|
@@ -114,11 +114,22 @@
|
|
timedata:'',
|
|
timedata:'',
|
|
billDate:'',
|
|
billDate:'',
|
|
itemList:[],
|
|
itemList:[],
|
|
|
|
+ sheetDetail:[],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
this.itemList = JSON.parse(opt.itemList);
|
|
this.itemList = JSON.parse(opt.itemList);
|
|
-
|
|
|
|
|
|
+ console.log(this.itemList)
|
|
|
|
+ this.itemList.forEach(item=>{
|
|
|
|
+ var obj={
|
|
|
|
+ itemId:item.id,
|
|
|
|
+ itemName:item.name,
|
|
|
|
+ itemQty:1,
|
|
|
|
+ salePrice:item.money,
|
|
|
|
+ totalPrice:item.money,
|
|
|
|
+ }
|
|
|
|
+ this.sheetDetail.push(obj)
|
|
|
|
+ })
|
|
this.goodsnum = opt.itemQty;
|
|
this.goodsnum = opt.itemQty;
|
|
//console.log(this.carInfo)
|
|
//console.log(this.carInfo)
|
|
this.userInfo = uni.getStorageSync("userInfo");
|
|
this.userInfo = uni.getStorageSync("userInfo");
|
|
@@ -138,7 +149,7 @@
|
|
this.customerName = this.mydata.customerInfo.customerName
|
|
this.customerName = this.mydata.customerInfo.customerName
|
|
this.mobilePhone = this.mydata.customerInfo.mobilePhone
|
|
this.mobilePhone = this.mydata.customerInfo.mobilePhone
|
|
this.shopInfo = this.mydata.shopInfo
|
|
this.shopInfo = this.mydata.shopInfo
|
|
-
|
|
|
|
|
|
+ this.shopID=this.shopInfo.id
|
|
uni.setStorage({
|
|
uni.setStorage({
|
|
key: 'yyshopInfo',
|
|
key: 'yyshopInfo',
|
|
data:this.shopInfo,
|
|
data:this.shopInfo,
|
|
@@ -179,19 +190,11 @@
|
|
this.$refs.timeSelect.open();
|
|
this.$refs.timeSelect.open();
|
|
},
|
|
},
|
|
submit() {
|
|
submit() {
|
|
- var jsonArray = [];
|
|
|
|
- var obj = {
|
|
|
|
- itemId: this.goodsInfo.id,
|
|
|
|
- itemName: this.goodsInfo.name,
|
|
|
|
- itemQty: this.goodsnum,
|
|
|
|
- salePrice: this.goodsInfo.salePrice,
|
|
|
|
- totalPrice: this.totalMoney
|
|
|
|
- }
|
|
|
|
- jsonArray.push(obj)
|
|
|
|
|
|
+
|
|
//"bizType:1商品2项目3套餐
|
|
//"bizType:1商品2项目3套餐
|
|
var params = {
|
|
var params = {
|
|
- sheetType: this.goodsInfo.bizType,
|
|
|
|
- sheetContent: this.goodsInfo.name,
|
|
|
|
|
|
+ sheetType:'5',
|
|
|
|
+ sheetContent: '钣喷',
|
|
customerName: this.customerName,
|
|
customerName: this.customerName,
|
|
mobilePhone: this.mobilePhone,
|
|
mobilePhone: this.mobilePhone,
|
|
plateNumber: this.carInfo.plateNumber,
|
|
plateNumber: this.carInfo.plateNumber,
|
|
@@ -199,7 +202,8 @@
|
|
totalMoney: this.totalMoney,
|
|
totalMoney: this.totalMoney,
|
|
shopId: this.shopID,
|
|
shopId: this.shopID,
|
|
comment: this.comment,
|
|
comment: this.comment,
|
|
- sheetDetail: JSON.stringify(jsonArray)
|
|
|
|
|
|
+ sheetDetail: JSON.stringify(this.sheetDetail),
|
|
|
|
+ payType:this.PayType,
|
|
}
|
|
}
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
@@ -207,14 +211,28 @@
|
|
this.$http('openMallOrder/submitOrder', params, 'POST').then(res => {
|
|
this.$http('openMallOrder/submitOrder', params, 'POST').then(res => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
- this.orderData = res.data
|
|
|
|
- this.unifiedPay(res.data)
|
|
|
|
|
|
+ this.orderData = res.data;
|
|
|
|
+ if(this.PayType==1){
|
|
|
|
+ this.unifiedPay(res.data)
|
|
|
|
+ }else{
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '提交成功',
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: res.msg,
|
|
title: res.msg,
|
|
icon: 'none',
|
|
icon: 'none',
|
|
duration: 3000
|
|
duration: 3000
|
|
});
|
|
});
|
|
|
|
+ if (this.orderData.sheetType==5){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../user/myOrder/paintOrderDetail?id=" +that.orderData.id
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -272,6 +290,10 @@
|
|
url: "../user/myOrder/mallOrderDetail?id=" + that.orderData.id +
|
|
url: "../user/myOrder/mallOrderDetail?id=" + that.orderData.id +
|
|
"&SheetType=" + that.orderData.sheetType
|
|
"&SheetType=" + that.orderData.sheetType
|
|
})
|
|
})
|
|
|
|
+ }else if (that.orderData.sheetType==5){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../user/myOrder/paintOrderDetail?id=" +that.orderData.id
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
@@ -290,6 +312,10 @@
|
|
url: "../user/myOrder/mallOrderDetail?id=" + that.orderData.id +
|
|
url: "../user/myOrder/mallOrderDetail?id=" + that.orderData.id +
|
|
"&SheetType=" + that.orderData.sheetType
|
|
"&SheetType=" + that.orderData.sheetType
|
|
})
|
|
})
|
|
|
|
+ }else if (that.orderData.sheetType==5){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "../user/myOrder/paintOrderDetail?id=" +that.orderData.id
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|