|
|
@@ -54,7 +54,9 @@ Page({ |
|
|
|
UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { |
|
|
|
success: (res) => { |
|
|
|
if (res.code == API.SUCCESS_CODE) { |
|
|
|
console.log(that.data.form); |
|
|
|
for (let j = 0; j < res.data.transfers.length; j++) { |
|
|
|
if(that.data.form.transfers[j].fileForm == undefined){continue;} |
|
|
|
for (let i = 0; i < that.data.form.transfers[j].fileForm.length; i++) { |
|
|
|
that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id |
|
|
|
const element = that.data.form.transfers[j].fileForm[i]; |
|
|
@@ -70,23 +72,24 @@ Page({ |
|
|
|
formData:element, |
|
|
|
success (response){ |
|
|
|
console.log(res); |
|
|
|
if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type == 0){ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id, |
|
|
|
}) |
|
|
|
} |
|
|
|
if((j+1) == that.data.form.transfers.length && (i+1) == that.data.form.transfers[j].fileForm.length && e.currentTarget.dataset.type != 0){ |
|
|
|
UTIL.showToastNoneIcon('操作成功!'); |
|
|
|
that.back(); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
fail(res){ |
|
|
|
console.log(res) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(e.currentTarget.dataset.type == 0){ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/apply/approval/approval?id='+res.data.approvalItemTemplate.id+'&deptId='+res.data.approvalItemTemplate.deptId, |
|
|
|
}) |
|
|
|
} |
|
|
|
if(e.currentTarget.dataset.type != 0){ |
|
|
|
UTIL.showToastNoneIcon('操作成功!'); |
|
|
|
that.back(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|