From 1550ea7fb0f98762062833a37f716ba459b986df Mon Sep 17 00:00:00 2001 From: lyh <liuyuanheng@xalxzn.com> Date: 星期五, 28 二月 2025 15:53:38 +0800 Subject: [PATCH] 工作流 代办已办 --- src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue | 64 +++++++++++++++---------------- 1 files changed, 31 insertions(+), 33 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue index 34603da..1866bd5 100644 --- a/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/Process/ProcessModalForm.vue @@ -17,7 +17,20 @@ <a-row> <a-col :span="24"> <a-form-model-item label="鍔犲伐璁惧缂栧彿" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> - <a-select v-model="model.processingEquipmentCode" placeholder="璇烽�夋嫨鍔犲伐璁惧缂栧彿"></a-select> + <j-dict-select-tag v-model="model.processingEquipmentCode" placeholder="璇烽�夋嫨鍔犲伐璁惧缂栧彿" dictCode="mdc_equipment,equipment_id,equipment_id"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍔犲伐璁惧鍨嬪彿"> + <a-input v-model="model.processingEquipmentModel" placeholder="璇疯緭鍏ュ姞宸ヨ澶囧瀷鍙�"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍔犲伐璁惧绫诲瀷"> + <a-input v-model="model.processingEquipmentOs" placeholder="璇疯緭鍏ュ姞宸ヨ澶囩被鍨�"></a-input> </a-form-model-item> </a-col> </a-row> @@ -61,22 +74,24 @@ </a-col> </a-row> </a-form-model> - - <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/> </a-spin> </template> <script> import { httpAction, getAction } from '@/api/manage' - import SelectDeviceDrawer from '@/views/system/modules/SelectDeviceDrawer' export default { name: 'ProcessModalForm', - components: { SelectDeviceDrawer }, + components: {}, + props: { + allDeviceList: { + type: Array + } + }, data() { return { model: { - passCount: 0 + processType: 0 }, labelCol: { xs: { span: 24 }, @@ -104,28 +119,23 @@ ] }, url: { - add: '/mdc/mdcPartProcessInfo/add', - edit: '/mdc/mdcPartProcessInfo/edit' + add: '/nc/stream/process/add', + edit: '/nc/stream/process/edit' } - } - }, - computed: { - formDisabled() { - return this.disabled } }, created() { //澶囦唤model鍘熷鍊� this.modelDefault = JSON.parse(JSON.stringify(this.model)) + this.$bus.$on('sendAllDeviceList', deviceList => this.deviceList = deviceList) }, methods: { - add() { - this.edit(this.modelDefault) + add(params) { + this.edit({ ...this.modelDefault, ...params }) }, edit(record) { - this.model = Object.assign({}, { equipmentIds: record.equipmentId }, record) + this.model = Object.assign({}, record) console.log('model', this.model) - this.visible = true }, submitForm() { const that = this @@ -134,11 +144,13 @@ if (valid) { that.confirmLoading = true let httpUrl = '' - let method = 'post' + let method = '' if (!this.model.id) { httpUrl += this.url.add + method = 'post' } else { - httpUrl += this.url.edit + httpUrl += this.url.edit + `/${this.model.id}` + method = 'put' } httpAction(httpUrl, this.model, method).then((res) => { if (res.success) { @@ -159,20 +171,6 @@ } }) - }, - deviceSearch() { - this.$refs.selectDeviceDrawer.visible = true - this.$refs.selectDeviceDrawer.selectedRowKeys = [] - this.$refs.selectDeviceDrawer.selectedRows = [] - this.$refs.selectDeviceDrawer.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] - }, - /** - * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂 - * @param data 宸查�夋嫨鐨勮澶� - */ - selectOK(data) { - this.$set(this.model, 'equipmentIds', data.join(',')) - if (this.model.equipmentIds) this.$refs.form.clearValidate('equipmentIds') } } } -- Gitblit v1.9.3