index.js 2.3 KB
import Api from '~/service/Api';
import CommonEvent from "../../common/event/CommonEvent"
import DbapEvent from "../../common/event/DbapEvent"
export default {
	mixins:[CommonEvent,DbapEvent],
	methods: {
		changeBasType(e){
			if (e === undefined) {
				return
			}
			if(this.model.mtabut.basflg === "X"){
				this.model.recgrp.bas.actiontype = "A"
				//模拟新增数据
				this.model.recgrp.bas.rptno = "110000000700231018PV04"
				this.model.recgrp.bas.custype = "C"
				this.model.recgrp.bas.custnm = "鸿富锦精密电子(济南)有限公司"
				this.model.recgrp.bas.buscode = "FB3941190004AG"
				this.model.recgrp.bas.fcyamt = 20
				this.model.recgrp.bas.method = "T"
				this.model.recgrp.bas.oppuser = "(JW)ABC"
				this.model.recgrp.bas.fcyacc = "39411488000040103"
				this.model.recgrp.bas.txccy = "USD"
				this.model.recgrp.bas.txamt = 20

			}else{
				this.model.recgrp.bas.actiontype = ""
			}
			
		},
		changeDclType(e){
			if (e === undefined) {
				return
			}
			if(this.model.mtabut.dclflg === "X"){
				this.model.recgrp.dcl.actiontype = "A"
				//模拟新增数据
				this.model.recgrp.dcl.rptno = "110000000700231018PV04"
				this.model.recgrp.dcl.rptdate = new Date("2023/10/18")
				this.model.recgrp.dcl.paytype = "R"
				this.model.recgrp.dcl.txrem = "31(WTS)付款 退"
				this.model.recgrp.dcl.tx2rem = "付汇  来料"
				this.model.recgrp.dcl.isref = "N"

			}else{
				this.model.recgrp.dcl.actiontype = ""
			}
			
		},
		// 获取地区机构号
		async getOwnExtkeyCondition() {
			const loading = this.loading();
			let body = { ownExtKey: "" };
			// if (this.model.trnInfo && this.model.trnInfo.sdhflg == "X" && this.model.cfagit.ownextkey) {
			// 	body.ownExtKey = this.model.cfagit.ownextkey;
			// }
			let res = await Api.post('/report/cfa/public/getBranchListByownExtKey', body);
			loading.close();
			if (res.respCode === SUCCESS) {
				this.ownExtkeyList = res.data;
			}
		},

		//获取交易编码列列表
		async getBopcodItems(){
			console.log("进入getBopcodList");
			const loading = this.loading();
			let iotyp="I"
			let res = await Api.post(`/report/bopnew/public/getBopcodList`, iotyp);
			loading.close();
			if (res.respCode === SUCCESS) {
				this.bopcodList = res.data;
				this.options1 = this.bopcodList;
    			this.options2 = this.bopcodList;
			}

		},
	}
}