|
|
@@ -55,6 +55,105 @@ Page({
|
|
|
sys_taskid: options.id
|
|
|
});
|
|
|
this.getDetail();
|
|
|
+ getApp().globalData.previewClick = this.previewClick.bind(this);
|
|
|
+ },
|
|
|
+ previewClick({
|
|
|
+ label,
|
|
|
+ value
|
|
|
+ }) {
|
|
|
+ if (label == '关联应用数据') {
|
|
|
+ const detail = this.data.detail;
|
|
|
+ if (detail.ownerid) {
|
|
|
+ const authComparison = wx.getStorageSync('authComparison');
|
|
|
+ //判断具体消息归属
|
|
|
+ switch (detail.ownertable) {
|
|
|
+ case "sa_customers":
|
|
|
+ this.saCustomer(detail.ownerid);
|
|
|
+ break;
|
|
|
+ case "sat_orderclue":
|
|
|
+ this.satOrderclue(detail.ownerid);
|
|
|
+ break;
|
|
|
+ case "sa_order":
|
|
|
+ this.saOrder(detail.ownerid)
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ let data = authComparison.find(s => (s.objectname || "") == detail.ownertable);
|
|
|
+ if (data) wx.navigateTo({
|
|
|
+ url: data.path.split("/index")[0] + "/detail?id=" + detail.ownerid,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ saOrder(sa_orderid) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221108151302,
|
|
|
+ "content": {
|
|
|
+ nocache: true,
|
|
|
+ sa_orderid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("订单", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ let path = '';
|
|
|
+ switch (res.data.type) {
|
|
|
+ case '工具借用单':
|
|
|
+ path = '/packageA/borrow/detail'
|
|
|
+ break;
|
|
|
+ case '借用归还单':
|
|
|
+ path = '/packageA/toolBill/detail'
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ path = '/packageA/orderForm/detail'
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ wx.navigateTo({
|
|
|
+ url: path + '?id=' + sa_orderid,
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ satOrderclue(sat_orderclueid) {
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "saletool.orderclue.web.orderclue",
|
|
|
+ "method": "selectDetail",
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ "nocache": true,
|
|
|
+ sat_orderclueid
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log("线索详情", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ wx.navigateTo({
|
|
|
+ url: (res.data.isprivate ? '/packageA/saleClue/detail' : '/packageA/publicClue/detail') + '?id=' + sat_orderclueid,
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ saCustomer(sa_customersid) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221012164302,
|
|
|
+ "content": {
|
|
|
+ sa_customersid
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log("客户详情", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+
|
|
|
+ wx.navigateTo({
|
|
|
+ url: (res.data.ispublic ? '/packageA/publicCustomer/detail' : '/packageA/setclient/detail') + '?id=' + sa_customersid,
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
getDetail() {
|
|
|
_Http.basic({
|
|
|
@@ -97,8 +196,8 @@ Page({
|
|
|
value: res.data.endtime
|
|
|
},
|
|
|
{
|
|
|
- label: '关联页数数据',
|
|
|
- value: res.data.allocationstatus
|
|
|
+ label: '关联应用数据',
|
|
|
+ value: res.data.title
|
|
|
},
|
|
|
{
|
|
|
label: '状态',
|
|
|
@@ -106,26 +205,23 @@ Page({
|
|
|
}
|
|
|
],
|
|
|
list1: [{
|
|
|
- label: "任务要求",
|
|
|
- value: res.data.remarks
|
|
|
- },
|
|
|
- {
|
|
|
- label: "开始时间",
|
|
|
- value: res.data.starttime
|
|
|
- },
|
|
|
- {
|
|
|
- label: "截止时间",
|
|
|
- value: res.data.endtime
|
|
|
- },
|
|
|
- {
|
|
|
- label: '关联页数数据',
|
|
|
- value: res.data.allocationstatus
|
|
|
- },
|
|
|
- {
|
|
|
- label: '状态',
|
|
|
- value: res.data.status
|
|
|
- }
|
|
|
- ],
|
|
|
+ label: "任务要求",
|
|
|
+ value: res.data.remarks
|
|
|
+ }, {
|
|
|
+ label: "开始时间",
|
|
|
+ value: res.data.starttime
|
|
|
+ }, {
|
|
|
+ label: "截止时间",
|
|
|
+ value: res.data.endtime
|
|
|
+ }, {
|
|
|
+ label: '关联应用数据',
|
|
|
+ value: res.data.title,
|
|
|
+ color: "#085CDF",
|
|
|
+ slot: 'title'
|
|
|
+ }, {
|
|
|
+ label: '状态',
|
|
|
+ value: res.data.status
|
|
|
+ }],
|
|
|
list2: [{
|
|
|
label: "创建人",
|
|
|
value: res.data.createby
|
|
|
@@ -140,7 +236,7 @@ Page({
|
|
|
value: res.data.changedate
|
|
|
}, {
|
|
|
label: "转手次数",
|
|
|
- value: res.data.leader[0].leadernum
|
|
|
+ value: res.data.leader.length ? res.data.leader[0].leadernum : 0
|
|
|
}]
|
|
|
});
|
|
|
|
|
|
@@ -254,6 +350,5 @@ Page({
|
|
|
})
|
|
|
break;
|
|
|
}
|
|
|
- },
|
|
|
- onShareAppMessage() {}
|
|
|
+ }
|
|
|
})
|