From 3dd1c81c84d78a30fff6468ccb05f979f2d50966 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期三, 22 十一月 2023 17:48:45 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430
---
src/views/eam/modules/site/ProductionLineModel.vue | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/src/views/eam/modules/site/ProductionLineModel.vue b/src/views/eam/modules/site/ProductionLineModel.vue
index dbb596b..7ac1c10 100644
--- a/src/views/eam/modules/site/ProductionLineModel.vue
+++ b/src/views/eam/modules/site/ProductionLineModel.vue
@@ -16,14 +16,14 @@
<a-row :gutter="24">
<a-col :span="24">
<a-form-item
- label="浜х嚎缂栧彿"
+ label="宸ユ缂栧彿"
:labelCol="{span:4}"
:wrapperCol="{span:18}"
>
<a-input
- :readOnly="disableSubmit"
+ :readOnly="codeDisable"
allow-clear
- placeholder="璇疯緭鍏ヤ骇绾跨紪鍙�"
+ placeholder="灏嗙敱绯荤粺鑷姩鐢熸垚"
v-decorator="['num', validatorRules.num ]"
/>
</a-form-item>
@@ -33,14 +33,14 @@
<a-row :gutter="24">
<a-col :span="24">
<a-form-item
- label="浜х嚎鍚嶇О"
+ label="宸ユ鍚嶇О"
:labelCol="{span:4}"
:wrapperCol="{span:18}"
>
<a-input
:readOnly="disableSubmit"
allow-clear
- placeholder="璇疯緭鍏ヤ骇绾垮悕绉�"
+ placeholder="璇疯緭鍏ュ伐娈靛悕绉�"
v-decorator="['name', validatorRules.name ]"
/>
</a-form-item>
@@ -89,7 +89,7 @@
<script>
import pick from 'lodash.pick'
-import { postAction, requestPut } from '@/api/manage'
+import { getAction, postAction, requestPut } from '@/api/manage'
import { duplicateCheck } from '@/api/api'
export default {
@@ -118,14 +118,14 @@
validatorRules: {
num: {
rules: [
- { required: true, message: '璇疯緭鍏ヤ骇绾跨紪鍙�!' },
+ { required: true, message: '璇疯緭鍏ュ伐娈电紪鍙�!' },
{ min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' },
{ validator: this.validateNum },
]
},
name: {
rules: [
- { required: true, message: '璇疯緭鍏ヤ骇绾垮悕绉�!' },
+ { required: true, message: '璇疯緭鍏ュ伐娈靛悕绉�!' },
{ min: 0, max: 30, message: '闀垮害涓嶈秴杩� 30 涓瓧绗�', trigger: 'blur' },
{ validator: this.validateName },
]
@@ -138,9 +138,11 @@
},
url: {
add: "/base/productionLine/add",
- edit: "/base/productionLine/edit"
+ edit: "/base/productionLine/edit",
+ getNum: '/eam/sysIdentity/getNumNew',
},
disableSubmit: false,
+ codeDisable: false,
//鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴��
alterFlag: ""
}
@@ -159,6 +161,18 @@
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'num', 'name', 'shiftCategoryId', 'remark'))
});
+ if (!record.id) {
+ this.$nextTick(() => {
+ getAction(this.url.getNum, { type: 'ProductionLine', length: '4' }).then((res) => {
+ if (res.success) {
+ this.form.setFieldsValue({ num: res.message });
+ }
+ })
+ });
+ this.codeDisable = false;
+ } else {
+ this.codeDisable = true;
+ }
},
close() {
this.$emit('close');
--
Gitblit v1.9.3