|
|
@@ -311,124 +311,124 @@ Page({ |
|
|
|
|
|
|
|
let fileForm = []; |
|
|
|
|
|
|
|
UTIL.httpRequest( |
|
|
|
API.URL_GET_FINDLIST, |
|
|
|
{ |
|
|
|
method:'GET', |
|
|
|
tableName:'t_yinnong_transfer', |
|
|
|
tableId:list.applyData.transfers[i].id, |
|
|
|
fileType:1 |
|
|
|
}, |
|
|
|
{ |
|
|
|
success: (res) => { |
|
|
|
// UTIL.httpRequest( |
|
|
|
// API.URL_GET_FINDLIST, |
|
|
|
// { |
|
|
|
// method:'GET', |
|
|
|
// tableName:'t_yinnong_transfer', |
|
|
|
// tableId:list.applyData.transfers[i].id, |
|
|
|
// fileType:1 |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// success: (res) => { |
|
|
|
|
|
|
|
let list2 = []; |
|
|
|
res.data.forEach((item2,index2)=>{ |
|
|
|
wx.downloadFile({ |
|
|
|
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 |
|
|
|
success (response) { |
|
|
|
if (response.statusCode === 200) { |
|
|
|
fileForm.push({ |
|
|
|
file: response.tempFilePath, |
|
|
|
fileType:'1', |
|
|
|
bizPath:'transfer', |
|
|
|
tableName:'t_yinnong_transfer', |
|
|
|
tableId:'' |
|
|
|
}) |
|
|
|
console.log("--------------fileForm2 start----------------"); |
|
|
|
console.log(fileForm); |
|
|
|
console.log("--------------fileForm2 end----------------"); |
|
|
|
list2.push({ |
|
|
|
tempFilePath:response.tempFilePath, |
|
|
|
id:item2.id |
|
|
|
}) |
|
|
|
list.applyData.transfers[i].SJimage = list2; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
// let list2 = []; |
|
|
|
// res.data.forEach((item2,index2)=>{ |
|
|
|
// wx.downloadFile({ |
|
|
|
// url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 |
|
|
|
// success (response) { |
|
|
|
// if (response.statusCode === 200) { |
|
|
|
// fileForm.push({ |
|
|
|
// file: response.tempFilePath, |
|
|
|
// fileType:'1', |
|
|
|
// bizPath:'transfer', |
|
|
|
// tableName:'t_yinnong_transfer', |
|
|
|
// tableId:'' |
|
|
|
// }) |
|
|
|
// console.log("--------------fileForm2 start----------------"); |
|
|
|
// console.log(fileForm); |
|
|
|
// console.log("--------------fileForm2 end----------------"); |
|
|
|
// list2.push({ |
|
|
|
// tempFilePath:response.tempFilePath, |
|
|
|
// id:item2.id |
|
|
|
// }) |
|
|
|
// list.applyData.transfers[i].SJimage = list2; |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
//发票 |
|
|
|
UTIL.httpRequest( |
|
|
|
API.URL_GET_FINDLIST, |
|
|
|
{ |
|
|
|
method:'GET', |
|
|
|
tableName:'t_yinnong_transfer', |
|
|
|
tableId:list.applyData.transfers[i].id, |
|
|
|
fileType:2 |
|
|
|
}, |
|
|
|
{ |
|
|
|
success: (res) => { |
|
|
|
let list2 = []; |
|
|
|
res.data.forEach((item2,index2)=>{ |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// //发票 |
|
|
|
// UTIL.httpRequest( |
|
|
|
// API.URL_GET_FINDLIST, |
|
|
|
// { |
|
|
|
// method:'GET', |
|
|
|
// tableName:'t_yinnong_transfer', |
|
|
|
// tableId:list.applyData.transfers[i].id, |
|
|
|
// fileType:2 |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// success: (res) => { |
|
|
|
// let list2 = []; |
|
|
|
// res.data.forEach((item2,index2)=>{ |
|
|
|
|
|
|
|
wx.downloadFile({ |
|
|
|
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 |
|
|
|
success (response) { |
|
|
|
if (response.statusCode === 200) { |
|
|
|
fileForm.push({ |
|
|
|
file: response.tempFilePath, |
|
|
|
fileType:'2', |
|
|
|
bizPath:'transfer', |
|
|
|
tableName:'t_yinnong_transfer', |
|
|
|
tableId:'' |
|
|
|
}) |
|
|
|
console.log("--------------fileForm2 start----------------"); |
|
|
|
console.log(fileForm); |
|
|
|
console.log("--------------fileForm2 end----------------"); |
|
|
|
list2.push({ |
|
|
|
tempFilePath:response.tempFilePath, |
|
|
|
id:item2.id |
|
|
|
}) |
|
|
|
list.applyData.transfers[i].FPimage = list2; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
//其他 |
|
|
|
UTIL.httpRequest( |
|
|
|
API.URL_GET_FINDLIST, |
|
|
|
{ |
|
|
|
method:'GET', |
|
|
|
tableName:'t_yinnong_transfer', |
|
|
|
tableId:list.applyData.transfers[i].id, |
|
|
|
fileType:3 |
|
|
|
}, |
|
|
|
{ |
|
|
|
success: (res) => { |
|
|
|
let list2 = []; |
|
|
|
res.data.forEach((item2,index2)=>{ |
|
|
|
// wx.downloadFile({ |
|
|
|
// url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 |
|
|
|
// success (response) { |
|
|
|
// if (response.statusCode === 200) { |
|
|
|
// fileForm.push({ |
|
|
|
// file: response.tempFilePath, |
|
|
|
// fileType:'2', |
|
|
|
// bizPath:'transfer', |
|
|
|
// tableName:'t_yinnong_transfer', |
|
|
|
// tableId:'' |
|
|
|
// }) |
|
|
|
// console.log("--------------fileForm2 start----------------"); |
|
|
|
// console.log(fileForm); |
|
|
|
// console.log("--------------fileForm2 end----------------"); |
|
|
|
// list2.push({ |
|
|
|
// tempFilePath:response.tempFilePath, |
|
|
|
// id:item2.id |
|
|
|
// }) |
|
|
|
// list.applyData.transfers[i].FPimage = list2; |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// //其他 |
|
|
|
// UTIL.httpRequest( |
|
|
|
// API.URL_GET_FINDLIST, |
|
|
|
// { |
|
|
|
// method:'GET', |
|
|
|
// tableName:'t_yinnong_transfer', |
|
|
|
// tableId:list.applyData.transfers[i].id, |
|
|
|
// fileType:3 |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// success: (res) => { |
|
|
|
// let list2 = []; |
|
|
|
// res.data.forEach((item2,index2)=>{ |
|
|
|
|
|
|
|
wx.downloadFile({ |
|
|
|
url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 |
|
|
|
success (response) { |
|
|
|
if (response.statusCode === 200) { |
|
|
|
fileForm.push({ |
|
|
|
file: response.tempFilePath, |
|
|
|
fileType:'3', |
|
|
|
bizPath:'transfer', |
|
|
|
tableName:'t_yinnong_transfer', |
|
|
|
tableId:'' |
|
|
|
}) |
|
|
|
console.log("--------------fileForm2 start----------------"); |
|
|
|
console.log(fileForm); |
|
|
|
console.log("--------------fileForm2 end----------------"); |
|
|
|
list2.push({ |
|
|
|
tempFilePath:response.tempFilePath, |
|
|
|
id:item2.id |
|
|
|
}) |
|
|
|
list.applyData.transfers[i].QTimage = list2; |
|
|
|
// wx.downloadFile({ |
|
|
|
// url: URL_PREFIX+item2.fileUrl, //仅为示例,并非真实的资源 |
|
|
|
// success (response) { |
|
|
|
// if (response.statusCode === 200) { |
|
|
|
// fileForm.push({ |
|
|
|
// file: response.tempFilePath, |
|
|
|
// fileType:'3', |
|
|
|
// bizPath:'transfer', |
|
|
|
// tableName:'t_yinnong_transfer', |
|
|
|
// tableId:'' |
|
|
|
// }) |
|
|
|
// console.log("--------------fileForm2 start----------------"); |
|
|
|
// console.log(fileForm); |
|
|
|
// console.log("--------------fileForm2 end----------------"); |
|
|
|
// list2.push({ |
|
|
|
// tempFilePath:response.tempFilePath, |
|
|
|
// id:item2.id |
|
|
|
// }) |
|
|
|
// list.applyData.transfers[i].QTimage = list2; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
list.applyData.transfers[i].id = ""; |
|
|
|
list.applyData.transfers[i].fileForm = fileForm; |
|
|
|
} |
|
|
|