Betdcrd.vue 11.2 KB
Newer Older
jinqian committed
1 2
<template>
  <div class="eibs-tab">
Eivi committed
3
    <!-- left -->
4
    <c-col :span="11">
Eivi committed
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
      <c-col :span="24">
        <el-form-item
          label="Internal Discrepancies"
          prop="bedgrp.blk.intdis"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bedgrp.blk.intdis"
              maxlength="50"
              show-word-limit
              placeholder="Please input Internal Discrepancies"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="Discrepancies"
          prop="bedgrp.blk.docdis"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bedgrp.blk.docdis"
              maxlength="65"
              show-word-limit
              placeholder="Please input Discrepancies"
              :disabled="!docdisflg"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
                :disabled="!docdisflg"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <c-checkbox v-model="docdisflg" style="margin-left: 150px"
          >Discrepancies modified</c-checkbox
        >
      </c-col>
    </c-col>
    <!-- right -->
67
    <c-col :span="11" :offset="1">
Eivi committed
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
      <c-col :span="24">
        <el-form-item
          label="Reasons for Rejection"
          prop="bedgrp.blk.docins"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bedgrp.blk.docins"
              maxlength="50"
              show-word-limit
              placeholder="Please input Reasons for Rejection"
              disabled
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="Disposal of Documents"
          prop="bedgrp.blk.disdoc"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bedgrp.blk.disdoc"
              maxlength="65"
              show-word-limit
              placeholder="Please input Disposal of Documents"
              disabled
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
                disabled
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-checkbox v-model="rejpenins" style="margin-left: 150px"
          >Rejection Pending Instructions</c-checkbox
        >
      </c-col>
    </c-col>

    <!-- next part -->
Eivi committed
133
    <c-col :span="24">
Eivi committed
134 135 136 137 138
      <c-docpre
        :model="model"
        :argadr="{
          path:'bedgrp.blk.prsdoc',
          grp:'betp',
Eivi committed
139
          code:'docpre'
Eivi committed
140
        }"
Eivi committed
141
        
Eivi committed
142 143 144 145 146
      >
      </c-docpre>
    </c-col>

    <!-- <c-col :span="24" style="height: 24px; margin-top: -10px">
Eivi committed
147 148 149 150 151 152 153 154 155
      <el-form-item :label="model.betp.docgrdm.docdsclab" class="messageLabel">
        <c-button style="float: right" @click="addTableValue" type="primary"
          >新增单据</c-button
        >
      </el-form-item>
    </c-col>
    <c-col :span="24" style="height: 0px">
      <el-divider></el-divider>
    </c-col>
156
    <c-col :span="24" style="margin-bottom: 30px">
Eivi committed
157 158 159 160 161 162 163
      <c-table
        height="200px"
        style="text-align: center"
        :list="this.model.betp.docgrdm.docgrd || []"
        :paginationShow="false"
        :border="true"
      >
164 165 166 167
        <el-table-column label="1st" width="auto">
          <template slot-scope="scope">
            <c-input v-model="scope.row.cmail1"></c-input>
          </template>
Eivi committed
168
        </el-table-column>
169 170 171 172
        <el-table-column label="2nd" width="auto">
          <template slot-scope="scope">
            <c-input v-model="scope.row.cmail2"></c-input>
          </template>
Eivi committed
173 174 175
        </el-table-column>
        <el-table-column label="Document" prop="docnam" width="auto">
          <template slot-scope="scope">
Eivi committed
176
             {{scope.row.docnam}}
Eivi committed
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
            <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="操作" width="170px" fixed="right">
          <template slot-scope="scope">
194
            <c-button @click="deleteTable(scope.$index)" type="primary"
Eivi committed
195 196 197 198 199
              >删除</c-button
            >
          </template>
        </el-table-column>
      </c-table>
Eivi committed
200
    </c-col> -->
Eivi committed
201
    <!-- <c-col :span="12">
202 203
        <el-form-item label="Internal Discrepancies" prop="bedgrp.blk.intdis">
            <c-input type="textarea" v-model="model.bedgrp.blk.intdis" maxlength="65" show-word-limit placeholder="请输入Internal Discrepancies" ></c-input>
jinqian committed
204
        </el-form-item>
205 206 207 208 209
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onIntdisButtxmsel">
            ...
jinqian committed
210
        </c-button>
211 212 213 214 215
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Reasons for Rejection" prop="bedgrp.blk.docins">
            <c-input type="textarea" v-model="model.bedgrp.blk.docins" maxlength="35" show-word-limit placeholder="请输入Reasons for Rejection" ></c-input>
jinqian committed
216
        </el-form-item>
217 218 219 220 221
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onResrejButtxmsel">
            ...
jinqian committed
222
        </c-button>
223 224 225 226 227
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Disposal of Documents" prop="bedgrp.blk.disdoc">
            <c-input type="textarea" v-model="model.bedgrp.blk.disdoc" maxlength="35" show-word-limit placeholder="请输入Disposal of Documents" ></c-input>
jinqian committed
228
        </el-form-item>
229 230 231 232 233
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onDisdocButtxmsel">
            ...
jinqian committed
234
        </c-button>
235 236 237 238 239
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Discrepancies" prop="bedgrp.blk.docdis">
            <c-input type="textarea" v-model="model.bedgrp.blk.docdis" maxlength="50" show-word-limit placeholder="请输入Discrepancies" ></c-input>
jinqian committed
240
        </el-form-item>
241 242 243 244 245
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onDocdisButtxmsel">
            ...
jinqian committed
246
        </c-button>
247 248 249 250 251 252 253 254 255 256 257 258
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.rejpenins">Rejection pending instructions</c-checkbox>
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.bedgrp.blk.docdisflg">Discrepancies modified</c-checkbox>
       </c-col>
                  
	<c-col :span="12">
	    <span  v-text="model.betp.docgrdm.docdsclab"   data-path=".betp.docgrdm.docdsclab" > </span>
Eivi committed
259
	</c-col> -->
jinqian committed
260 261 262
  </div>
</template>
<script>
Eivi committed
263
import Api from "~/service/Api";
264
import commonProcess from "~/mixin/commonProcess";
Eivi committed
265 266
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Betdcr/Event";
Eivi committed
267 268
import Utils from "~/utils";
import Docpre from "~/views/Public/Docpre";
jinqian committed
269 270

export default {
Eivi committed
271
  components:{"c-docpre":Docpre},
Eivi committed
272
  inject: ["root"],
Eivi committed
273
  props: ["model", "codes"],
Eivi committed
274 275 276
  mixins: [commonProcess],
  data() {
    return {
277
      TableValue: [
Eivi committed
278 279
        {
          id: 0,
280 281 282 283 284 285 286 287 288
          cmail1: "",
          cmail2: "",
          docnam: "",
          docnam: "",
          description: "",
          docnam: "",
          serialNum: "",
          tableName: "",
          tcddoc: "",
Eivi committed
289 290 291 292 293 294 295
        },
      ],
      newValue: {
        id: 0,
        cmail1: "",
        cmail2: "",
        docnam: "",
296 297 298 299 300 301
        docnam: "",
        description: "",
        docnam: "",
        serialNum: "",
        tableName: "",
        tcddoc: "",
Eivi committed
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
      },
      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" },
      ],
    };
  },
  computed: {
    docdisflg: {
      get() {
329 330 331 332 333
        if(this.model.bedgrp.blk.docdis==""){
          return this.model.bedgrp.blk.docdisflg != "X";
        }else{
          return this.model.bedgrp.blk.docdisflg != "";
        }
Eivi committed
334 335 336
      },
      set(val) {
        this.model.bedgrp.blk.docdisflg = val ? "X" : "";
337
        this.model.bedgrp.blk.docdis = "";
Eivi committed
338 339 340 341 342 343 344 345 346 347 348
      },
    },
    rejpenins: {
      get() {
        return this.model.rejpenins != "";
      },
      set(val) {
        this.model.rejpenins = val ? "X" : "";
      },
    },
  },
349 350 351 352 353 354 355 356 357
  methods: {
    ...Event,
    addTableValue(index) {
      var newTableValue = Object.assign({}, this.newValue);
      const serial = Utils.generateUUID();
      newTableValue.serialNum = serial;
      // this.model.bftp.docgrdm.docgrd.push(newTableValue);
      this.model.betp.docgrdm.docgrd.splice(index - 1, 0, newTableValue);

Eivi committed
358 359
      this.TableValue.push(newTableValue);
    },
360 361
    deleteTable(index) {
      this.model.betp.docgrdm.docgrd.splice(index, 1);
jinqian committed
362
    },
Eivi committed
363 364 365
  },
  created: function () {},
};
jinqian committed
366 367
</script>
<style>
Eivi committed
368 369 370 371 372
.messageLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
  font-size: 12px;
}
jinqian committed
373
</style>