|
@@ -49,7 +49,7 @@ Page({
|
|
|
}
|
|
|
};
|
|
|
this.getList()
|
|
|
- // this.getBrand()
|
|
|
+ this.getBrand()
|
|
|
this.getDomain()
|
|
|
},
|
|
|
/* 获取产品 */
|
|
@@ -146,9 +146,7 @@ Page({
|
|
|
}
|
|
|
}, false).then(res => {
|
|
|
console.log("查询品牌", res)
|
|
|
- if (res.msg == '成功') this.setData({
|
|
|
- "filtratelist[0].list": res.data
|
|
|
- });
|
|
|
+ if (res.msg == '成功') this.data.brandList = res.data
|
|
|
})
|
|
|
},
|
|
|
/* 获取领域 */
|
|
@@ -191,5 +189,49 @@ Page({
|
|
|
downCount = setTimeout(() => {
|
|
|
this.getList(true);
|
|
|
}, 300);
|
|
|
+ },
|
|
|
+ createOrder() {
|
|
|
+ if (this.data.brandList.length == 1 && this.data.filtratelist[1].list.length == 1) {
|
|
|
+
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确定创建标准订单',
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) _Http.basic({
|
|
|
+ "id": 20221108111402,
|
|
|
+ content: {
|
|
|
+ sa_orderid: 0,
|
|
|
+ rec_contactsid: 0,
|
|
|
+ pay_enterpriseid: 0,
|
|
|
+ sa_contractid: 0,
|
|
|
+ sa_projectid: 0,
|
|
|
+ "sa_brandid": this.data.brandList[0].sa_brandid, //品牌ID
|
|
|
+ "type": "标准订单", //订单类型
|
|
|
+ "tradefield": this.data.filtratelist[1].list[0].tradefield, //必选
|
|
|
+ sys_enterpriseid: 0
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("创建标准订单", res);
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg != '成功' ? res.msg : '创建成功',
|
|
|
+ icon: "none",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
|
|
|
+ });
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/packageA/orderForm/add/add?type=标准订单',
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|