From 6e6b156bb0100043214c170d7171eb79e0d7e344 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 26 4月 2024 13:48:42 +0800
Subject: [PATCH] 时间查询 选完时间再清除掉 接口报错
---
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue | 76 +++++++++++++++++++++----------------
1 files changed, 43 insertions(+), 33 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 e076ebf..80bdb17 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
@@ -1,9 +1,10 @@
<template>
<a-modal :title="title" :width="1300" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
- @cancel="handleCancel">
+ @cancel="handleCancel" :footer="null">
+
<a-spin :spinning="confirmLoading">
<!-- tab -->
- <a-tabs default-active-key="1" @change="callbacktab">
+ <a-tabs default-active-key="1" @change="callbacktab" v-if="visible">
<a-tab-pane key="1" tab="鍩烘湰淇℃伅">
<!-- <add-form ref="addFormRef" @ok="handleOk" /> -->
<!-- 鍩烘湰淇℃伅 layout="inline" layout="vertical" -->
@@ -28,8 +29,9 @@
</a-form-item> -->
<a-form-item label="鐗╂枡绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-select style="width: 100%" placeholder="璇烽�夋嫨鐗╂枡绫诲瀷" v-decorator="['materialType']">
- <a-select-option v-for="(item, index) in materialTypeData" :key="index" :value="item.materialTypeCode">{{
+ <a-select style="width: 100%" placeholder="璇烽�夋嫨鐗╂枡绫诲瀷"
+ v-decorator="['materialType', { rules: [{ required: true, message: '璇烽�夋嫨鐗╂枡绫诲瀷锛�' }] }]">
+ <a-select-option v-for="(item, index) in materialTypeData" :key="index" :value="item.id">{{
item.materialTypeName }}</a-select-option>
</a-select>
</a-form-item>
@@ -43,7 +45,7 @@
<a-form-item label="ABC鍒嗙被" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<!-- <a-input-number placeholder="璇疯緭鍏BC鍒嗙被" style="width: 100%" v-decorator="['aBCClass']" /> -->
- <a-select style="width: 100%" placeholder="璇烽�夋嫨ABC鍒嗙被" v-decorator="['aBCClass']">
+ <a-select style="width: 100%" placeholder="璇烽�夋嫨ABC鍒嗙被" v-decorator="['abcClass']">
<a-select-option v-for="(item, index) in materialTypeData2" :key="index" :value="Number(item.code)">{{
item.name }}</a-select-option>
</a-select>
@@ -61,7 +63,7 @@
<!-- <a-input placeholder="璇疯緭鍏ュ簱瀛樺崟浣�" v-decorator="['materialUnit']" /> -->
<a-select style="width: 100%" placeholder="璇烽�夋嫨搴撳瓨鍗曚綅" v-decorator="['materialUnit']">
- <a-select-option v-for="(item, index) in selectTypeData1" :key="index" :value="item.unitCode">{{
+ <a-select-option v-for="(item, index) in selectTypeData1" :key="index" :value="item.unitName">{{
item.unitName }}</a-select-option>
</a-select>
@@ -70,8 +72,8 @@
<a-form-item label="閲囪喘鍗曚綅" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<!-- <a-input placeholder="璇疯緭鍏ラ噰璐崟浣�" v-decorator="['pOUnit']" /> -->
- <a-select style="width: 100%" placeholder="璇烽�夋嫨閲囪喘鍗曚綅" v-decorator="['pOUnit']">
- <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="item.unitCode">{{
+ <a-select style="width: 100%" placeholder="璇烽�夋嫨閲囪喘鍗曚綅" v-decorator="['poUnit']">
+ <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="item.unitName">{{
item.unitName }}</a-select-option>
</a-select>
@@ -84,7 +86,7 @@
<a-input placeholder="璇疯緭鍏ラ噸閲�" v-decorator="['weight']" />
</a-form-item>
<a-form-item label="鏍囧寘鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input placeholder="璇疯緭鍏ユ爣鍖呮暟閲�" v-decorator="['sNP']" />
+ <a-input placeholder="璇疯緭鍏ユ爣鍖呮暟閲�" v-decorator="['snp']" />
</a-form-item>
<a-form-item label="鎹㈢畻鐜�" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="璇疯緭鍏ユ崲绠楃巼" v-decorator="['translateRate']" />
@@ -101,19 +103,21 @@
<a-form-item label="鎻忚堪" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="璇疯緭鍏ユ弿杩�" v-decorator="['materialDesc']" />
</a-form-item>
+ <a-form-item v-show="false"><a-input v-decorator="['id']" /></a-form-item>
</a-form>
</a-tab-pane>
+ <!-- force-render 寰堥噸瑕� 涓嶇劧ref瀹炰緥鑾峰彇涓嶅埌 -->
<a-tab-pane key="2" tab="鎺у埗灞炴��" force-render>
- <add-control-rule v-if="visible" ref="WmsControlRuleRef" />
+ <add-control-rule ref="WmsControlRuleRef" />
</a-tab-pane>
- <a-tab-pane key="3" tab="鎵规灞炴��">
+ <a-tab-pane key="3" tab="鎵规灞炴��" force-render>
闇�姹傚緟瀹�
</a-tab-pane>
- <a-tab-pane key="4" tab="鏇夸唬鍝佺鐞�">
- <add-form-sub v-if="visible" ref="addFormWmsSubstituteGoodRef" />
+ <a-tab-pane key="4" tab="鏇夸唬鍝佺鐞�" force-render>
+ <add-form-sub ref="addFormWmsSubstituteGoodRef" />
</a-tab-pane>
- <a-tab-pane key="5" tab="瀹㈡埛">
- <add-form-base-customer v-if="visible" ref="addFormBaseCustomer" />
+ <a-tab-pane key="5" tab="寰�鏉ュ崟浣�" force-render>
+ <add-form-base-customer ref="addFormBaseCustomer" />
</a-tab-pane>
<!-- <a-tab-pane key="6" tab="鍖呰鍏崇郴">
@@ -121,6 +125,12 @@
</a-tab-pane> -->
</a-tabs>
</a-spin>
+
+ <div style="text-align: right;">
+ <a-button @click="handleCancel">鑱屾秷</a-button>
+ <a-button v-if="title != '璇︽儏鐗╂枡淇℃伅璇︽儏'" type="primary" @click="handleSubmit">纭畾</a-button>
+ </div>
+
</a-modal>
</template>
@@ -144,7 +154,7 @@
addControlRule
},
created() {
- this.materialTypeDataList()
+
const materialTypeOption = this.$options
this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class_type')
},
@@ -181,20 +191,13 @@
}).catch(() => {
})
- // 搴撳瓨鍗曚綅
+ // 搴撳瓨鍗曚綅 閲囪喘鍗曚綅
WmsUnitPage().then((d) => {
this.selectTypeData1 = d.data.rows || []
- }).catch(() => {
-
- })
-
- // 閲囪喘鍗曚綅
- WmsUnitPage().then((d) => {
this.selectTypeData2 = d.data.rows || []
}).catch(() => {
})
-
},
callbacktab(e) {
@@ -211,13 +214,14 @@
this.$nextTick(() => {
// let materialCode = this.form.getFieldValue('materialCode');
// let materialName = this.form.getFieldValue('materialName');
- this.$refs.addFormWmsSubstituteGoodRef.initShowSubstituteGood()
+ // this.$refs.addFormWmsSubstituteGoodRef.initShowSubstituteGood()
})
}
},
handleOk() { },
// 鍒濆鍖栨柟娉�
add(record, type) {
+ this.materialTypeDataList()
this.visible = true
if (record) {//缂栬緫
if (type == '璇︽儏') {
@@ -230,23 +234,22 @@
...record
})
})
+ this.confirmLoading = true
WmsMaterialDetailList({
id: record.id
})
.then(res => {
if (res.success) {
-
- console.log(res)
this.$nextTick(() => {
+ this.$refs.addFormWmsSubstituteGoodRef.list = res.data.substituteGoodList || []
+ this.$refs.addFormBaseCustomer.list = res.data.baseCustomerList || []
if (res.data.controlRuleDetailList && res.data.controlRuleDetailList.length > 0) {
this.$refs.WmsControlRuleRef.form.setFieldsValue({
...res.data.controlRuleDetailList[0]
})
}
- this.$refs.addFormWmsSubstituteGoodRef.list = res.data.substituteGoodList || []
- this.$refs.addFormBaseCustomer.list = res.data.baseCustomerList || []
- })
+ })
} else {
this.$message.error('璇︽儏澶辫触锛�' + JSON.stringify(res.message))
}
@@ -298,6 +301,10 @@
// values.stationNameParameter = values.stationNameParameterArr.join(',')
// }
+
+ console.log("鐗╂枡淇℃伅9999999999999999")
+ console.log(values);
+
console.log(6666666666666 + '鎺у埗灞炴��')
var ControlRuleld = this.$refs.WmsControlRuleRef.form.getFieldValue('id') || ''
@@ -317,16 +324,19 @@
BaseCustomerList = this.$refs.addFormBaseCustomer.list
}
- console.log(6666666666666 + '寰�鏉ュ叧绯婚泦鍚�')
+ console.log(6666666666666 + '寰�鏉ュ崟浣嶉泦鍚�')
// console.log(6666666666666 + '鍖呰鍏崇郴')
// console.log(this.$refs.addFormContainerPackagingRef.list)
-
+ var a1 = []
+ BaseCustomerList.forEach((item) => {
+ a1.push(item.id)
+ })
var param = {
MaterialInput: values,
ControlRuleld: ControlRuleld, //鎺у埗灞炴��
SubstituteGoodList: SubstituteGoodList, //鏇夸唬鍝�
- BaseCustomerList: BaseCustomerList, //寰�鏉ュ叧绯婚泦鍚�
+ BaseCustomerList: a1, //寰�鏉ュ崟浣嶉泦鍚�
// ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //鍖呰鍏崇郴
}
this.confirmLoading = true
--
Gitblit v1.9.3