From 1b8b8bafca4fe4c3556bda5e66e3ff6252bd7acc Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期一, 16 六月 2025 14:27:32 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/tms/modules/outBound/OutboundOrderModal.vue | 147 +++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 131 insertions(+), 16 deletions(-) diff --git a/src/views/tms/modules/outBound/OutboundOrderModal.vue b/src/views/tms/modules/outBound/OutboundOrderModal.vue index fc2e217..8171597 100644 --- a/src/views/tms/modules/outBound/OutboundOrderModal.vue +++ b/src/views/tms/modules/outBound/OutboundOrderModal.vue @@ -18,7 +18,7 @@ </a-col> <a-col :span="12"> <a-form-model-item label="鍑哄簱绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outStorehouseType"> - <j-dict-select-tag :disabled="disableSubmit" @change="handleTypeChange" type="list" v-model="model.outStorehouseType" dictCode="out_storehouse_type" placeholder="璇烽�夋嫨鍑哄簱绫诲瀷" /> + <j-dict-select-tag :disabled="disableSubmit || addShow" @change="handleTypeChange" type="list" v-model="model.outStorehouseType" dictCode="out_storehouse_type" placeholder="璇烽�夋嫨鍑哄簱绫诲瀷"/> </a-form-model-item> </a-col> </a-row> @@ -36,8 +36,56 @@ </a-row> <a-row> <a-col :span="12"> + <a-form-model-item label="闆朵欢鍥惧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partDrawingNo"> + <a-input :disabled="disableSubmit" v-model="model.partDrawingNo" placeholder="璇疯緭鍏ラ浂浠跺浘鍙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partName"> + <a-input :disabled="disableSubmit" v-model="model.partName" placeholder="璇疯緭鍏ラ浂浠跺悕绉�" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input :disabled="disableSubmit" v-model="model.partMaterial" placeholder="璇疯緭鍏ラ浂浠舵潗鏂�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="宸ュ簭锛堝伐姝ュ彿锛�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionProcessesNo"> + <a-input :disabled="disableSubmit" v-model="model.productionProcessesNo" placeholder="璇疯緭鍏ュ伐搴忥紙宸ユ鍙凤級" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍔犲伐鎵规" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchCode"> + <a-input :disabled="disableSubmit" v-model="model.batchCode" placeholder="璇疯緭鍏ュ姞宸ユ壒娆�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍔犲伐鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machiningCount"> + <a-input-number :disabled="disableSubmit" v-model="model.machiningCount" placeholder="璇疯緭鍏ュ姞宸ユ暟閲�" :min="1" style="width: 100%"></a-input-number> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍔犲伐璁惧" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentCode"> + <a-input :disabled="disableSubmit" v-model="model.equipmentCode" placeholder="璇疯緭鍏ュ姞宸ヨ澶�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="绋嬪簭鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ncName"> + <a-input :disabled="disableSubmit" v-model="model.ncName" placeholder="璇疯緭鍏ョ▼搴忓悕" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> <a-form-model-item label="瀹℃牳浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reviewer"> - <j-select-user-by-dep :disabled="disableSubmit" v-model="model.reviewer" :store="'id'" :text="'realname'" :multi="false" /> + <j-select-user-by-dep :disabled="disableSubmit" v-model="model.reviewer" :store="'username'" :text="'realname'" :multi="false" /> </a-form-model-item> </a-col> <a-col :span="12"> @@ -54,7 +102,7 @@ </a-col> <a-col :span="12"> <a-form-model-item v-if="addShow" label="瀹℃牳鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditDate"> - <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿" v-model="model.auditDate" style="width: 100%" disabled/> + <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿" :show-time="true" dateFormat="YYYY-MM-DD HH:mm" v-model="model.auditDate" style="width: 100%" disabled/> </a-form-model-item> </a-col> </a-row> @@ -75,7 +123,8 @@ </a-form-model> </a-spin> - <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectOutBoundTool">閫夋嫨鍑哄簱宸ュ叿</a-button> + <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectBorrowOutBoundTool">閫夋嫨鍑哄簱宸ュ叿</a-button> + <a-button v-show="selectSharpenTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectSharpenOutBoundTool">閫夋嫨鍒冪(宸ュ叿</a-button> <a-table ref="table" size="middle" @@ -93,7 +142,22 @@ <div :key="col.dataIndex"> <a-input-number v-if="col.dataIndex === 'outboundQuantity'" - :disabled="record.quantity <= 1" + :disabled="record.accuracyClass === '1'" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> + + <a-input-number + v-if="col.dataIndex === 'ratedLife'" + :disabled="record.quantity > 1" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> + <a-input-number + v-if="col.dataIndex === 'useLife'" + :disabled="record.quantity > 1" :value="text" @change="(e) => handleChange(e, record.key, col, index)" :min="1" @@ -111,7 +175,8 @@ <a-button @click="handleOk" :disabled="isDisabled" type="primary">纭畾</a-button> </template> - <j-select-outbound-tool-modal ref="selectOutBoundToolModal"></j-select-outbound-tool-modal> + <j-select-borrow-outbound-tool-modal ref="selectBorrowOutBoundToolModal"></j-select-borrow-outbound-tool-modal> + <j-select-sharpen-outbound-tool-modal ref="selectSharpenOutBoundToolModal"></j-select-sharpen-outbound-tool-modal> </j-modal> </template> @@ -121,7 +186,8 @@ import { httpAction } from '@/api/manage' import { validateDuplicateValue } from '@/utils/util' import OutboundDetailList from '../../OutboundDetailList.vue' - import JSelectOutboundToolModal from './JSelectOutboundToolModal.vue' + import JSelectBorrowOutboundToolModal from './JSelectBorrowOutboundToolModal.vue' + import JSelectSharpenOutboundToolModal from './JSelectSharpenOutboundToolModal.vue' import { getAction } from '../../../../api/manage' import title from 'ant-design-vue/lib/skeleton/Title' @@ -129,7 +195,8 @@ name: "OutboundOrderModal", components: { OutboundDetailList, - JSelectOutboundToolModal + JSelectBorrowOutboundToolModal, + JSelectSharpenOutboundToolModal }, data () { return { @@ -140,6 +207,7 @@ isDisabled: false, addShow: true, selectBorrowTool: false, + selectSharpenTool: false, model:{ }, labelCol: { @@ -201,6 +269,18 @@ align:"center", dataIndex: 'outboundLocation' }, + // { + // title:'棰濆畾瀵垮懡', + // align:"center", + // dataIndex: 'ratedLife', + // scopedSlots: { customRender: 'ratedLife' }, + // }, + // { + // title:'浣跨敤瀵垮懡', + // align:"center", + // dataIndex: 'useLife', + // scopedSlots: { customRender: 'useLife' }, + // }, // { // title:'鍑哄簱鐘舵��;1.鏈嚭搴擄紱2.閮ㄥ垎鍑哄簱锛�3.鍑哄簱瀹屾垚', // align:"center", @@ -218,10 +298,16 @@ confirmLoading: false, validatorRules: { outStorehouseType: [ - { required: true, message: '璇疯緭鍏ュ嚭搴撶被鍨�!'}, + { required: true, message: '璇烽�夋嫨鍑哄簱绫诲瀷!'}, ], subjectMatter: [ { required: true, message: '璇疯緭鍏ラ鐢ㄤ簨鐢�!'}, + ], + reviewer: [ + { required: true, message: '璇烽�夋嫨瀹℃牳浜�!'}, + ], + outboundTime: [ + { required: true, message: '璇烽�夋嫨鍑哄簱鏃堕棿!'}, ], }, url: { @@ -248,7 +334,8 @@ outboundQuantity: data[i].quantity, storageLocation: data[i].warehouseId, warehouseName: data[i].warehouseName, - outboundLocation: data[i].positionCode + outboundLocation: data[i].positionCode, + accuracyClass:data[i].accuracyClass }) } this.ipagination.total = this.dataSource.length @@ -258,15 +345,23 @@ handleTypeChange(value) { if (value === '1') { this.selectBorrowTool = true + this.selectSharpenTool = false + this.dataSource = [] } if (value === '2') { this.selectBorrowTool = false + this.selectSharpenTool = false + this.dataSource = [] } if (value === '3') { this.selectBorrowTool = false + this.selectSharpenTool = false + this.dataSource = [] } if (value === '4') { this.selectBorrowTool = false + this.selectSharpenTool = true + this.dataSource = [] } }, handleDelete(record, index) { @@ -290,7 +385,7 @@ this.dataSource = temp } }, - selectOutBoundTool() { + selectBorrowOutBoundTool() { console.log(this.dataSource) let ids = '' if (this.title === '鏂板') { @@ -299,7 +394,18 @@ if (this.title === '缂栬緫') { ids = this.dataSource.map(item => item.toolLedgerDetailId).join(',') } - this.$refs.selectOutBoundToolModal.showModal(ids) + this.$refs.selectBorrowOutBoundToolModal.showOrderModal(ids) + }, + selectSharpenOutBoundTool() { + console.log(this.dataSource) + let ids = '' + if (this.title === '鏂板') { + ids = this.dataSource.map(item => item.id).join(',') + } + if (this.title === '缂栬緫') { + ids = this.dataSource.map(item => item.toolSharpeningId).join(',') + } + this.$refs.selectSharpenOutBoundToolModal.showOrderModal(ids) }, add () { this.addShow = false @@ -316,16 +422,20 @@ const type = record.outStorehouseType switch (type) { case '1': - this.handleTypeChange('1') + this.selectBorrowTool = true + this.selectSharpenTool = false break case '2': - this.handleTypeChange('2') + this.selectBorrowTool = false + this.selectSharpenTool = false break case '3': - this.handleTypeChange('3') + this.selectBorrowTool = false + this.selectSharpenTool = false break case '4': - this.handleTypeChange('4') + this.selectBorrowTool = false + this.selectSharpenTool = true break } } @@ -338,6 +448,7 @@ this.$emit('close'); this.addShow = true this.selectBorrowTool = false + this.selectSharpenTool = false this.visible = false; this.$refs.form.clearValidate(); }, @@ -349,6 +460,10 @@ // 瑙﹀彂琛ㄥ崟楠岃瘉 this.$refs.form.validate(valid => { if (valid) { + if (this.dataSource == null || this.dataSource.length === 0) { + this.$message.warning('璇烽�夋嫨鍑哄簱宸ュ叿!'); + return + } this.model.outboundDetailList = this.dataSource that.confirmLoading = true; let httpurl = ''; -- Gitblit v1.9.3