Commit ce09a4ce by 傅凯

支持机构选择

parent dcd26907
<template>
<span>
<el-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="onDialogOpen"></el-button>
<el-dialog title="机构选择" :visible.sync="dialogOpen">
<!-- <el-form size="mini" :inline="true">
<el-form-item>
<el-input v-model="model.ptyname" placeholder="请输入机构名称" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchPty">查询</el-button>
</el-form-item>
</el-form> -->
<el-table :data="model.ptyData" size="mini" height="270"
@row-dblclick="selectRow"
v-loading="loading"
>
<el-table-column property="extkey" label="客户号" width="130"></el-table-column>
<el-table-column property="nam" label="中文名称" width="230"></el-table-column>
<el-table-column property="adr" label="中文地址" width="270"></el-table-column>
<el-table-column property="nam1" label="英文名称1" width="120"></el-table-column>
<el-table-column property="nam2" label="英文名称2" width="120"></el-table-column>
<el-table-column property="tel" label="电话" width="100"></el-table-column>
</el-table>
<el-pagination
layout="prev, pager, next"
:total="1">
</el-pagination>
</el-dialog>
</span>
</template>
<script>
import Api from "~/service/Api"
import Utils from "~/utils"
export default {
props:['service','flag','extkey','ctx'],
data(){
return {
dialogOpen:false,
loading:true,
model:{
ptyname:"",
ptyData:[]
}
}
},
methods:{
onDialogOpen(){
this.dialogOpen = true
this.searchPty() //默认查询
},
async searchPty(){
let rtnmsg = await Api.post(this.service,{params: {flg:this.flag,extkey:this.extkey},data: {}})
if(rtnmsg.code == SUCCESS)
{
this.model.ptyData = rtnmsg.data
}
this.loading = false
},
selectRow(row){
//model[`${prefix}_extkey`] = row.extkey || ""
let adrblk=''
let nam =row.nam
let adr=row.adr
let nam1=row.nam1|| ""
let nam2=row.nam2|| ""
let str1=row.str1|| ""
let str2=row.str2|| ""
let ptyinr=row.ptyinr|| ""
if (nam1)
adrblk=nam1
if (nam2)
adrblk=adrblk+"\r\n"+nam2
if (str1)
adrblk=adrblk+"\r\n"+str1
if (str2)
adrblk=adrblk+"\r\n"+str2
// model[`${prefix}_adrblk`] = adrblk;
this.ctx.extkey = row.extkey || ""
this.ctx.adrblk = adrblk
this.ctx.namcn = nam
this.ctx.adrcn = adr
this.ctx.ptyinr = ptyinr
this.dialogOpen = false
// model[`${prefix}_namcn`] = nam;
// model[`${prefix}_adrcn`] = adr;
// model[`${prefix}_ptyinr`] = ptyinr;
}
}
}
</script>
\ No newline at end of file
import c_page from "./c-page.vue" import c_page from "./c-page.vue"
import PtyPicker from "./PtyPicker"
export default { export default {
install(Vue){ install(Vue){
Vue.component("c-page",c_page) Vue.component("c-page",c_page)
Vue.component("c-ptypicker",PtyPicker)
} }
} }
\ No newline at end of file
...@@ -153,7 +153,8 @@ ...@@ -153,7 +153,8 @@
<el-col :span="24" class="m-inputbtn"> <el-col :span="24" class="m-inputbtn">
<el-col class="m-inputbtn-input"> <el-col class="m-inputbtn-input">
<el-input v-model="model.cpdgrp.orc.pts.namcn" maxlength="100" placeholder="请输入汇款人"></el-input> <el-input v-model="model.cpdgrp.orc.pts.namcn" maxlength="100" placeholder="请输入汇款人"></el-input>
<el-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="handleSearch"></el-button> <!-- <el-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="handleSearch"></el-button> -->
<c-ptypicker service="cptopn/orcp_ptysel" flag="C" :ctx="model.cpdgrp.orc.pts" :extkey="model.cpdgrp.orc.pts.extkey" />
</el-col> </el-col>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -225,9 +226,10 @@ export default { ...@@ -225,9 +226,10 @@ export default {
}, },
handleRecLiqtypChange () { handleRecLiqtypChange () {
this.model.cpdgrp.rec.swftyp = "" this.model.cpdgrp.rec.swftyp = ""
} },
}, },
created:async function(){ model:async function(){
console.log("初始化,加载机构列表"); console.log("初始化,加载机构列表");
let rtnmsg = await Api.post("common/bchlevelLst",{params:{}}) let rtnmsg = await Api.post("common/bchlevelLst",{params:{}})
if(rtnmsg.code == SUCCESS) if(rtnmsg.code == SUCCESS)
......
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