|
@@ -79,6 +79,9 @@ Page({
|
|
|
let image = value.attinfos.find(v => v.fileType == "image");
|
|
|
value.cover = image ? image.cover : "";
|
|
|
}
|
|
|
+ if (value.gradeprice) value.gradeprice = (value.gradeprice - 0).toFixed(2)
|
|
|
+ if (value.oldprice) value.oldprice = (value.oldprice - 0).toFixed(2)
|
|
|
+ if (value.price) value.price = (value.price - 0).toFixed(2)
|
|
|
return value;
|
|
|
})
|
|
|
this.setData({
|
|
@@ -177,34 +180,22 @@ Page({
|
|
|
title: '提示',
|
|
|
content: '是否确定创建促销订单?',
|
|
|
complete: (res) => {
|
|
|
- if (res.confirm) _Http.basic({
|
|
|
- "id": 20221108111402,
|
|
|
- content: {
|
|
|
- sa_orderid: 0,
|
|
|
- sa_accountclassid: that.data.detail.sa_accountclassid,
|
|
|
- rec_contactsid: 0,
|
|
|
- pay_enterpriseid: 0,
|
|
|
- sa_contractid: 0,
|
|
|
- sa_projectid: 0,
|
|
|
- sa_promotionid: that.data.detail.sa_promotionid,
|
|
|
- "sa_brandid": that.data.detail.sa_brandid, //品牌ID
|
|
|
- "type": "促销订单", //订单类型
|
|
|
- "tradefield": that.data.detail.tradefield.join(','), //必选
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log("创建促销订单", res);
|
|
|
- wx.showToast({
|
|
|
- title: res.msg != '成功' ? res.msg : '创建成功',
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- /* 绑定产品 */
|
|
|
+ if (res.confirm)
|
|
|
_Http.basic({
|
|
|
- "id": 20221109093602,
|
|
|
+ "id": 20221128183202,
|
|
|
"content": {
|
|
|
- "sa_orderid": res.data.sa_orderid,
|
|
|
- "sa_contractid": res.data.sa_contractid,
|
|
|
- "sys_enterpriseid": res.data.sys_enterpriseid,
|
|
|
- "type": "促销订单",
|
|
|
+ istool: 0,
|
|
|
+ type: "促销订单",
|
|
|
+ sa_orderid: 0,
|
|
|
+ sa_accountclassid: that.data.detail.sa_accountclassid,
|
|
|
+ rec_contactsid: 0,
|
|
|
+ pay_enterpriseid: 0,
|
|
|
+ sa_contractid: 0,
|
|
|
+ sa_projectid: 0,
|
|
|
+ sa_promotionid: that.data.detail.sa_promotionid,
|
|
|
+ "sa_brandid": that.data.detail.sa_brandid, //品牌ID
|
|
|
+ "type": "促销订单", //订单类型
|
|
|
+ "tradefield": that.data.detail.tradefield.join(','), //必选
|
|
|
"items": list.map(v => {
|
|
|
return {
|
|
|
"sa_orderitemsid": 0,
|
|
@@ -214,14 +205,18 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- }).then(s => {
|
|
|
- if (s.msg == '成功') setTimeout(() => {
|
|
|
+ }).then(res => {
|
|
|
+ console.log("转化促销订单", res)
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg != '成功' ? res.msg : '创建成功',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
wx.redirectTo({
|
|
|
url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
|
|
|
});
|
|
|
- }, 500)
|
|
|
+ }, 300)
|
|
|
})
|
|
|
- })
|
|
|
}
|
|
|
})
|
|
|
},
|