浏览代码

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pages/bankDraft/add/add.js
#	pages/bankDraft/add/add.wxml
master
yujk 3 年前
父节点
当前提交
731cfea748
共有 3 个文件被更改,包括 150 次插入193 次删除
  1. +116
    -113
      pages/apply/paymentTemplate/add/add.js
  2. +33
    -79
      pages/bankDraft/add/add.js
  3. +1
    -1
      project.private.config.json

+ 116
- 113
pages/apply/paymentTemplate/add/add.js 查看文件

@@ -251,6 +251,8 @@ Page({

list.applyData.transfers[i].expenditureAmount = '';

list.applyData.transfers[i].fileNum = 0;

list.applyData.transfers[i].cashierType = list.applyData.transfers[i].cashierId != '' && list.applyData.transfers[i].cashierId != null && list.applyData.transfers[i].cashierId != null ? 'edit':'add' ;

@@ -280,6 +282,7 @@ Page({
if(list.applyData.transfers[i].capitalExpenditureType == 4){
let prames = {
transferId:list.applyData.transfers[i].id,
}
// 关联合同查询
UTIL.httpRequest(API.URL_GET_GETSELECTINFOBYOUTID , prames, {
@@ -311,124 +314,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;
}


+ 33
- 79
pages/bankDraft/add/add.js 查看文件

@@ -22,16 +22,11 @@ Page({
orderStatus: "", //汇票状态 必填 1在库 2转付中 3转付 4承兑
remark: "",
},
minDate: new Date(2020, 5, 1).getTime(),
maxDate: new Date(2030, 0, 31).getTime(),
orderStatusOptions:[],
orderTypeOptions:[],
showBtn:true,
showStartTime:false,
showEndTime:false,
orderTypeindex:0,
orderStatusindex:0,
status:0,
},

/**
@@ -46,35 +41,32 @@ Page({
if(res.data.orderStatus!='1'){
this.setData({'showBtn':false});
}
this.setData({'form':res.data})
//汇票类型
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, {
success: (r) => {
if(r.data.length>0){
that.setData({
orderTypeOptions:r.data,
})
r.data.map((rr,ind) => {
if(rr.dictValue == res.data.orderType){
that.setData({'orderTypeindex':ind})
}
})
}
success: (rr) => {
this.setData({
orderTypeOptions:rr.data
});
this.data.orderTypeOptions.map(r => {
if(r.dictValue == res.data.orderType){
res.data.orderTypeText = r.dictLabel
that.setData({'form':res.data});
}
})
}
})
//汇票状态
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_status', {method:'GET'}, {
success: (r) => {
if(r.data.length>0){
that.setData({
orderStatusOptions:r.data,
})
r.data.map((rr,ind) => {
if(rr.dictValue == res.data.orderStatus){
that.setData({'orderStatusindex':ind})
}
})
}
success: (rr) => {
this.setData({
orderStatusOptions:rr.data
});
this.data.orderStatusOptions.map(r => {
if(r.dictValue == res.data.orderStatus){
res.data.orderStatusText = r.dictLabel
that.setData({'form':res.data});
}
})
}
})
}
@@ -117,27 +109,20 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
let that = this
//汇票类型
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, {
success: (res) => {
if(res.data.length>0){
that.setData({
orderTypeOptions:res.data,
'form.orderType':res.data[0].dictValue
})
}
this.setData({
orderTypeOptions:res.data
});
}
})
//汇票状态
UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_status', {method:'GET'}, {
success: (res) => {
if(res.data.length>0){
that.setData({
orderStatusOptions:res.data,
'form.orderStatus':res.data[0].dictValue
})
}
this.setData({
orderStatusOptions:res.data
});
}
})
},
@@ -154,23 +139,17 @@ Page({
})
},
closeBox(even){
console.log(even.currentTarget.dataset.name);
this.setData({
[even.currentTarget.dataset.name]:false
})
},
onConfirmorderType (e) {
let obj = e.detail.value;
this.setData({
'form.orderType':this.data.orderTypeOptions[obj].dictValue,
'orderTypeindex':obj
})
},
onConfirmorderStatus (e) {
let obj = e.detail.value;
onConfirmOrderType(event) {
this.setData({
'form.orderStatus':this.data.orderStatusOptions[obj].dictValue,
'orderStatusindex':obj
})
[event.currentTarget.dataset.name]: false,
[event.currentTarget.dataset.value]: event.detail.value.dictValue,
[event.currentTarget.dataset.value+'Text']: event.detail.value.dictLabel,
});
},
goSubmit(){
if(this.data.form.orderNum===''||this.data.form.orderNum==null){ //汇票号码
@@ -200,8 +179,7 @@ Page({
}else if(this.data.form.orderStatus === ''||this.data.form.orderStatus==null){//联行号
UTIL.showToastNoneIcon('汇票状态不能为空!');
return false;
}else if(this.data.status=='0'){
this.setData({'status':1})
}else{
var that = this;
that.data.form.method = 'POST';
if(that.data.form.id==""||that.data.form.id==null){
@@ -217,18 +195,6 @@ Page({
},2000)
}
})
},
fail: function (response) {
if (typeof fail === FUNCTION_TEXT) {
fail(handleFail(response));
} else {
showToastNoneIcon(API.MSG_FAIL_HTTP);
}
this.setData({'status':0})
},
complete: function (response) {
this.setData({'status':0})
wx.hideNavigationBarLoading();
}
})
}else{
@@ -244,18 +210,6 @@ Page({
},2000)
}
})
},
fail: function (response) {
if (typeof fail === FUNCTION_TEXT) {
fail(handleFail(response));
} else {
showToastNoneIcon(API.MSG_FAIL_HTTP);
}
this.setData({'status':0})
},
complete: function (response) {
this.setData({'status':0})
wx.hideNavigationBarLoading();
}
})
}


+ 1
- 1
project.private.config.json 查看文件

@@ -149,5 +149,5 @@
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "WXMB",
"libVersion": "2.21.4"
"libVersion": "2.11.2"
}

正在加载...
取消
保存