From 585fb0bbd4a7bc7f8f333ecba7c5fecd2ee5cbc2 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 28 三月 2024 09:46:44 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop --- src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue | 124 ++++++++++++++++++++++++---------------- 1 files changed, 74 insertions(+), 50 deletions(-) diff --git a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue index 4c933fc..cca34ff 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue @@ -31,25 +31,34 @@ </a-col> <a-col :span="12"> <a-form-item - label="瀵硅薄閮ㄩ棬" + label="浣跨敤閮ㄩ棬" :labelCol="labelCol" :wrapperCol="wrapperCol" > <!-- <a-input-search :disabled="disableSubmit" - placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" enter-button @search="onDepartList()" :read-only="true" v-decorator="['useDepartName', validatorRules.useDepartName]" - /> --> + /> <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" - placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all v-decorator="['useId', validatorRules.useId ]" + />--> + + <j-dict-select-tag + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤閮ㄩ棬'" + :triggerChange="true" + dictCode="sys_depart,depart_name,id,del_flag!='1'" + v-decorator="['useId', {}]" /> </a-form-item> </a-col> @@ -99,21 +108,21 @@ <a-input allow-clear :disabled="true" - :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶囩紪鐮�/鍚嶇О/鍨嬪彿'" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ粺涓�缂栫爜/鍚嶇О/鍨嬪彿'" v-decorator="['equipmentId', validatorRules.equipmentId ]" /> </a-form-item> </a-col> <!-- <a-col :span="12"> <a-form-item - label="瀵硅薄閮ㄩ棬Id" + label="浣跨敤閮ㄩ棬Id" :labelCol="labelCol" :wrapperCol="wrapperCol" > <a-input allow-clear :disabled="true" - :placeholder="disableSubmit?'':'璇疯緭鍏ュ璞¢儴闂╥d'" + :placeholder="disableSubmit?'':'璇疯緭鍏ヤ娇鐢ㄩ儴闂╥d'" v-decorator="['useId', validatorRules.useId ]" /> </a-form-item> @@ -122,17 +131,15 @@ <a-row :gutter="24"> <a-col :span="12"> <a-form-item - label="娲惧伐鏂瑰紡" + label="绠$悊鍒跺害" :labelCol="labelCol" :wrapperCol="wrapperCol" > - <j-dict-select-tag + <a-input allow-clear - :disabled="disableSubmit" - :placeholder="disableSubmit?'':'璇烽�夋嫨娲惧伐鏂瑰紡'" - :triggerChange="true" - dictCode="assign_mode" - v-decorator="['assignMode', validatorRules.assignMode]" + :disabled="false" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ鐞嗗埗搴�'" + v-decorator="['disUda1', validatorRules.disUda1 ]" /> </a-form-item> </a-col> @@ -201,6 +208,7 @@ rowKey='id' :columns="columns" :dataSource="dataSource" + :pagination="false" > <template v-for="col in columns" @@ -216,7 +224,7 @@ style="width: 100%" :disabled="false" /> - <j-image-upload + <!-- <j-image-upload :value="text" v-if="col.dataIndex == 'photo'" :isMultiple="false" @@ -224,7 +232,7 @@ placeholder="璇蜂笂浼犲浘鐗�" @change="(e)=>handleChange(e, record.key, col, index)" > - </j-image-upload> + </j-image-upload> --> <a-input :value="text" v-if="col.dataIndex == 'location'" @@ -316,46 +324,45 @@ dataIndex: 'name' }, { - title: '妫�娴嬫爣鍑�', + title: '瀹屾垚鏁版嵁/瑕佹眰', align: 'center', dataIndex: 'detectionStandard' }, - { - title: '鍚堟牸鑼冨洿', - align: 'center', - dataIndex: 'acceptabilityLimit' - }, - { - title: '鏂规硶', - align: 'center', - dataIndex: 'inspectionMethodName' - }, - { - title: '宸ュ叿', - align: 'center', - dataIndex: 'inspectionTool' - }, + // { + // title: '鍚堟牸鑼冨洿', + // align: 'center', + // dataIndex: 'acceptabilityLimit' + // }, + // { + // title: '鏂规硶', + // align: 'center', + // dataIndex: 'inspectionMethodName' + // }, + // { + // title: '宸ュ叿', + // align: 'center', + // dataIndex: 'inspectionTool' + // }, { title: '鍛ㄦ湡', align: 'center', dataIndex: 'inspectionCycleId', scopedSlots: { customRender: 'inspectionCycleId' }, - width: 170, }, - { - title: '绀烘剰鍥�', - align: 'center', - dataIndex: 'photo', - scopedSlots: { customRender: 'photo' }, - width: 170, - }, - { - title: '閮ㄤ綅', - align: 'center', - dataIndex: 'location', - scopedSlots: { customRender: 'location' }, - width: 170, - }, + // { + // title: '绀烘剰鍥�', + // align: 'center', + // dataIndex: 'photo', + // scopedSlots: { customRender: 'photo' }, + // width: 170, + // }, + // { + // title: '閮ㄤ綅', + // align: 'center', + // dataIndex: 'location', + // scopedSlots: { customRender: 'location' }, + // width: 170, + // }, { title: '鎿嶄綔', align: 'center', @@ -410,6 +417,11 @@ { required: true, message: '璇疯緭鍏ュ巻鍙茬増鏈�!' }, ] }, + disUda1: { + rules: [ + { required: true, message: '璇疯緭鍏ョ鐞嗗埗搴�!' }, + ] + }, }, url: { add: "/eam/inspectionStandard/add", @@ -418,6 +430,7 @@ revise: '/eam/inspectionStandard/revise', getReviseVersion: "/eam/inspectionStandard/getReviseVersion", loadOptions: '/sys/sysDepart/loadDepartTreeOptions', + getNum: '/eam/sysIdentity/getNumNew' }, dataSource: [], @@ -458,12 +471,13 @@ add() { this.edit({ dailyInspectionStandardDetaillist: [] }) + this.getSeq() }, edit(record) { let that = this; that.getInspectionCycle() - that.initOptions(); + // that.initOptions(); that.dataSource = []; that.form.resetFields(); that.model = Object.assign({}, record); @@ -473,7 +487,7 @@ that.dataSource = temp; } that.$nextTick(() => { - that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark')); + that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentName', 'useDepartName', 'disUda1', 'useId', 'teamName', 'assignMode', 'version', 'remark')); }); if (record.id) { that.codeDisable = true; @@ -492,6 +506,14 @@ that.form.setFieldsValue({ "version": "1.0", }) }); } + }, + + getSeq() { + getAction(this.url.getNum, { type: 'DailylnspectionStandard', length: 4 }).then(res => { + if (res.success) { + this.form.setFieldsValue({ "num": res.result }) + } + }) }, initOptions() { @@ -516,7 +538,7 @@ onDepartList() { this.$refs.DepartList.list(); - this.$refs.DepartList.title = "閫夋嫨瀵硅薄閮ㄩ棬"; + this.$refs.DepartList.title = "閫夋嫨浣跨敤閮ㄩ棬"; }, sendDepartRecord(data) { this.dataSource = []; @@ -543,10 +565,12 @@ let obj; if (!this.model.id) { formData.versionStatus = '1' + formData.approvalStatus = '1' obj = postAction(this.url.add, formData); } else { if (this.isRevise) { formData.versionStatus = '1' + formData.approvalStatus = '1' obj = postAction(this.url.revise, formData); } else { obj = requestPut(this.url.edit, formData, { id: this.model.id }); -- Gitblit v1.9.3