| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- const _Http = getApp().globalData.http;
- Component({
- properties: {
- list: Array
- },
- data: {
- viewIndex: null
- },
- options: {
- addGlobalClass: true
- },
- methods: {
- selectClient(e) {
- const {
- item
- } = e.currentTarget.dataset,
- pages = getCurrentPages(),
- page = pages[pages.length - 1];
- this.setData({
- taskname: item.taskname,
- content: {
- sa_projectid: page.data.detail.sa_projectid,
- "sa_projtaskmagid": item.sa_projtaskmagid,
- "sa_projstagemagid": item.sa_projstagemagid,
- }
- })
- if (item.partiestype.length != 0) {
- wx.navigateTo({
- url: '/packageA/select/setclient/select?params=' + JSON.stringify({
- "id": 20221129152204,
- content: {
- model: "#Task",
- nocache: true,
- sa_projectid: page.data.detail.sa_projectid,
- "sa_projtaskmagid": item.sa_projtaskmagid,
- pageNumber: 1,
- pageTotal: 1,
- pageSize: 20,
- total: null,
- where: {
- condition: "",
- }
- },
- }),
- });
- } else {
- this.handleAdd([]);
- }
- },
- handleAdd(ids) {
- let content = this.data.content;
- content.sa_project_partiesids = ids
- wx.redirectTo({
- url: '/packageA/project/modules/task/add?content=' + JSON.stringify(content) + '&taskname=' + this.data.taskname,
- })
- },
- viewHistory(e) {
- const {
- sa_projectid,
- sa_projtaskmagid,
- sa_projstagemagid
- } = e.currentTarget.dataset.item,
- content = {
- nocheca: true,
- sa_projectid,
- sa_projtaskmagid,
- sa_projstagemagid,
- pageNumber: 1,
- pageTotal: 1,
- pageSize: 20
- };
- if (!content.sa_projectid) {
- let page = getCurrentPages().find(v => v.__route__ == 'packageA/project/detail');
- content.sa_projectid = page.data.detail.sa_projectid;
- }
- wx.navigateTo({
- url: '/packageA/project/modules/task/history?content=' + JSON.stringify(content),
- })
- }
- }
- })
|