Commit 76bedf48 by 潘际乾

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

parent 6472ef2a
...@@ -154,13 +154,14 @@ export default { ...@@ -154,13 +154,14 @@ export default {
this.currentPage = currentPage; this.currentPage = currentPage;
}, },
selectEty(row, column, event) { selectEty(row, column, event) {
const str = this.data[row.IDX] // const str = this.data[row.IDX]
let v = ""; // let v = "";
if (this.type === 'extkey') { // if (this.type === 'extkey') {
v = str.split("\t")[4].trim() // v = str.split("\t")[4].trim()
} else if (this.type === 'bankno') { // } else if (this.type === 'bankno') {
v = str.split("\t")[0].trim() // v = str.split("\t")[0].trim()
} // }
const v = row[this.tableColumn[0].prop].split("\n")[0]
this.$emit("select-ety", v, this.rulePath) this.$emit("select-ety", v, this.rulePath)
this.show = false; this.show = false;
this.currentPage = 1; this.currentPage = 1;
......
...@@ -4145,10 +4145,10 @@ const CodeTable = { ...@@ -4145,10 +4145,10 @@ const CodeTable = {
{label:"终结付款",value:"FNAL" }, {label:"终结付款",value:"FNAL" },
], ],
paytype:[ paytype:[
{label:"票汇",value:"2" },
{label:"其他",value:"3" },
{label:"电汇",value:"0" }, {label:"电汇",value:"0" },
{label:"信汇",value:"1" }, {label:"信汇",value:"1" },
{label:"票汇",value:"2" },
{label:"其他",value:"3" },
], ],
payuil:[ payuil:[
{label:"English",value:"EN" }, {label:"English",value:"EN" },
...@@ -5164,9 +5164,9 @@ const CodeTable = { ...@@ -5164,9 +5164,9 @@ const CodeTable = {
{value:"3",label:"不申报" }, {value:"3",label:"不申报" },
], ],
sztyp:[ sztyp:[
{label:"1",value:"跨境收支" }, {label:"跨境收支",value:"1" },
{label:"2",value:"境内交易" }, {label:"境内交易",value:"2" },
{label:"3",value:"不申报" }, {label:"账户结售汇",value:"3" },
], ],
tag:[ tag:[
{label:"File Name",value:"N" }, {label:"File Name",value:"N" },
......
import _ from "lodash" import _ from "lodash"
import commonDeclare from "./commonDeclare" import commonDeclare from "./commonDeclare"
import commonApi from "./commonApi" import commonApi from "./commonApi"
import Utils from "~/utils"
export default { export default {
mixins: [commonApi,commonDeclare], mixins: [commonApi,commonDeclare],
data: function () { data: function () {
...@@ -86,6 +88,13 @@ export default { ...@@ -86,6 +88,13 @@ export default {
} }
} }
return "blur"; return "blur";
},
/**
* 更新Model
* @param {any} data model数据
*/
updateModel(data) {
Utils.copyValueFromVO(this.model, data);
} }
}, },
computed:{ computed:{
......
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
], ],
"cpdgrp.rec.amtf33b":[ "cpdgrp.rec.amtf33b":[
{type: "number", required: false, message: "必输项"}, {required: false, message: "必输项"},
{max: 16,message:"整数位不能超过12位"}, {max: 16,message:"整数位不能超过12位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" } {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
], ],
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
], ],
"cpdgrp.rec.amt71f":[ "cpdgrp.rec.amt71f":[
{type: "number", required: false, message: "必输项"}, {required: false, message: "必输项"},
{max: 16,message:"整数位不能超过12位"}, {max: 16,message:"整数位不能超过12位"},
{pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" } {pattern: /(^\d+$)|(^\.\d{1,3}$)|(^\d+\.\d{1,3}$)/, message: "小数位不能超过3位" }
], ],
......
...@@ -223,12 +223,13 @@ export default class Utils { ...@@ -223,12 +223,13 @@ export default class Utils {
return async function(rule, value, callback){ return async function(rule, value, callback){
//调用具体的check //调用具体的check
const res = await this.exeuteCheck(key) 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]) // }
} else { if (Object.hasOwnProperty.call(res.fieldErrors, key)) {
callback(); callback(new Error(res.fieldErrors[key]))
} } else {
callback();
} }
} }
} }
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
placeholder="请选择汇款性质" placeholder="请选择汇款性质"
> >
<el-option <el-option
v-for="item in codes.trntyp" v-for="item in trntyp"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
...@@ -293,6 +293,7 @@ ...@@ -293,6 +293,7 @@
v-model="model.cptp.payeecountcode" v-model="model.cptp.payeecountcode"
maxlength="3" maxlength="3"
placeholder="请输入收款人常驻国家/地区代码" placeholder="请输入收款人常驻国家/地区代码"
@keyup.enter.native="payeecountcodeEvent"
></c-input> ></c-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -536,6 +537,7 @@ ...@@ -536,6 +537,7 @@
v-model="model.cptp.pyebchkey" v-model="model.cptp.pyebchkey"
maxlength="14" maxlength="14"
placeholder="请输入收款人" placeholder="请输入收款人"
@keyup.enter.native="pyebchkeyEvent"
></c-input> ></c-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -1318,19 +1320,31 @@ ...@@ -1318,19 +1320,31 @@
></c-input> ></c-input>
</el-form-item> </el-form-item>
</el-col> --> </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> </div>
</template> </template>
<script> <script>
import Api from "~/service/Api"; import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Cptopn/Event"; import Event from "~/model/Cptopn/Event";
import Utils from "~/utils"
export default { export default {
inject: ["root"],
props: ["model", "codes"], props: ["model", "codes"],
mixins: [CommonProcess],
data() { data() {
return { return {
model1:'',
model2:'',
model3:'', model3:'',
options1:[ options1:[
{value:'AUD',label:'AUD 澳大利亚元'}, {value:'AUD',label:'AUD 澳大利亚元'},
...@@ -1354,49 +1368,12 @@ export default { ...@@ -1354,49 +1368,12 @@ export default {
{value:'TWD',label:'TWD 新台湾元'}, {value:'TWD',label:'TWD 新台湾元'},
{value:'USD',label:'USD 美元'}, {value:'USD',label:'USD 美元'},
], ],
options2:[ trntyp:[
{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:[
{value:'0',label:'贸易'}, {value:'0',label:'贸易'},
{value:'1',label:'非贸易'}, {value:'1',label:'非贸易'},
{value:'2',label:'资本'}, {value:'2',label:'资本'},
{value:'3',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:[ options10:[
{value:'1',label:'工业企业'}, {value:'1',label:'工业企业'},
{value:'2',label:'私营企业'}, {value:'2',label:'私营企业'},
...@@ -1407,9 +1384,63 @@ export default { ...@@ -1407,9 +1384,63 @@ export default {
{value:'7',label:'其他企业'}, {value:'7',label:'其他企业'},
{value:'8',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 () {}, created: function () {},
}; };
</script> </script>
......
...@@ -358,9 +358,14 @@ export default { ...@@ -358,9 +358,14 @@ export default {
temp3:'final', temp3:'final',
data:[] data:[]
}; };
}, },
methods: { ...Event }, methods: {
created: function () {}, dispDefault() {
},
...Event
},
created: function () {},
}; };
</script> </script>
<style> <style>
......
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