|
|
@@ -41,6 +41,7 @@ Component({
|
|
|
pageTotal: 1,
|
|
|
total: null
|
|
|
},
|
|
|
+ show: false,
|
|
|
deliverys: [{
|
|
|
value: "快递(到付)",
|
|
|
remarks: "快递(到付)"
|
|
|
@@ -53,7 +54,14 @@ Component({
|
|
|
}, {
|
|
|
value: "自提",
|
|
|
remarks: "自提"
|
|
|
- }]
|
|
|
+ }],
|
|
|
+ actions: [{
|
|
|
+ name: '从产品库添加',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '从工单添加',
|
|
|
+ }
|
|
|
+ ],
|
|
|
},
|
|
|
lifetimes: {
|
|
|
detached: function () {
|
|
|
@@ -201,53 +209,42 @@ Component({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- /* 去添加产品 */
|
|
|
- addProduct() {
|
|
|
- if (this.data.packagetype) {
|
|
|
- wx.navigateTo({
|
|
|
- url: '/packageA/activity/bindingProduct/index?params=' + JSON.stringify({
|
|
|
- "id": 20230107182302,
|
|
|
- "version": 1,
|
|
|
- "content": {
|
|
|
- nocache: true,
|
|
|
- sa_orderid, //订单ID
|
|
|
- packagetype: this.data.packagetype,
|
|
|
- sa_promotionid: this.data.sa_promotionid,
|
|
|
- "where": {
|
|
|
- "condition": "",
|
|
|
- packagetypemx: "",
|
|
|
- }
|
|
|
- }
|
|
|
- }) + `&butText=添加套餐&packagetypemxrows=${JSON.stringify(this.data.packagetypemxrows)}&getListPa=` + JSON.stringify({
|
|
|
- "id": "20221109093902",
|
|
|
- content: this.data.content
|
|
|
- }),
|
|
|
- });
|
|
|
-
|
|
|
- getApp().globalData.handleSelect = this.handleInsert.bind(this);
|
|
|
-
|
|
|
- } else {
|
|
|
+ onSelected(e) {
|
|
|
+ if (e.detail.name == '从产品库添加') {
|
|
|
let detail = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data.detail,
|
|
|
id = '2025080510311403';
|
|
|
wx.navigateTo({
|
|
|
url: `/select/product/index?params=${JSON.stringify({
|
|
|
- "id":id,
|
|
|
- "content": {
|
|
|
- nocache:true,
|
|
|
- sa_orderid, //订单ID
|
|
|
- "total": 0,
|
|
|
- "where": {
|
|
|
- "condition": ""
|
|
|
- }
|
|
|
- }
|
|
|
- })}&butText=添加产品`
|
|
|
+ "id":id,
|
|
|
+ "content": {
|
|
|
+ nocache:true,
|
|
|
+ sa_orderid, //订单ID
|
|
|
+ "total": 0,
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })}&butText=添加产品`
|
|
|
});
|
|
|
this.setData({
|
|
|
type: detail.type
|
|
|
})
|
|
|
getApp().globalData.handleSelect = this.handleSelect.bind(this);
|
|
|
- }
|
|
|
+ } else {
|
|
|
|
|
|
+ }
|
|
|
+ this.onCancel()
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ this.setData({
|
|
|
+ show: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 去添加产品 */
|
|
|
+ addProduct() {
|
|
|
+ this.setData({
|
|
|
+ show: true
|
|
|
+ })
|
|
|
},
|
|
|
/* 去修改 */
|
|
|
editProduct() {
|
|
|
@@ -327,7 +324,7 @@ Component({
|
|
|
content: {
|
|
|
...this.data.base,
|
|
|
"items": list.map(v => {
|
|
|
- v.sa_orderitemsi = v.sa_orderitemsid || 0;
|
|
|
+ v.sa_orderitemsid = v.sa_orderitemsid || 0;
|
|
|
v.sa_promotion_itemsid = v.sa_promotion_itemsid || 0;
|
|
|
v.custamount = v.custamount || 0;
|
|
|
v.price = this.data.type == '工具订单' ? v.marketprice : v.contractprice;
|