|
|
@@ -238,16 +238,15 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
confirmFinish(){
|
|
|
-
|
|
|
- if(this.$util.isEmpty(this.selectList)){
|
|
|
- this.$msg('请选择花材')
|
|
|
- return false
|
|
|
+ let params = {id:this.orderInfo.id}
|
|
|
+ if(!this.$util.isEmpty(this.selectList)){
|
|
|
+ const newItem = this.selectList.map(ele=>{
|
|
|
+ return {productId:ele.id,num:ele.currentNum,unitType:ele.unitType,unitPrice:ele.unitPrice}
|
|
|
+ })
|
|
|
+ params = {...params,itemList:JSON.stringify(newItem)}
|
|
|
}
|
|
|
- const newItem = this.selectList.map(ele=>{
|
|
|
- return {productId:ele.id,num:ele.currentNum,unitType:ele.unitType,unitPrice:ele.unitPrice}
|
|
|
- })
|
|
|
uni.showLoading({mask:true})
|
|
|
- finish({id:this.orderInfo.id,itemList:JSON.stringify(newItem)}).then(res=>{
|
|
|
+ finish(params).then(res=>{
|
|
|
uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
|
this.$msg(res.msg)
|