Commit cff95e4b by fukai

剥离到公共的

parent 14b10421
......@@ -239,83 +239,6 @@ export default {
},
async handleDisplay(index, row){
let cortyp = row.cortyp
let rtnmsg
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
this.model.setmod.msgmod.doccod = row.id
rtnmsg = await Api.post('cptopn/msgmod_butshw', this.wrapper())
} else {
this.model.trnmod.trndoc.doccod = row.id
this.model.trnmod.trndoc.cortyp = cortyp
const params = {
index: index
}
rtnmsg = await Api.post("ditopn/executeDocpan", this.wrapper(params))
}
if (rtnmsg.respCode == SUCCESS) {
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
let viewurl = rtnmsg.data.setmod_msgmod_docpth;
this.viewurl = viewurl
this.title = "报文"
//window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
else if (cortyp == 'ELC') {
Modal.info({
title: '电证报文', content: <div style={{ height: 400, overflow: 'auto' }}><ELCMessage mty={row.id} message={rtnmsg.data["\\trnmod\\trndoc\\docinf"]} /></div>,
width: 1000,
})
}
else {
// let url = rtnmsg.data.trnmod_trndoc_smh_docpth;
this.title = "面函"
let viewurl = "/#/docpan/show";
let XMLdata;
if (row.pandsc == "国内信用证") {
window.sessionStorage.docTXT = ''
window.sessionStorage.docXML = rtnmsg.data.litbenl1blk;
}
else if (row.pandsc == "开立国内信用证备查表") {
window.sessionStorage.docTXT = ''
window.sessionStorage.docXML = rtnmsg.data.litapll1blk
}
else if (row.pandsc == "elcs.101.001.01") {
window.sessionStorage.docXML = ''
window.sessionStorage.docTXT = ''
rtnmsg.data.trnmod_trndoc_doceot[index].doctxt.rows.forEach(element => {
window.sessionStorage.docTXT += element + "\r\n"
});
}
else if (row.pandsc == "MT799") {
window.sessionStorage.docTXT = ''
XMLdata = rtnmsg.data.litbenl1blk
}
// console.log( window.sessionStorage.docTXT);
// console.log( window.sessionStorage.docXML);
window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
this.dialogOpen = true
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' })
}
},
async handleDetail(index, row) {
const params = {
index: index
}
let rtnmsg = await Api.post("ditopn/executeDocpanDetail", this.wrapper(params))
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.title = row.pandsc
this.centerDialogVisible = true,
this.dialog = rtnmsg.data.trnmod_trndoc_doceot[index]
this.index = index
}
},
async BlurBennam(e) {
let rtnmsg = await this.executeDefault("ditp.remark")
if (rtnmsg.respCode == SUCCESS) {
......
<template>
<div class="eibs-tab">
<!-- <c-col :span="12">
<el-form-item label="Correspondence"> </el-form-item>
</c-col> -->
<c-col :span="23" style="margin-left:9px">
<c-istream-table-docpan :list="stmData.data" :columns="stmData.columns">
<el-table-column label="报文格式">
......@@ -155,107 +151,9 @@
>
</template>
</el-table-column>
<!-- <el-table-column label="">
<template slot-scope="scope">
<el-button
size="medium"
type="danger"
@click="handleDetail(scope.row.index, scope.row)"
>明细</el-button
>
</template>
</el-table-column> -->
</c-istream-table-docpan>
</c-col>
<!-- <c-col :span="24">
<c-table :list="model.trnmod.trndoc.doceot" style="width:80%,text-align:center">
<el-table-column
label="Role"
width="auto"
>
</el-table-column>
<el-table-column
label="Description"
width="auto"
>
</el-table-column>
<el-table-column
label="CORTYP"
width="auto"
>
</el-table-column>
<el-table-column
label="DOCSNF"
width="auto"
>
</el-table-column>
<el-table-column
label="Lang."
width="auto"
>
</el-table-column>
<el-table-column
label="Form"
width="auto"
>
</el-table-column>
<el-table-column
label="Or."
width="auto"
>
</el-table-column>
<el-table-column
label="CC"
width="auto"
>
</el-table-column>
<el-table-column
label=".."
width="auto"
>
</el-table-column>
<el-table-column
label="Show"
width="auto"
>
</el-table-column>
<el-table-column
label="Details"
width="auto"
>
</el-table-column>
</c-table>
</c-col> -->
<!--
<c-col :span="12">
<span v-text="model.trnmod.trndoc.advlabel" data-path=".trnmod.trndoc.advlabel" > </span>
</c-col>
<c-col :span="12">
<el-form-item label="国内证落款">
<c-input v-model="model.trnmod.trndoc.advnam" maxlength="50" placeholder="请输入国内证落款"></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label="修改申请人名称">
<c-input type="textarea" v-model="model.trnmod.trndoc.amdapl" maxlength="50" show-word-limit placeholder="请输入修改申请人名称" ></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<span v-text="model.trnmod.trndoc.amdnam" data-path=".trnmod.trndoc.amdnam" > </span>
</c-col>
<c-col :span="12">
<el-form-item label="国内证通知书">
<c-input v-model="model.trnmod.trndoc.advdoc" maxlength="1" placeholder="请输入国内证通知书"></c-input>
</el-form-item>
</c-col>
--><template>
<template>
<el-dialog
:title="title"
:visible.sync="centerDialogVisible"
......@@ -496,7 +394,6 @@
</template>
<script>
import CommonProcess from "~/mixin/CommonProcess";
import Event from "~/model/Ditopn/Event";
import Api from "~/service/Api";
import Utils from "~/utils/index";
export default {
......@@ -544,7 +441,6 @@ export default {
}
},
methods: {
...Event,
saveDialog() {
this.centerDialogVisible = false;
console.log(this.model);
......@@ -558,6 +454,82 @@ export default {
}
})
},
async handleDisplay(index, row){
//后续要根据快照模式切换请求方式
let cortyp = row.cortyp
let rtnmsg
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
this.model.setmod.msgmod.doccod = row.id
rtnmsg = await Api.post(`${this.declareParams.trnName}/msgmod_butshw`, this.wrapper())
} else {
this.model.trnmod.trndoc.doccod = row.id
this.model.trnmod.trndoc.cortyp = cortyp
const params = {
index: index
}
rtnmsg = await Api.post(`${this.declareParams.trnName}/executeDocpan`, this.wrapper(params))
}
if (rtnmsg.respCode == SUCCESS) {
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
let viewurl = rtnmsg.data.setmod_msgmod_docpth;
this.viewurl = viewurl
this.title = "报文"
//window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
else if (cortyp == 'ELC') {
Modal.info({
title: '电证报文', content: <div style={{ height: 400, overflow: 'auto' }}><ELCMessage mty={row.id} message={rtnmsg.data["\\trnmod\\trndoc\\docinf"]} /></div>,
width: 1000,
})
}
else {
// let url = rtnmsg.data.trnmod_trndoc_smh_docpth;
this.title = "面函"
let viewurl = "/#/docpan/show";
let XMLdata;
if (row.pandsc == "国内信用证") {
window.sessionStorage.docTXT = ''
window.sessionStorage.docXML = rtnmsg.data.litbenl1blk;
}
else if (row.pandsc == "开立国内信用证备查表") {
window.sessionStorage.docTXT = ''
window.sessionStorage.docXML = rtnmsg.data.litapll1blk
}
else if (row.pandsc.startsWith("elcs.")) {
window.sessionStorage.docXML = ''
window.sessionStorage.docTXT = ''
rtnmsg.data.trnmod_trndoc_doceot[index].doctxt.rows.forEach(element => {
window.sessionStorage.docTXT += element + "\r\n"
});
}
else if (row.pandsc == "MT799") {
window.sessionStorage.docTXT = ''
XMLdata = rtnmsg.data.litbenl1blk
}
// console.log( window.sessionStorage.docTXT);
// console.log( window.sessionStorage.docXML);
window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
this.dialogOpen = true
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' })
}
},
async handleDetail(index, row) {
const params = {
index: index
}
let rtnmsg = await Api.post(`${this.declareParams.trnName}/executeDocpanDetail`, this.wrapper(params))
if (rtnmsg.respCode == SUCCESS) {
this.title = row.pandsc
this.centerDialogVisible = true,
this.dialog = rtnmsg.data.trnmod_trndoc_doceot[index]
this.index = index
}
},
},
created: function () {},
};
......
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