From 264795ac21be1ef5e36ec431005acb84777dad79 Mon Sep 17 00:00:00 2001 From: liuying <1427574514@qq.com> Date: 周四, 25 4月 2024 14:07:46 +0800 Subject: [PATCH] css --- iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/addForm.vue | 166 +++++++++++++++++++++++++++---------------------------- 1 files changed, 81 insertions(+), 85 deletions(-) diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/addForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/addForm.vue index 6953930..295ef44 100644 --- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/addForm.vue +++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/addForm.vue @@ -1,19 +1,14 @@ 锘�<template> - <a-modal - title="鏂板瀹瑰櫒鍏崇郴" - :width="900" - :visible="visible" - :confirmLoading="confirmLoading" - @ok="handleSubmit" + <a-modal title="鏂板瀹瑰櫒鍏崇郴" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" @cancel="handleCancel"> <a-spin :spinning="confirmLoading"> - <a-form :form="form"> + <a-form :form="form"> <a-form-item label="瀹瑰櫒绫诲瀷鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <!-- <a-input placeholder="璇疯緭鍏ュ鍣ㄧ被鍨婭D" v-decorator="['containerTypeId', {rules: [{required: true, message: '璇疯緭鍏ュ鍣ㄧ被鍨婭D锛�'}]}]" /> --> <a-select style="width: 100%" placeholder="璇烽�夋嫨瀹瑰櫒绫诲瀷鍚嶇О" v-decorator="['containerTypeId']"> - <a-select-option v-for="(item, index) in selectTypeData" :key="index" - :value="item.typeCode">{{ item.typeName }}</a-select-option> + <a-select-option v-for="(item, index) in selectTypeData" :key="index" :value="item.typeCode">{{ item.typeName + }}</a-select-option> </a-select> </a-form-item> @@ -24,8 +19,8 @@ <!-- <a-input placeholder="璇疯緭鍏ョ墿鏂欑被鍨婭D" v-decorator="['materialTypeId', {rules: [{required: true, message: '璇疯緭鍏ョ墿鏂欑被鍨婭D锛�'}]}]" /> --> <a-select style="width: 100%" placeholder="璇烽�夋嫨鐗╂枡绫诲瀷鍚嶇О" v-decorator="['materialTypeId']"> - <a-select-option v-for="(item, index) in selectTypeData2" :key="index" - :value="item.materialTypeCode">{{ item.materialTypeName }}</a-select-option> + <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="item.materialTypeCode">{{ + item.materialTypeName }}</a-select-option> </a-select> </a-form-item> @@ -36,7 +31,7 @@ <a-input placeholder="璇疯緭鍏ョ墿鏂欑被鍨嬪悕绉�" v-decorator="['materialTypeName', {rules: [{required: true, message: '璇疯緭鍏ョ墿鏂欑被鍨嬪悕绉帮紒'}]}]" /> </a-form-item> --> <a-form-item label="鐗╂枡瀹瑰櫒瀹归噺" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> - <a-input placeholder="璇疯緭鍏ョ墿鏂欏鍣ㄥ閲�" v-decorator="['boxQty', {rules: [{required: true, message: '璇疯緭鍏ョ墿鏂欏鍣ㄥ閲忥紒'}]}]" /> + <a-input placeholder="璇疯緭鍏ョ墿鏂欏鍣ㄥ閲�" v-decorator="['boxQty', { rules: [{ required: true, message: '璇疯緭鍏ョ墿鏂欏鍣ㄥ閲忥紒' }] }]" /> </a-form-item> </a-form> </a-spin> @@ -44,86 +39,87 @@ </template> <script> - import moment from 'moment' - import { +import moment from 'moment' +import { WmsContainerPackagingAdd - } from '@/api/modular/main/WmsBase/WmsContainerPackagingManage' +} from '@/api/modular/main/WmsBase/WmsContainerPackagingManage' - import { WmsContainerTypePage, WmsContainerTypeDelete, WmsContainerTypeToExcel } from '@/api/modular/main/WmsBase/WmsContainerTypeManage' - import { WmsMaterialTypePage,} from '@/api/modular/main/WmsBase/WmsMaterialTypeManage' - export default { - data () { - return { - labelCol: { - xs: { span: 24 }, - sm: { span: 5 } +import { WmsContainerTypePage, WmsContainerTypeDelete, WmsContainerTypeToExcel } from '@/api/modular/main/WmsBase/WmsContainerTypeManage' +import { WmsMaterialTypePage, } from '@/api/modular/main/WmsBase/WmsMaterialTypeManage' +export default { + data() { + return { + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 15 } + }, + visible: false, + confirmLoading: false, + form: this.$form.createForm(this), + selectTypeData2:[] + } }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 15 } + created() { + WmsContainerTypePage().then((d) => { + this.selectTypeData = d.data.rows || [] + }).catch(() => { + + }) + WmsMaterialTypePage().then((d) => { + this.selectTypeData2 = d.data.rows || [] + }).catch(() => { + + }) }, - visible: false, - confirmLoading: false, - form: this.$form.createForm(this) - } + methods: { + moment, + // 鍒濆鍖栨柟娉� + add(record) { + this.visible = true + this.$nextTick(() => { + + }); + + }, - created() { - WmsContainerTypePage().then((d) => { - this.selectTypeData = d.data.rows || [] - }).catch(() => { - - }) - WmsMaterialTypePage().then((d) => { - this.selectTypeData2 = d.data.rows || [] - }).catch(() => { - - }) - }, - methods: { - moment, - // 鍒濆鍖栨柟娉� - add (record) { - this.visible = true - this.$nextTick(() => { - - }); - - - }, - /** - * 鎻愪氦琛ㄥ崟 - */ - handleSubmit () { - const { form: { validateFields } } = this - this.confirmLoading = true - validateFields((errors, values) => { - if (!errors) { - for (const key in values) { - if (typeof (values[key]) === 'object') { - values[key] = JSON.stringify(values[key]) - } + /** + * 鎻愪氦琛ㄥ崟 + */ + handleSubmit() { + const { form: { validateFields } } = this + this.confirmLoading = true + validateFields((errors, values) => { + if (!errors) { + for (const key in values) { + if (typeof (values[key]) === 'object') { + values[key] = JSON.stringify(values[key]) } - WmsContainerPackagingAdd(values).then((res) => { - if (res.success) { - this.$message.success('鏂板鎴愬姛') - this.confirmLoading = false - this.$emit('ok', values) - this.handleCancel() - } else { - this.$message.error('鏂板澶辫触锛�' + JSON.stringify(res.message)) - } - }).finally((res) => { - this.confirmLoading = false - }) - } else { - this.confirmLoading = false } - }) - }, - handleCancel () { - this.form.resetFields() - this.visible = false - } + WmsContainerPackagingAdd(values).then((res) => { + if (res.success) { + this.$message.success('鏂板鎴愬姛') + this.confirmLoading = false + this.$emit('ok', values) + this.handleCancel() + } else { + this.$message.error('鏂板澶辫触锛�' + JSON.stringify(res.message)) + } + }).finally((res) => { + this.confirmLoading = false + }) + } else { + this.confirmLoading = false + } + }) + }, + handleCancel() { + this.form.resetFields() + this.visible = false } } +} </script> -- Gitblit v1.9.3