Commit 0e157a6b by wangyanjiao

Docpre公共模板

parent 37f0dce3
......@@ -58,6 +58,7 @@ export default class Botdcr {
dbfadrblkcn: "", // Chinese address .bodgrp.dre.dbfadrblkcn
},
blk: {
docpre:"", // bodgrp.blk.docpre
resrej: "", // Reason for Non-Payment/Non-Acceptance .bodgrp.blk.resrej
colins: "", // Collection Instructions .bodgrp.blk.colins
colinsflg: "", // Collection instructions modified .bodgrp.blk.colinsflg
......
......@@ -153,7 +153,7 @@
</c-table>
</c-col> -->
<c-col :span="24" style="height: 24px; margin-top: -10px">
<!-- <c-col :span="24" style="height: 24px; margin-top: -10px">
<el-form-item :label="model.botp.docgrdm.docdsclab" class="messageLabel">
<c-button style="float: right" @click="addTableValue" type="primary">新增单据</c-button>
</el-form-item>
......@@ -163,19 +163,18 @@
:paginationShow="false" :border="true">
<el-table-column label="1st" width="auto">
<template slot-scope="scope">
<c-input v-model="scope.row.cmail1" @change="docpre"></c-input>
<c-input v-model="scope.row.cmail1" @change="docpre" maxlength="12"></c-input>
</template>
</el-table-column>
<el-table-column label="2nd" width="auto">
<template slot-scope="scope">
<c-input v-model="scope.row.cmail2"></c-input>
<c-input v-model="scope.row.cmail2" maxlength="12" @change="docpre"></c-input>
</template>
</el-table-column>
<el-table-column label="Document" prop="docnam" width="auto">
<template slot-scope="scope">
<!-- {{scope.row.docnam}} -->
<c-select style="width: 100%" placeholder="请选择" v-model="scope.row.docnam">
<c-select style="width: 100%" placeholder="请选择" v-model="scope.row.docnam" @change="docpre">
<el-option v-for="item in codeTable" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</c-select>
......@@ -187,7 +186,16 @@
</template>
</el-table-column>
</c-table>
</c-col>
</c-col> -->
<c-docpre
:model="model"
:argadr="{
path:'bodgrp.blk.docpre',
grp: 'botp',
rol: 'blk',
}"></c-docpre>
</c-col>
<!-- ====================右边======================= -->
......@@ -233,8 +241,12 @@ import CodeTable from "~/config/CodeTable"
import Event from "~/model/Botdav/Event"
import Utils from "~/utils";
import Ptap from "~/views/Public/Ptap";
import Docpre from "~/views/Public/Docpre";
export default {
components: { "c-ptap": Ptap },
components: {
"c-ptap": Ptap,
"c-docpre": Docpre,
},
inject: ["root"],
props: ["model", "codes"],
mixins: [commonProcess],
......
......@@ -10,7 +10,8 @@
</el-form-item>
</c-col>
<c-col :span="4">
<c-button style="margin:0 10px 0 0;padding: 0 10px;" size="small" type="primary" icon="el-icon-search"></c-button>
<c-button style="margin:0 10px 0 0;padding: 0 10px;" size="small" type="primary" icon="el-icon-search">
</c-button>
</c-col>
</c-col>
<c-col :span="11" :offset="1">
......@@ -55,14 +56,15 @@
<c-col :span="24">
<el-form-item label="Collection Condition" prop="bodgrp.rec.doctypcod">
<c-select v-model="model.bodgrp.rec.doctypcod" style="width:100%" placeholder="请选择Collection Condition" :code="codes.doctypcod"
disabled>
<c-select v-model="model.bodgrp.rec.doctypcod" style="width:100%" placeholder="请选择Collection Condition"
:code="codes.doctypcod" disabled>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="Document Set Status" prop="bodgrp.rec.docsta">
<c-select v-model="model.bodgrp.rec.docsta" maxlength="40" placeholder="请输入Document Set Status" disabled :code="codes.docstabot" >
<c-select v-model="model.bodgrp.rec.docsta" maxlength="40" placeholder="请输入Document Set Status" disabled
:code="codes.docstabot">
</c-select>
</el-form-item>
</c-col>
......@@ -150,7 +152,8 @@
</c-col>
<c-col :span="24">
<el-form-item label="Collecting Bank" prop="bodgrp.col.pts.ref">
<c-input v-model="model.bodgrp.col.pts.ref" maxlength="16" placeholder="请输入Collecting Bank" disabled></c-input>
<c-input v-model="model.bodgrp.col.pts.ref" maxlength="16" placeholder="请输入Collecting Bank" disabled>
</c-input>
</el-form-item>
</c-col>
......@@ -170,7 +173,7 @@
</el-form-item>
</c-col>
<c-col :span="24" style="height: 24px; margin-top: -10px">
<!-- <c-col :span="24" style="height: 24px; margin-top: -10px">
<el-form-item :label="model.botp.docgrdm.docdsclab" class="messageLabel">
<div v-if="model.rejtypsel == 'R'">
<c-button style="float: right" @click="addTableValue" type="primary">新增单据</c-button>
......@@ -193,7 +196,6 @@
</el-table-column>
<el-table-column label="Document" prop="docnam" width="auto">
<template slot-scope="scope">
<!-- {{scope.row.docnam}} -->
<c-select style="width: 100%" placeholder="请选择" v-model="scope.row.docnam" :disabled="model.rejtypsel != 'R'">
<el-option v-for="item in codeTable" :key="item.value" :label="item.label" :value="item.value">
</el-option>
......@@ -208,9 +210,17 @@
</template>
</el-table-column>
</c-table>
</c-col> -->
<c-col>
<c-docpre :model="model" :argadr="{
path: 'bodgrp.blk.docpre',
grp: 'botp',
rol: 'blk',
}" :ifShowAdd="model.rejtypsel == 'R'" :ifShowDelete="model.rejtypsel == 'R'"></c-docpre>
</c-col>
</c-col>
......@@ -225,9 +235,13 @@ import CodeTable from "~/config/CodeTable"
import Event from "~/model/Botdcr/Event"
import Utils from "~/utils";
import Ptap from "~/views/Public/Ptap";
import Docpre from "~/views/Public/Docpre";
export default {
components: { "c-ptap": Ptap },
components: {
"c-ptap": Ptap,
"c-docpre": Docpre,
},
inject: ['root'],
props: ["model", "codes"],
mixins: [commonProcess],
......
<template>
<div>
<c-col :span="24" style="height: 24px; margin-top: -10px">
<el-form-item :label="model[argadr.grp].docgrdm.docdsclab" class="messageLabel" >
<div v-if="ifShowAdd">
<c-button style="float: right" @click="addTableValue" type="primary">新增单据</c-button>
</div>
</el-form-item>
</c-col>
<c-col :span="24" style="margin-bottom: 30px;">
<c-table height="200px" style="text-align: center" :list="this.model[argadr.grp].docgrdm.docgrd || []"
:paginationShow="false" :border="true">
<el-table-column label="1st" width="auto" prop="cmail1">
<template slot-scope="scope">
<c-input v-model="scope.row.cmail1" @change="docpre" :disabled="disabledCmail1">
</c-input>
</template>
</el-table-column>
<el-table-column label="2nd" width="auto" prop="cmail2">
<template slot-scope="scope">
<c-input v-model="scope.row.cmail2" @change="docpre" :disabled="disabledCmail2">
</c-input>
</template>
</el-table-column>
<el-table-column label="Document" prop="docnam" width="auto">
<template slot-scope="scope">
<!-- {{scope.row.docnam}} -->
<c-select style="width: 100%" placeholder="请选择" v-model="scope.row.docnam"
:disabled="disabledDocnam">
<el-option v-for="item in codeTable" :key="item.value" :label="item.label" @change="docpre"
:value="item.value">
</el-option>
</c-select>
</template>
</el-table-column>
<el-table-column label="操作" width="170px" fixed="right">
<template slot-scope="scope">
<div v-if="ifShowDelete">
<c-button @click="deleteTable(scope.$index)" type="primary">删除</c-button>
</div>
</template>
</el-table-column>
</c-table>
</c-col>
</div>
</template>
<script>
import commonProcess from "~/mixin/commonProcess";
export default {
inject: ["root"],
mixins: [commonProcess],
data() {
return {
data: [],
codeTable: [
{ label: "Airway Bills", value: "Airway Bills" },
{ label: "Beneficiary's Declaration", value: "Beneficiary's Declaration" },
{ label: "Bill of Lading Copies", value: "Bill of Lading Copies" },
{ label: "Bill of Lading Originals", value: "Bill of Lading Originals" },
{ label: "Certificate", value: "Certificate" },
{ label: "Certificate of Analysis", value: "Certificate of Analysis" },
{ label: "Certificate of Origin", value: "Certificate of Origin" },
{ label: "Certificate of Quality", value: "Certificate of Quality" },
{ label: "Certificate of Quantity", value: "Certificate of Quantity" },
{ label: "Commercial Invoice", value: "Commercial Invoice" },
{ label: "Courier Receipt", value: "Courier Receipt" },
{ label: "Draft", value: "Draft" },
{ label: "Export Licence", value: "Export Licence" },
{ label: "Fax Report", value: "Fax Report" },
{ label: "Inspection Cert", value: "Inspection Cert" },
{ label: "Insurance Policy", value: "Insurance Policy" },
{ label: "Packing List", value: "Packing List" },
{ label: "Shipment Advice", value: "Shipment Advice" },
{ label: "Weight List", value: "Weight List" },
],
TableValue: [
{
id: 0,
cmail1: "",
cmail2: "",
docnam: "",
description: "",
serialNum: "",
tableName: "",
tcddoc: "",
},
],
};
},
watch: {},
props: {
model: {
type: Object,
default: undefined,
},
argadr: {
type: Object,
default: function () {
return {
grp: "", //所属模块 eg:bdtp,botp...
path: "", // path为存储数据字段所对应的default方法
};
},
},
disabledCmail1: {
type: Boolean,
default: false,
},
disabledCmail2: {
type: Boolean,
default: false,
},
disabledDocnam: {
type: Boolean,
default: false,
},
ifShowAdd: {
type: Boolean,
default: true,
},
ifShowDelete: {
type: Boolean,
default: true,
},
},
methods: {
...Event,
addTableValue(index) {
var newTableValue = Object.assign({}, this.newValue);
const serial = Utils.generateUUID();
newTableValue.serialNum = serial;
this.model[argadr.grp].docgrdm.docgrd.splice(index - 1, 0, newTableValue);
},
deleteTable(index) {
this.model[argadr.grp].docgrdm.docgrd.splice(index, 1);
},
async docpre() {
let rtnmsg = await this.executeDefault(this.argadr.path)
// let rtnmsg = await this.executeDefault('bodgrp.blk.docpre')
if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑
this.updateModel(rtnmsg.data)
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
},
},
created: function () {
}
};
</script>
<style>
.messageLabel>>>.el-form-item__label {
text-align: left;
font-weight: bold;
font-size: 12px;
}
</style>
\ No newline at end of file
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