From 1eb08ced0ef966804e96c9b792bba45ca6eb6601 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周四, 25 4月 2024 11:25:45 +0800 Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/iWare_RawMaterialWarehouse --- iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue | 33 ++++++++++++++++++++++++--------- 1 files changed, 24 insertions(+), 9 deletions(-) diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue index 22e6397..34da4a7 100644 --- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue +++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue @@ -1,12 +1,12 @@ <template> - <a-modal title="鏂板鍩虹鐗╂枡淇℃伅" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" + <a-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" @cancel="handleCancel"> <a-spin :spinning="confirmLoading"> <!-- tab --> <a-tabs default-active-key="1" @change="callbacktab"> <a-tab-pane key="1" tab="鍩烘湰淇℃伅"> <!-- <add-form ref="addFormRef" @ok="handleOk" /> --> - <!-- 鍩烘湰淇℃伅 --> + <!-- 鍩烘湰淇℃伅 layout="inline" layout="vertical" --> <a-form :form="form"> <a-form-item label="鐗╂枡鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" @@ -145,6 +145,7 @@ }, data() { return { + title: '', labelCol: { // xs: { span: 24 }, // sm: { span: 5 } @@ -207,14 +208,21 @@ handleOk() { }, // 鍒濆鍖栨柟娉� add(record) { - this.visible = true - // this.$nextTick(() => { - // // this.getSelects() - // }) const materialTypeOption = this.$options - this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class') - // const inspectionMethodOption = this.$options - // this.inspectionMethodData = inspectionMethodOption.filters['dictData']('material_inspection') + this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class') + + this.visible = true + if (record) {//缂栬緫 + this.title = '缂栬緫鍩虹鐗╂枡淇℃伅'; + this.$nextTick(() => { + this.form.setFieldsValue({ + ...record + }) + }) + + } else { // 鏂板 + this.title = '鏂板鍩虹鐗╂枡淇℃伅'; + } }, getSelects() { if (this.areaNameParameterData.length <= 0 || this.stationNameParameterData.length <= 0) { @@ -327,3 +335,10 @@ } } </script> + +<style lang="less" scoped> +.ant-row.ant-form-item { + width: 50% !important; + display: inline-block; +} +</style> -- Gitblit v1.9.3