Commit 76bedf48 by 潘际乾

收款人常驻国家/地区代码的弹框选择

parent 6472ef2a
......@@ -154,13 +154,14 @@ export default {
this.currentPage = currentPage;
},
selectEty(row, column, event) {
const str = this.data[row.IDX]
let v = "";
if (this.type === 'extkey') {
v = str.split("\t")[4].trim()
} else if (this.type === 'bankno') {
v = str.split("\t")[0].trim()
}
// const str = this.data[row.IDX]
// let v = "";
// if (this.type === 'extkey') {
// v = str.split("\t")[4].trim()
// } else if (this.type === 'bankno') {
// v = str.split("\t")[0].trim()
// }
const v = row[this.tableColumn[0].prop].split("\n")[0]
this.$emit("select-ety", v, this.rulePath)
this.show = false;
this.currentPage = 1;
......
......@@ -4145,10 +4145,10 @@ const CodeTable = {
{label:"终结付款",value:"FNAL" },
],
paytype:[
{label:"票汇",value:"2" },
{label:"其他",value:"3" },
{label:"电汇",value:"0" },
{label:"信汇",value:"1" },
{label:"票汇",value:"2" },
{label:"其他",value:"3" },
],
payuil:[
{label:"English",value:"EN" },
......@@ -5164,9 +5164,9 @@ const CodeTable = {
{value:"3",label:"不申报" },
],
sztyp:[
{label:"1",value:"跨境收支" },
{label:"2",value:"境内交易" },
{label:"3",value:"不申报" },
{label:"跨境收支",value:"1" },
{label:"境内交易",value:"2" },
{label:"账户结售汇",value:"3" },
],
tag:[
{label:"File Name",value:"N" },
......
import _ from "lodash"
import commonDeclare from "./commonDeclare"
import commonApi from "./commonApi"
import Utils from "~/utils"
export default {
mixins: [commonApi,commonDeclare],
data: function () {
......@@ -86,6 +88,13 @@ export default {
}
}
return "blur";
},
/**
* 更新Model
* @param {any} data model数据
*/
updateModel(data) {
Utils.copyValueFromVO(this.model, data);
}
},
computed:{
......
......@@ -186,7 +186,7 @@ export default {
],
"cpdgrp.rec.amtf33b":[
{type: "number", required: false, message: "必输项"},
{required: false, message: "必输项"},
{max: 16,message:"整数位不能超过12位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
],
......@@ -223,7 +223,7 @@ export default {
],
"cpdgrp.rec.amt71f":[
{type: "number", required: false, message: "必输项"},
{required: false, message: "必输项"},
{max: 16,message:"整数位不能超过12位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
],
......
......@@ -223,13 +223,14 @@ export default class Utils {
return async function(rule, value, callback){
//调用具体的check
const res = await this.exeuteCheck(key)
if (res.respCode == SUCCESS){
// if (res.respCode == SUCCESS){
// }
if (Object.hasOwnProperty.call(res.fieldErrors, key)) {
callback(res.fieldErrors[key])
callback(new Error(res.fieldErrors[key]))
} else {
callback();
}
}
}
}
}
\ No newline at end of file
......@@ -196,7 +196,7 @@
placeholder="请选择汇款性质"
>
<el-option
v-for="item in codes.trntyp"
v-for="item in trntyp"
:key="item.value"
:label="item.label"
:value="item.value"
......@@ -293,6 +293,7 @@
v-model="model.cptp.payeecountcode"
maxlength="3"
placeholder="请输入收款人常驻国家/地区代码"
@keyup.enter.native="payeecountcodeEvent"
></c-input>
</el-form-item>
</el-col>
......@@ -536,6 +537,7 @@
v-model="model.cptp.pyebchkey"
maxlength="14"
placeholder="请输入收款人"
@keyup.enter.native="pyebchkeyEvent"
></c-input>
</el-form-item>
</el-col>
......@@ -1318,19 +1320,31 @@
></c-input>
</el-form-item>
</el-col> -->
<c-grid-ety-prompt-dialog ref="etyDialog"
:title="gridPromptDialog.title"
:columnStr="gridPromptDialog.columnStr"
:data="gridPromptDialog.data"
:type="gridPromptDialog.type"
:rulePath="gridPromptDialog.rulePath"
v-on:select-ety="selectEty"
>
</c-grid-ety-prompt-dialog>
</div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Cptopn/Event";
import Utils from "~/utils"
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [CommonProcess],
data() {
return {
model1:'',
model2:'',
model3:'',
options1:[
{value:'AUD',label:'AUD 澳大利亚元'},
......@@ -1354,49 +1368,12 @@ export default {
{value:'TWD',label:'TWD 新台湾元'},
{value:'USD',label:'USD 美元'},
],
options2:[
{value:'1',label:'Chinese'},
{value:'2',label:'English'},
],
options3:[
{value:'1',label:'是'},
{value:'2',label:'否'},
],
options4:[
{value:'1',label:'Beneficiary Customer'},
{value:'2',label:'Ordering Customer'},
],
options5:[
{value:'1',label:'金(含金饰品)'},
{value:'2',label:'银(含银饰品)'},
{value:'3',label:'铜(含电解铜、铜制品及铜精矿)'},
{value:'4',label:'铝(含电解铝、铝矾土及铝制品)'},
{value:'5',label:'锌(含电解锌、锌精矿)'},
{value:'6',label:'铁矿砂(含精矿)'},
{value:'7',label:'其他金属'},
{value:'8',label:'大豆'},
],
options6:[
trntyp:[
{value:'0',label:'贸易'},
{value:'1',label:'非贸易'},
{value:'2',label:'资本'},
{value:'3',label:'其他'},
],
options7:[
{value:'0',label:'电汇'},
{value:'1',label:'票汇'},
{value:'2',label:'信汇'},
{value:'3',label:'其他'},
],
options8:[
{value:'0',label:'对公'},
{value:'1',label:'对私'},
],
options9:[
{value:'1',label:'跨境收支'},
{value:'2',label:'境内交易'},
{value:'3',label:'账户结售汇'},
],
options10:[
{value:'1',label:'工业企业'},
{value:'2',label:'私营企业'},
......@@ -1407,9 +1384,63 @@ export default {
{value:'7',label:'其他企业'},
{value:'8',label:'私人'},
],
gridPromptDialog: {
title: '',
columnStr: '',
data: [],
type: '',
rulePath: ''
}
};
},
methods: { ...Event },
methods: {
payeecountcodeEvent() {
this.executeRule("cptp.payeecountcode").then((res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
this.updateModel(res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'cptp.payeecountcode'
}
}
}
)
},
pyebchkeyEvent() {
this.executeRule("cptp.pyebchkey").then((res) => {
if (res.respCode = "AAAAAA"){
if (res.data.params) {
this.updateModel(res.data);
} else {
this.$refs.etyDialog.show = true
this.gridPromptDialog.title = res.data.title
this.gridPromptDialog.columnStr = res.data.columns
this.gridPromptDialog.data = res.data.vals.rows
this.gridPromptDialog.type = 'extkey'
this.gridPromptDialog.rulePath = 'cptp.pyebchkey'
}
}
}
)
},
selectEty(val, rulePath) {
const props = rulePath.replaceAll(".", "_")
const obj = {}
obj[props] = val;
Utils.copyValueFromVO(this.model, obj);
this.executeRule(rulePath).then((res) => {
if (res.respCode = "AAAAAA"){
Utils.copyValueFromVO(this.model, res.data);
}
});
},
...Event
},
created: function () {},
};
</script>
......
......@@ -359,7 +359,12 @@ export default {
data:[]
};
},
methods: { ...Event },
methods: {
dispDefault() {
},
...Event
},
created: function () {},
};
</script>
......
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