From 5786ce6a3c6bbae7e9c5bdd7de54c630c838531e Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Tue, 6 Feb 2024 16:13:24 +0800
Subject: [PATCH] 11
---
pages/billing/changeGoods1.vue | 81 +++++++++++++++++------------
pages/index/addHangOrder.vue | 2 +-
pages/index/orderDetail.vue | 2 +-
pages/inventory/addinventory.vue | 88 +++++++++++++++++---------------
pages/inventory/changeGoods1.vue | 88 +++++++++++++++++---------------
pages/inventory/goodsList1.vue | 81 +++++++++++++++++------------
pages/other/custom.vue | 61 ++++++++++------------
7 files changed, 220 insertions(+), 183 deletions(-)
diff --git a/pages/billing/changeGoods1.vue b/pages/billing/changeGoods1.vue
index 13f5bfb..5c91160 100644
--- a/pages/billing/changeGoods1.vue
+++ b/pages/billing/changeGoods1.vue
@@ -89,7 +89,7 @@
- {{item.name}}
+ {{item.name}} 库存:{{item.productNum}}
@@ -183,7 +183,9 @@
storageType: '',
carNum: 0,
carType: 0,
- type: ''
+ type: '',
+ productId:'',
+ productNum:0,
}
},
filters: {
@@ -255,37 +257,47 @@
jishuqi++
}
}
- if (this.goodsDetail.attributeList.length == jishuqi) {
- let data = {}
- this.attributeList = {
- attributeList: JSON.stringify(obj),
- productCount: this.temporaryNum,
- name: name,
- price: this.purchasePrice
- }
-
- for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
- this.goodsDetail.attributeList[i].isChecked = false;
- for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
- this.goodsDetail.attributeList[i].value[m].isChecked = false
- }
- }
- if (this.temporaryList.length == 0) {
- this.temporaryList.push(this.attributeList);
- } else {
- for (var i = 0; i < this.temporaryList.length; i++) {
- if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
- if (this.temporaryList.length == (i + 1)) {
- this.temporaryList.push(this.attributeList);
- return
- }
- } else {
- return
- }
- }
-
- }
-
+ if (this.goodsDetail.attributeList.length == jishuqi) {
+ this.tui.request("/app/stock/productCount", "post", {
+ productId: this.productId,
+ // productId: "1718617874370793472",
+ attributeList: JSON.stringify(obj)
+ // attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
+ }, false, true).then((res) => {
+ if (res.code == 200) {
+ this.productNum = res.result
+ this.attributeList = {
+ attributeList: JSON.stringify(obj),
+ productCount: this.temporaryNum,
+ productNum:this.productNum,
+ name: name,
+ price: this.purchasePrice
+ }
+ for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
+ this.goodsDetail.attributeList[i].isChecked = false;
+ for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
+ this.goodsDetail.attributeList[i].value[m].isChecked = false
+ }
+ }
+ if (this.temporaryList.length == 0) {
+ this.temporaryList.push(this.attributeList);
+ } else {
+ for (var i = 0; i < this.temporaryList.length; i++) {
+ if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
+ if (this.temporaryList.length == (i + 1)) {
+ this.temporaryList.push(this.attributeList);
+ return
+ }
+ } else {
+ return
+ }
+ }
+
+ }
+ } else {
+ this.tui.toast(res.message)
+ }
+ }).catch((res) => {})
}
},
@@ -346,7 +358,8 @@
}
this.$refs.carPopup.open('bottom')
this.carType = this.carList.length
- } else {
+ } else {
+ this.productId = item.id
this.checkGoods(item);
this.$refs.popup.open('bottom')
}
diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue
index 2f360c3..7456381 100644
--- a/pages/index/addHangOrder.vue
+++ b/pages/index/addHangOrder.vue
@@ -117,7 +117,7 @@
- {{item.name}} 库存数:{{item.productNum}}
+ {{item.name}} 库存:{{item.productNum}}
diff --git a/pages/index/orderDetail.vue b/pages/index/orderDetail.vue
index 29e6ff0..91b5264 100644
--- a/pages/index/orderDetail.vue
+++ b/pages/index/orderDetail.vue
@@ -17,7 +17,7 @@
-
+
{{item1.attributeList | sliceMsg}}
数量:{{item1.productCount}}
diff --git a/pages/inventory/addinventory.vue b/pages/inventory/addinventory.vue
index e043197..3777c36 100644
--- a/pages/inventory/addinventory.vue
+++ b/pages/inventory/addinventory.vue
@@ -115,17 +115,9 @@
-