|
|
|
@ -67,7 +67,7 @@ |
|
|
|
<view @tap.stop="delShopSpec(value[0],values[0])"> |
|
|
|
<uni-icons color="red" type="minus" size="26"></uni-icons> |
|
|
|
</view> |
|
|
|
<text @tap="checkSpec('颜色',value[0])">{{numData(values[0])[0]}}</text><text @tap="checkSpec('尺码',value[0])">{{numData(values[0])[1]}}</text> |
|
|
|
<text @tap="checkSpec('颜色',value[0],values[0],numData(values[0])[0])">{{numData(values[0])[0]}}</text><text @tap="checkSpec('尺码',value[0],values[0],numData(values[0])[1])">{{numData(values[0])[1]}}</text> |
|
|
|
<!-- <text style="color: red;">单价:¥{{item.price}}</text> --> |
|
|
|
<view style="text-align: left;padding-left: 5px;width:40%;display: flex;"><uni-number-box |
|
|
|
max="100000" style="margin-top:16rpx;" v-model="values[1].productCount" |
|
|
|
@ -243,10 +243,11 @@ |
|
|
|
</uni-popup> |
|
|
|
<!-- 弹出规格选择 --> |
|
|
|
<uni-popup ref="getaPopup" background-color="#fff" :is-mask-click="true"> |
|
|
|
<view class="type-popup"> |
|
|
|
<view class="type-popup" style="margin-bottom: 0;border-radius: 0;"> |
|
|
|
<view style="height: 80rpx;font-size: 36rpx;font-weight: bold;line-height: 80rpx;text-align: center;"> |
|
|
|
选择规格 |
|
|
|
修改当前规格 |
|
|
|
</view> |
|
|
|
<view style="text-align:center;color:red;font-size: 22rpx;">*如果当前规格中没有您想要的,可以手动输入</view> |
|
|
|
<view class="card-list"> |
|
|
|
<ul> |
|
|
|
<li v-for="items in attrList" :key="items.id"> |
|
|
|
@ -259,11 +260,18 @@ |
|
|
|
</view> |
|
|
|
<view class="content-fur"> |
|
|
|
<view class="content-low" v-for="item in attributeValue" :key="item.id" |
|
|
|
@tap="changeSpec()">{{item.value}}</view> |
|
|
|
@tap="changeSpec(item.value)">{{item.value}}</view> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</view> |
|
|
|
<view style="color: #333;width: 90%;margin: 0 auto 20rpx;"> |
|
|
|
<uni-easyinput v-model="specifications" placeholder="请输入规格值"></uni-easyinput> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view @tap="changeSpec(specifications)" style="width: 100%;height: 70rpx;line-height: 70rpx;text-align: center;border-radius: 0;background: linear-gradient(90deg, #60F3FF, #088FEB);color: #fff;"> |
|
|
|
<view>确认修改</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<uni-popup ref="inputDialog" type="dialog"> |
|
|
|
@ -312,7 +320,9 @@ |
|
|
|
dataObj: new Map(), |
|
|
|
isPlusAndMinus:false, |
|
|
|
indexList:[], |
|
|
|
attributeValue:[] |
|
|
|
attributeValue:[], |
|
|
|
specifications:'', |
|
|
|
temporary:[] //修改单个规格值临时存放要修改的对象 |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
@ -352,8 +362,7 @@ |
|
|
|
this.carList1 = uni.getStorageSync('carList1') |
|
|
|
}else{ |
|
|
|
this.carList1 = this.carList1 |
|
|
|
} |
|
|
|
console.log('过来吧露露',this.carList1) |
|
|
|
} |
|
|
|
this.khName = JSON.parse(JSON.stringify(this.khName)) || '' |
|
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
|
@ -464,8 +473,7 @@ |
|
|
|
setTimeout(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
}, 300) |
|
|
|
} |
|
|
|
console.log('列表',this.carList) |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
|
|
|
|
@ -481,12 +489,12 @@ |
|
|
|
} |
|
|
|
return name; |
|
|
|
}, |
|
|
|
checkSpec(type,id){ |
|
|
|
checkSpec(type,id,attr,value){ |
|
|
|
if(this.carList.get(id).categoryId == ''){ |
|
|
|
this.tui.toast('请先选择商品分类') |
|
|
|
return; |
|
|
|
} |
|
|
|
//this.attrList |
|
|
|
this.temporary = [id,attr,type,value] |
|
|
|
let num = type == '颜色' ? 0 : 1 |
|
|
|
this.getGategoryLowList(num,this.carList.get(id).categoryId) |
|
|
|
}, |
|
|
|
@ -523,8 +531,31 @@ |
|
|
|
}).catch((res) => {}) |
|
|
|
this.$forceUpdate() |
|
|
|
this.$refs.getaPopup.open() |
|
|
|
|
|
|
|
console.log('规格',this.attrList) |
|
|
|
}, |
|
|
|
//点击某一个规格,可修改 |
|
|
|
changeSpec(item){ |
|
|
|
let that = this; |
|
|
|
if(item == ''){ |
|
|
|
this.tui.toast('请输入要修改的规格值') |
|
|
|
return; |
|
|
|
} |
|
|
|
let data = this.temporary |
|
|
|
let specMap = new Map() //新的临时存放值那个更改过的值的数组 |
|
|
|
this.carList.get(data[0]).stockLogList.forEach(function(value, key) { |
|
|
|
if(key == data[1]){ |
|
|
|
let stringKey = key.replace(data[3],item) //拿到了更改过的key |
|
|
|
specMap.set(stringKey,value) //name的值没有改,所有的数组都放在这个下面 |
|
|
|
that.carList.get(data[0]).stockLogList.delete(data[1]) |
|
|
|
} |
|
|
|
}) |
|
|
|
if(this.carList.get(data[0]).stockLogList.size > 0){ |
|
|
|
this.carList.get(data[0]).stockLogList.forEach(function(value, key) { |
|
|
|
specMap.set(key,value) |
|
|
|
}) |
|
|
|
} |
|
|
|
this.carList.get(data[0]).stockLogList = specMap |
|
|
|
this.$forceUpdate() |
|
|
|
this.$refs.getaPopup.close() |
|
|
|
}, |
|
|
|
inputDialogToggle(item) { |
|
|
|
this.inputVal = ''; |
|
|
|
@ -880,7 +911,6 @@ |
|
|
|
clickGategroy(item){ |
|
|
|
this.carList.get(this.productId).categoryName = item.categoryName |
|
|
|
this.carList.get(this.productId).categoryId = item.id |
|
|
|
console.log(this.carList) |
|
|
|
this.$forceUpdate() |
|
|
|
this.$refs.typePopup.close() |
|
|
|
}, |
|
|
|
@ -899,7 +929,6 @@ |
|
|
|
}else if(type== 'addGateDialog'){ |
|
|
|
this.$refs.addGateDialog.open() |
|
|
|
}else if(type== "mergePopup"){ |
|
|
|
console.log(id) |
|
|
|
this.mergeId = id |
|
|
|
this.$refs.mergePopup.open() |
|
|
|
} |
|
|
|
@ -907,16 +936,10 @@ |
|
|
|
//合并已有 |
|
|
|
clickMerge(value,key){ |
|
|
|
let that = this; |
|
|
|
console.log('key',this.mergeId) |
|
|
|
console.log('11',this.carList.get(this.mergeId)) // 旧的 |
|
|
|
console.log('订单',this.carList.get(value)) // 新的 |
|
|
|
this.carList.get(this.mergeId).stockLogList.forEach(function(values, keys) { |
|
|
|
if(that.carList.get(value).stockLogList.has(keys)){ |
|
|
|
console.log('找到了') |
|
|
|
that.carList.get(value).stockLogList.get(keys).productCount += that.carList.get(that.mergeId).stockLogList.get(keys).productCount |
|
|
|
}else{ |
|
|
|
console.log('没找到',that.carList.get(that.mergeId).stockLogList.get(keys)) |
|
|
|
console.log('没找到',keys) |
|
|
|
that.carList.get(value).stockLogList.set(keys,that.carList.get(that.mergeId).stockLogList.get(keys)) |
|
|
|
} |
|
|
|
that.carList.get(value).productCount += that.carList.get(that.mergeId).stockLogList.get(keys).productCount |
|
|
|
@ -924,160 +947,137 @@ |
|
|
|
}) |
|
|
|
this.carList.delete(this.mergeId) |
|
|
|
this.$forceUpdate() |
|
|
|
console.log(this.carList) |
|
|
|
this.getAllPrice() |
|
|
|
this.$refs.mergePopup.close() |
|
|
|
}, |
|
|
|
AiAddSpec(value){ |
|
|
|
console.log(value) |
|
|
|
this.toggle('bottom', value.id); |
|
|
|
if(value.categoryId == ''){ |
|
|
|
this.tui.toast('请先选择商品分类') |
|
|
|
return; |
|
|
|
} |
|
|
|
this.getById(value,1); |
|
|
|
}, |
|
|
|
//通过商品id查询商品详细信息 |
|
|
|
getById(id) { |
|
|
|
let that = this; |
|
|
|
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.result.delFlag == 0) { |
|
|
|
that.tui.toast("请将商品上架后再操作!") |
|
|
|
return |
|
|
|
} |
|
|
|
that.goodsDetail = res.result; |
|
|
|
that.temporaryList = [] |
|
|
|
|
|
|
|
|
|
|
|
if (that.carList.size > 0) { |
|
|
|
// let isTrue = false |
|
|
|
that.carList.forEach(function(value, key) { |
|
|
|
value.stockLogList.forEach(function(values, keys) { |
|
|
|
if(value.stockLogList1.length == 0){ |
|
|
|
let obj = { |
|
|
|
productCount: values.productCount, |
|
|
|
name: values.name, |
|
|
|
attributeList: keys, |
|
|
|
productNum: that.productNum |
|
|
|
} |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
}else{ |
|
|
|
for(var i=0;i<value.stockLogList1.length;i++){ |
|
|
|
if(value.stockLogList1[i].attributeList != keys){ |
|
|
|
if(value.stockLogList1.length == (i+1)){ |
|
|
|
let obj = { |
|
|
|
productCount: values.productCount, |
|
|
|
name: values.name, |
|
|
|
attributeList: keys, |
|
|
|
productNum: that.productNum |
|
|
|
} |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
} |
|
|
|
getById(id,current) { |
|
|
|
let that = this; |
|
|
|
console.log(id) |
|
|
|
if(current == 1){ |
|
|
|
that.goodsDetail = id; |
|
|
|
}else{ |
|
|
|
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.result.delFlag == 0) { |
|
|
|
that.tui.toast("请将商品上架后再操作!") |
|
|
|
return |
|
|
|
} |
|
|
|
that.goodsDetail = res.result; |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
that.temporaryList = [] |
|
|
|
if (that.carList.size > 0) { |
|
|
|
// let isTrue = false |
|
|
|
that.carList.forEach(function(value, key) { |
|
|
|
value.stockLogList.forEach(function(values, keys) { |
|
|
|
if(value.stockLogList1.length == 0){ |
|
|
|
let obj = { |
|
|
|
productCount: values.productCount, |
|
|
|
name: values.name, |
|
|
|
attributeList: keys, |
|
|
|
productNum: that.productNum |
|
|
|
} |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
}else{ |
|
|
|
for(var i=0;i<value.stockLogList1.length;i++){ |
|
|
|
if(value.stockLogList1[i].attributeList != keys){ |
|
|
|
if(value.stockLogList1.length == (i+1)){ |
|
|
|
let obj = { |
|
|
|
productCount: values.productCount, |
|
|
|
name: values.name, |
|
|
|
attributeList: keys, |
|
|
|
productNum: that.productNum |
|
|
|
} |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
that.zNum = 0 |
|
|
|
that.$nextTick(() => { |
|
|
|
that.carList.forEach(function(value, key) { |
|
|
|
if (value.productId == id) { |
|
|
|
that.zNum = value.productCount |
|
|
|
that.temporaryList = value.stockLogList1 |
|
|
|
that.pageOldTemList = value.stockLogList1 |
|
|
|
that.oldTemList = value.stockLogList1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
that.zNum = 0 |
|
|
|
that.$nextTick(() => { |
|
|
|
that.carList.forEach(function(value, key) { |
|
|
|
if (value.productId == id) { |
|
|
|
that.zNum = value.productCount |
|
|
|
that.temporaryList = value.stockLogList1 |
|
|
|
that.pageOldTemList = value.stockLogList1 |
|
|
|
that.oldTemList = value.stockLogList1 |
|
|
|
} |
|
|
|
value.stockLogList1 = [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", { |
|
|
|
categoryId: this.goodsDetail.categoryId |
|
|
|
}, false, true).then((res1) => { |
|
|
|
if (res1.code == 200) { |
|
|
|
this.goodsList = [] |
|
|
|
this.$refs.shopPopup.open('bottom') |
|
|
|
if (typeof(res1.result) == 'string') { |
|
|
|
let newObj = JSON.parse(res1.result) |
|
|
|
let newArr = [] |
|
|
|
let dataArr = [] |
|
|
|
for (let val in newObj) { |
|
|
|
let valueObj = []; |
|
|
|
for (var i = 0; i < newObj[val].length; i++) { |
|
|
|
valueObj.push({ |
|
|
|
value: newObj[val][i], |
|
|
|
isChecked: false |
|
|
|
}) |
|
|
|
this.dataObj.set(newObj[val][i], val) |
|
|
|
// isTrue = false |
|
|
|
} |
|
|
|
newArr.push({ |
|
|
|
name: val, |
|
|
|
value: valueObj |
|
|
|
}) |
|
|
|
} |
|
|
|
this.goodsDetail.attributeList = newArr; |
|
|
|
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) { |
|
|
|
let oldCheck = false |
|
|
|
let oldValue = [] |
|
|
|
for (var m = 0; m < this.goodsDetail.attributeList[i].value |
|
|
|
.length; m++) { |
|
|
|
if (this.goodsDetail.attributeList[i].value[m].isChecked == true) { |
|
|
|
oldCheck = true |
|
|
|
oldValue.push(this.goodsDetail.attributeList[i].value[m].value) |
|
|
|
} |
|
|
|
value.stockLogList1 = [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
that.$nextTick(() => { |
|
|
|
console.log('oldTemList', that.oldTemList) |
|
|
|
console.log('temporaryList', that.temporaryList) |
|
|
|
console.log('pageOldTemList', that.pageOldTemList) |
|
|
|
}) |
|
|
|
|
|
|
|
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", { |
|
|
|
categoryId: this.goodsDetail.categoryId |
|
|
|
}, false, true).then((res1) => { |
|
|
|
if (res1.code == 200) { |
|
|
|
this.goodsList = [] |
|
|
|
this.$refs.shopPopup.open('bottom') |
|
|
|
if (typeof(res1.result) == 'string') { |
|
|
|
let newObj = JSON.parse(res1.result) |
|
|
|
let newArr = [] |
|
|
|
let dataArr = [] |
|
|
|
for (let val in newObj) { |
|
|
|
let valueObj = []; |
|
|
|
// let isTrue = false |
|
|
|
for (var i = 0; i < newObj[val].length; i++) { |
|
|
|
// for (var m = 0; m < this.oldTemList.length; m++) { |
|
|
|
// var data = this.oldTemList[m].name.split('/') |
|
|
|
// for (var j = 0; j < data.length; j++) { |
|
|
|
// if (data[j] == newObj[val][i]) { |
|
|
|
// isTrue = true |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// for (var m = 0; m < this.pageOldTemList.length; m++) { |
|
|
|
// var data = this.pageOldTemList[m].name.split('/') |
|
|
|
// for (var j = 0; j < data.length; j++) { |
|
|
|
// if (data[j] == newObj[val][i]) { |
|
|
|
// isTrue = true |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
valueObj.push({ |
|
|
|
value: newObj[val][i], |
|
|
|
isChecked: false |
|
|
|
}) |
|
|
|
this.dataObj.set(newObj[val][i], val) |
|
|
|
// isTrue = false |
|
|
|
} |
|
|
|
newArr.push({ |
|
|
|
name: val, |
|
|
|
value: valueObj |
|
|
|
}) |
|
|
|
} |
|
|
|
this.goodsDetail.attributeList = newArr; |
|
|
|
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) { |
|
|
|
let oldCheck = false |
|
|
|
let oldValue = [] |
|
|
|
for (var m = 0; m < this.goodsDetail.attributeList[i].value |
|
|
|
.length; m++) { |
|
|
|
if (this.goodsDetail.attributeList[i].value[m].isChecked == true) { |
|
|
|
oldCheck = true |
|
|
|
oldValue.push(this.goodsDetail.attributeList[i].value[m].value) |
|
|
|
} |
|
|
|
} |
|
|
|
// if (oldCheck) { |
|
|
|
// let specs1 = { |
|
|
|
// specs: [] |
|
|
|
// } |
|
|
|
|
|
|
|
// specs1.specs = oldValue |
|
|
|
// this.goodsList.push(specs1) |
|
|
|
// } else { |
|
|
|
let specs1 = { |
|
|
|
specs: [] |
|
|
|
} |
|
|
|
this.goodsList.push(specs1) |
|
|
|
// } |
|
|
|
oldCheck = false |
|
|
|
oldValue = [] |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tui.toast('失败了') |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res1.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
let specs1 = { |
|
|
|
specs: [] |
|
|
|
} |
|
|
|
this.goodsList.push(specs1) |
|
|
|
oldCheck = false |
|
|
|
oldValue = [] |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tui.toast('失败了') |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res1.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
this.getKCList(id); |
|
|
|
this.getKCList(current == 1?id.id:id); |
|
|
|
}, |
|
|
|
//库存商品详情 |
|
|
|
getKCList(id) { |
|
|
|
@ -1275,39 +1275,34 @@ |
|
|
|
delCarData(index) { |
|
|
|
this.temporaryList.splice(index, 1); |
|
|
|
this.temporaryChange() |
|
|
|
// uni.showModal({ |
|
|
|
// title: "提示", |
|
|
|
// content: "确定删除此条商品吗?", |
|
|
|
// success: function(res) { |
|
|
|
// if(res.confirm){ |
|
|
|
// that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name); |
|
|
|
// that.carList.get(id).stockLogList.delete(name) |
|
|
|
// that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get(id).purchasePrice |
|
|
|
// if(that.carList.get(id).stockLogList.size == 0){ |
|
|
|
// that.carList.delete(id) |
|
|
|
// } |
|
|
|
|
|
|
|
// that.getAllPrice() |
|
|
|
// } |
|
|
|
// that.$forceUpdate() |
|
|
|
// } |
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
//删除商品下的某一个规格 |
|
|
|
delShopSpec(id, name) { |
|
|
|
var that = this; |
|
|
|
var that = this; |
|
|
|
console.log(that.carList) |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除此条商品吗?", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name).productCount; |
|
|
|
that.carList.get(id).stockLogList.delete(name) |
|
|
|
if (res.confirm) { |
|
|
|
if(that.carList.get(id).stockLogList.size == 1){ |
|
|
|
that.carList.get(id).productCount = that.carList.get(id).stockLogList.get(name).productCount; |
|
|
|
}else{ |
|
|
|
that.carList.get(id).productCount -= that.carList.get(id).stockLogList.get(name).productCount; |
|
|
|
} |
|
|
|
|
|
|
|
let count = that.carList.get(id).stockLogList.get(name).productCount |
|
|
|
that.carList.get(id).stockLogList.delete(name) |
|
|
|
|
|
|
|
that.carList.get(id).price = that.carList.get(id).productCount * that.carList.get( |
|
|
|
id).purchasePrice |
|
|
|
if (that.carList.get(id).stockLogList.size == 0) { |
|
|
|
that.carList.delete(id) |
|
|
|
let key = '{"颜色":"均色","尺码":"均码"}' |
|
|
|
let value = { |
|
|
|
name:'均色/均码/', |
|
|
|
productCount: count |
|
|
|
} |
|
|
|
that.carList.get(id).stockLogList.set(key,value) |
|
|
|
} |
|
|
|
|
|
|
|
that.getAllPrice() |
|
|
|
@ -1320,13 +1315,14 @@ |
|
|
|
async inventorySubmit() { |
|
|
|
if (this.khName == '' || this.carList == '') { |
|
|
|
uni.showToast({ |
|
|
|
title: "商品信息填写完成后入库!", |
|
|
|
title: "请选择供应商后入库!", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
let that = this; |
|
|
|
let purchase = { |
|
|
|
let purchase = { |
|
|
|
id:uni.getStorageSync('AiInventoryId'), |
|
|
|
alreadyPay: this.alreadyPay == '' ? 0 : this.alreadyPay, //已付金额 |
|
|
|
noPay: this.noPay == '' ? 0 : this.noPay, //欠款 |
|
|
|
shouldPay: this.shouldPay, //应付金额 |
|
|
|
@ -1337,7 +1333,7 @@ |
|
|
|
supplierName: this.khName.consigneeName |
|
|
|
} |
|
|
|
let purchaseDetails = []; |
|
|
|
console.log(this.carList) |
|
|
|
let jishuqi = 0 |
|
|
|
this.carList.forEach(function(value, key) { |
|
|
|
value.stockLogList1 = [] |
|
|
|
if (value.purchasePrice == '' || value.purchasePrice == 0) { |
|
|
|
@ -1363,11 +1359,13 @@ |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
}) |
|
|
|
delete value.id; |
|
|
|
purchaseDetails.push(value) |
|
|
|
purchaseDetails.push(value) |
|
|
|
jishuqi ++ |
|
|
|
}) |
|
|
|
console.log(purchaseDetails) |
|
|
|
console.log(purchase) |
|
|
|
await this.goInventory(purchase,purchaseDetails) |
|
|
|
if(jishuqi == this.carList.size){ |
|
|
|
await this.goInventory(purchase,purchaseDetails) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
goInventory(purchase,purchaseDetails){ |
|
|
|
uni.navigateTo({ |
|
|
|
@ -1391,8 +1389,7 @@ |
|
|
|
}) |
|
|
|
this.alreadyPay = this.shouldPay |
|
|
|
that.noPay = this.shouldPay - this.alreadyPay |
|
|
|
this.$forceUpdate() |
|
|
|
console.log('计算',this.carList) |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
//修改已选规格的数量 |
|
|
|
GoodsNumChange(e, index, index1) { |
|
|
|
|