Commit ae28b048 by niewei

depanrmentNumer

parent 82aa781d
......@@ -3,88 +3,88 @@ import commonFunctions from '~/mixin/commonFunctions.js';
import Api from '~/service/Api';
export default {
mixins: [commonFunctions],
methods: {
async handleSearch() {
let opndatfrom = this.model.opndatfrom;
if (!opndatfrom || opndatfrom == '') {
this.$notify.error({title: this.$t('factoring.错误'), message: this.$t('factoring.查询开始日期必输!')});
return;
}
let opndatto = this.model.opndatto;
if (!opndatto || opndatto == '') {
this.$notify.error({title: this.$t('factoring.错误'), message: this.$t('factoring.查询结束日期必输!')});
return;
}
let params = {
...this.model,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
opndatfrom: moment(opndatfrom).format('YYYY-MM-DD'),
opndatto: moment(opndatto).format('YYYY-MM-DD'),
};
this.model.branch = JSON.parse(sessionStorage.getItem('currentOrg')).departmentnumber
this.load = true;
let rtnmsg = await Api.post("/factoring/fitsee/list", params);
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
this.stmData.data = rtnmsg.data.list;
this.pagination = {
pageNum: rtnmsg.data.pageNum || 1,
pageSize: rtnmsg.data.pageSize || 10,
total: rtnmsg.data.total
};
} else {
this.$notify.error({title: this.$t('factoring.错误'), message: this.$t('factoring.服务请求失败!')});
}
this.load = false;
},
async handleReset() {
this.model.sealcrtyp = '';
this.model.opndatfrom = new Date((new Date).getTime() - (7 * 24 * 60 * 60 * 1000));
this.model.opndatto = new Date();
this.model.seaownref = '';
this.model.seashgref = '';
this.model.seaamtfr = '';
this.model.seasta = '';
this.model.seacur = '';
this.model.pty.extkey = '';
this.model.pty.nam = '';
this.model.usr.extkey = '';
this.model.seaamtto = '';
this.model.searol = '';
this.model.nam = '';
this.model.seapty = '';
this.model.searef = '';
},
// pageSize改变
handleSizeChange(val) {
this.pagination.pageNum = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
// 页码改变
handleCurrentChange(val) {
this.pagination.pageNum = val;
this.handleSearch();
},
// 获取处理按钮
getButtons(row) {
this.$set(this.codes, "rowList", row);
this.handleVisible = true;
},
// 跳转对应交易
onChoose(code, row) {
this.routerPush({
path: "/business/" + code,
query: {inr: row.inr}
});
this.handleVisible = false;
},
// 保理开立
toTrtopn() {
this.routerPush('/business/fitepn');
},
}
mixins: [commonFunctions],
methods: {
async handleSearch () {
let opndatfrom = this.model.opndatfrom;
if (!opndatfrom || opndatfrom == '') {
this.$notify.error({ title: this.$t('factoring.错误'), message: this.$t('factoring.查询开始日期必输!') });
return;
}
let opndatto = this.model.opndatto;
if (!opndatto || opndatto == '') {
this.$notify.error({ title: this.$t('factoring.错误'), message: this.$t('factoring.查询结束日期必输!') });
return;
}
let params = {
...this.model,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize,
opndatfrom: moment(opndatfrom).format('YYYY-MM-DD'),
opndatto: moment(opndatto).format('YYYY-MM-DD'),
};
this.model.branch = JSON.parse(sessionStorage.getItem('currentOrg')).departmentNumber
this.load = true;
let rtnmsg = await Api.post("/factoring/fitsee/list", params);
if (rtnmsg.respCode == SUCCESS) {
this.load = false;
this.stmData.data = [];
this.stmData.data = rtnmsg.data.list;
this.pagination = {
pageNum: rtnmsg.data.pageNum || 1,
pageSize: rtnmsg.data.pageSize || 10,
total: rtnmsg.data.total
};
} else {
this.$notify.error({ title: this.$t('factoring.错误'), message: this.$t('factoring.服务请求失败!') });
}
this.load = false;
},
async handleReset () {
this.model.sealcrtyp = '';
this.model.opndatfrom = new Date((new Date).getTime() - (7 * 24 * 60 * 60 * 1000));
this.model.opndatto = new Date();
this.model.seaownref = '';
this.model.seashgref = '';
this.model.seaamtfr = '';
this.model.seasta = '';
this.model.seacur = '';
this.model.pty.extkey = '';
this.model.pty.nam = '';
this.model.usr.extkey = '';
this.model.seaamtto = '';
this.model.searol = '';
this.model.nam = '';
this.model.seapty = '';
this.model.searef = '';
},
// pageSize改变
handleSizeChange (val) {
this.pagination.pageNum = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
// 页码改变
handleCurrentChange (val) {
this.pagination.pageNum = val;
this.handleSearch();
},
// 获取处理按钮
getButtons (row) {
this.$set(this.codes, "rowList", row);
this.handleVisible = true;
},
// 跳转对应交易
onChoose (code, row) {
this.routerPush({
path: "/business/" + code,
query: { inr: row.inr }
});
this.handleVisible = false;
},
// 保理开立
toTrtopn () {
this.routerPush('/business/fitepn');
},
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment