|
|
@@ -16,7 +16,7 @@ Page({
|
|
|
}
|
|
|
return value;
|
|
|
},
|
|
|
- show:false,
|
|
|
+ show: false,
|
|
|
tabsList: [{
|
|
|
label: "详细信息",
|
|
|
icon: "icon-tabchanpin"
|
|
|
@@ -51,18 +51,18 @@ Page({
|
|
|
let tabbarsList = []
|
|
|
if (res.data.status == '新建') tabbarsList = [{
|
|
|
label: "编辑",
|
|
|
- icon: "icon-dibu-bianji"
|
|
|
- },{
|
|
|
+ icon: "icon-dibu-bianji"
|
|
|
+ }, {
|
|
|
label: "提交",
|
|
|
- icon: "icon-tijiao",
|
|
|
- },{
|
|
|
+ icon: "icon-tijiao",
|
|
|
+ }, {
|
|
|
label: "删除",
|
|
|
icon: "icon-guanlian-shanchu"
|
|
|
}]
|
|
|
if (res.data.status == '提交') tabbarsList = [{
|
|
|
label: "审核",
|
|
|
icon: "icon-shenhe"
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: "退回",
|
|
|
icon: "icon-a-fanshenhetuihui"
|
|
|
}]
|
|
|
@@ -94,7 +94,7 @@ Page({
|
|
|
}, {
|
|
|
label: "经销商简称",
|
|
|
value: data.enterprisename
|
|
|
- },{
|
|
|
+ }, {
|
|
|
label: "回款归属月份",
|
|
|
value: data.period
|
|
|
}, {
|
|
|
@@ -126,33 +126,33 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
/* 审核选择弹出框关闭 */
|
|
|
- onClose () {
|
|
|
+ onClose() {
|
|
|
this.setData({
|
|
|
show: false
|
|
|
})
|
|
|
},
|
|
|
/* 审核提交 */
|
|
|
- async checkSubmit ({
|
|
|
+ async checkSubmit({
|
|
|
detail
|
|
|
}) {
|
|
|
let res = await _Http.basic({
|
|
|
- "id": "20221226153304",
|
|
|
+ "id": "20221226153304",
|
|
|
"content": {
|
|
|
- "sa_paybillid":this.data.sa_paybillid,
|
|
|
- "period":getTime.formatTime(new Date(detail), '-').split(' ')[0]
|
|
|
+ "sa_paybillid": this.data.sa_paybillid,
|
|
|
+ "period": getTime.formatTime(new Date(detail), '-').split(' ')[0]
|
|
|
}
|
|
|
})
|
|
|
console.log(res);
|
|
|
if (res.msg == '成功') {
|
|
|
this.setData({
|
|
|
- show:false
|
|
|
+ show: false
|
|
|
})
|
|
|
this.getDetail(true)
|
|
|
}
|
|
|
},
|
|
|
tabbarOnClick({
|
|
|
- detail
|
|
|
- }) {
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
switch (detail.label) {
|
|
|
case "编辑":
|
|
|
wx.navigateTo({
|
|
|
@@ -169,7 +169,7 @@ Page({
|
|
|
if (confirm) _Http.basic({
|
|
|
"id": "20221226153204",
|
|
|
"content": {
|
|
|
- "sa_paybillid":this.data.sa_paybillid
|
|
|
+ "sa_paybillid": this.data.sa_paybillid
|
|
|
}
|
|
|
}).then(res => {
|
|
|
wx.showToast({
|
|
|
@@ -188,11 +188,11 @@ Page({
|
|
|
break;
|
|
|
case "审核":
|
|
|
wx.showToast({
|
|
|
- title:'请选择回款日期',
|
|
|
- icon:'none'
|
|
|
+ title: '请选择回款日期',
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
this.setData({
|
|
|
- show:true
|
|
|
+ show: true
|
|
|
})
|
|
|
break;
|
|
|
case "退回":
|
|
|
@@ -203,9 +203,9 @@ Page({
|
|
|
confirm
|
|
|
}) => {
|
|
|
if (confirm) _Http.basic({
|
|
|
- "id":20221227110104,
|
|
|
+ "id": 20221227110104,
|
|
|
"content": {
|
|
|
- sa_paybillid:this.data.sa_paybillid
|
|
|
+ sa_paybillid: this.data.sa_paybillid
|
|
|
}
|
|
|
}).then(res => {
|
|
|
wx.showToast({
|
|
|
@@ -220,35 +220,35 @@ Page({
|
|
|
})
|
|
|
break;
|
|
|
case "删除":
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: `是否删除该凭证?`,
|
|
|
- complete: ({
|
|
|
- confirm
|
|
|
- }) => {
|
|
|
- if (confirm) _Http.basic({
|
|
|
- "id":20221226153104,
|
|
|
- "content": {
|
|
|
- sa_paybillids:[this.data.sa_paybillid]
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- wx.showToast({
|
|
|
- title: res.msg == '成功' ? `已删除该凭证` : res.msg,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- if (res.msg == '成功') {
|
|
|
- setTimeout(() => {
|
|
|
- wx.navigateBack()
|
|
|
- getCurrentPages()[getCurrentPages().length - 2].getList(true)
|
|
|
- },300)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- break;
|
|
|
- }
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否删除该凭证?`,
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) _Http.basic({
|
|
|
+ "id": 20221226153104,
|
|
|
+ "content": {
|
|
|
+ sa_paybillids: [this.data.sa_paybillid]
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg == '成功' ? `已删除该凭证` : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (res.msg == '成功') {
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateBack()
|
|
|
+ getCurrentPages()[getCurrentPages().length - 2].getList(true)
|
|
|
+ }, 300)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ }
|
|
|
},
|
|
|
- onInput (detail) {
|
|
|
+ onInput(detail) {
|
|
|
|
|
|
},
|
|
|
//tabs 切换
|
|
|
@@ -257,8 +257,8 @@ Page({
|
|
|
}) {
|
|
|
this.setData({
|
|
|
tabsActive: detail
|
|
|
- });
|
|
|
- console.log(this.data.tabsActive);
|
|
|
+ });
|
|
|
+ console.log(this.data.tabsActive);
|
|
|
this.partialRenewal();
|
|
|
},
|
|
|
//局部数据更新 tabs
|
|
|
@@ -271,7 +271,7 @@ Page({
|
|
|
pageNumber,
|
|
|
pageTotal
|
|
|
} = Component.data.content,
|
|
|
- id = this.data.detail.sa_paybillid;
|
|
|
+ id = this.data.detail.sa_paybillid;
|
|
|
if (total == null || init) {
|
|
|
Component.getList(id, init);
|
|
|
} else if (pageNumber < pageTotal) {
|
|
|
@@ -287,7 +287,7 @@ Page({
|
|
|
let page = getCurrentPages().find(v => v.__route__ == 'packageA/remitVoucher/index');
|
|
|
let content = JSON.parse(JSON.stringify(page.data.content));
|
|
|
content.pageNumber = 1;
|
|
|
- content.pageSize = page.data.list.length;
|
|
|
+ content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
|
|
|
_Http.basic({
|
|
|
"id": 20230111141104,
|
|
|
content
|