Tk.vue 6.41 KB
Newer Older
liuxin committed
1 2 3
<template>
  <div class="eibs-tab">
    <!--                          
潘际乾 committed
4
	<c-col :span="24">
liuxin committed
5
	    <span  v-text="model.ditp.hwfwms"   data-path=".ditp.hwfwms" > </span>
潘际乾 committed
6
	</c-col>
7
    -->
liuxin committed
8
    <c-col :span="15">
9
        <c-col :span="24">
liushikai committed
10
        <el-form-item label="货物描述" prop="didgrp.blk.lcrgod">
liuxin committed
11
            <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>
12
       </el-form-item>
潘际乾 committed
13
       </c-col>
liuxin committed
14
                  
潘际乾 committed
15
       <c-col :span="24">
liushikai committed
16
        <el-form-item label="单据要求" prop="didgrp.blk.lcrdoc">
liuxin committed
17
            <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>
18
       </el-form-item>
潘际乾 committed
19
       </c-col>
liuxin committed
20
                                                    
潘际乾 committed
21
       <c-col :span="24">
liushikai committed
22
        <el-form-item label="附加条款" prop="didgrp.blk.adlcnd">
liuxin committed
23
            <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>
24
       </el-form-item>
潘际乾 committed
25
       </c-col>
liuxin committed
26
                                                    
潘际乾 committed
27
       <c-col :span="24">
liushikai committed
28
        <el-form-item label="给付款、承兑、议付行的指示" prop="didgrp.blk.insbnk">
liuxin committed
29
            <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>
30
       </el-form-item>
潘际乾 committed
31
       </c-col>
32 33
    </c-col>          

liuxin committed
34
    <c-col :span="7" :offset="1">
liuxin committed
35 36 37 38
        <c-col :offset="1">
            <el-form-item label="单据模板智能识别:" class="messageLabel">
            </el-form-item>
        </c-col>
liuxin committed
39
        <IntellectIcon :IconList="IconList" :spanVal="spanVal" v-on:deleteIcon="deleteIcon" v-on:insertIcon="insertIcon"></IntellectIcon>
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
    </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>    -->
liuxin committed
76 77 78 79 80
                  
  </div>
</template>
<script>
import Api from "~/service/Api"
wangren committed
81
import commonProcess from "~/mixin/commonProcess";
liuxin committed
82
import CodeTable from "~/config/CodeTable"
liuxin committed
83
import Event from "~/model/Ditopn/Event"
84
import IntellectIcon from "~/components/IntellectIcon"
liuxin committed
85 86

export default {
87
    inject: ['root'],
liuxin committed
88
    props:["model","codes"],
wangren committed
89
    mixins: [commonProcess],
90
    components: { IntellectIcon },
liuxin committed
91 92
    data(){
        return {
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
            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",
            ],
liuxin committed
123
            spanVal:7,
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
        }
    },
    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));
liuxin committed
145 146 147
        }
    },
    created:function(){
liuxin committed
148 149 150 151
        var IconList = JSON.parse(sessionStorage.getItem("IconList"));
        if(IconList == null){
            sessionStorage.setItem('IconList', JSON.stringify(this.IconList));
        }
liuxin committed
152 153 154 155
    }
}
</script>
<style>
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
  .bottom {
    margin-top: 6px;
    line-height: 5px;
  }

  .button {
    padding: 0;
    float: right;
  }

  .image {
    width: 100%;
    height: 100%;
    display: block;
  }
liuxin committed
171

172 173 174 175 176 177 178 179 180
  .clearfix:before,
  .clearfix:after {
      display: table;
      content: "";
  }
  
  .clearfix:after {
      clear: both
  }
liuxin committed
181 182 183 184 185
  .messageLabel >>> .el-form-item__label{
    /* text-align: left; */
    font-weight:bold;
    font-size: 12px;
}
liuxin committed
186
</style>