Tk.vue
6.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<template>
<div class="eibs-tab">
<!--
<c-col :span="24">
<span v-text="model.ditp.hwfwms" data-path=".ditp.hwfwms" > </span>
</c-col>
-->
<c-col :span="15">
<c-col :span="24">
<el-form-item label="货物描述" prop="didgrp.blk.lcrgod">
<c-input type="textarea" :autosize="{ minRows: 6, maxRows: 8}" v-model="model.didgrp.blk.lcrgod" style="margin-right:20px;" maxlength="1430" show-word-limit placeholder="请输入Description of Goods" ></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="单据要求" prop="didgrp.blk.lcrdoc">
<c-input type="textarea" :autosize="{ minRows: 6, maxRows: 8}" v-model="model.didgrp.blk.lcrdoc" maxlength="1950" style="margin-right:20px;" show-word-limit placeholder="请输入单据要求" ></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="附加条款" prop="didgrp.blk.adlcnd">
<c-input type="textarea" :autosize="{ minRows: 6, maxRows: 8}" v-model="model.didgrp.blk.adlcnd" style="margin-right:20px;" maxlength="1430" show-word-limit placeholder="请输入附加条款" ></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="给付款、承兑、议付行的指示" prop="didgrp.blk.insbnk">
<c-input type="textarea" :autosize="{ minRows: 6, maxRows: 8}" v-model="model.didgrp.blk.insbnk" style="margin-right:20px;" maxlength="325" show-word-limit placeholder="请输入付行的指示" ></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="7" :offset="1">
<c-col :offset="1">
<el-form-item label="单据模板智能识别:" class="messageLabel">
</el-form-item>
</c-col>
<IntellectIcon :IconList="IconList" :spanVal="spanVal" v-on:deleteIcon="deleteIcon" v-on:insertIcon="insertIcon"></IntellectIcon>
</c-col>
<!-- <c-col :span="8">
<el-row>
<el-col :span="4" v-for="(item, idx) in tkData" :key="idx" :offset="1">
<div v-if="item.show">
<el-card :body-style="{ padding: '0px' }" style="height:100%">
<img :src="item.src" class="image">
<div style="padding: 5px;">
<span style="text-align:center;font-size:5px">{{item.name}}</span>
<el-button type="text" class="button" icon="el-icon-delete" @click="DeleteTK(idx)"></el-button>
</div>
</el-card>
</div>
</el-col>
<el-col :span="4" :offset="1">
<el-card :body-style="{ padding: '0px' }">
<img src="../../../assets/add.png" class="image" @click="AddTK">
</el-card>
</el-col>
</el-row>
<el-dialog :visible.sync="TKdialog" :title="'单据列表'">
<div style="height:200px">
<el-col :span="2" v-for="(item, idx) in tkData" :key="idx" :offset="1">
<div v-if="item.show == false">
<el-card :body-style="{ padding: '0px' }" style="height:100%">
<img :src="item.src" class="image">
<div style="padding: 5px;">
<span style="text-align:center;font-size:5px">{{item.name}}</span>
<el-button type="text" class="button" icon="el-icon-plus" @click="InsertTK(idx)"></el-button>
</div>
</el-card>
</div>
</el-col>
</div>
</el-dialog>
</c-col> -->
</div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Ditopn/Event"
import IntellectIcon from "~/components/IntellectIcon"
export default {
inject: ['root'],
props:["model","codes"],
mixins: [commonProcess],
components: { IntellectIcon },
data(){
return {
TKdialog: false,
tkData:[
{
id:"invoice",
src: require("~/assets/invoice.png"),
name:"发票",
show:true
},
{
id:"receipt",
src: require("~/assets/receipt.png"),
name:"货物收据",
show:true
},
{
id:"oceanShipping",
src: require("~/assets/oceanShipping.png"),
name:"海运提单",
show:true
},
// {
// id:"add",
// src: require("~/assets/add.png"),
// name:"添加",
// show:true
// },
],
IconList:[
"invoice","receipt",
],
spanVal:7,
}
},
methods:{
...Event,
deleteIcon(id){
const arr = []
for (let i = 0; i < this.IconList.length; i++) {
const icon = this.IconList[i];
if (icon != id) {
arr.push(icon)
}
}
this.IconList = arr;
},
insertIcon(id){
this.IconList = [...this.IconList, id];
}
},
watch: {
IconList(){
sessionStorage.setItem('IconList', JSON.stringify(this.IconList));
}
},
created:function(){
var IconList = JSON.parse(sessionStorage.getItem("IconList"));
if(IconList == null){
sessionStorage.setItem('IconList', JSON.stringify(this.IconList));
}
}
}
</script>
<style>
.bottom {
margin-top: 6px;
line-height: 5px;
}
.button {
padding: 0;
float: right;
}
.image {
width: 100%;
height: 100%;
display: block;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
.messageLabel >>> .el-form-item__label{
/* text-align: left; */
font-weight:bold;
font-size: 12px;
}
</style>