|
@@ -29,6 +29,7 @@ Page({
|
|
|
timdialogid: 0, //对话框id
|
|
|
gambitList: [], //话题列表
|
|
|
sendfrom: [],
|
|
|
+ isEndGambit: true, //是否结束话题,用于点击编辑不结束话题
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
@@ -49,6 +50,9 @@ Page({
|
|
|
this.getMeme()
|
|
|
},
|
|
|
toCreate() {
|
|
|
+ this.setData({
|
|
|
+ isEndGambit: false
|
|
|
+ })
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/chatRoom/create?timdialogid=' + this.data.timdialogid,
|
|
|
})
|
|
@@ -334,33 +338,61 @@ Page({
|
|
|
},
|
|
|
/* 确认合作 */
|
|
|
confirmTheCooperation() {
|
|
|
- _Http.basic({
|
|
|
- "accesstoken": wx.getStorageSync('userData').token,
|
|
|
- "classname": "customer.supplyanddemand.supplyanddemand",
|
|
|
- "method": "updatesupplyanddemandstatus",
|
|
|
- "content": {
|
|
|
- "tsupplyanddemandid": this.data.ownerid,
|
|
|
- "fstatus": "已解决",
|
|
|
- "tenterprise_userid": this.data.initiator,
|
|
|
- "timdialogid": this.data.timdialogid
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确定达成合作',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "customer.supplyanddemand.supplyanddemand",
|
|
|
+ "method": "updatesupplyanddemandstatus",
|
|
|
+ "content": {
|
|
|
+ "tsupplyanddemandid": that.data.ownerid,
|
|
|
+ "fstatus": "已解决",
|
|
|
+ "tenterprise_userid": that.data.initiator,
|
|
|
+ "timdialogid": that.data.timdialogid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ let text = ' 恭喜达成合作';
|
|
|
+ if (res.msg != '成功') text = res.data;
|
|
|
+ wx.showToast({
|
|
|
+ title: text,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
- console.log("确认合作", res)
|
|
|
})
|
|
|
},
|
|
|
/* 拒绝合作 */
|
|
|
refuseToCooperate() {
|
|
|
- _Http.basic({
|
|
|
- "accesstoken": wx.getStorageSync('userData').token,
|
|
|
- "classname": "customer.supplyanddemand.supplyanddemand",
|
|
|
- "method": "updatesupplyanddemandstatus",
|
|
|
- "content": {
|
|
|
- "tsupplyanddemandid": this.data.ownerid,
|
|
|
- "fstatus": "待对接",
|
|
|
- "timdialogid": this.data.timdialogid
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确定拒绝',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "customer.supplyanddemand.supplyanddemand",
|
|
|
+ "method": "updatesupplyanddemandstatus",
|
|
|
+ "content": {
|
|
|
+ "tsupplyanddemandid": that.data.ownerid,
|
|
|
+ "fstatus": "待对接",
|
|
|
+ "timdialogid": that.data.timdialogid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ let text = ' 拒绝成功';
|
|
|
+ if (res.msg != '成功') text = res.data;
|
|
|
+ wx.showToast({
|
|
|
+ title: text,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
- console.log("拒绝合作", res)
|
|
|
})
|
|
|
},
|
|
|
/* 输入框数据绑定 */
|
|
@@ -634,7 +666,7 @@ Page({
|
|
|
this.setData({
|
|
|
timsubjectid: s.data[0].timsubjectid
|
|
|
})
|
|
|
- this.endGambit(true) //存在未关闭话题,调用关闭话题,并在关闭后重新获取历史话题
|
|
|
+ if (this.data.isEndGambit) this.endGambit(true) //存在未关闭话题,调用关闭话题,并在关闭后重新获取历史话题
|
|
|
} else {
|
|
|
this.query_imdialogMessage(); //不存在未关闭话题,直接获取历史话题
|
|
|
}
|