From 33f721fc0a4bc40679bff4983aeb5d7edb821705 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期四, 24 七月 2025 10:12:08 +0800 Subject: [PATCH] 仓库增加格数及对应功能修改,库存子表不管到把的唯一编码存储刀具编码 --- src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue | 5 src/views/tms/modules/baseTools/ParaBladeModal.vue | 645 ++++++++++++++++++--------- src/views/tms/modules/inbound/InboundListRight.vue | 10 src/views/tms/modules/inbound/InboundModel.vue | 13 src/views/tms/modules/inbound/InboundApplyDetailList.vue | 7 src/views/tms/modules/baseTools/ParaBaseModal.vue | 19 src/views/tms/modules/baseTools/ParaMillToolModal.vue | 50 ++ src/views/tms/modules/baseTools/ParaTurningToolsModal.vue | 50 ++ src/views/tms/modules/inbound/InboundApplyModelList.vue | 15 src/views/tms/modules/inboundOrder/JSelectToolingModal.vue | 38 + src/views/tms/modules/baseTools/ParaThreadingToolModal.vue | 50 ++ src/views/tms/modules/baseTools/ParaHoleToolsModal.vue | 50 ++ src/views/tms/modules/baseTools/ParaCommonToolModal.vue | 50 ++ src/views/tms/modules/inboundOrder/InboundDetailList.vue | 2 src/views/tms/GoodsShelvesList.vue | 5 src/views/tms/modules/inboundOrder/InboundOrderModel.vue | 6 src/views/tms/modules/baseTools/SelectPositionCodeModal.vue | 252 ++++++++++ src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue | 21 src/views/tms/modules/GoodsShelvesForm.vue | 34 + 19 files changed, 1,053 insertions(+), 269 deletions(-) diff --git a/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue b/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue index fda8bb8..05a17a3 100644 --- a/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue +++ b/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue @@ -242,6 +242,11 @@ dataIndex: 'toolModel' }, { + title:'搴撲綅鍙�', + align:"center", + dataIndex: 'goodsShelvesId' + }, + { title:'鐢宠鍏ュ簱鏁伴噺', align:"center", dataIndex: 'inStorageQuantity' diff --git a/src/views/tms/GoodsShelvesList.vue b/src/views/tms/GoodsShelvesList.vue index bbcd99d..a1b79ad 100644 --- a/src/views/tms/GoodsShelvesList.vue +++ b/src/views/tms/GoodsShelvesList.vue @@ -202,6 +202,11 @@ dataIndex: 'columnNumber' }, { + title:'鏍兼暟', + align:"center", + dataIndex: 'cellsNum' + }, + { title:'璐ф灦缂栧彿', align:"center", dataIndex: 'shelfNumber' diff --git a/src/views/tms/modules/GoodsShelvesForm.vue b/src/views/tms/modules/GoodsShelvesForm.vue index a2a91aa..1cb9cb7 100644 --- a/src/views/tms/modules/GoodsShelvesForm.vue +++ b/src/views/tms/modules/GoodsShelvesForm.vue @@ -38,6 +38,11 @@ <a-input v-model="model.columnNumber" placeholder="璇疯緭鍏ュ垪鏁�" ></a-input> </a-form-model-item> </a-col> + <a-col :span="12"> + <a-form-model-item label="鏍兼暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cellsNum"> + <a-input v-model="model.cellsNum" placeholder="璇疯緭鍏ユ牸鏁�" ></a-input> + </a-form-model-item> + </a-col> <a-col :span="12"> <a-form-model-item label="搴撲綅鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-input v-model="model.locationCode" placeholder="璇疯緭鍏ュ簱浣嶅彿" ></a-input> @@ -84,6 +89,7 @@ storey: '', arrange: '', columnNumber: '', + cellsNum:'', locationCode: '', remark: '' }, @@ -110,6 +116,7 @@ ], shelfNumber: [ { required: true, message: '璇疯緭鍏ヨ揣鏋跺彿!'}, + { validator: this.validateShelfNumber }, ], shelfName: [ { required: true, message: '璇疯緭鍏ヨ揣鏋跺悕绉�!'}, @@ -118,8 +125,10 @@ url: { add: "/tms/goodsShelves/add", edit: "/tms/goodsShelves/edit", - queryById: "/tms/goodsShelves/queryById" - } + queryById: "/tms/goodsShelves/queryById", + checkShelfNum:"/tms/goodsShelves/checkShelfNum" + }, + warehouseId:'' } }, computed: { @@ -128,9 +137,9 @@ }, //鎷兼帴搴撲綅鍙� autoGeneratedLocationCode() { - const { shelfNumber, storey, arrange, columnNumber } = this.model; - if (shelfNumber || storey || arrange || columnNumber) { - return `${shelfNumber}${storey}${arrange}${columnNumber}`; + const { shelfNumber, storey, arrange, columnNumber, cellsNum } = this.model; + if (shelfNumber || storey || arrange || columnNumber || cellsNum) { + return `${shelfNumber}${storey}${arrange}${columnNumber}${cellsNum}`; } return ''; } @@ -152,6 +161,7 @@ edit (record) { this.model = Object.assign({}, record); this.visible = true; + this.warehouseId = record.warehouseId }, submitForm () { const that = this; @@ -182,6 +192,20 @@ }) }, + //楠岃瘉 璐ф灦鍙� + validateShelfNumber(rule, value, callback) { + var params = { + warehouseId: this.warehouseId, + shelfNumber: value, + }; + getAction(this.url.checkShelfNum,params).then((res) => { + if (res.success) { + callback(); + } else { + callback("璐ф灦缂栧彿宸插瓨鍦�!"); + } + }) + }, }, watch: { autoGeneratedLocationCode(newVal) { diff --git a/src/views/tms/modules/baseTools/ParaBaseModal.vue b/src/views/tms/modules/baseTools/ParaBaseModal.vue index 1229690..90edbe0 100644 --- a/src/views/tms/modules/baseTools/ParaBaseModal.vue +++ b/src/views/tms/modules/baseTools/ParaBaseModal.vue @@ -70,6 +70,18 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + <a-col :span="8"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> </a-row> </a-form-model> @@ -81,12 +93,12 @@ import { getAction,postAction, httpAction } from '@/api/manage' import { validateDuplicateValueInDelFlag } from '@/utils/util' import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' -import { getSystemConfigValue } from '@api/api' + import JDictSelectTag from '@/components/dict/JDictSelectTag' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 export default { name: 'ParaBaseModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag }, data() { return { title: '鎿嶄綔', @@ -114,6 +126,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } diff --git a/src/views/tms/modules/baseTools/ParaBladeModal.vue b/src/views/tms/modules/baseTools/ParaBladeModal.vue index e33aff7..aa2a9f8 100644 --- a/src/views/tms/modules/baseTools/ParaBladeModal.vue +++ b/src/views/tms/modules/baseTools/ParaBladeModal.vue @@ -5,122 +5,181 @@ :visible="visible" centered :confirmLoading="confirmLoading" - :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" switchFullscreen @ok="handleOk" @cancel="handleCancel" - cancelText="鍏抽棴"> + cancelText="鍏抽棴" + > <a-spin :spinning="confirmLoading"> <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + <a-divider orientation="center" style="font-size: large; font-style: italic; color: #66aeed"> + 宸ュ叿鍩虹淇℃伅 </a-divider> <a-row :gutter="24"> - <a-col :span="6"> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> - <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> - <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - </a-row> - </a-col> - - <a-col :span="6"> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="chineseName" - label="涓枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="foreignLanguageName" - label="澶栨枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="toolModel" - label="鍨嬪彿/鍥惧彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> - </a-form-model-item> - </a-col> - </a-row> - </a-col> - - <a-col :span="6"> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="standardLevel" - label="鏍囨敞绾у埆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item prop="signCode" label="搴忓彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - </a-row> - </a-col> - - <a-col :span="6"> - <a-row> - <a-col :span="24"> - <a-form-model-item label='' :labelCol='labelCol' :wrapperCol='wrapperCol'> - <j-image-upload text='涓婁紶鍥剧墖' v-model='model.toolPicture'></j-image-upload> - </a-form-model-item> - </a-col> - </a-row> - </a-col> - </a-row> - - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 - </a-divider> - - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item prop="applicationType" - label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" - v-model="model.applicationType" :disabled="disableSubmit" /> + <a-col :span="6"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> </a-form-model-item> </a-col> - <a-col :span="8"> - <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ伐鍏风紪鐮�'" + v-model="model.toolCode" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit ? '' : '璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> + </a-col> + + <a-col :span="6"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ヤ腑鏂囧悕绉�'" + v-model="model.chineseName" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="foreignLanguageName" label="澶栨枃鍚嶇О"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ鏂囧悕绉�'" + v-model="model.foreignLanguageName" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ瀷鍙�/鍥惧彿'" + v-model="model.toolModel" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + </a-col> + + <a-col :span="6"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="standardLevel" label="鏍囨敞绾у埆"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ爣鍑嗙骇鍒�'" + v-model="model.standardLevel" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ爣鍑嗗彿'" + v-model="model.standardCode" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ簭鍙�'" + v-model="model.signCode" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + </a-row> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit ? '' : '璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + + <a-col :span="6"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <j-image-upload text="涓婁紶鍥剧墖" v-model="model.toolPicture"></j-image-upload> + </a-form-model-item> + </a-col> + </a-row> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large; font-style: italic; color: #66aeed"> + 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> + <j-dict-select-tag + dict-code="equipment_category" + :placeholder="disableSubmit ? '' : '璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" + v-model="model.provinceCity" + :disabled="disableSubmit" + /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <!-- <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="搴撲綅鍙�"> <a-select :disabled="disableSubmit" @@ -129,6 +188,16 @@ v-model="model.positionCode" /> </a-form-item> + </a-form-model-item> --> + <a-form-model-item label="搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-tooltip title="閫夋嫨搴撲綅鍚庯紝姝ょ被鍒�鍏烽粯璁ゅ瓨鍌ㄥ埌姝ゅ簱浣嶏紝璇锋厧閲嶉�夋嫨锛�" placement="topRight"> + <a-input-search + v-model="model.positionCode" + @search="positionCodeSearch" + enter-button + placeholder="璇烽�夋嫨搴撲綅" + /> + </a-tooltip> </a-form-model-item> </a-col> </a-row> @@ -136,17 +205,29 @@ <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" + v-model="model.storageLocation" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ渶浣庡簱瀛�'" + v-model="model.lowerInventory" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ渶楂樺簱瀛�'" + v-model="model.highestInventory" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> </a-row> @@ -154,7 +235,11 @@ <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> - <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio-group + v-model="model.auxiliaryUnitFlag" + :placeholder="disableSubmit ? '' : '璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" + :disabled="disableSubmit" + > <a-radio :value="'1'">鏄�</a-radio> <a-radio :value="'2'">鍚�</a-radio> </a-radio-group> @@ -162,25 +247,41 @@ </a-col> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ヨ閲忎富鍗曚綅'" + v-model="model.mainUnit" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ヨ閲忚緟鍗曚綅'" + v-model="model.auxiliaryUnit" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> </a-row> - <a-row :gutter="24"> + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ巶瀹�'" + v-model="model.supplierId" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + <a-input + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ崟浠�'" + v-model="model.price" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <!-- <a-col :span="8"> @@ -190,28 +291,45 @@ </a-col> --> </a-row> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 + <a-divider orientation="center" style="font-size: large; font-style: italic; color: #66aeed"> + 鍙傛暟淇℃伅 </a-divider> <a-row :gutter="24"> <a-col :span="6"> <a-form-model-item label="鍒�鐗囧舰鐘�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape"> - <a-input v-model="model.bladeShape" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧舰鐘�'" :disabled="disableSubmit"></a-input> + <a-input + v-model="model.bladeShape" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囧舰鐘�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鐗囬暱搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeLength"> - <a-input v-model="model.bladeLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囬暱搴�'" :disabled="disableSubmit"></a-input> + <a-input + v-model="model.bladeLength" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囬暱搴�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒囧墛鍒冩暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingEdgeCount"> - <a-input v-model="model.cuttingEdgeCount" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉鏁�'" :disabled="disableSubmit"></a-input> + <a-input + v-model="model.cuttingEdgeCount" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垏鍓婂垉鏁�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> - <a-col :span="6"> + <a-col :span="6"> <a-form-model-item label="鍒�鐗囧帤搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeThickness"> - <a-input v-model="model.bladeThickness" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧帤搴�'" :disabled="disableSubmit"></a-input> + <a-input + v-model="model.bladeThickness" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囧帤搴�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> </a-row> @@ -219,137 +337,239 @@ <a-row :gutter="24"> <a-col :span="6"> <a-form-model-item label="澶瑰浐鍨嬪紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingType"> - <a-input v-model="model.clampingType" :placeholder="disableSubmit?'':'璇疯緭鍏ュす鍥哄瀷寮�'" :disabled="disableSubmit"></a-input> + <a-input + v-model="model.clampingType" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュす鍥哄瀷寮�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�灏朢" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noseAngleR"> - <a-input v-model="model.noseAngleR" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏朢'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.noseAngleR" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁灏朢'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鐗囨潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> - <a-input v-model="model.toolMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囨潗鏂�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.toolMaterial" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囨潗鏂�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> - <a-input v-model="model.partMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ラ浂浠舵潗鏂�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.partMaterial" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ浂浠舵潗鏂�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="6"> <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> - <a-radio-group v-model="model.paintcoatFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁娑傚眰'" :disabled="disableSubmit"> + <a-radio-group + v-model="model.paintcoatFlag" + :placeholder="disableSubmit ? '' : '璇烽�夋嫨鏄惁娑傚眰'" + :disabled="disableSubmit" + > <a-radio :value="'1'">鏄�</a-radio> <a-radio :value="'2'">鍚�</a-radio> </a-radio-group> </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalConditions"> - <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="technicalConditions" + > + <a-input + v-model="model.technicalConditions" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> - <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠惰鏄�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="conditionsInfo" + > + <a-input + v-model="model.conditionsInfo" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="娑傚眰鏉愯川" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coatingMaterial"> - <a-input v-model="model.coatingMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ユ秱灞傛潗璐�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.coatingMaterial" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ秱灞傛潗璐�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="6"> <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> - <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.brand" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ搧鐗�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒跺紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="types"> - <a-input v-model="model.types" :placeholder="disableSubmit?'':'璇疯緭鍏ュ埗寮�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.types" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ埗寮�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍔犲伐鍒嗙被" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingClassify"> - <a-input v-model="model.processingClassify" :placeholder="disableSubmit?'':'璇疯緭鍏ュ姞宸ュ垎绫�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.processingClassify" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ姞宸ュ垎绫�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鐗囧悗瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladePosterior"> - <a-input v-model="model.bladePosterior" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧悗瑙�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.bladePosterior" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囧悗瑙�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="6"> <a-form-model-item label="鍒囧墛鏂瑰悜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingDirection"> - <a-input v-model="model.cuttingDirection" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婃柟鍚�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.cuttingDirection" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垏鍓婃柟鍚�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鐗囧搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeWide"> - <a-input v-model="model.bladeWide" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧搴�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.bladeWide" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囧搴�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鐗囧昂瀵�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeSize"> - <a-input v-model="model.bladeSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧昂瀵�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.bladeSize" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囧昂瀵�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍐呭铻虹汗" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inOutThread"> - <a-input v-model="model.inOutThread" :placeholder="disableSubmit?'':'璇疯緭鍏ュ唴澶栬灪绾�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.inOutThread" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ唴澶栬灪绾�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="6"> <a-form-model-item label="铻虹汗鏍囧噯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadStandard"> - <a-input v-model="model.threadStandard" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾规爣鍑�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.threadStandard" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ヨ灪绾规爣鍑�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鐗欏瀷瑙掑害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dentalAngle"> - <a-input v-model="model.dentalAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ョ墮鍨嬭搴�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.dentalAngle" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ョ墮鍨嬭搴�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="铻鸿窛" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pitch"> - <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪璺�'" :disabled="disableSubmit" ></a-input> + <a-input + v-model="model.pitch" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ヨ灪璺�'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="鏈�灏忓姞宸ュ唴铻虹汗鍏О鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="minInternalThread"> - <a-input v-model="model.minInternalThread" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忓姞宸ュ唴铻虹汗鍏О鐩村緞'" :disabled="disableSubmit" ></a-input> + <a-form-model-item + label="鏈�灏忓姞宸ュ唴铻虹汗鍏О鐩村緞" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="minInternalThread" + > + <a-input + v-model="model.minInternalThread" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ渶灏忓姞宸ュ唴铻虹汗鍏О鐩村緞'" + :disabled="disableSubmit" + ></a-input> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="24"> <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> - <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + <a-textarea + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ娉�'" + v-model="model.remark" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> </a-row> </a-form-model> </a-spin> + <select-position-code-modal ref="selectPositionCodeModal" :title="'閫夋嫨搴撲綅'" /> </j-modal> </template> <script> -import { getAction,postAction, httpAction } from '@/api/manage' +import { getAction, postAction, httpAction } from '@/api/manage' import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' -import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 +import { duplicateCheck } from '@/api/api' //閲嶅鏍¢獙 import { ajaxGetDictItems } from '@/api/api' +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import SelectPositionCodeModal from './SelectPositionCodeModal' export default { name: 'ParaHoleToolsModal', - components: { JSelectProduction }, + components: { JSelectProduction, JDictSelectTag, SelectPositionCodeModal }, data() { return { title: '鎿嶄綔', @@ -361,86 +581,64 @@ model: {}, labelCol: { xs: { span: 24 }, - sm: { span: 9 } + sm: { span: 9 }, }, wrapperCol: { xs: { span: 24 }, - sm: { span: 14 } + sm: { span: 14 }, }, labelColLong: { xs: { span: 24 }, - sm: { span: 2 } + sm: { span: 2 }, }, wrapperColLong: { xs: { span: 24 }, - sm: { span: 22 } + sm: { span: 22 }, }, confirmLoading: false, validatorRules: { - toolCode: [ - { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, - { validator: this.validateNum } - ], - classifyNum: [ - { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } - ], - classifyName: [ - { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } - ], - toolModel: [ - { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, - { validator: this.validateModel } - ], - chineseName: [ - { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } - ], - bladeShape: [ - { required: true, message: '璇疯緭鍏ュ垁鐗囧舰鐘�' } - ], - bladeLength: [ - { required: true, message: '璇疯緭鍏ュ垁鐗囬暱搴�' } - ], - cuttingEdgeCount: [ - { required: true, message: '璇疯緭鍏ュ垏鍓婂垉鏁�' } - ], - bladeThickness: [ - { required: true, message: '璇疯緭鍏ュ垁鐗囧帤搴�' } - ], - clampingType: [ - { required: true, message: '璇疯緭鍏ュす鍥哄瀷寮�' } - ], - noseAngleR: [ - { required: true, message: '璇疯緭鍏ュ垁灏朢' } - ], - toolMaterial: [ - { required: true, message: '璇疯緭鍏ュ垁鐗囨潗鏂�' } - ], - paintcoatFlag: [ - { required: true, message: '璇烽�夋嫨鏄惁娑傚眰' } - ], - technicalConditions: [ - { required: true, message: '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�' } - ] + accuracyClass: [{ required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }], + toolCode: [{ required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum }], + classifyNum: [{ required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' }], + classifyName: [{ required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' }], + toolModel: [{ required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, { validator: this.validateModel }], + chineseName: [{ required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' }], + bladeShape: [{ required: true, message: '璇疯緭鍏ュ垁鐗囧舰鐘�' }], + bladeLength: [{ required: true, message: '璇疯緭鍏ュ垁鐗囬暱搴�' }], + cuttingEdgeCount: [{ required: true, message: '璇疯緭鍏ュ垏鍓婂垉鏁�' }], + bladeThickness: [{ required: true, message: '璇疯緭鍏ュ垁鐗囧帤搴�' }], + clampingType: [{ required: true, message: '璇疯緭鍏ュす鍥哄瀷寮�' }], + noseAngleR: [{ required: true, message: '璇疯緭鍏ュ垁灏朢' }], + toolMaterial: [{ required: true, message: '璇疯緭鍏ュ垁鐗囨潗鏂�' }], + paintcoatFlag: [{ required: true, message: '璇烽�夋嫨鏄惁娑傚眰' }], + technicalConditions: [{ required: true, message: '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�' }], }, url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', }, - locationCodeOptions:[] + locationCodeOptions: [], } }, created() { - ajaxGetDictItems("tms_goods_shelves,location_code,id", null).then((res) => { - if (res.success) { - this.locationCodeOptions = res.result - } - }) + ajaxGetDictItems('tms_goods_shelves,location_code,id', null).then((res) => { + if (res.success) { + this.locationCodeOptions = res.result + } + }) + }, + mounted() { + this.$bus.$on('selectionRows', (data) => { + this.model.positionCode = data[0].positionCode + }) }, methods: { add(nodeSelected) { - this.editable = false; + this.editable = false //鍒濆鍖栭粯璁ゅ�� - this.model = {}; + this.model = { + positionCode: '' + }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName @@ -448,7 +646,7 @@ this.visible = true }, edit(record) { - this.editable = true; + this.editable = true this.model = Object.assign({}, record) this.visible = true }, @@ -457,25 +655,32 @@ this.visible = false this.$refs.form.clearValidate() }, + positionCodeSearch() { + let positionCode = [] + positionCode.push(this.model.positionCode) + this.$refs.selectPositionCodeModal.showModal(positionCode) + this.$refs.selectPositionCodeModal.title = '閫夋嫨搴撲綅' + this.$refs.selectPositionCodeModal.disableSubmit = false + }, handleOk() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { + this.$refs.form.validate((valid) => { if (valid) { that.confirmLoading = true let formData = Object.assign(this.model) let httpUrl = '' - let method = 'post' - if (!this.model.id) { - httpUrl += this.url.add - } else { - httpUrl += this.url.edit - } - httpAction(httpUrl, formData, method) + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) .then((res) => { if (res.success) { that.$message.success(res.message) - that.$emit('ok') + that.$emit('ok') } else { that.$message.warning(res.message) } @@ -490,39 +695,39 @@ handleCancel() { this.close() }, - //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 validateNum(rule, value, callback) { var params = { tableName: 'tms_base_tools', fieldName: 'tool_code', fieldVal: value, - dataId: this.model.id - }; + dataId: this.model.id, + } duplicateCheck(params).then((res) => { if (res.success) { callback() } else { - callback("宸ュ叿缂栫爜宸插瓨鍦�!") + callback('宸ュ叿缂栫爜宸插瓨鍦�!') } }) }, - //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 validateModel(rule, value, callback) { var params = { tableName: 'tms_base_tools', fieldName: 'tool_model', fieldVal: value, - dataId: this.model.id - }; + dataId: this.model.id, + } duplicateCheck(params).then((res) => { if (res.success) { callback() } else { - callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + callback('鍨嬪彿/鍥惧彿宸插瓨鍦�!') } }) }, - } + }, } </script> diff --git a/src/views/tms/modules/baseTools/ParaCommonToolModal.vue b/src/views/tms/modules/baseTools/ParaCommonToolModal.vue index c07a495..aad3851 100644 --- a/src/views/tms/modules/baseTools/ParaCommonToolModal.vue +++ b/src/views/tms/modules/baseTools/ParaCommonToolModal.vue @@ -38,6 +38,20 @@ </a-form-model-item> </a-col> </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> </a-col> <a-col :span="6"> @@ -119,13 +133,23 @@ </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <!-- <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> <a-select :disabled="disableSubmit" :triggerChange="true" :options="locationCodeOptions" v-model="model.positionCode" /> + </a-form-model-item> --> + <a-form-model-item label="搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-tooltip title="閫夋嫨搴撲綅鍚庯紝姝ょ被鍒�鍏烽粯璁ゅ瓨鍌ㄥ埌姝ゅ簱浣嶏紝璇锋厧閲嶉�夋嫨锛�" placement="topRight"> + <a-input-search + v-model="model.positionCode" + @search="positionCodeSearch" + enter-button + placeholder="璇烽�夋嫨搴撲綅" + /> + </a-tooltip> </a-form-model-item> </a-col> </a-row> @@ -190,6 +214,7 @@ </a-row> </a-form-model> </a-spin> + <select-position-code-modal ref="selectPositionCodeModal" :title="'閫夋嫨搴撲綅'" /> </j-modal> </template> @@ -198,10 +223,12 @@ import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 import { ajaxGetDictItems } from '@/api/api' +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import SelectPositionCodeModal from './SelectPositionCodeModal' export default { name: 'ParaCommonToolModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag,SelectPositionCodeModal }, data() { return { title: '鎿嶄綔', @@ -229,6 +256,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } @@ -261,11 +291,18 @@ } }) }, + mounted() { + this.$bus.$on('selectionRows', (data) => { + this.model.positionCode = data[0].positionCode + }) + }, methods: { add(nodeSelected) { this.editable = false; //鍒濆鍖栭粯璁ゅ�� - this.model = {}; + this.model = { + positionCode: '' + }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName @@ -282,6 +319,13 @@ this.visible = false this.$refs.form.clearValidate() }, + positionCodeSearch() { + let positionCode = [] + positionCode.push(this.model.positionCode) + this.$refs.selectPositionCodeModal.showModal(positionCode) + this.$refs.selectPositionCodeModal.title = '閫夋嫨搴撲綅' + this.$refs.selectPositionCodeModal.disableSubmit = false + }, handleOk() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 diff --git a/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue b/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue index 60905ed..9520948 100644 --- a/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue +++ b/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue @@ -38,6 +38,20 @@ </a-form-model-item> </a-col> </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> </a-col> <a-col :span="6"> @@ -119,13 +133,23 @@ </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <!-- <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> <a-select :disabled="disableSubmit" :triggerChange="true" :options="locationCodeOptions" v-model="model.positionCode" /> + </a-form-model-item> --> + <a-form-model-item label="搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-tooltip title="閫夋嫨搴撲綅鍚庯紝姝ょ被鍒�鍏烽粯璁ゅ瓨鍌ㄥ埌姝ゅ簱浣嶏紝璇锋厧閲嶉�夋嫨锛�" placement="topRight"> + <a-input-search + v-model="model.positionCode" + @search="positionCodeSearch" + enter-button + placeholder="璇烽�夋嫨搴撲綅" + /> + </a-tooltip> </a-form-model-item> </a-col> </a-row> @@ -379,6 +403,7 @@ </a-row> </a-form-model> </a-spin> + <select-position-code-modal ref="selectPositionCodeModal" :title="'閫夋嫨搴撲綅'" /> </j-modal> </template> @@ -387,10 +412,12 @@ import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 import { ajaxGetDictItems } from '@/api/api' +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import SelectPositionCodeModal from './SelectPositionCodeModal' export default { name: 'ParaHoleToolsModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag,SelectPositionCodeModal }, data() { return { title: '鎿嶄綔', @@ -418,6 +445,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } @@ -474,11 +504,18 @@ } }) }, + mounted() { + this.$bus.$on('selectionRows', (data) => { + this.model.positionCode = data[0].positionCode + }) + }, methods: { add(nodeSelected) { this.editable = false; //鍒濆鍖栭粯璁ゅ�� - this.model = {}; + this.model = { + positionCode: '' + }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName @@ -495,6 +532,13 @@ this.visible = false this.$refs.form.clearValidate() }, + positionCodeSearch() { + let positionCode = [] + positionCode.push(this.model.positionCode) + this.$refs.selectPositionCodeModal.showModal(positionCode) + this.$refs.selectPositionCodeModal.title = '閫夋嫨搴撲綅' + this.$refs.selectPositionCodeModal.disableSubmit = false + }, handleOk() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 diff --git a/src/views/tms/modules/baseTools/ParaMillToolModal.vue b/src/views/tms/modules/baseTools/ParaMillToolModal.vue index 9ee29a0..220ca01 100644 --- a/src/views/tms/modules/baseTools/ParaMillToolModal.vue +++ b/src/views/tms/modules/baseTools/ParaMillToolModal.vue @@ -38,6 +38,20 @@ </a-form-model-item> </a-col> </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> </a-col> <a-col :span="6"> @@ -119,13 +133,23 @@ </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <!-- <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> <a-select :disabled="disableSubmit" :triggerChange="true" :options="locationCodeOptions" v-model="model.positionCode" /> + </a-form-model-item> --> + <a-form-model-item label="搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-tooltip title="閫夋嫨搴撲綅鍚庯紝姝ょ被鍒�鍏烽粯璁ゅ瓨鍌ㄥ埌姝ゅ簱浣嶏紝璇锋厧閲嶉�夋嫨锛�" placement="topRight"> + <a-input-search + v-model="model.positionCode" + @search="positionCodeSearch" + enter-button + placeholder="璇烽�夋嫨搴撲綅" + /> + </a-tooltip> </a-form-model-item> </a-col> </a-row> @@ -384,6 +408,7 @@ </a-row> </a-form-model> </a-spin> + <select-position-code-modal ref="selectPositionCodeModal" :title="'閫夋嫨搴撲綅'" /> </j-modal> </template> @@ -392,10 +417,12 @@ import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 import { ajaxGetDictItems } from '@/api/api' +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import SelectPositionCodeModal from './SelectPositionCodeModal' export default { name: 'ParaHoleToolsModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag,SelectPositionCodeModal }, data() { return { title: '鎿嶄綔', @@ -423,6 +450,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } @@ -481,6 +511,11 @@ locationCodeOptions:[] } }, + mounted() { + this.$bus.$on('selectionRows', (data) => { + this.model.positionCode = data[0].positionCode + }) + }, created() { ajaxGetDictItems("tms_goods_shelves,location_code,id", null).then((res) => { if (res.success) { @@ -492,7 +527,9 @@ add(nodeSelected) { this.editable = false; //鍒濆鍖栭粯璁ゅ�� - this.model = {}; + this.model = { + positionCode: '' + }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName @@ -509,6 +546,13 @@ this.visible = false this.$refs.form.clearValidate() }, + positionCodeSearch() { + let positionCode = [] + positionCode.push(this.model.positionCode) + this.$refs.selectPositionCodeModal.showModal(positionCode) + this.$refs.selectPositionCodeModal.title = '閫夋嫨搴撲綅' + this.$refs.selectPositionCodeModal.disableSubmit = false + }, handleOk() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 diff --git a/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue b/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue index e34e55a..82a61ad 100644 --- a/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue +++ b/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue @@ -38,6 +38,20 @@ </a-form-model-item> </a-col> </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> </a-col> <a-col :span="6"> @@ -119,13 +133,23 @@ </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <!-- <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> <a-select :disabled="disableSubmit" :triggerChange="true" :options="locationCodeOptions" v-model="model.positionCode" /> + </a-form-model-item> --> + <a-form-model-item label="搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-tooltip title="閫夋嫨搴撲綅鍚庯紝姝ょ被鍒�鍏烽粯璁ゅ瓨鍌ㄥ埌姝ゅ簱浣嶏紝璇锋厧閲嶉�夋嫨锛�" placement="topRight"> + <a-input-search + v-model="model.positionCode" + @search="positionCodeSearch" + enter-button + placeholder="璇烽�夋嫨搴撲綅" + /> + </a-tooltip> </a-form-model-item> </a-col> </a-row> @@ -325,6 +349,7 @@ </a-row> </a-form-model> </a-spin> + <select-position-code-modal ref="selectPositionCodeModal" :title="'閫夋嫨搴撲綅'" /> </j-modal> </template> @@ -333,10 +358,12 @@ import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 import { ajaxGetDictItems } from '@/api/api' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import SelectPositionCodeModal from './SelectPositionCodeModal' export default { name: 'ParaHoleToolsModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag,SelectPositionCodeModal }, data() { return { title: '鎿嶄綔', @@ -364,6 +391,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } @@ -426,11 +456,18 @@ } }) }, + mounted() { + this.$bus.$on('selectionRows', (data) => { + this.model.positionCode = data[0].positionCode + }) + }, methods: { add(nodeSelected) { this.editable = false; //鍒濆鍖栭粯璁ゅ�� - this.model = {}; + this.model = { + positionCode: '' + }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName @@ -447,6 +484,13 @@ this.visible = false this.$refs.form.clearValidate() }, + positionCodeSearch() { + let positionCode = [] + positionCode.push(this.model.positionCode) + this.$refs.selectPositionCodeModal.showModal(positionCode) + this.$refs.selectPositionCodeModal.title = '閫夋嫨搴撲綅' + this.$refs.selectPositionCodeModal.disableSubmit = false + }, handleOk() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue index 367e78e..6cd8e17 100644 --- a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue +++ b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue @@ -38,6 +38,20 @@ </a-form-model-item> </a-col> </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> </a-col> <a-col :span="6"> @@ -120,13 +134,23 @@ </a-form-model-item> </a-col> <a-col :span="8"> - <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <!-- <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> <a-select :disabled="disableSubmit" :triggerChange="true" :options="locationCodeOptions" v-model="model.positionCode" /> + </a-form-model-item> --> + <a-form-model-item label="搴撲綅" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-tooltip title="閫夋嫨搴撲綅鍚庯紝姝ょ被鍒�鍏烽粯璁ゅ瓨鍌ㄥ埌姝ゅ簱浣嶏紝璇锋厧閲嶉�夋嫨锛�" placement="topRight"> + <a-input-search + v-model="model.positionCode" + @search="positionCodeSearch" + enter-button + placeholder="璇烽�夋嫨搴撲綅" + /> + </a-tooltip> </a-form-model-item> </a-col> </a-row> @@ -403,6 +427,7 @@ </a-row> </a-form-model> </a-spin> + <select-position-code-modal ref="selectPositionCodeModal" :title="'閫夋嫨搴撲綅'" /> </j-modal> </template> @@ -411,10 +436,12 @@ import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 import { ajaxGetDictItems } from '@/api/api' +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import SelectPositionCodeModal from './SelectPositionCodeModal' export default { name: 'ParaHoleToolsModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag,SelectPositionCodeModal }, data() { return { title: '鎿嶄綔', @@ -442,6 +469,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } @@ -497,6 +527,11 @@ locationCodeOptions:[] } }, + mounted() { + this.$bus.$on('selectionRows', (data) => { + this.model.positionCode = data[0].positionCode + }) + }, created() { ajaxGetDictItems("tms_goods_shelves,location_code,id", null).then((res) => { if (res.success) { @@ -508,7 +543,9 @@ add(nodeSelected) { this.editable = false; //鍒濆鍖栭粯璁ゅ�� - this.model = {}; + this.model = { + positionCode: '' + }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName @@ -525,6 +562,13 @@ this.visible = false this.$refs.form.clearValidate() }, + positionCodeSearch() { + let positionCode = [] + positionCode.push(this.model.positionCode) + this.$refs.selectPositionCodeModal.showModal(positionCode) + this.$refs.selectPositionCodeModal.title = '閫夋嫨搴撲綅' + this.$refs.selectPositionCodeModal.disableSubmit = false + }, handleOk() { const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 diff --git a/src/views/tms/modules/baseTools/SelectPositionCodeModal.vue b/src/views/tms/modules/baseTools/SelectPositionCodeModal.vue new file mode 100644 index 0000000..3fdf287 --- /dev/null +++ b/src/views/tms/modules/baseTools/SelectPositionCodeModal.vue @@ -0,0 +1,252 @@ +<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.warehouseNum"></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.warehouseName"></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.positionCode"></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: 'SelectPositionCodeModal', + 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: 'positionCode', + sorter: true, + }, + { + title: '浠撳簱缂栫爜', + align: 'center', + dataIndex: 'warehouseNum', + sorter: true, + }, + { + title: '浠撳簱鍚嶇О', + align: 'center', + dataIndex: 'warehouseName', + sorter: true, + }, + { + title: '璐ф灦缂栧彿', + align: 'center', + dataIndex: 'shelfNumber', + sorter: true, + }, + { + title: '璐ф灦鍚嶇О', + align: 'center', + dataIndex: 'shelfName', + sorter: true, + }, + ], + selectedRowKeys: [], + 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, + }, + departTree: [], + visible: false, + loading: false, + url: { + list: '/tms/toolsConfigProperty/positionCodeList', + }, + oldSlelectRows: [], + } + }, + computed: { + rowSelection() { + return { + type: 'radio', + 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].positionCode) > -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) + 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 绛涢�� + 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> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue b/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue index 1595536..d0a3225 100644 --- a/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue +++ b/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue @@ -38,6 +38,20 @@ </a-form-model-item> </a-col> </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> + <j-dict-select-tag + :disabled="disableSubmit" + type="list" + v-model="model.accuracyClass" + :triggerChange="true" + dictCode="accuracy_class" + :placeholder="disableSubmit?'':'璇烽�夋嫨绮惧害绛夌骇'" + /> + </a-form-model-item> + </a-col> + </a-row> </a-col> <a-col :span="6"> @@ -192,12 +206,12 @@ import { getAction,postAction, httpAction } from '@/api/manage' import { validateDuplicateValueInDelFlag } from '@/utils/util' import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' -import { getSystemConfigValue } from '@api/api' +import JDictSelectTag from '@/components/dict/JDictSelectTag' import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 export default { name: 'ParaHoleToolsModal', - components: { JSelectProduction }, + components: { JSelectProduction,JDictSelectTag }, data() { return { title: '鎿嶄綔', @@ -225,6 +239,9 @@ }, confirmLoading: false, validatorRules: { + accuracyClass:[ + { required: true, message: '璇烽�夋嫨绮惧害绛夌骇' }, + ], toolCode: [ { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, { validator: this.validateNum } diff --git a/src/views/tms/modules/inbound/InboundApplyDetailList.vue b/src/views/tms/modules/inbound/InboundApplyDetailList.vue index 8c5d4fc..45dca8f 100644 --- a/src/views/tms/modules/inbound/InboundApplyDetailList.vue +++ b/src/views/tms/modules/inbound/InboundApplyDetailList.vue @@ -62,13 +62,18 @@ dataIndex: 'applicationType', align: 'center', }, + { + title: '搴撲綅鍙�', + dataIndex: 'goodsShelvesId', + align: 'center', + }, { title: '鍏ュ簱鏁伴噺', dataIndex: 'inStorageQuantity', align: 'center', }, { - title: '瀹為檯鍏ュ簱鏁伴噺', + title: '宸插叆搴撴暟閲�', dataIndex: 'inActualCount', align: 'center', } diff --git a/src/views/tms/modules/inbound/InboundApplyModelList.vue b/src/views/tms/modules/inbound/InboundApplyModelList.vue index 4a20b63..2e49fac 100644 --- a/src/views/tms/modules/inbound/InboundApplyModelList.vue +++ b/src/views/tms/modules/inbound/InboundApplyModelList.vue @@ -52,12 +52,12 @@ size="middle" bordered rowKey="id" - :customRow="customRow" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" + :customRow="customRow" @change="handleTableChange" > </a-table> @@ -168,7 +168,7 @@ // }, ], visible:false, - selectDetailRows:{}, + selectDetailRows:[], model:{}, form: this.$form.createForm(this), confirmLoading: false, @@ -226,8 +226,6 @@ return { on: { click: (e) => { - //灏嗗綋鍓嶉�変腑鐨勮褰曚紶鍒板瓙椤甸潰 - this.$bus.$emit('getToolingStorageData', record) this.onSelectChange(record.id.split(","), [record]); //鐐瑰嚮褰撳墠琛屽彉鑹� let oldList = document.querySelectorAll('.checked-td-of-add-table') @@ -247,12 +245,18 @@ onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; + //灏嗗綋鍓嶉�変腑鐨勮褰曚紶鍒板瓙椤甸潰 + this.$bus.$emit('getToolingStorageData', this.selectionRows) }, selectRows(selectDetailRows) { this.selectDetailRows = selectDetailRows; }, handleInbound() { - let that = this + let that = this + if(this.selectDetailRows.length == 0){ + that.$message.success("璇峰厛閫夋嫨闇�瑕佸叆搴撶殑鏁版嵁!") + return + } this.form.validateFields((err, values) => { if (!err) { that.confirmLoading = true @@ -280,7 +284,6 @@ }, handleCancel(){ this.visible = false - } }, } diff --git a/src/views/tms/modules/inbound/InboundListRight.vue b/src/views/tms/modules/inbound/InboundListRight.vue index 9d15b9c..be65891 100644 --- a/src/views/tms/modules/inbound/InboundListRight.vue +++ b/src/views/tms/modules/inbound/InboundListRight.vue @@ -349,10 +349,11 @@ } }, - onSelectChange(selectedRowKeys) { + onSelectChange(selectedRowKeys,selectionRows) { this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� - getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { + getAction(this.url.queryParaByToolCode, { toolCode: this.selectionRows[0].toolCodeId,paraTypeFlag:this.paraTypeFlag}).then((res) => { if (res.success) { if(this.paraTypeFlag === "1"){ this.$refs.paraCommonToolList.getPara(res.result); @@ -371,7 +372,7 @@ this.$message.warning(res.message); } }) - getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0]}).then((res) => { + getAction(this.url.queryByToolCode, { toolCode: this.selectionRows[0].toolCodeId}).then((res) => { if (res.success) { this.$refs.toolsConfigPropertyList.getPara(res.result); } else { @@ -491,7 +492,8 @@ this.ipagination.total = res.result.total //榛樿閫変腑绗竴鏉℃暟鎹� this.selectedRowKeys[0] = res.result.records[0].id - this.onSelectChange(this.selectedRowKeys) + this.selectionRows = res.result.records + this.onSelectChange(this.selectedRowKeys,this.selectionRows) } else { //this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); this.ipagination.total = 0 diff --git a/src/views/tms/modules/inbound/InboundModel.vue b/src/views/tms/modules/inbound/InboundModel.vue index d4d8ad2..3ba3ee8 100644 --- a/src/views/tms/modules/inbound/InboundModel.vue +++ b/src/views/tms/modules/inbound/InboundModel.vue @@ -47,7 +47,7 @@ </a-col> </a-row> - <a-row style="width: 100%"> + <!-- <a-row style="width: 100%"> <a-col :span="24 / 2"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="搴撲綅鍙�" prop="locationCodeId"> <a-select @@ -57,7 +57,7 @@ /> </a-form-model-item> </a-col> - </a-row> + </a-row> --> </a-form-model> </a-spin> <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectReturnList()" v-show="returnShow && !disableSubmit">閫夋嫨鍊熷嚭宸ュ叿</a-button> @@ -245,6 +245,12 @@ title: '鍞竴缂栫爜', align: 'center', dataIndex: 'onlyCode', + width: 150, + }, + { + title: '搴撲綅鍙�', + align: 'center', + dataIndex: 'goodsShelvesId', width: 150, }, { @@ -469,7 +475,8 @@ onlyCode:data[i].onlyCode, inStorageQuantity:data[i].storageQuantity || data[i].quantity || 1, quantity:data[i].quantity, - accuracyClass:data[i].accuracyClass + accuracyClass:data[i].accuracyClass, + goodsShelvesId:data[i].positionCode }) } //this.ipaginationm.total = this.dataSource.length diff --git a/src/views/tms/modules/inboundOrder/InboundDetailList.vue b/src/views/tms/modules/inboundOrder/InboundDetailList.vue index 0eec0dc..8588095 100644 --- a/src/views/tms/modules/inboundOrder/InboundDetailList.vue +++ b/src/views/tms/modules/inboundOrder/InboundDetailList.vue @@ -64,7 +64,7 @@ { title: '搴撲綅鍙�', align: 'center', - dataIndex: 'locationCode', + dataIndex: 'goodsShelvesId', }, { title: '鍏ュ簱鏁伴噺', diff --git a/src/views/tms/modules/inboundOrder/InboundOrderModel.vue b/src/views/tms/modules/inboundOrder/InboundOrderModel.vue index 4e1d578..9f448c2 100644 --- a/src/views/tms/modules/inboundOrder/InboundOrderModel.vue +++ b/src/views/tms/modules/inboundOrder/InboundOrderModel.vue @@ -342,7 +342,6 @@ title: '搴撲綅鍙�', align: 'center', dataIndex: 'goodsShelvesId', - scopedSlots: { customRender: 'goodsShelvesId' }, }, { title: '鍏ュ簱鏁伴噺', @@ -402,7 +401,7 @@ } this.$nextTick(() => { this.form.setFieldsValue( - pick(this.model, 'inboundNum', 'inStorehouseType', 'inboundTime', 'applicationReason', 'handler','approvalDate','reviewer','approvalOpinion','remark') + pick(this.model, 'inboundNum', 'inStorehouseType', 'inboundTime', 'applicationReason', 'handler','approvalDate','reviewer','approvalOpinion','remark','goodsShelvesId') ) }) }, @@ -575,7 +574,8 @@ onlyCode:data[i].onlyCode, quantity:data[i].quantity, inStorageQuantity:data[i].storageQuantity || data[i].quantity || 1, - accuracyClass:data[i].accuracyClass + accuracyClass:data[i].accuracyClass, + goodsShelvesId:data[i].positionCode }) } //this.ipaginationm.total = this.dataSource.length diff --git a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue index 7c37496..bd76e80 100644 --- a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue +++ b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue @@ -83,25 +83,26 @@ title: '宸ュ叿缂栫爜', align: 'center', dataIndex: 'toolCode', - sorter: true, }, { title: '宸ュ叿鍚嶇О', align: 'center', dataIndex: 'chineseName', - sorter: true, }, { - title: '宸ュ叿绫诲瀷', + title: '搴撲綅鍙�', align: 'center', - dataIndex: 'applicationTypeName', - sorter: true, + dataIndex: 'positionCode', }, { title: '鍨嬪彿/鍥惧彿', align: 'center', dataIndex: 'toolModel', - sorter: true, + }, + { + title: '宸ュ叿绫诲瀷', + align: 'center', + dataIndex: 'applicationTypeName', }, ], selectedRowKeys: [], @@ -109,6 +110,7 @@ scrollTrigger: {}, dataSource: [], selectionRows: [], + allSelectionRows: [], title: '鏍规嵁鏌ヨ缁撴灉閫夋嫨宸ュ叿', ipagination: { current: 1, @@ -138,7 +140,10 @@ rowSelection() { return { type: 'checkbox', + selectedRowKeys: this.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { + //鏇存柊璺ㄩ〉閫変腑鐘舵�� + this.updateSelection(selectedRows); this.selectedRowKeys = selectedRowKeys this.onSelectChange(selectedRows) }, @@ -154,6 +159,22 @@ watch: {}, created() {}, methods: { + // 鏇存柊璺ㄩ〉閫変腑鐘舵�� + updateSelection(selectedRows) { + // 鑾峰彇褰撳墠椤垫墍鏈夎鐨処D + const currentPageIds = this.dataSource.map(item => item.id); + + // 1. 绉婚櫎褰撳墠椤典箣鍓嶇殑閫夋嫨 + this.allSelectionRows = this.allSelectionRows.filter( + row => !currentPageIds.includes(row.id) + ); + + // 2. 娣诲姞褰撳墠椤垫柊閫夋嫨鐨勮 + this.allSelectionRows = [...this.allSelectionRows, ...selectedRows]; + + // 3. 鏇存柊閫変腑keys + this.selectedRowKeys = this.allSelectionRows.map(row => row.id); + }, async loadData(arg) { if (arg === 1) { this.ipagination.current = 1 @@ -182,6 +203,9 @@ }, showModal(oldSlelectRows) { this.oldSlelectRows = oldSlelectRows + //閲嶇疆璺ㄩ〉閫夋嫨鐘舵�� + this.allSelectionRows = []; + this.selectedRowKeys = []; this.visible = true this.loadData(1) }, @@ -222,7 +246,7 @@ this.loadData() }, handleSubmit() { - this.$bus.$emit('selectionRows', this.selectionRows) + this.$bus.$emit('selectionRows', this.allSelectionRows); this.searchReset(0) this.close() }, -- Gitblit v1.9.3