Commit 1c405596 by 李少勇

修改fxdsdb交易

parent 42255e09
......@@ -3,12 +3,26 @@
<el-dialog v-if="visible" v-dialogDrag :visible="visible" :modal-append-to-body="false" :close-on-click-modal="false"
title="新增" destroy-on-close width="50%">
<div>
<el-upload action="/webapi/frontend/fxdsdb/upload" :before-upload="handleBeforeUpload" :on-success="handleSuccess" :limit="1" :show-file-list="false" accept=".xml">
<el-upload
action="/webapi/frontend/fxdsdb/upload"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:limit="1"
:show-file-list="false"
accept=".xml"
>
<c-button slot="trigger" size="small" type="primary">导入</c-button>
</el-upload>
<el-table v-if="isDispaly" :data="stmData.data" :columns="stmData.columns" v-loading="load" style="width: 100%;margin-top: 10px;"
size="small" :border="true"
:highlight-current-row="true">
<el-table
v-if="isDispaly"
:data="stmData.data"
:columns="stmData.columns"
v-loading="load"
style="width: 100%;margin-top: 10px;"
size="small"
:border="true"
:highlight-current-row="true"
>
<el-table-column v-for="(item, key) in stmData.columns" :key="key" :label="item.label" :prop="item.prop"
:min-width="item.width">
</el-table-column>
......@@ -293,6 +307,8 @@ export default {
width: "100px"
},
],
filtyp: '',
keyCode: ''
};
},
watch: {
......@@ -313,39 +329,62 @@ export default {
handleSuccess(res, file) {
console.log('=====', res)
if(res.respCode == SUCCESS){
this.filtyp = res.data.filtyp
if(res.data.filtyp=='9' || res.data.filtyp=='10'){
this.stmData.columns=this.fxdcomlstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdcomlst
this.keyCode = 'fxdcomlst'
}
if(res.data.filtyp=='11'){
this.stmData.columns=this.fxdtyplstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdtyplst
this.keyCode = 'fxdtyplst'
}
if(res.data.filtyp=='12'){
this.stmData.columns=this.fxdsuelstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdsuelst
this.keyCode = 'fxdsuelst'
}
if(res.data.filtyp=='13' || res.data.filtyp=='14' || res.data.filtyp=='15'){
this.stmData.columns=this.fxdcomlstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdcomlst
this.keyCode = 'fxdcomlst'
}
if(res.data.filtyp=='16' || res.data.filtyp=='17'){
this.stmData.columns=this.fxdcomlstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdcomlst
this.keyCode = 'fxdcomlst'
}
if(res.data.filtyp=='18'){
this.stmData.columns=this.fxddcflstHead;
this.stmData.data = res.data.cpsfxdgrp.fxddcflst
this.keyCode = 'fxddcflst'
}
if(res.data.filtyp=='19'){
this.stmData.columns=this.fxdriglstHead;
this.stmData.data = res.data.cpsfxdgrp.fxdriglst
this.keyCode = 'fxdriglst'
}
}
this.load = false;
this.isDispaly = true;
},
handleSubmit() {
async handleSubmit() {
let rtnmsg = await Api.post("/webapi/frontend/fxdsdb/saveXml", {
filtyp: this.filtyp,
[this.keyCode]: this.stmData.data
});
if (rtnmsg.respCode == SUCCESS) {
this.$notify.success({
title: '提示',
message: '提交成功',
});
} else {
this.$notify.error({
title: this.$t("financing.错误"),
message: this.$t("financing.服务请求失败!"),
});
}
this.visible = false;
},
handleCancel() {
......
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