From 9d3f1aa7571cd532c0c27bf8376ebf4b2178a252 Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期三, 24 七月 2024 17:45:45 +0800 Subject: [PATCH] fix:解决srm之前改了域名,处理各种异常状态,跳转也会出现异常等问题。 --- src/views/purchaseManage/purchase/components/AddPurchase.vue | 41 ++++++++++++++++++++++++++++++++++------- 1 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/views/purchaseManage/purchase/components/AddPurchase.vue b/src/views/purchaseManage/purchase/components/AddPurchase.vue index b7936a4..59482de 100644 --- a/src/views/purchaseManage/purchase/components/AddPurchase.vue +++ b/src/views/purchaseManage/purchase/components/AddPurchase.vue @@ -144,6 +144,7 @@ clearable placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-dd" + :picker-options="pickerOptionsBefore" > </el-date-picker> </el-form-item> @@ -158,6 +159,7 @@ clearable placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-dd" + :picker-options="pickerOptions" > </el-date-picker> </el-form-item> @@ -228,6 +230,7 @@ <div class="basic-info-title" style="display: flex">浜у搧淇℃伅</div> <div class="product-view"> <CommonFormTableView + ref="tableRef" :detailEnter="editCommonConfig.detailEnter" :show-summary="showSummary" :recalculateShow="false" @@ -336,7 +339,7 @@ <script> import CommonFormTableView from "@/components/makepager/CommonFormTableView" import BomDialog from "@/components/makepager/BomDialog" -import { getProductList } from "@/api/productManage/product" +import { getProductListTwo } from "@/api/productManage/product" import { addPurchase, updatePurchase, @@ -398,7 +401,7 @@ number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }], warehouse: [{ required: true, message: "璇烽�夋嫨鏀惰揣浠撳簱", trigger: "change" }], signingDate: [{ required: true, message: "璇烽�夋嫨绛剧害鏃ユ湡", trigger: "change" }], - deliveryDate: [{ required: true, message: "璇烽�夋嫨浜や粯鏃ユ湡", trigger: "change" }] + deliveryDate: [{ required: true, message: "璇烽�夋嫨浜や粯鏃ユ湡", trigger: "change" }], }, productTableList: {}, showSummary: { @@ -429,11 +432,20 @@ totalTwo: 0, productListIdx: 0, lacks: [], + pickerOptions: { + disabledDate(time) { + return time.getTime() < Date.now() - 8.64e7 + } + }, + pickerOptionsBefore: { + disabledDate(time) { + return time.getTime() > Date.now() + } + }, receiveWhouseList: [] // 鏀惰揣浠撳簱鍒楄〃 } }, created() { - console.log(this.editConfig, "鍙傛暟") this.handleGetBomKindDictList() this.getWarehouseInfo() this.$store.dispatch("getSupplier") @@ -625,7 +637,7 @@ } } else { // 缂栬緫 - getProductList({ + getProductListTwo({ supplierId: this.editConfig.infomation.supplierId, page: 1, pageSize: 100 @@ -743,18 +755,20 @@ }, // 閫夋嫨渚涘簲鍟� async handleSelectClient(value, item) { + this.$refs.tableRef.supplierId=item.id this.productTableList.supplierId = item.id if (value === "client") { this.supplierId = item.id this.editConfig.infomation.supplierId = item.id } - await getProductList({ + await getProductListTwo({ supplierId: item.id, page: 1, pageSize: 100 }).then((res) => { if (res.code === 200) { this.productTableList.tableProductList = res.data.list + this.$refs.tableRef.productList=res.data.list console.log(this.productTableList.tableProductList, "pop") } }) @@ -763,12 +777,14 @@ this.editSelectSupplierConfig.editVisible = true }, async selClient(row) { - await getProductList({ + this.$refs.tableRef.supplierId=row.id + await getProductListTwo({ supplierId: row.id, page: 1, pageSize: 100 }).then((res) => { if (res.code === 200) { + this.$refs.tableRef.productList=res.data.list this.productTableList.tableProductList = res.data.list } }) @@ -778,11 +794,22 @@ this.editConfig.infomation.supplierId = row.id }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 - clearupClient(value) { + async clearupClient(value) { if (value == "client") { + this.$refs.tableRef.supplierId=null this.$set(this.editConfig.infomation, "supplierName", "") this.supplierId = null this.$forceUpdate() + await getProductListTwo({ + page: 1, + pageSize: 100 + }).then((res) => { + if (res.code === 200) { + this.productTableList.tableProductList = res.data.list + this.$refs.tableRef.productList=res.data.list + console.log(this.productTableList.tableProductList, "pop") + } + }) } }, setTableForm() { -- Gitblit v1.8.0