|
|
@@ -3,12 +3,20 @@ let queue = [],
|
|
|
downCounter = null;
|
|
|
|
|
|
Component({
|
|
|
+ options: {
|
|
|
+ addGlobalClass: true
|
|
|
+ },
|
|
|
properties: {
|
|
|
- disabled: {type:Boolean}, //禁用
|
|
|
+ disabled: {
|
|
|
+ type: Boolean
|
|
|
+ }, //禁用
|
|
|
type: {
|
|
|
type: String,
|
|
|
value: "合同"
|
|
|
- }
|
|
|
+ }, //禁用
|
|
|
+ synchronous: {
|
|
|
+ type: Boolean
|
|
|
+ },
|
|
|
},
|
|
|
data: {
|
|
|
sa_contractid: 0,
|
|
|
@@ -28,6 +36,41 @@ Component({
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ openSynchronous() {
|
|
|
+ this.selectComponent("#synchronous").onOpen();
|
|
|
+ },
|
|
|
+ confirm({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ let params = this.data.type == "合同" ? {
|
|
|
+ "id": 20231208154904,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": this.data.sa_contractid,
|
|
|
+ "isadd": detail
|
|
|
+ }
|
|
|
+ } : {
|
|
|
+ "id": 20231208161304,
|
|
|
+ "content": {
|
|
|
+ "sa_quotedpriceid": this.data.sa_quotedpriceid,
|
|
|
+ "isadd": detail
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ _Http.basic(params).then(res => {
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg == '成功' ? '设置成功' : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ if (res.msg == '成功') {
|
|
|
+ this.selectComponent("#synchronous").onCancel();
|
|
|
+ this.getList(this.data.type == "合同" ? this.data.sa_contractid : this.data.sa_quotedpriceid, true)
|
|
|
+ } else {
|
|
|
+ this.selectComponent("#synchronous").setData({
|
|
|
+ loading: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
addType() {
|
|
|
let page = getCurrentPages()[getCurrentPages().length - 1];
|
|
|
if (page.route == 'packageA/contract/detail') {
|
|
|
@@ -135,19 +178,17 @@ Component({
|
|
|
}) {
|
|
|
_Http.basic({
|
|
|
"id": this.data.type == "合同" ? 20221124111202 : 20230219161503,
|
|
|
- "content": {
|
|
|
- "sa_contract_itemsaleclassids": detail,
|
|
|
- "sa_quotedprice_itemclassids": detail
|
|
|
- }
|
|
|
+ "content": detail
|
|
|
}).then(res => {
|
|
|
console.log("批量删除类别", res);
|
|
|
wx.showToast({
|
|
|
title: res.msg == '成功' ? '删除成功!' : res.msg,
|
|
|
icon: "none"
|
|
|
})
|
|
|
- if (res.msg == '成功') this.setData({
|
|
|
+ if (res.msg == '成功') this.getList(this.data.type == "合同" ? this.data.sa_contractid : this.data.sa_quotedpriceid, true)
|
|
|
+ /* this.setData({
|
|
|
list: this.data.list.filter(v => detail.indexOf(v[this.data.idname]) == -1)
|
|
|
- })
|
|
|
+ }) */
|
|
|
})
|
|
|
},
|
|
|
/* 生成修改队列 */
|