import {getDectyp, init, resolveResponse, save} from "../../../../../../service/business/rmb"; import Utils from "../../../../../../utils"; import commonFunctions from "../../../../../../mixin/commonFunctions"; export default { mixins: [commonFunctions], methods: { saveTdn() { this.$refs['modelForm'].validate(async (validStatic) => { if (validStatic) { save('rmb2106', this.model).then(response => { resolveResponse.bind(this)(response); }); } else { // 前端校验失败 this.$notify({ title: '失败', message: '校验失败', type: 'error', }); } }) }, init(transName, pblInr) { this.model.pblmod.dectyp = getDectyp(transName); this.model.pblmod.wrkpbl.inr = pblInr; init('rmb2106', this.model).then(response => { if (response.respCode === SUCCESS) { Utils.copyValueFromVoData(this.model, response.data); } }) }, // commitAll() { // this.$refs['modelForm'].validate(async (validStatic) => { // if (validStatic) { // this.all() // } else { // // 前端校验失败 // this.$notify({ // title: '失败', // message: '校验失败', // type: 'error', // }); // } // }) // }, // async all() { // let tbkVoList = this.model.tdb2111.tbkVoList.slice(this.model.oldtbk) // let rtnmsg = await Api.post('/report/rmbsel/add2111All', tbkVoList) // if (rtnmsg.respCode == SUCCESS) { // this.$notify({ // title: "成功", // message: "提交成功", // type: "success", // }); // this.$store.commit('delTagsArry', this.$route.path); // this.$router.back() // }else{ // this.$notify({ // title: "失败", // message: "提交失败", // type: "error", // }); // } // }, // onChangeNewnum() { // let num = Number(this.model.tdb2111.tdbVo.paymentlist); // let count = this.model.oldtbk // if(num > 0) { // //页面个数 // let cha = 0 // if(this.model.tdb2111.tbkVoList){ // cha = this.model.tdb2111.tbkVoList.length -count // } // if(cha < num) { // // // 新增页面 // for(let i = 0;i < (num-cha);i++) { // this.model.tdb2111.tbkVoList.push({ // objtyp:'TDB', // objinr:this.model.tdb2111.tdbVo.inr, // sta: '', // listopertype: '1', // seqno: i+ count+1, // balofpaycode: '', // bustypecode: '', // payamt: '', // bustypelist: '', // actualpayercode: '', // actualpayername: '', // ifprepayment: '', // prepayerscale: 0.00, // accountperiod: 0, // custstate: '', // certificateno: '', // contractno: '', // csta: '', // addword: '', // }); // } // }else{ // //删除多余的标签 // this.model.tdb2111.tbkVoList.splice(num, cha -num) // } // }else{ // this.model.tdb2111.tbkVoList.splice(count,this.model.tdb2111.tbkVoList.length-count) // } // // }, } }