diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue
index ecba05f..cbd5fe5 100644
--- a/pages/index/addHangOrder.vue
+++ b/pages/index/addHangOrder.vue
@@ -12,7 +12,7 @@
{{item.saleName}}
编辑
- 扫码开单
+ 扫码开单
语音备注
@@ -29,13 +29,14 @@
备注:
{{item.remark}}
-
+
- 女士连衣裙(HD738206579)
-
+ {{items.productName}} {{items.productSn}}
+
+
+
+ {{itemss.attributeList}} * {{itemss.productCount}}
- 颜色:黑色,尺码:s码 * 2
- 颜色:黑色,尺码:s码 * 2
@@ -190,7 +191,8 @@
purchasePrice: 0,
zPrice:0,
zNum:0,
- storageType:0
+ storageType:0,
+ hangId:''
}
},
onLoad() {
@@ -280,9 +282,10 @@
}
},
//扫一扫功能
- scanCodeAdd() {
+ scanCodeAdd(id) {
uni.scanCode({
- success: (res) => {
+ success: (res) => {
+ this.hangId = id
this.toggle('bottom', res.result);
},
@@ -375,6 +378,9 @@
supplierName: this.goodsDetail.supplierName,
saleDetailQueryDTO:this.temporaryList
}
+ // if(){
+
+ // }
this.carList.push(data)
console.log(this.carList);
this.temporaryList = []
@@ -397,7 +403,7 @@
setSaleDetail(){
this.tui.request("/app/sale/setSaleDetail", "post", {
saleDetailList:this.carList,
- saleId:this.goodsDetail.id
+ saleId:this.hangId
}, false, false).then((res) => {
if (res.code == 200) {
this.getRegList()
diff --git a/pages/inventory/addinventory.vue b/pages/inventory/addinventory.vue
index 59fab5f..353753c 100644
--- a/pages/inventory/addinventory.vue
+++ b/pages/inventory/addinventory.vue
@@ -33,11 +33,12 @@
品名:{{item.productName}}
货号:{{item.productSn}}
- 总价:{{item.price}} 数量:{{item.num}}
+ 总价:{{item.price}} 数量:{{item.num}}
-
+
{{items.name}}
单价:¥{{items.price}}
数量:{{items.productCount}}
@@ -89,11 +90,11 @@
-
-
-
-
+
+
+
+
@@ -121,15 +122,43 @@
alreadyPay: 0,
realAmount: 0,
shouldPay: 0,
- totalAmount: 0,
- index:'',
- index1:''
+ totalAmount: 0,
+ index: '',
+ index1: ''
}
},
onShow() {
this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
- this.carList = this.carList || ''
+ let lsList = this.carList;
+ if (lsList.length == 0) {
+ this.carList = this.carList1 || []
+ } else { //111 222
+ for (var i = 0; i < lsList.length; i++) {
+ for (var s = 0; s < lsList[i].saleDetailQueryDTO.length; s++) {
+ for (var m = 0; m < this.carList1.length; m++) {
+ if (lsList[i].id == this.carList1[m].id) { //是相同商品
+ for (var v = 0; v < this.carList1[m].saleDetailQueryDTO.length; v++) { //不是相同规格
+ if (lsList[i].saleDetailQueryDTO[s].name != this.carList1[m].saleDetailQueryDTO[v].name) {
+ //已经是最后一项循环
+ if (s + 1 == lsList[i].saleDetailQueryDTO.length) {
+
+ this.carList[i].saleDetailQueryDTO.push(this.carList1[m].saleDetailQueryDTO[v])
+ }
+ } else { //是相同规格
+ this.carList[i].saleDetailQueryDTO[s].productCount += this.carList1[m].saleDetailQueryDTO[v].productCount
+ }
+ }
+ }else{
+ if (i + 1 == lsList.length) { //已经是最后一项循环
+ this.carList.push(this.carList1[m])
+ }
+ }
+ }
+ }
+ }
+ }
console.log(this.carList)
+ console.log(lsList)
for (let i = 0; i < this.carList.length; i++) {
this.totalAmount += this.carList[i].num
this.shouldPay += this.carList[i].price
@@ -174,6 +203,12 @@
inventorySubmit() {
console.log(this.khName)
console.log(this.carList)
+ if (this.khName == '' || this.carList == '') {
+ uni.showToast({
+ title: "信息填写完成后入库!",
+ icon: 'none'
+ })
+ }
let that = this;
let purchase = {
alreadyPay: this.alreadyPay, //已付金额
@@ -218,25 +253,26 @@
})
}
})
- },
- //编辑每一个的单价
- clickCollapse(index,index1){
- this.index = index
- this.index1 = index1
- this.$refs.inputDialog.open()
- },
- //计算价格
- changePrice(val){
- this.shouldPay = 0
- this.carList[this.index].price = 0
- this.carList[this.index].saleDetailQueryDTO[this.index1].price = val;
- console.log(this.carList)
- for (let m = 0; m < this.carList[this.index].saleDetailQueryDTO.length; m++) {
- this.carList[this.index].price += this.carList[this.index].saleDetailQueryDTO[m].productCount *this.carList[this.index].saleDetailQueryDTO[m].price
- }
- for (let i = 0; i < this.carList.length; i++) {
- this.shouldPay += this.carList[i].price
- }
+ },
+ //编辑每一个的单价
+ clickCollapse(index, index1) {
+ this.index = index
+ this.index1 = index1
+ this.$refs.inputDialog.open()
+ },
+ //计算价格
+ changePrice(val) {
+ this.shouldPay = 0
+ this.carList[this.index].price = 0
+ this.carList[this.index].saleDetailQueryDTO[this.index1].price = val;
+ console.log(this.carList)
+ for (let m = 0; m < this.carList[this.index].saleDetailQueryDTO.length; m++) {
+ this.carList[this.index].price += this.carList[this.index].saleDetailQueryDTO[m].productCount * this
+ .carList[this.index].saleDetailQueryDTO[m].price
+ }
+ for (let i = 0; i < this.carList.length; i++) {
+ this.shouldPay += this.carList[i].price
+ }
}
}
}
@@ -364,7 +400,7 @@
.shop-collapse text {
flex: 1;
- text-align: center;
+ text-align: center;
padding-right: 40rpx;
border-right: 1px solid #eee;
}
diff --git a/pages/inventory/changeGoods1.vue b/pages/inventory/changeGoods1.vue
index bdd9527..8cdc213 100644
--- a/pages/inventory/changeGoods1.vue
+++ b/pages/inventory/changeGoods1.vue
@@ -90,14 +90,14 @@
-
+
- {{item.name}}
+ {{item[0]}}
-
+
-