Commit db8208fb by lianyang

brtdck/brtudp的Discr./Instr.页面docpre.vue的表格引用公共页面

parent e5293e74
...@@ -80,6 +80,7 @@ export default class Brtdck { ...@@ -80,6 +80,7 @@ export default class Brtdck {
dbfadrblkcn: "", // Chinese address .brdgrp.prb.dbfadrblkcn dbfadrblkcn: "", // Chinese address .brdgrp.prb.dbfadrblkcn
}, },
blk: { blk: {
prsdoc:"", // brdgrp.blk.prsdoc
matper: "", // Maturity Period .brdgrp.blk.matper matper: "", // Maturity Period .brdgrp.blk.matper
comcon: "", // Comments and Conclusions .brdgrp.blk.comcon comcon: "", // Comments and Conclusions .brdgrp.blk.comcon
setinsbr: "", // Settlement Instructions BR .brdgrp.blk.setinsbr setinsbr: "", // Settlement Instructions BR .brdgrp.blk.setinsbr
......
...@@ -76,6 +76,7 @@ export default class Brtudp { ...@@ -76,6 +76,7 @@ export default class Brtudp {
}, },
tag72add: "", // TAG72 .brdgrp.tag72add tag72add: "", // TAG72 .brdgrp.tag72add
blk: { blk: {
prsdoc: "", //brdgrp.blk.prsdoc
comcon: "", // Comments and Conclusions .brdgrp.blk.comcon comcon: "", // Comments and Conclusions .brdgrp.blk.comcon
setinsbr: "", // Settlement Instructions BR .brdgrp.blk.setinsbr setinsbr: "", // Settlement Instructions BR .brdgrp.blk.setinsbr
docdis: "", // Discrepancies .brdgrp.blk.docdis docdis: "", // Discrepancies .brdgrp.blk.docdis
......
...@@ -48,21 +48,21 @@ ...@@ -48,21 +48,21 @@
<span v-text="model.brtp.docgrdm.docdsclab" data-path=".brtp.docgrdm.docdsclab" > </span> <span v-text="model.brtp.docgrdm.docdsclab" data-path=".brtp.docgrdm.docdsclab" > </span>
</c-col> --> </c-col> -->
<!-- Documents Presdented 已交单据 --> <!-- Documents Presdented 已交单据 -->
<c-col :span="24" style="height: 24px; margin-top: 5px"> <!-- <c-col :span="24" style="height: 24px; margin-top: 5px"> -->
<!-- <el-form-item <!-- <el-form-item
:label="model.brtp.docgrdm.docdsclab" :label="model.brtp.docgrdm.docdsclab"
class="messageLabel" class="messageLabel"
> --> > -->
<el-form-item <!-- <el-form-item
label="Documents Presdented" label="Documents Presdented"
class="messageLabel"> class="messageLabel">
<c-button style="float: right" @click="addTableValue" type="primary" <c-button style="float: right" @click="addTableValue" type="primary"
>新增单据</c-button >新增单据</c-button
> >
</el-form-item> </el-form-item>
</c-col> </c-col> -->
<c-col :span="24" style="margin-bottom: 30px;margin-top: -10px;"> <!-- <c-col :span="24" style="margin-bottom: 30px;margin-top: -10px;">
<c-table <c-table
height="200px" height="200px"
style="text-align: center" style="text-align: center"
...@@ -81,9 +81,9 @@ ...@@ -81,9 +81,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Document" prop="docnam" width="auto" sortable> <el-table-column label="Document" prop="docnam" width="auto" sortable>
<template slot-scope="scope"> <template slot-scope="scope"> -->
<!-- {{scope.row.docnam}} --> <!-- {{scope.row.docnam}} -->
<c-select <!-- <c-select
style="width: 100%" style="width: 100%"
placeholder="请选择" placeholder="请选择"
v-model="scope.row.docnam" v-model="scope.row.docnam"
...@@ -106,6 +106,13 @@ ...@@ -106,6 +106,13 @@
</template> </template>
</el-table-column> </el-table-column>
</c-table> </c-table>
</c-col> -->
<c-col :span="24">
<c-docpre :model="model" :argadr="{
path: 'brdgrp.blk.prsdoc',
grp: 'brtp',
code: 'docpre',
}"></c-docpre>
</c-col> </c-col>
</c-col> </c-col>
...@@ -177,57 +184,75 @@ import commonProcess from "~/mixin/commonProcess"; ...@@ -177,57 +184,75 @@ import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import Event from "~/model/Brtdck/Event"; import Event from "~/model/Brtdck/Event";
import Utils from "~/utils"; import Utils from "~/utils";
import Docpre from "~/views/Public/Docpre";
export default { export default {
components: {
// "c-ptap": Ptap,
"c-docpre": Docpre,
},
inject: ["root"], inject: ["root"],
props: ["model", "codes"], props: ["model", "codes"],
mixins: [commonProcess], mixins: [commonProcess],
data() { data() {
return { return {
newValue: { // TableValue: [
id: 0, // {
cmail1: "", // id: 0,
cmail2: "", // cmail1: "",
docnam: "", // cmail2: "",
serialNum: "", // docnam: "",
tableName: "", // description: "",
tcddoc: "", // serialNum: "",
}, // tableName: "",
codeTable: [ // tcddoc: "",
{ label: 'Airway Bills', value: '1' }, // },
{ label: `Beneficiary's Declaration`, value: '2' }, // ],
{ label: 'Bill of Lading Copies', value: '3' }, // newValue: {
{ label: 'Bill of Lading Originals', value: '4' }, // id: 0,
{ label: 'Certificate', value: '5' }, // cmail1: "",
{ label: 'Certificate of Analysis', value: '6' }, // cmail2: "",
{ label: 'Certificate of Origin', value: '7' }, // docnam: "",
{ label: 'Certificate of Quality', value: '8' }, // description: "",
{ label: 'Certificate of Quantity', value: '9' }, // serialNum: "",
{ label: 'Commercial Invoice', value: '10' }, // tableName: "",
{ label: 'Courier Receipt', value: '11' }, // tcddoc: "",
{ label: 'Draft', value: '12' }, // },
{ label: 'Export Licence ', value: '13' }, // codeTable: [
{ label: 'Fax Report', value: '14' }, // { label: 'Airway Bills', value: '1' },
{ label: 'Inspection Cert', value: '15' }, // { label: `Beneficiary's Declaration`, value: '2' },
{ label: 'Insurance Policy', value: '16' }, // { label: 'Bill of Lading Copies', value: '3' },
{ label: 'Packing List', value: '17' }, // { label: 'Bill of Lading Originals', value: '4' },
{ label: 'Shipment Advice', value: '18' }, // { label: 'Certificate', value: '5' },
{ label: 'Weight List', value: '19' }, // { label: 'Certificate of Analysis', value: '6' },
], // { label: 'Certificate of Origin', value: '7' },
// { label: 'Certificate of Quality', value: '8' },
// { label: 'Certificate of Quantity', value: '9' },
// { label: 'Commercial Invoice', value: '10' },
// { label: 'Courier Receipt', value: '11' },
// { label: 'Draft', value: '12' },
// { label: 'Export Licence ', value: '13' },
// { label: 'Fax Report', value: '14' },
// { label: 'Inspection Cert', value: '15' },
// { label: 'Insurance Policy', value: '16' },
// { label: 'Packing List', value: '17' },
// { label: 'Shipment Advice', value: '18' },
// { label: 'Weight List', value: '19' },
// ],
}; };
}, },
methods: { methods: {
...Event, ...Event,
addTableValue(index) { // addTableValue(index) {
var newTableValue = Object.assign({}, this.newValue); // var newTableValue = Object.assign({}, this.newValue);
const serial=Utils.generateUUID(); // const serial=Utils.generateUUID();
newTableValue.serialNum=serial; // newTableValue.serialNum=serial;
// this.model.brtp.docgrdm.docgrd.push(newTableValue); // // this.model.brtp.docgrdm.docgrd.push(newTableValue);
this.model.brtp.docgrdm.docgrd.splice(index-1,0,newTableValue); // this.model.brtp.docgrdm.docgrd.splice(index-1,0,newTableValue);
}, // },
deleteTable(index) { // deleteTable(index) {
this.model.brtp.docgrdm.docgrd.splice(index, 1); // this.model.brtp.docgrdm.docgrd.splice(index, 1);
}, // },
}, },
created: function () {}, created: function () {},
computed: { computed: {
......
...@@ -40,55 +40,17 @@ ...@@ -40,55 +40,17 @@
</c-fullbox> </c-fullbox>
</el-form-item> </el-form-item>
</c-col> </c-col>
<!-- 表格 -->
<c-col :span="24"> <c-col :span="24">
<el-form-item label="Documents Presented"> <c-docpre :model="model" :argadr="{
<c-table path: 'brdgrp.blk.prsdoc',
height="200px" grp: 'brtp',
style="text-align: center" code: 'docpre',
:list="this.model.brtp.docgrdm.docgrd || []" }"></c-docpre>
:paginationShow="false"
:border="true"
>
<el-table-column prop="CMAIL1" label="1st" sortable>
<template slot-scope="scope">
<c-input v-model="scope.row.cmail1"></c-input>
</template>
</el-table-column>
<el-table-column prop="CMAIL2" label="2nd" sortable>
<template slot-scope="scope">
<c-input v-model="scope.row.cmail2"></c-input>
</template>
</el-table-column>
<el-table-column prop="DOCNAM" label="Document" sortable>
<template slot-scope="scope">
<!-- {{scope.row.docnam}} -->
<c-select
style="width: 100%"
placeholder="请选择"
v-model="scope.row.docnam"
>
<el-option
v-for="item in codeTable"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</template>
</el-table-column>
<el-table-column label="" prop="det" width="80px" fixed="right">
<template slot-scope="scope" slot="header">
<el-button circle style="padding:4px" class="el-icon-plus" size="mini" @click="addRow(scope)">
</el-button>
<el-button style="padding:4px" circle class="el-icon-minus" size="mini" @click="removeRow(scope)">
</el-button>
</template>
</el-table-column>
</c-table>
</el-form-item>
</c-col> </c-col>
</c-col> </c-col>
<!--=== ========================================右边======================================== --> <!--=== ========================================右边======================================== -->
...@@ -160,56 +122,21 @@ import commonProcess from "~/mixin/commonProcess"; ...@@ -160,56 +122,21 @@ import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import Event from "~/model/Brtudp/Event"; import Event from "~/model/Brtudp/Event";
import Utils from "~/utils"; import Utils from "~/utils";
import Docpre from "~/views/Public/Docpre";
export default { export default {
components: {
// "c-ptap": Ptap,
"c-docpre": Docpre,
},
inject: ["root"], inject: ["root"],
props: ["model", "codes"], props: ["model", "codes"],
mixins: [commonProcess], mixins: [commonProcess],
data() { data() {
return { return {
newValue: {
id: 0,
cmail1: "",
cmail2: "",
docnam: "",
serialNum: "",
tableName: "",
tcddoc: "",
},
codeTable: [
{ label: 'Airway Bills', value: '1' },
{ label: `Beneficiary's Declaration`, value: '2' },
{ label: 'Bill of Lading Copies', value: '3' },
{ label: 'Bill of Lading Originals', value: '4' },
{ label: 'Certificate', value: '5' },
{ label: 'Certificate of Analysis', value: '6' },
{ label: 'Certificate of Origin', value: '7' },
{ label: 'Certificate of Quality', value: '8' },
{ label: 'Certificate of Quantity', value: '9' },
{ label: 'Commercial Invoice', value: '10' },
{ label: 'Courier Receipt', value: '11' },
{ label: 'Draft', value: '12' },
{ label: 'Export Licence ', value: '13' },
{ label: 'Fax Report', value: '14' },
{ label: 'Inspection Cert', value: '15' },
{ label: 'Insurance Policy', value: '16' },
{ label: 'Packing List', value: '17' },
{ label: 'Shipment Advice', value: '18' },
{ label: 'Weight List', value: '19' },
],
}; };
}, },
methods: { ...Event methods: { ...Event
,addRow(scope){
var newTableValue = Object.assign({}, this.newValue);
const serial=Utils.generateUUID();
newTableValue.serialNum=serial;
// this.model.brtp.docgrdm.docgrd.push(newTableValue);
this.model.brtp.docgrdm.docgrd.splice(scope.index-1,0,newTableValue);
},
removeRow(scope){
this.model.brtp.docgrdm.docgrd.splice(scope.index, 1);
},
}, },
created: function () { }, created: function () { },
computed: { computed: {
......
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