|
|
@@ -21,6 +21,8 @@ Component({
|
|
|
}, //是否同步按钮显示
|
|
|
},
|
|
|
data: {
|
|
|
+ directAddition: false,
|
|
|
+ actionSheet: false,
|
|
|
sa_contractid: 0,
|
|
|
"content": {
|
|
|
nocache: true,
|
|
|
@@ -28,6 +30,13 @@ Component({
|
|
|
pageTotal: 1,
|
|
|
total: null
|
|
|
},
|
|
|
+ actions: [{
|
|
|
+ name: '自报价单添加',
|
|
|
+ value: 0
|
|
|
+ }, {
|
|
|
+ name: '自产品档案添加',
|
|
|
+ value: 1
|
|
|
+ }],
|
|
|
},
|
|
|
lifetimes: {
|
|
|
detached: function () {
|
|
|
@@ -142,6 +151,41 @@ Component({
|
|
|
getApp().globalData.handleSelect = this.handleSelectProduct.bind(this);
|
|
|
}
|
|
|
},
|
|
|
+ actionSheetOnSelected({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ if (detail.value == 0) {
|
|
|
+ this.addProduct();
|
|
|
+ } else {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/packageA/select/product/select?params=' + JSON.stringify({
|
|
|
+ "id": 20221124093602,
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ nocache: true,
|
|
|
+ sa_contractid: this.data.sa_contractid,
|
|
|
+ total: null,
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ "istool": 0 //是否是工具
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ getApp().globalData.handleSelect = this.handleSelectProduct.bind(this);
|
|
|
+ }
|
|
|
+ this.closeActionSheet()
|
|
|
+ },
|
|
|
+ openActionSheet() {
|
|
|
+ this.setData({
|
|
|
+ actionSheet: true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ closeActionSheet() {
|
|
|
+ this.setData({
|
|
|
+ actionSheet: false
|
|
|
+ })
|
|
|
+ },
|
|
|
selectOffers({
|
|
|
item
|
|
|
}) {
|