From a80d418d5d985af44565058c56c061b2b4c4fa43 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期三, 03 九月 2025 16:51:24 +0800 Subject: [PATCH] 参数录入增加数据字典选择,查询列表增加字典翻译 --- src/views/tms/modules/baseTools/ParaTurningToolsModal.vue | 190 ++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 160 insertions(+), 30 deletions(-) diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue index 6cd8e17..7ae3354 100644 --- a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue +++ b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue @@ -59,7 +59,7 @@ <a-col :span="24"> <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit" @change="e => chineseNameChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -75,7 +75,7 @@ <a-col :span="24"> <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" @change="e => toolModelChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -124,7 +124,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -157,11 +157,6 @@ <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-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-form-model-item> @@ -171,9 +166,6 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <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"> @@ -182,6 +174,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -192,14 +187,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <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-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> @@ -214,11 +209,38 @@ <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="shortCalled"> + <a-input + v-model="model.shortCalled" + :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="groupCompanyCode"> + <a-input + v-model="model.groupCompanyCode" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆嗗洟鍏徃鏍囪" :labelCol="{span:4}" :wrapperCol="{span:20}" prop="groupCompanySign"> + <a-input + v-model="model.groupCompanySign" + :disabled="true" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> <a-row :gutter="24"> <a-col :span="6"> <a-form-model-item label="鍒�澶磋鏍�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headSpecifications"> - <a-input v-model="model.headSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶磋鏍�'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.headSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶磋鏍�'" :disabled="disableSubmit" @change="e => headSpecificationsChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -228,7 +250,7 @@ </a-col> <a-col :span="6"> <a-form-model-item label="涓诲亸瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leadAngle"> - <a-input v-model="model.leadAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ヤ富鍋忚'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.leadAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ヤ富鍋忚'" :disabled="disableSubmit" @change="e => leadAngleChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -246,12 +268,26 @@ </a-col> <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> + <j-dict-select-tag + type="list" + v-model="model.cuttingDirection" + :triggerChange="true" + dictCode="cutting_direction" + placeholder="璇烽�夋嫨鍒囧墛鏂瑰悜" + :disabled="disableSubmit" + /> </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> + <j-dict-select-tag + type="list" + v-model="model.toolMaterial" + :triggerChange="true" + dictCode="tool_material" + placeholder="璇烽�夋嫨鍒�鍏锋潗鏂�" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -272,7 +308,14 @@ </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> - <a-input v-model="model.toolPattern" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏峰瀷寮�'" :disabled="disableSubmit" ></a-input> + <j-dict-select-tag + type="list" + v-model="model.toolPattern" + :triggerChange="true" + dictCode="tool_pattern" + placeholder="璇烽�夋嫨鍒�鍏峰瀷寮�" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -281,7 +324,7 @@ </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="conditionsInfo"> <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> @@ -294,7 +337,14 @@ </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> + <j-dict-select-tag + type="list" + v-model="model.types" + :triggerChange="true" + dictCode="types" + placeholder="璇烽�夋嫨鍒跺紡" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -304,14 +354,28 @@ </a-col> <a-col :span="6"> <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> - <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ喎鍗存柟寮�'" :disabled="disableSubmit" ></a-input> + <j-dict-select-tag + type="list" + v-model="model.coolingMethod" + :triggerChange="true" + dictCode="cooling_method" + placeholder="璇烽�夋嫨鍐峰嵈鏂瑰紡" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="6"> <a-form-model-item label="鍒�鏉嗙被鍒�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="holderCategory"> - <a-input v-model="model.holderCategory" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗙被鍒�'" :disabled="disableSubmit" ></a-input> + <j-dict-select-tag + type="list" + v-model="model.holderCategory" + :triggerChange="true" + dictCode="holder_category" + placeholder="璇烽�夋嫨鍒�鏉嗙被鍒�" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -321,7 +385,14 @@ </a-col> <a-col :span="6"> <a-form-model-item label="鎺ュ彛绱у浐褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fasteningForm"> - <a-input v-model="model.fasteningForm" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帴鍙g揣鍥哄舰寮�'" :disabled="disableSubmit" ></a-input> + <j-dict-select-tag + type="list" + v-model="model.fasteningForm" + :triggerChange="true" + dictCode="fastening_form" + placeholder="璇烽�夋嫨鎺ュ彛绱у浐褰㈠紡" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -338,7 +409,14 @@ </a-col> <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> + <j-dict-select-tag + type="list" + v-model="model.bladeShape" + :triggerChange="true" + dictCode="blade_shape" + placeholder="璇烽�夋嫨鍒�鐗囧舰鐘�" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -348,7 +426,14 @@ </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鏉嗘柟鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="barDirection"> - <a-input v-model="model.barDirection" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗘柟鍚�'" :disabled="disableSubmit" ></a-input> + <j-dict-select-tag + type="list" + v-model="model.barDirection" + :triggerChange="true" + dictCode="bar_direction" + placeholder="璇烽�夋嫨鍒�鏉嗘柟鍚�" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> </a-row> @@ -377,7 +462,14 @@ <a-row> <a-col :span="6"> <a-form-model-item label="鍒�鐗囪澶规柟寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingMethod"> - <a-input v-model="model.clampingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囪澶规柟寮�'" :disabled="disableSubmit" ></a-input> + <j-dict-select-tag + type="list" + v-model="model.clampingMethod" + :triggerChange="true" + dictCode="clamping_method" + placeholder="璇烽�夋嫨鍒�鐗囪澶规柟寮�" + :disabled="disableSubmit" + /> </a-form-model-item> </a-col> <a-col :span="6"> @@ -523,8 +615,13 @@ url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', }, - locationCodeOptions:[] + locationCodeOptions:[], + chineseNameChange1:'', + toolModelChange1:'', + headSpecificationsChange1:'', + leadAngleChange1:'', } }, mounted() { @@ -544,7 +641,7 @@ this.editable = false; //鍒濆鍖栭粯璁ゅ�� this.model = { - positionCode: '' + positionCode: '' }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId @@ -555,12 +652,29 @@ edit(record) { this.editable = true; this.model = Object.assign({}, record) + this.chineseNameChange1 = record.chineseName + this.toolModelChange1 = '-'+record.toolModel + this.headSpecificationsChange1 = '-'+record.headSpecifications + this.leadAngleChange1 = '-'+record.leadAngle + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + // getAction(this.url.queryParaByToolCode, { + // toolCode: record.toolCodeId, + // paraTypeFlag: record.paraTypeFlag, + // }).then((res) => { + // if (res.success) { + // this.model = Object.assign({}, res.result) + // } + // }) this.visible = true }, close() { this.$emit('close') this.visible = false this.$refs.form.clearValidate() + this.chineseNameChange1 = '', + this.toolModelChange1 = '', + this.headSpecificationsChange1 = '', + this.leadAngleChange1 = '' }, positionCodeSearch() { let positionCode = [] @@ -634,6 +748,22 @@ } }) }, + chineseNameChange(chineseNameChange){ + this.chineseNameChange1 = chineseNameChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + }, + toolModelChange(toolModelChange){ + this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + }, + headSpecificationsChange(headSpecificationsChange){ + this.headSpecificationsChange1 = headSpecificationsChange == '' ? '' : '-'+headSpecificationsChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + }, + leadAngleChange(leadAngleChange){ + this.leadAngleChange1 = leadAngleChange == '' ? '' : '-'+leadAngleChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + } } } </script> -- Gitblit v1.9.3