|
@@ -18,6 +18,33 @@ Page({
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.getList()
|
|
|
+
|
|
|
+ let domainrelatedaccounts = wx.getStorageSync('domainrelatedaccounts');
|
|
|
+ if (domainrelatedaccounts.length) {
|
|
|
+ this.setData({
|
|
|
+ domainrelatedaccounts
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "sysmanage.develop.optiontype.optiontype",
|
|
|
+ "method": "optiontypeselect",
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 9999,
|
|
|
+ "typename": "domainrelatedaccounts"
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("查询领域对应列表", res)
|
|
|
+ if (res.msg == '成功' && res.data.length) {
|
|
|
+ domainrelatedaccounts = res.data;
|
|
|
+ wx.setStorageSync('domainrelatedaccounts', domainrelatedaccounts)
|
|
|
+ this.setData({
|
|
|
+ domainrelatedaccounts
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log("domainrelatedaccounts", domainrelatedaccounts)
|
|
|
},
|
|
|
/* 打开设置定制项 */
|
|
|
customization(e) {
|
|
@@ -159,44 +186,64 @@ Page({
|
|
|
wx.showLoading({
|
|
|
title: '生成中...',
|
|
|
})
|
|
|
+
|
|
|
+ let tradefield = this.data.domainrelatedaccounts.find(v => v.value == data.type);
|
|
|
_Http.basic({
|
|
|
- "id": 20221128183202,
|
|
|
+ "id": 20221008134803,
|
|
|
+ "version": 1,
|
|
|
"content": {
|
|
|
- istool: 0,
|
|
|
- type: "标准订单",
|
|
|
- "tradefield": data.type, //必选
|
|
|
- sa_brandid: this.data.sa_brandid,
|
|
|
- "items": data.list.map(v => {
|
|
|
- return {
|
|
|
- "sa_orderitemsid": 0,
|
|
|
- "itemid": v.itemid,
|
|
|
- "qty": v.favoritesqty,
|
|
|
- "sa_brandid": v.brand.length ? v.brand[0].sa_brandid : this.data.sa_brandid || 0,
|
|
|
- width: v.favoriteswidth || 0,
|
|
|
- length: v.favoriteslength || 0,
|
|
|
- }
|
|
|
- })
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageTotal": 1,
|
|
|
+ "pageSize": 9999,
|
|
|
+ "where": {
|
|
|
+ "condition": "",
|
|
|
+ "isused": 1,
|
|
|
+ "isnotspecialfund": 0, //是否专用
|
|
|
+ },
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
- wx.hideLoading()
|
|
|
- console.log("转化订单", res)
|
|
|
- if (res.msg != '成功') return wx.showToast({
|
|
|
- title: res.msg,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- this.setData({
|
|
|
- results: [],
|
|
|
- isAll: false
|
|
|
- })
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '生成成功!是否立即前往',
|
|
|
- complete: (s) => {
|
|
|
- if (s.confirm) wx.navigateTo({
|
|
|
- url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
|
|
|
+ }).then(acc => {
|
|
|
+ console.log("账户列表", acc)
|
|
|
+ let list = acc.data.filter(v => tradefield.subvalues.some(s => s == v.sa_accountclassid))
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221128183202,
|
|
|
+ "content": {
|
|
|
+ istool: 0,
|
|
|
+ type: "标准订单",
|
|
|
+ "tradefield": data.type, //必选
|
|
|
+ sa_brandid: this.data.sa_brandid,
|
|
|
+ sa_accountclassid: list.length ? list[0].sa_accountclassid : 0,
|
|
|
+ "items": data.list.map(v => {
|
|
|
+ return {
|
|
|
+ "sa_orderitemsid": 0,
|
|
|
+ "itemid": v.itemid,
|
|
|
+ "qty": v.favoritesqty,
|
|
|
+ "sa_brandid": v.brand.length ? v.brand[0].sa_brandid : this.data.sa_brandid || 0,
|
|
|
+ width: v.favoriteswidth || 0,
|
|
|
+ length: v.favoriteslength || 0,
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
- });
|
|
|
+ }).then(res => {
|
|
|
+ wx.hideLoading()
|
|
|
+ console.log("转化订单", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ results: [],
|
|
|
+ isAll: false
|
|
|
+ })
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '生成成功!是否立即前往',
|
|
|
+ complete: (s) => {
|
|
|
+ if (s.confirm) wx.navigateTo({
|
|
|
+ url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
addToShoppingCart(index) {
|