Merge remote-tracking branch 'origin/master'
| | |
| | | <third-maintenance-approval-modal ref="thirdMaintenanceApprovalModal" :selectShenpiData="selectThirdMaintenanceData" |
| | | @searchReset="searchReset"></third-maintenance-approval-modal> |
| | | <equipment-seal-up-approval-modal ref="equipmentSealUpApprovalModelRef" @searchReset="searchReset" /> |
| | | <inbound-order-handle ref="inboundOrderApprovalModal" :selectInboundOrderData="selectInboundOrderData" |
| | | @searchReset="searchReset"></inbound-order-handle> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import EquipmentSealUpApprovalModal from '@views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue' |
| | | import stocktakingBoundHandle from '@views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue' |
| | | import lossBoundHandle from '@views/flowable/workflow/lossBound/lossBoundHandle.vue' |
| | | import InboundOrderHandle from '@views/flowable/workflow/inboundOrder/InboundOrderHandle.vue' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersList', |
| | |
| | | SecondMaintenanceApprovalModal, |
| | | ThirdMaintenanceApprovalModal, |
| | | OutBoundOrderHandle, |
| | | EquipmentSealUpApprovalModal |
| | | EquipmentSealUpApprovalModal, |
| | | InboundOrderHandle |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | selectOutBoundOrderData: {}, |
| | | selectLossBoundOrderData: {}, |
| | | selectStocktakingBoundOrderData: {}, |
| | | selectInboundOrderData:{}, |
| | | //ä¸å¡ä¿¡æ¯ID |
| | | dataId: undefined |
| | | } |
| | |
| | | break |
| | | case 'equipment_seal_up': |
| | | this.handleEquipmentSealUp(item) |
| | | break |
| | | case 'toolInStorageApproval': |
| | | this.handleToolInStorage(item) |
| | | break |
| | | default: |
| | | alert('没æ¾å°è¯¥æµç¨') |
| | |
| | | this.$refs.equipmentSealUpApprovalModelRef.title = item.name |
| | | this.$refs.equipmentSealUpApprovalModelRef.handleDetail(item) |
| | | this.$refs.equipmentSealUpApprovalModelRef.disableSubmit = false |
| | | } |
| | | }, |
| | | handleToolInStorage(item) { |
| | | if (item && item.dataId) { |
| | | this.selectInboundOrderData = Object.assign({}, item) |
| | | this.$refs.inboundOrderApprovalModal.auditVisible = true |
| | | this.$refs.inboundOrderApprovalModal.clearTableSource() |
| | | this.$refs.inboundOrderApprovalModal.getAllApproveData(item) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :footer="null" |
| | | @cancel="handCancel" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <b>{{ selectInboundOrderData.description }}</b> |
| | | <br> |
| | | <br> |
| | | <a-tag color="blue"> |
| | | å¤ç人 {{ selectInboundOrderData.assignee_dictText }} |
| | | </a-tag> |
| | | <a-tag color="blue"> |
| | | å建æ¶é´ {{ selectInboundOrderData.createTime }} |
| | | </a-tag> |
| | | <br> |
| | | <br> |
| | | <button @click="fetchAndShowBmp" class="btn-custom">æå¼æµç¨å¾</button> |
| | | <div v-if="imageSrc"> |
| | | <img :src="imageSrc" alt="Fetched Image" /> |
| | | </div> |
| | | <hr class="shallow-hr"> |
| | | </div> |
| | | <div> |
| | | <b>ç³è¯·å详æ
</b> |
| | | <br> |
| | | <a-form :form='form'> |
| | | <a-spin :spinning="spinning"> |
| | | <a-tabs default-active-key='1' @change='callback'> |
| | | <a-tab-pane key='1' tab='ç³è¯·ååºæ¬ä¿¡æ¯'> |
| | | <a-form-model ref='form' :model='tableRowRecord'> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='å
¥åºåç¼å·' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='inboundNum'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.inboundNum'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='å
¥åºç±»å' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='inStorehouseType'> |
| | | <j-dict-select-tag :disabled="coldisabled" type="list" v-model="tableRowRecord.inStorehouseType" dictCode="in_storehouse_type" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='å
¥åºæ¶é´' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='inboundTime'> |
| | | <j-date :disabled="coldisabled" v-model="tableRowRecord.inboundTime" :show-time="true" dateFormat="YYYY-MM-DD HH:mm" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='ç³è¯·åå ' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='applicationReason'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.applicationReason'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='ç»æäºº' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='handler'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.handler_dictText'></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='span'> |
| | | <a-form-model-item label='夿³¨' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> |
| | | <a-textarea :disabled="coldisabled" v-model="tableRowRecord.remark" rows="4" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='2' tab='ç³è¯·åæç»ä¿¡æ¯'> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:'max-content'}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="null"> |
| | | </a-table> |
| | | </a-tab-pane> |
| | | <a-tab-pane key='3' tab='æµç¨èç¹'> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> |
| | | <div> |
| | | <h3 style="font-weight: bold;">{{item.taskName}}</h3> |
| | | <div>å¤ç人ï¼{{item.assignee_dictText}}</div> |
| | | <div v-if="index !==0">å¤çæ¶é¿ï¼{{item.duration}}</div> |
| | | <div v-if="item.name !== 'æäº¤ç³è¯·'">å¤çç±»åï¼{{item.sequenceFlowName}}</div> |
| | | <div v-if="item.description">å¤çæè§ï¼{{item.description}}</div> |
| | | </div> |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | </a-form> |
| | | </div> |
| | | <div v-if="auditVisible"> |
| | | <hr class="shallow-hr"> |
| | | <br> |
| | | <b>审æ¹è¯¦æ
</b> |
| | | <br> |
| | | <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col ::span='span'> |
| | | <a-form-model-item label="ç³è¯·äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='handler_dictText'> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.handler_dictText'></a-input> |
| | | </a-form-model-item > |
| | | </a-col> |
| | | <a-col ::span='span'> |
| | | <a-form-model-item label="ç³è¯·æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime"> |
| | | <a-input :disabled='coldisabled' v-model='tableRowRecord.createTime'></a-input> |
| | | </a-form-model-item > |
| | | </a-col> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-item label="审æ¹ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select v-model='assignFileStream.status' placeholder="è¯·éæ©å®¡æ¹ç»æ"> |
| | | <a-select-option value="3">éè¿</a-select-option> |
| | | <a-select-option value="4">驳å</a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24" class="btxx"> |
| | | <a-form-model-item label="å®¡æ¹æè§" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea v-model="assignFileStream.approvalOpinion" rows="4" placeholder="请è¾å
¥å®¡æ¹æè§"/> |
| | | </a-form-model-item > |
| | | </a-col> |
| | | </a-row> |
| | | <div class="table-operator" style="text-align: right;"> |
| | | <a-button @click="handleQueXiaoTask" type="primary" icon="close">åæ¶</a-button> |
| | | <a-button @click="submitForm">æ 交</a-button> |
| | | </div> |
| | | </a-form-model> |
| | | </div> |
| | | </a-card> |
| | | |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' |
| | | export default { |
| | | name: 'FlowShenPi', |
| | | mixins: [mixinDevice], |
| | | props: { |
| | | selectInboundOrderData: { |
| | | type: Object, |
| | | required: true |
| | | } |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | span: 12, |
| | | span1: 8, |
| | | coldisabled: true, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | assignFileStream:{}, |
| | | tableDataSource: [], |
| | | usageDataSource: [], |
| | | hitaskDataSource:[], |
| | | dataSource: [], |
| | | bomForm: {}, |
| | | imageSrc: null, |
| | | drawerVisible: true, |
| | | auditVisible: true, |
| | | loading: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 30 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'toolCode' |
| | | }, |
| | | { |
| | | title:'å·¥å
፱Ȍ', |
| | | align:"center", |
| | | dataIndex: 'applicationType' |
| | | }, |
| | | { |
| | | title:'䏿åç§°', |
| | | align:"center", |
| | | dataIndex: 'chineseName' |
| | | }, |
| | | { |
| | | title:'åå·/å¾å·', |
| | | align:"center", |
| | | dataIndex: 'toolModel' |
| | | }, |
| | | { |
| | | title:'ç³è¯·å
¥åºæ°é', |
| | | align:"center", |
| | | dataIndex: 'inStorageQuantity' |
| | | }, |
| | | ], |
| | | validatorRules: { |
| | | status: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©å®¡æ¹ç¶æ!'}, |
| | | ] |
| | | }, |
| | | }, |
| | | approveData: {}, |
| | | flowData: {}, |
| | | title: '审æ¹é¡µé¢', |
| | | width: 1200, |
| | | visible: false, |
| | | // 表头 |
| | | url: { |
| | | queryInboundOrder: '/tms/inboundOrder/list', |
| | | queryInboundDetailList: 'tms/inboundDetail/list', |
| | | diagramView: '/assign/flow/diagramView', |
| | | queryHisTaskList:'/assign/flow/queryHisTaskList', |
| | | approve:"/tms/inboundOrder/approval", |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | workflowSource: [] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | callback() { |
| | | }, |
| | | handCancel() { |
| | | this.visible = false |
| | | }, |
| | | clearTableSource() { |
| | | this.tableDataSource = [] |
| | | this.usageDataSource = [] |
| | | }, |
| | | fetchAndShowBmp() { |
| | | try { |
| | | let parm = { |
| | | processDefinitionId: this.flowData.processDefinitionId, |
| | | processInstanceId:this.flowData.processInstanceId, |
| | | TaskDefinitionKey:this.flowData.processDefinitionKey |
| | | } |
| | | downFile(this.url.diagramView,parm,'get').then((res=>{ |
| | | const urlObject = window.URL.createObjectURL(new Blob([res])) |
| | | this.imageSrc = urlObject |
| | | })) |
| | | } catch (error) { |
| | | console.error('Error fetching image blob:', error) |
| | | alert('æ æ³å è½½å¾çï¼è¯·ç¨ååè¯ã') |
| | | } |
| | | }, |
| | | handleQueXiaoTask(){ |
| | | this.visible = false |
| | | this.routeReload() |
| | | }, |
| | | submitForm () { |
| | | const that = this; |
| | | if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ |
| | | this.$message.warning('è¯·éæ©å®¡æ¹ç¶æï¼') |
| | | return false; |
| | | } |
| | | if (!that.assignFileStream.approvalOpinion==null || that.assignFileStream.approvalOpinion===undefined) { |
| | | this.$message.warning('请è¾å
¥å®¡æ¹æè§ï¼') |
| | | return false; |
| | | } |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let url=this.url.approve |
| | | let method = 'post'; |
| | | let flowTaskVo = {} |
| | | flowTaskVo.status=that.assignFileStream.status; |
| | | flowTaskVo.approvalOpinion =that.assignFileStream.approvalOpinion; |
| | | flowTaskVo.comment =that.assignFileStream.approvalOpinion; |
| | | flowTaskVo.dataId = this.selectInboundOrderData.dataId |
| | | flowTaskVo.taskId = this.selectInboundOrderData.id |
| | | flowTaskVo.userId = this.selectInboundOrderData.assignee |
| | | flowTaskVo.instanceId = this.selectInboundOrderData.procInstId |
| | | flowTaskVo.targetKey = this.selectInboundOrderData.taskDefKey |
| | | flowTaskVo.values = this.selectInboundOrderData.variables |
| | | flowTaskVo.assignee = this.selectInboundOrderData.assignee |
| | | console.log("表åæäº¤æ°æ®",flowTaskVo) |
| | | httpAction(url,flowTaskVo,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.visible = false |
| | | //å·æ°è¡¨æ ¼ |
| | | that.$emit('searchReset') |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | getAllApproveData(item) { |
| | | this.visible = true |
| | | this.loading = true |
| | | this.flowData = item |
| | | getAction(this.url.queryHisTaskList, {procInstId: item.procInstId}).then(res=>{ |
| | | if(res.success){ |
| | | this.hitaskDataSource = res.result |
| | | } |
| | | }) |
| | | getAction(this.url.queryInboundOrder, {id: item.dataId}).then((res => { |
| | | if (res.success) { |
| | | this.tableRowRecord = res.result.records[0] |
| | | } |
| | | })) |
| | | getAction(this.url.queryInboundDetailList, {inboundOrderId: item.dataId}).then(res => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .shallow-hr { |
| | | border: 0; |
| | | height: 1px; /* åç线çé«åº¦ */ |
| | | background-color: rgba(0, 0, 0, 0.1); /* ä½¿ç¨ RGBA é¢è²ï¼å¹¶è®¾ç½®è¾ä½çéæåº¦ */ |
| | | margin: 20px 0; /* åç线ä¸ä¸çå¤è¾¹è· */ |
| | | } |
| | | .btn-custom { |
| | | background-color: #4CAF50; /* 绿è²èæ¯ */ |
| | | color: white; /* ç½è²æå */ |
| | | border: none; /* æ è¾¹æ¡ */ |
| | | padding: 5px 15px; /* å
è¾¹è· */ |
| | | text-align: center; /* æåå±
ä¸ */ |
| | | text-decoration: none; /* æ ä¸å线 */ |
| | | display: inline-block; /* è¡å
åå
ç´ */ |
| | | font-size: 12px; /* åä½å¤§å° */ |
| | | margin: 4px 2px; /* å¤è¾¹è· */ |
| | | cursor: pointer; /* é¼ æ æ¬åæ¶æ¾ç¤ºæå */ |
| | | border-radius: 4px; /* åè§è¾¹æ¡ */ |
| | | } |
| | | |
| | | .bold-large-label { |
| | | font-weight: bold; |
| | | font-size: 20px; /* æä½ éè¦çä»»ä½å¤§å° */ |
| | | } |
| | | .left_qiu{ |
| | | position: absolute; |
| | | left: -74px; |
| | | top: 0; |
| | | width:54px; |
| | | border-radius: 50%; |
| | | height:54px; |
| | | font-size: 13px; |
| | | margin: auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #0099ff; |
| | | transform: translate(0, 0); |
| | | } |
| | | /deep/ .ant-timeline-item-tail{ |
| | | left: -29px !important; |
| | | } |
| | | .left_qiu span{ |
| | | width: 3em; |
| | | display: block; |
| | | color: #fff; |
| | | text-align: center; |
| | | } |
| | | .img{ |
| | | width: 75%; |
| | | } |
| | | |
| | | .wrap{ |
| | | clear: both; |
| | | width: 100%; |
| | | display: flex; |
| | | height: 50px; |
| | | border: 1px solid #ccc; |
| | | /* background-color: aqua; */ |
| | | } |
| | | .box{ |
| | | width:21%; |
| | | height:50px; |
| | | border-right: 1px solid #ccc; |
| | | line-height: 50px; |
| | | /* background: red; */ |
| | | text-align:center; |
| | | margin: auto; |
| | | } |
| | | |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="å
¥åºç³è¯·åç¼å·"> |
| | | <a-input placeholder="请è¾å
¥å
¥åºç³è¯·åç¼å·" v-model="queryParam.inboundNum" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="å
¥åºç±»å"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©å
¥åºç±»å" |
| | | v-model="queryParam.inStorehouseType" |
| | | dict="in_storehouse_type" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="ç»æäºº"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©ç»æäºº" |
| | | v-model="queryParam.handler" |
| | | dict="sys_user,realname,id,del_flag!=1" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :customRow="customRow" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a href="javascript:;" @click="handleEdit(record)" v-if="record.orderStatus == '1'">ç¼è¾</a> |
| | | <a-divider type="vertical" v-if="record.orderStatus == '1'" /> |
| | | <a href="javascript:;" @click="handleDetail(record)">详æ
</a> |
| | | <a-divider type="vertical" v-if="record.orderStatus == '1'"/> |
| | | <a href="javascript:;" @click="handleSubmit(record)" v-if="record.orderStatus == '1'">æäº¤</a> |
| | | </span> |
| | | </a-table> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="å·¥å
·å
¥åºæç»" key="1"> |
| | | <inbound-detail-list ref="inboundDetailList"></inbound-detail-list> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <!-- tableåºå-end --> |
| | | <inbound-order-model ref="modalForm" @ok="modalFormOk"></inbound-order-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import InboundOrderModel from './modules/inbound/InboundOrderModel' |
| | | import InboundDetailList from './modules/inbound/InboundDetailList' |
| | | import { requestPut } from '@/api/manage' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
| | | import { postAction,getAction } from '../../api/manage' |
| | | |
| | | export default { |
| | | name: 'InboundOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | InboundOrderModel, |
| | | InboundDetailList, |
| | | JDictSelectTag, |
| | | JSearchSelectTag, |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å
¥åºç³è¯·å', |
| | | url: { |
| | | list: '/tms/inboundOrder/list', |
| | | toolingStorageStatus: '/tooling/storage/toolingStorageStatus', |
| | | importExcelUrl: 'tooling/storage/importExcel', |
| | | exportXlsUrl: '/tooling/storage/exportXls', |
| | | takeBack: '/tooling/storage/takeBack', |
| | | edit:'/tms/inboundOrder/edit', |
| | | submit:'/tms/inboundOrder/submit' |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'å
¥åºç³è¯·åç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'inboundNum', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å
¥åºåç±»å', |
| | | align: 'center', |
| | | dataIndex: 'inStorehouseType_dictText', |
| | | }, |
| | | { |
| | | title: 'ç»æäºº', |
| | | align: 'center', |
| | | dataIndex: 'handler_dictText', |
| | | }, |
| | | { |
| | | title: 'ç³è¯·åå ', |
| | | align: 'center', |
| | | dataIndex: 'applicationReason', |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'inboundTime', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸äºº', |
| | | align: 'center', |
| | | dataIndex: 'reviewer_dictText', |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'approvalDate', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'orderStatus_dictText', |
| | | }, |
| | | { |
| | | title: 'åç¨åå·', |
| | | align: 'center', |
| | | dataIndex: 'borrowNum', |
| | | }, |
| | | { |
| | | title: 'å®¡æ¹æè§', |
| | | align: 'center', |
| | | dataIndex: 'approvalOpinion', |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | computed: { |
| | | /* 导å
¥è·¯å¾é¡µé¢éæ°è®¡ç® */ |
| | | importExcelUrl: function () { |
| | | // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;//å¼åç¯å¢æå |
| | | return `${window._CONFIG['hxFileURL']}/${this.url.importExcelUrl}` |
| | | }, |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.$refs.inboundDetailList.dataSource = [] |
| | | this.loadData(1); |
| | | }, |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | //å°å½åéä¸çè®°å½ä¼ å°åé¡µé¢ |
| | | this.$bus.$emit('getToolingStorageData', record) |
| | | //ç¹å»å½åè¡åè² |
| | | let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | if (oldList) { |
| | | for (let j = 0; j < oldList.length; j++) { |
| | | oldList[j].classList.remove('checked-td-of-add-table') |
| | | } |
| | | } |
| | | let children = e.target.parentNode.children |
| | | for (let i = 0; i < children.length; i++) { |
| | | children[i].classList.add('checked-td-of-add-table') |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | handleAdd() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | handleSubmit(record) { |
| | | let that = this; |
| | | getAction(that.url.submit, { id:record.id}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | /deep/ .notshow { |
| | | display: none; |
| | | } |
| | | /deep/ .checked-td-of-add-table { |
| | | background-color: rgba(220, 220, 220, 1); |
| | | } |
| | | </style> |
| | |
| | | >åæ¶</a> |
| | | </div> |
| | | </a-alert> |
| | | <div class="drawer-bootom-button"> |
| | | <!-- <div class="drawer-bootom-button"> |
| | | <a-dropdown |
| | | :trigger="['click']" |
| | | placement="bottomCenter" |
| | |
| | | <a-icon type="bars" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <a-input-search |
| | | @search="handleSearch" |
| | |
| | | <!-- showLine --> |
| | | <a-tree |
| | | :checkStrictly="checkStrictly" |
| | | :expandedKeys.sync="expandedKeys" |
| | | |
| | | :selectedKeys="selectedKeys" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="treeDataSource" |
| | | :autoExpandParent="autoExpandParent" |
| | | |
| | | :defaultExpandAll="true" |
| | | @select="onSelect" |
| | | @expand="onExpand" |
| | | > |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | class="card-area" |
| | | > |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { requestPut } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'InboundDetailList', |
| | | mixins: [JeecgListMixin], |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | url: { |
| | | list: '/tms/inboundDetail/list', |
| | | }, |
| | | queryParam: {}, |
| | | nodeType: 0, |
| | | dataSource: [], |
| | | disableMixinCreated:true, |
| | | columns: [ |
| | | { |
| | | title: 'å·¥å
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'toolCode', |
| | | width: '10%', |
| | | key: 'toolCode' |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | dataIndex: 'chineseName', |
| | | align: 'center', |
| | | key: 'toolName' |
| | | }, |
| | | { |
| | | title: 'åå·/å¾å·', |
| | | dataIndex: 'toolModel', |
| | | align: 'center', |
| | | key: 'toolModel' |
| | | }, |
| | | |
| | | { |
| | | title: 'å·¥å
·åç±»', |
| | | dataIndex: 'applicationType', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ°é', |
| | | dataIndex: 'inStorageQuantity', |
| | | align: 'center', |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('getToolingStorageData', (data) => { |
| | | this.queryParam.inboundOrderId = data.id; |
| | | this.searchQuery(); |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :visible="visible" |
| | | :fullScreen="true" |
| | | :width="1200" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºç³è¯·åç¼å·"> |
| | | <a-input :disabled="true" placeholder="ç³»ç»èªå¨çæ" v-decorator="['inboundNum', validatorRules.inboundNum]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºç±»å"> |
| | | <j-dict-select-tag |
| | | :disabled="disableSubmit" |
| | | type="list" |
| | | v-decorator="['inStorehouseType', validatorRules.inStorehouseType]" |
| | | :triggerChange="true" |
| | | dictCode="in_storehouse_type" |
| | | placeholder="è¯·éæ©å
¥åºç±»å" |
| | | @change="handleTypeChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºæ¶é´"> |
| | | <a-date-picker |
| | | @change="onChange" |
| | | :disabled="disableSubmit" |
| | | style="width: 100%" |
| | | v-decorator="['inboundTime', validatorRules.inboundTime]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="ç³è¯·åå " :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请è¾å
¥ç³è¯·åå " :disabled="disableSubmit" v-decorator="['applicationReason', validatorRules.applicationReason]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="ç»æäºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-search-select-tag |
| | | :disabled="true" |
| | | v-if="!barcodeCurrentType" |
| | | placeholder="è¯·éæ©ç»æäºº" |
| | | v-decorator="['handler', { rules: [{ required: false, message: 'è¯·éæ©ç»æäºº' }] }]" |
| | | dict="sys_user,realname,id,del_flag=0" |
| | | @change="selectCurrentUserChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="å®¡æ ¸äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-search-select-tag |
| | | :disabled="true" |
| | | placeholder="è¯·éæ©å®¡æ ¸äºº" |
| | | v-decorator="['reviewer', validatorRules.reviewer]" |
| | | dict="sys_user,realname,id,del_flag=0" |
| | | @change="selectCurrentUserChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | |
| | | <a-row style="width: 100%"> |
| | | |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å®¡æ ¸æ¶é´"> |
| | | <a-date-picker |
| | | @change="onChange" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | v-decorator="['approvalDate', validatorRules.approvalDate]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="å®¡æ ¸æè§" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请è¾å
¥å®¡æ ¸æè§" :disabled="true" v-decorator="['approvalOpinion', validatorRules.approvalOpinion]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24"> |
| | | <a-form-item :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }" label="夿³¨"> |
| | | <a-textarea |
| | | :disabled="disableSubmit" |
| | | :rows="2" |
| | | placeholder="..." |
| | | v-decorator="['remark', validatorRules.remark]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectReturnList()" v-show="returnShow && !disableSubmit">éæ©åç¨åºåºå</a-button> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTooling()" v-show="toolingShow && !disableSubmit">鿩工å
·</a-button> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectSharpenList()" v-show="sharpenShow && !disableSubmit">éæ©å磨åºåºå</a-button> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> |
| | | <div :key="col.dataIndex"> |
| | | <a-input-number |
| | | v-if="col.dataIndex == 'inStorageQuantity'" |
| | | :disabled="quantityDisable" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :min="1" |
| | | /> |
| | | </div> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record, index"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record, index)" :disabled="disableSubmit"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | <template slot="footer" v-if="disableSubmit == false"> |
| | | <a-button :style="{ marginRight: '8px' }" @click="handleCancel">å
³é</a-button> |
| | | <a-button @click="handleOk" :disabled="isDisabled" type="primary">ç¡®å®</a-button> |
| | | </template> |
| | | |
| | | <template slot="footer" v-if="disableSubmit == true"> |
| | | <a-button :style="{ marginRight: '8px' }" @click="handleCancel">å
³é</a-button> |
| | | </template> |
| | | <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk"></j-select-tooling-modal> |
| | | <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk"></j-select-return-list-modal> |
| | | <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk"></j-select-sharpen-list-modal> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import JSelectToolingModal from './JSelectToolingModal' |
| | | import { ajaxGetDictItems } from '@/api/api' |
| | | import moment from 'moment' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import { filterObj } from '@/utils/util' |
| | | import JSelectReturnListModal from './JSelectReturnListModal' |
| | | import JSelectSharpenListModal from './JSelectSharpenListModal' |
| | | |
| | | export default { |
| | | name: 'InboundOrderModel', |
| | | components: { |
| | | JSelectToolingModal, |
| | | JMultiSelectTag, |
| | | JDictSelectTag, |
| | | JSelectReturnListModal, |
| | | JSearchSelectTag, |
| | | JSelectSharpenListModal, |
| | | }, |
| | | data() { |
| | | return { |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | isDisabled: false, |
| | | selectedRowKeys: {}, |
| | | state: { |
| | | show: false, |
| | | maintenanceValue: 1, |
| | | checkValue: 1, |
| | | maintenanceState: false, |
| | | checkState: false, |
| | | }, |
| | | inboundDate: '', |
| | | applicationDate: '', |
| | | supplierShow: false, |
| | | disableSubmit: false, |
| | | numDisable:false, |
| | | quantityDisable:false, |
| | | onlyCodeDisable:true, |
| | | returnShow:false, |
| | | toolingShow:false, |
| | | sharpenShow:false, |
| | | addDisable:false, |
| | | toolinngOptions:[], |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | loading: false, |
| | | form: this.$form.createForm(this), |
| | | dataSource: [], |
| | | toolingTreeData:[], |
| | | warehouseOptions:[], |
| | | locationOptions:[], |
| | | allToolingList:[], |
| | | param: {}, |
| | | barcodeCurrentType: false, |
| | | inboundOrderId:'', |
| | | validatorRules: { |
| | | type: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å
¥åºç±»å!', |
| | | }, |
| | | ], |
| | | }, |
| | | inboundDate: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç³è¯·å
¥åºæ¥æ!', |
| | | }, |
| | | ], |
| | | }, |
| | | applicant: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç³è¯·äºº!', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | url: { |
| | | add: '/tms/inboundOrder/add', |
| | | edit: '/tms/inboundOrder/edit', |
| | | queryByUserName: '/sys/user/queryByUserName', |
| | | toolingList:'/tms/baseTools/list', |
| | | queryAccountList:'/tooling/storage/queryAccountList', |
| | | querySharpenList:'/sharpen/sharpenDetail/querySharpenList', |
| | | queryReturnList:'/returnInventory/queryReturnList', |
| | | detailList:'/tms/inboundDetail/list', |
| | | }, |
| | | toolingOptions:[], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'toolCode', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å·¥å
፱Ȍ', |
| | | align: 'center', |
| | | dataIndex: 'applicationType' |
| | | }, |
| | | { |
| | | title: '䏿åç§°', |
| | | align: 'center', |
| | | dataIndex: 'chineseName', |
| | | }, |
| | | { |
| | | title: 'åå·/å¾å·', |
| | | align: 'center', |
| | | dataIndex: 'toolModel' |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ°é', |
| | | align: 'center', |
| | | dataIndex: 'inStorageQuantity', |
| | | scopedSlots: { customRender: 'inStorageQuantity' }, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | modalFormOk() { |
| | | }, |
| | | getQueryParams() { |
| | | this.param.pageNo = this.ipagination.current |
| | | this.param.pageSize = this.ipagination.pageSize |
| | | return filterObj(this.param) |
| | | }, |
| | | add() { |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | let that = this |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.isDisabled = false |
| | | this.disableSubmit = false |
| | | if (record.id) { |
| | | if(record.inStorehouseType == "1"){ |
| | | this.toolingShow = true |
| | | }else if(record.inStorehouseType == "2"){ |
| | | this.returnShow = true |
| | | }else if(record.inStorehouseType == "5"){ |
| | | this.sharpenShow = true |
| | | } |
| | | this.inboundOrderId = record.id |
| | | this.detailList(this.inboundOrderId) |
| | | } |
| | | this.initOptions() |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'inboundNum', 'inStorehouseType', 'inboundTime', 'applicationReason', 'handler','approvalDate','reviewer','approvalOpinion','remark') |
| | | ) |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | //let t = (this.ipaginationm.current - 1) * this.ipaginationm.pageSize + index |
| | | const temp = [...this.dataSource] |
| | | const target = temp.filter(item => key === item.key)[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.dataSource = [] |
| | | this.visible = false |
| | | this.supplierShow = false, |
| | | this.disableSubmit = false, |
| | | this.numDisable = false, |
| | | this.quantityDisable = false, |
| | | this.onlyCodeDisable = true, |
| | | this.returnShow = false, |
| | | this.toolingShow = false, |
| | | this.sharpenShow = false, |
| | | this.addDisable = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | this.ipagination = pagination |
| | | this.detailList(this.inboundOrderId); |
| | | }, |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.detailData = this.dataSource |
| | | let http = '' |
| | | if(this.model.id){ |
| | | http = this.url.edit |
| | | }else{ |
| | | http = this.url.add |
| | | } |
| | | postAction(http, formData) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok', new Date()) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | //鿩工å
· |
| | | selectTooling: function () { |
| | | let ids = [] |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].toolCodeId) |
| | | } |
| | | this.$refs.toolingModalForm.showModal(ids) |
| | | this.$refs.toolingModalForm.title = '鿩工å
·' |
| | | this.$refs.toolingModalForm.disableSubmit = false |
| | | }, |
| | | //éæ©å½è¿å·¥å
· |
| | | selectReturnList: function () { |
| | | let ids = [] |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].id) |
| | | } |
| | | this.$refs.returnModalForm.showModal(ids) |
| | | this.$refs.returnModalForm.title = 'éæ©å½è¿å·¥å
·' |
| | | this.$refs.returnModalForm.disableSubmit = false |
| | | }, |
| | | //éæ©å磨工å
· |
| | | selectSharpenList: function () { |
| | | let ids = [] |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].id) |
| | | } |
| | | this.$refs.sharpenModalForm.showModal(ids) |
| | | this.$refs.sharpenModalForm.title = 'éæ©å磨工å
·' |
| | | this.$refs.sharpenModalForm.disableSubmit = false |
| | | }, |
| | | handleDelete(record, index) { |
| | | this.dataSource.splice(index, 1) |
| | | }, |
| | | onChange() {}, |
| | | //æ§å¶æ«ç ææé |
| | | selectCurrentUserType(e) { |
| | | if (e == '0') { |
| | | this.barcodeCurrentType = true |
| | | } else { |
| | | this.barcodeCurrentType = false |
| | | } |
| | | }, |
| | | //æé人åå¼ |
| | | selectCurrentUserChange(e) { |
| | | console.log('å½åæé', e) |
| | | // this.form.setFieldsValue({ |
| | | // // userName: e, |
| | | // userNameId: e, |
| | | // }) |
| | | }, |
| | | //å
¥åºç±»å |
| | | handleTypeChange(value) { |
| | | this.dataSource = [] |
| | | if(value == 1){ |
| | | this.toolingShow = true |
| | | this.quantityDisable = false |
| | | this.addDisable = true |
| | | this.numDisable = false |
| | | }else{ |
| | | this.toolingShow = false |
| | | } |
| | | if(value == 2){ |
| | | this.numDisable = true |
| | | this.addDisable = false |
| | | this.returnShow = true |
| | | this.quantityDisable = true |
| | | }else{ |
| | | this.returnShow = false |
| | | } |
| | | if (value == 5) { |
| | | this.numDisable = true |
| | | this.addDisable = false |
| | | this.sharpenShow = true |
| | | this.quantityDisable = true |
| | | } else { |
| | | this.sharpenShow = false |
| | | } |
| | | |
| | | }, |
| | | //æ·»å å·¥å
·æé® |
| | | addTooling() { |
| | | const temp = [...this.dataSource]; |
| | | temp.push({ indexId: temp.length + 1 }); |
| | | this.dataSource = temp; |
| | | }, |
| | | detailList(inboundOrderId) { |
| | | this.param.inboundOrderId = inboundOrderId |
| | | getAction(this.url.detailList, this.getQueryParams()).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | }) |
| | | }, |
| | | initOptions() { |
| | | |
| | | ajaxGetDictItems("mes_base_warehouse,name,id,del_flag!='1' order by num asc", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | } |
| | | } |
| | | this.warehouseOptions = res.result; |
| | | } |
| | | }) |
| | | ajaxGetDictItems("mes_base_storage_area,name,id,del_flag!='1'", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | } |
| | | } |
| | | this.locationOptions = res.result; |
| | | } |
| | | }) |
| | | ajaxGetDictItems("mes_base_tooling,num,id,del_flag!='1'", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | res.result[i].toolingName = res.result[i].name |
| | | } |
| | | } |
| | | this.toolingOptions = res.result; |
| | | } |
| | | }) |
| | | }, |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| | | ); |
| | | }, |
| | | }, |
| | | watch: {}, |
| | | mounted() { |
| | | this.$bus.$on('selectionRows', (data) => { |
| | | //getCurrSelected äºä»¶ æ¥æ¶ç»ä»¶ä¼ éçåæ° |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.dataSource.push({ |
| | | toolCodeId:data[i].id, |
| | | toolingId: data[i].toolingId || data[i].id, |
| | | toolCode: data[i].toolCode, |
| | | chineseName: data[i].chineseName, |
| | | toolModel: data[i].toolModel, |
| | | applicationType: data[i].applicationTypeName, |
| | | unitName: data[i].unitName || data[i].unitId_dictText, |
| | | onlyCode:data[i].onlyCode, |
| | | noAccountQuantity:data[i].noAccountQuantity, |
| | | inStorageQuantity:data[i].storageQuantity |
| | | }) |
| | | } |
| | | //this.ipaginationm.total = this.dataSource.length |
| | | }) |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="less" scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | |
| | | /deep/ .notshow { |
| | | display: none; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <j-modal |
| | | :visible="visible" |
| | | :title="title" |
| | | switchFullscreen |
| | | :width="1200" |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top: 50px" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥å
·ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥å·¥å
·ç¼ç ,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.num"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥å
·åç§°"> |
| | | <a-input placeholder="请è¾å
¥å·¥å
·åç§°,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.name"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="è§æ ¼åå·"> |
| | | <a-input placeholder="请è¾å
¥è§æ ¼åå·,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.model"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!--颿åå表--> |
| | | <a-table |
| | | ref="table" |
| | | :scroll="scrollTrigger" |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'JSelectToolingModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'toolingNum', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'toolingName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å¯ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'onlyCode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ°é', |
| | | align: 'center', |
| | | dataIndex: 'inStorageQuantity', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç±»', |
| | | align: 'center', |
| | | dataIndex: 'toolingCategoryName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'è§æ ¼åå·', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | align: 'center', |
| | | dataIndex: 'unitName', |
| | | sorter: true, |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSlelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'æ ¹æ®æ¥è¯¢ç»æéæ©å·¥å
·', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'desc', |
| | | }, |
| | | departTree: [], |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | // list: '/base/tooling/list', |
| | | list: '/returnInventory/queryReturnList', |
| | | queryKnifeBom:'/toolingStorage/mesToolingOutbounds/queryKnifeBom' |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: (record) => ({ |
| | | props: { |
| | | disabled: record.distable, |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | } |
| | | }, |
| | | }, |
| | | watch: {}, |
| | | created() {}, |
| | | methods: { |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].toolingId) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | showModal(oldSlelectRows) { |
| | | this.oldSlelectRows = oldSlelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | if (this.selectionRows.length > 0) { |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | params['onlyCode'] = this.selectionRows[0].onlyCode; |
| | | getAction(this.url.queryKnifeBom, params).then((res) => { |
| | | if (res.success) { |
| | | this.prepareKnifeDetailList = res.result |
| | | this.$bus.$emit('selectionRows', this.prepareKnifeDetailList) |
| | | } |
| | | |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | |
| | | }) |
| | | this.searchReset(0) |
| | | this.close() |
| | | } else { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®') |
| | | } |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | onSearch() { |
| | | this.loadData(1) |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <j-modal |
| | | :visible="visible" |
| | | :title="title" |
| | | switchFullscreen |
| | | :width="1200" |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top: 50px" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥å
·ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥å·¥å
·ç¼ç ,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.num"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥å
·åç§°"> |
| | | <a-input placeholder="请è¾å
¥å·¥å
·åç§°,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.name"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="è§æ ¼åå·"> |
| | | <a-input placeholder="请è¾å
¥è§æ ¼åå·,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.model"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!--颿åå表--> |
| | | <a-table |
| | | ref="table" |
| | | :scroll="scrollTrigger" |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'JSelectToolingModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'toolingNum', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'toolingName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å¯ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'onlyCode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ°é', |
| | | align: 'center', |
| | | dataIndex: 'inStorageQuantity', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç±»', |
| | | align: 'center', |
| | | dataIndex: 'toolingCategoryName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'è§æ ¼åå·', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | align: 'center', |
| | | dataIndex: 'unitName', |
| | | sorter: true, |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSlelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'æ ¹æ®æ¥è¯¢ç»æéæ©å·¥å
·', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'desc', |
| | | }, |
| | | departTree: [], |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | // list: '/base/tooling/list', |
| | | list: '/sharpen/sharpenDetail/querySharpenList', |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: (record) => ({ |
| | | props: { |
| | | disabled: record.distable, |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | } |
| | | }, |
| | | }, |
| | | watch: {}, |
| | | created() {}, |
| | | methods: { |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | params["sharpenStatus"] = 1 |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].toolingId) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | showModal(oldSlelectRows) { |
| | | this.oldSlelectRows = oldSlelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | this.$bus.$emit('selectionRows', this.selectionRows) |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | onSearch() { |
| | | this.loadData(1) |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <j-modal |
| | | :visible="visible" |
| | | :title="title" |
| | | switchFullscreen |
| | | :width="1200" |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top: 50px" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥å
·ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥å·¥å
·ç¼ç ,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.toolCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="䏿åç§°"> |
| | | <a-input placeholder="请è¾å
¥ä¸æåç§°,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.chineseName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åå·/å¾å·"> |
| | | <a-input placeholder="请è¾å
¥è§æ ¼åå·,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.toolModel"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!--å·¥å
·å表--> |
| | | <a-table |
| | | ref="table" |
| | | :scroll="scrollTrigger" |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'JSelectToolingModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'toolCode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'chineseName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
፱Ȍ', |
| | | align: 'center', |
| | | dataIndex: 'applicationTypeName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'åå·/å¾å·', |
| | | align: 'center', |
| | | dataIndex: 'toolModel', |
| | | sorter: true, |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSlelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'æ ¹æ®æ¥è¯¢ç»æéæ©å·¥å
·', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter: { |
| | | column: 'toolCode', |
| | | order: 'desc', |
| | | }, |
| | | departTree: [], |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | // list: '/base/tooling/list', |
| | | list: '/tms/baseTools/paraCommonToolList', |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: (record) => ({ |
| | | props: { |
| | | disabled: record.distable, |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | } |
| | | }, |
| | | }, |
| | | watch: {}, |
| | | created() {}, |
| | | methods: { |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | showModal(oldSlelectRows) { |
| | | this.oldSlelectRows = oldSlelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | this.$bus.$emit('selectionRows', this.selectionRows) |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | onSearch() { |
| | | this.loadData(1) |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |