From 7b5e1c2372faf11b6211126410d2713f2b47f147 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 19 四月 2024 17:01:44 +0800
Subject: [PATCH] 嘉联 excel转化pdf的文件裁剪问题调整
---
src/views/productManage/reorderRules/index.vue | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/src/views/productManage/reorderRules/index.vue b/src/views/productManage/reorderRules/index.vue
index 9a66f15..91de486 100644
--- a/src/views/productManage/reorderRules/index.vue
+++ b/src/views/productManage/reorderRules/index.vue
@@ -81,7 +81,7 @@
reorderId: 0,
queryProductId: null,
searchTaskMap: [],
- currentRowId:-1
+ currentRowId: -1
}
},
created() {
@@ -92,7 +92,6 @@
this.pagerOptions.currPage = 1
this.searchTaskMap =
query.productId?.length > 0 ? [{ productId: this.queryProductId, title: query.productName }] : []
- console.log(this.searchTaskMap)
}
this.getData()
},
@@ -103,7 +102,7 @@
selectBox: false,
selectIndex: true,
tableColumn: [
- { label: "浜у搧", prop: "productName", product: true,width:"150px" },
+ { label: "浜у搧", prop: "productName", product: true, width: "150px" },
{ label: "浣嶇疆", prop: "locationName", defaultLocation: true },
{ label: "鍦ㄥ簱鏁伴噺", prop: "amount" },
{ label: "棰勬祴鏁伴噺", prop: "prediction" },
@@ -123,7 +122,6 @@
pageSize: this.pagerOptions.pageSize
}).then((res) => {
if (res.code === 200) {
- console.log(res)
const list = res.data.map((item) => {
let orderNum = 0
if (parseFloat(item.minInventory) - parseFloat(item.prediction) > 0) {
@@ -135,7 +133,7 @@
}
return {
...item,
- productName:item.product.name,
+ productName: item.product.name,
locationName: item.location.name,
isSet: false,
isEdit: true,
@@ -182,7 +180,6 @@
},
// 鏂板
addProductClick() {
- console.log(this.addTitle)
this.isSel()
if (this.isNoProduct && this.addTitle === "鏂板缓") {
this.$refs.tablelistRef.getProductList()
@@ -215,17 +212,18 @@
this.showDiscard = false
let requestUrl = this.currentRowId === 0 ? addReorderRule : updateReorderRule
let params = this.saveParams()
- requestUrl(params).then((res) => {
- if (res.code === 200) {
- let tipStr = this.currentRowId === 0 ? "娣诲姞鎴愬姛" : "淇敼鎴愬姛"
- this.$message.success(tipStr)
+ requestUrl(params)
+ .then((res) => {
+ if (res.code === 200) {
+ let tipStr = this.currentRowId === 0 ? "娣诲姞鎴愬姛" : "淇敼鎴愬姛"
+ this.$message.success(tipStr)
+ this.getData()
+ }
+ })
+ .catch((err) => {
this.getData()
- }
- })
- .catch((err) => {
- this.getData()
- console.log(err)
- })
+ console.log(err)
+ })
}
},
saveParams() {
@@ -281,7 +279,7 @@
if (!this.isNoProduct && this.currentRowId === 0) {
this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓")
} else {
- this.currentRowId = row.id||0
+ this.currentRowId = row.id || 0
this.addTitle = "淇濆瓨"
this.showDiscard = true
this.isRowClick = true
@@ -291,7 +289,7 @@
this.tableData.map((item, index) => {
if (index === rowIndex) {
item.isEdit = false
- item.editable = false
+ item.editable = true
item.isOrder = true
} else {
item.isEdit = true
@@ -318,11 +316,11 @@
this.locationId = item?.value ?? item?.id
},
// 閫変腑浜у搧鏂规硶
- selProductClick(value,item){
- if(value==="product"){
- this.productId=item.id
- this.unit=item.unit
- }
+ selProductClick(item) {
+ this.productId = item.productId
+ this.unit = item.unit
+ this.amount = item.amount
+ this.prediction = item.prediction
},
// 閫変腑璺嚎鏂规硶
selRouteClick(item, prop) {
--
Gitblit v1.8.0