From 7763948ad5ff19ee0a45b09cbb9f53ee86eb4975 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 22 三月 2024 15:58:24 +0800
Subject: [PATCH] 新建入库、库存调拨、新建出库报错问题修改
---
src/views/operate/orderPoint/index.vue | 90 ++++++++++++++++++++++-----------------------
1 files changed, 44 insertions(+), 46 deletions(-)
diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue
index 80c1401..340eb0e 100644
--- a/src/views/operate/orderPoint/index.vue
+++ b/src/views/operate/orderPoint/index.vue
@@ -8,10 +8,13 @@
:placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
:amount-view="false"
:search-task-map="searchTaskMap"
+ :show-sreen="false"
+ :screen-array="screenArray"
@addCommonClick="addProductClick"
@searchClick="getList"
@discardBtnClick="discardBtnClick"
@delSelectClick="delSelectClick"
+ @switchKeywords="switchKeywords"
/>
</div>
<div class="content_wrap">
@@ -83,41 +86,6 @@
data() {
return {
datas: [],
- // datas: [{
- // label: '涓�绾� 1',
- // children: [{
- // label: '浜岀骇 1-1',
- // children: [{
- // label: '涓夌骇 1-1-1'
- // }]
- // }]
- // }, {
- // label: '涓�绾� 2',
- // children: [{
- // label: '浜岀骇 2-1',
- // children: [{
- // label: '涓夌骇 2-1-1'
- // }]
- // }, {
- // label: '浜岀骇 2-2',
- // children: [{
- // label: '涓夌骇 2-2-1'
- // }]
- // }]
- // }, {
- // label: '涓�绾� 3',
- // children: [{
- // label: '浜岀骇 3-1',
- // children: [{
- // label: '涓夌骇 3-1-1'
- // }]
- // }, {
- // label: '浜岀骇 3-2',
- // children: [{
- // label: '涓夌骇 3-2-1'
- // }]
- // }]
- // }],
defaultProps: {
children: "children",
label: "jointName"
@@ -135,18 +103,36 @@
amount: 0,
operationId: 0,
minInventory: 0,
- maxInventory: 0,
- orderNumber: 0,
+ maxInventory: 1,
+ orderNumber: 1,
unit: "",
reorderId: 0,
searchTaskMap: [],
- type: "bh"
+ type: "bh",
+ screenArray: [{ id: "0", type: "bh", title: "閲嶆柊璁㈣喘" }]
}
},
created() {
+ if (this.$route.params.productId) {
+ this.getData({
+ productId: this.$route.params.productId,
+ pageSize: 15,
+ page: 1
+ })
+ }else if(this.$route.params.locationId){
+ this.searchTaskMap=[]
+ this.getData({
+ id: this.$route.params.locationId,
+ jointName:this.$route.params.locationName,
+ // type:"",
+ pageSize: 15,
+ page: 1
+ })
+ }else {
+ this.getData()
+ }
this.setTable()
- this.searchTaskMap = [{ type: this.type, title: "閲嶆柊璁㈣喘" }]
- this.getData()
+ this.searchTaskMap = [{ id: "0", type: this.type, title: "閲嶆柊璁㈣喘" }]
this.getLocationList()
},
methods: {
@@ -175,7 +161,8 @@
type: this.type,
keyWord: data?.jointName,
page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
+ pageSize: this.pagerOptions.pageSize,
+ productId: data?.productId
}).then((res) => {
if (res.code === 200) {
console.log(res)
@@ -212,7 +199,7 @@
},
// 鎿嶄綔杈撳叆
inputContent(val, prop, row) {
- console.log(val, prop, row)
+ console.log(row)
if (prop === "minInventory") {
this.minInventory = val
if (parseFloat(this.minInventory) - parseFloat(this.prediction) > 0) {
@@ -237,7 +224,7 @@
},
// 鏂板
addProductClick() {
- console.log(this.addTitle)
+ console.log(this.addTitle, "qqqqqqqqqqqq")
this.isSel()
if (this.isNoProduct && this.addTitle === "鏂板缓") {
this.$refs.tablelistRef.getProductList()
@@ -263,6 +250,7 @@
editable: false,
isOrder: true
})
+ this.tableList.tableData = this.tableData
this.locationId = 0
this.productId = 0
} else {
@@ -270,7 +258,10 @@
this.showDiscard = false
let requestUrl = this.currentRowId === 0 ? addReorderRule : updateReorderRule
let params = this.saveParams()
- requestUrl(params)
+ if(params.productId===0){
+ this.$message.warning("璇峰~鍐欎骇鍝佷俊鎭�!")
+ }else{
+ requestUrl(params)
.then((res) => {
console.log(res)
if (res.code === 200) {
@@ -283,6 +274,7 @@
console.log(err)
this.getData()
})
+ }
// }
}
},
@@ -377,8 +369,10 @@
},
// 閫変腑浜у搧鏂规硶
selProductClick(item) {
- this.productId = item.value
+ this.productId = item.productId
this.unit = item.unit
+ this.amount = item.amount
+ this.prediction = item.prediction
},
// 閫変腑璺嚎鏂规硶
selRouteClick(item, prop) {
@@ -404,13 +398,17 @@
},
...res.data
]
- console.log(res, "res666")
})
},
// 鍒犻櫎type
delSelectClick() {
this.type = ""
this.getData()
+ },
+ switchKeywords(item) {
+ console.log(item, "switchKeywords")
+ this.type = item?.length > 0 ? "bh" : ""
+ this.getData()
}
}
}
--
Gitblit v1.8.0