|
@@ -17,12 +17,20 @@ Component({
|
|
|
}, //禁用
|
|
|
},
|
|
|
data: {
|
|
|
+ actionShow: false,
|
|
|
content: {
|
|
|
nocache: true,
|
|
|
pageNumber: 1,
|
|
|
pageTotal: 1,
|
|
|
total: null
|
|
|
- }
|
|
|
+ },
|
|
|
+ actions: [{
|
|
|
+ name: getApp().globalData.Language.getMapText('自项目合同添加'),
|
|
|
+ value: "自项目合同添加",
|
|
|
+ }, {
|
|
|
+ name: getApp().globalData.Language.getMapText('自产品档案添加'),
|
|
|
+ value: "自产品档案添加"
|
|
|
+ }]
|
|
|
},
|
|
|
lifetimes: {
|
|
|
detached: function () {
|
|
@@ -184,11 +192,15 @@ Component({
|
|
|
},
|
|
|
/* 去添加产品 */
|
|
|
addProduct() {
|
|
|
- let detail = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data.detail,
|
|
|
+ let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data,
|
|
|
+ detail = page.detail,
|
|
|
id = '',
|
|
|
query = "&newprice=contractprice"; /* marketprice */
|
|
|
switch (detail.type) {
|
|
|
case '项目订单':
|
|
|
+ if (page.ProductFile) return this.setData({
|
|
|
+ actionShow: true
|
|
|
+ })
|
|
|
id = 20230103155002;
|
|
|
break;
|
|
|
case '促销订单':
|
|
@@ -202,6 +214,10 @@ Component({
|
|
|
id = 20221109153502;
|
|
|
break;
|
|
|
}
|
|
|
+ this.toAdd(id, detail, query)
|
|
|
+
|
|
|
+ },
|
|
|
+ toAdd(id, detail, query = '&newprice=contractprice') {
|
|
|
wx.navigateTo({
|
|
|
url: `/select/product/index?params=${JSON.stringify({
|
|
|
"id":id,
|
|
@@ -220,6 +236,17 @@ Component({
|
|
|
})
|
|
|
getApp().globalData.handleSelect = this.handleSelect.bind(this);
|
|
|
},
|
|
|
+ cancelSelector() {
|
|
|
+ this.setData({
|
|
|
+ actionShow: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectorMode({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ this.toAdd(detail.value == '自项目合同添加' ? 20230103155002 : '2025031913184903', getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data.detail)
|
|
|
+ this.cancelSelector();
|
|
|
+ },
|
|
|
/* 处理新增产品 */
|
|
|
handleSelect(detail) {
|
|
|
let that = this;
|