@@ -674,6 +674,7 @@ Page({ | |||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
for (let j = 0; j < res.data.transfers.length; j++) { | 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++) { | 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 | that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id | ||||
const element = that.data.form.transfers[j].fileForm[i]; | const element = that.data.form.transfers[j].fileForm[i]; | ||||
@@ -689,11 +690,7 @@ Page({ | |||||
formData:element, | formData:element, | ||||
success (response){ | success (response){ | ||||
console.log(res); | 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, | |||||
}) | |||||
} | |||||
}, | }, | ||||
fail(res){ | fail(res){ | ||||
console.log(res) | console.log(res) | ||||
@@ -701,6 +698,16 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
} | } | ||||
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(); | |||||
} | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -54,7 +54,9 @@ Page({ | |||||
UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { | UTIL.httpRequest(API.URL_GET_SAVE, that.data.form, { | ||||
success: (res) => { | success: (res) => { | ||||
if (res.code == API.SUCCESS_CODE) { | if (res.code == API.SUCCESS_CODE) { | ||||
console.log(that.data.form); | |||||
for (let j = 0; j < res.data.transfers.length; j++) { | 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++) { | 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 | that.data.form.transfers[j].fileForm[i].tableId = res.data.transfers[j].id | ||||
const element = that.data.form.transfers[j].fileForm[i]; | const element = that.data.form.transfers[j].fileForm[i]; | ||||
@@ -70,23 +72,24 @@ Page({ | |||||
formData:element, | formData:element, | ||||
success (response){ | success (response){ | ||||
console.log(res); | 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){ | fail(res){ | ||||
console.log(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(); | |||||
} | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -208,7 +208,7 @@ | |||||
position: absolute; | position: absolute; | ||||
line-height: 30rpx; | line-height: 30rpx; | ||||
padding:0 10rpx; | padding:0 10rpx; | ||||
border-radius: 50%; | |||||
border-radius: 50px; | |||||
top: -10rpx; | top: -10rpx; | ||||
right: -10rpx; | right: -10rpx; | ||||
} | } | ||||