|
|
@@ -1,18 +1,66 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
Component({
|
|
|
properties: {
|
|
|
- list: Array,
|
|
|
- isFollow: Boolean
|
|
|
+ list: Array
|
|
|
},
|
|
|
data: {
|
|
|
-
|
|
|
+ viewIndex: null
|
|
|
},
|
|
|
methods: {
|
|
|
- toEdit(e) {
|
|
|
+ handleDetail(e) {
|
|
|
+ const {
|
|
|
+ index
|
|
|
+ } = e.currentTarget.dataset,
|
|
|
+ item = this.data.list[index],
|
|
|
+ pages = getCurrentPages(),
|
|
|
+ page = pages[pages.length - 1];
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221128144904,
|
|
|
+ "content": {
|
|
|
+ "sa_projectid": page.data.detail.sa_projectid,
|
|
|
+ "sa_projtaskmagid": item.sa_projtaskmagid,
|
|
|
+ "sa_projstagemagid": item.sa_projtaskmagid || 0,
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 999
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ viewIndex: index == this.data.viewIndex ? null : index,
|
|
|
+ workList: res.data
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ selectClient(e) {
|
|
|
const {
|
|
|
item
|
|
|
- } = e.currentTarget.dataset;
|
|
|
+ } = e.currentTarget.dataset,
|
|
|
+ pages = getCurrentPages(),
|
|
|
+ page = pages[pages.length - 1];
|
|
|
+ console.log(item)
|
|
|
wx.navigateTo({
|
|
|
- url: '/packageA/project/modules/task/add?data=' + JSON.stringify(item) + '&isFollow=' + this.data.isFollow
|
|
|
+ url: '/packageA/select/setclient/select?params=' + JSON.stringify({
|
|
|
+ id: 20221129152204,
|
|
|
+ model: "#Task",
|
|
|
+ content: {
|
|
|
+ nocache: true,
|
|
|
+ sa_projectid: page.data.detail.sa_projectid,
|
|
|
+ "sa_projtaskmagid": item.sa_projtaskmagid,
|
|
|
+ pageNumber: 1,
|
|
|
+ pageTotal: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ total: null,
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }),
|
|
|
})
|
|
|
},
|
|
|
}
|