Brtdcrd.vue 5.9 KB
Newer Older
jianglong committed
1 2 3 4 5 6 7
<template>
  <div class="eibs-tab">
    <c-row>
      <c-col :span="12">
        <c-row>
          <c-col :span="24">
            <el-form-item label="不符点">
8 9
              <c-input type="textarea" :disabled="model.bddgrp.blk.docdisflg ? false : true" :rows="6"
                v-model="model.bddgrp.blk.docdis" maxlength="65" show-word-limit placeholder="请输入不符点"></c-input>
jianglong committed
10 11
            </el-form-item>
          </c-col>
jianglong committed
12
        </c-row>
13 14 15
        <el-form-item label="快递单号" v-if="model.bddgrp.rec.advdocflg == 'X'">
          <c-input type="textarea" :rows="2" v-model="model.expmno" maxlength="120" show-word-limit placeholder="请输入单号">
          </c-input>
jianglong committed
16
        </el-form-item>
17 18 19 20 21 22 23 24 25 26 27
        <!-- <c-row>
          <c-form-item label="已交单据" prop="bdtp.docgrdm.docgrd">
            <c-col :span="24">
              <c-istream-table
                :list="model.bdtp.docgrdm.docgrd"
                :columns="columns"
              >
              </c-istream-table>
            </c-col>
          </c-form-item>
        </c-row> -->
28
        <!-- <c-col :span="24" style="height: 24px; margin-top: -10px">
29 30 31 32
          <el-form-item :label="model.bdtp.docgrdm.docdsclab" class="messageLabel">
            <c-button style="float: right" @click="addTableValue" type="primary">新增单据</c-button>
          </el-form-item>
        </c-col>
33
        <c-col :span="24" style="margin-bottom: 30px;">
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
          <c-table height="200px" style="text-align: center" :list="this.model.bdtp.docgrdm.docgrd || []"
            :paginationShow="false" :border="true">
            <el-table-column label="1st" width="auto">
              <template slot-scope="scope">
                <c-input v-model="scope.row.cmail1"></c-input>
              </template>

            </el-table-column>
            <el-table-column label="2st" width="auto">
              <template slot-scope="scope">
                <c-input v-model="scope.row.cmail2"></c-input>
              </template>
            </el-table-column>
            <el-table-column label="Document" prop="docnam" width="auto">
              <template slot-scope="scope">
                <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">
                <c-button @click="deleteTable(scope.$index)" type="primary">删除</c-button>
              </template>
            </el-table-column>
          </c-table>
61 62 63 64 65 66 67 68 69 70 71
        </c-col> -->
        <c-docpre
        :model="model" 
        :argadr="{
          path: 'bddgrp.blk.prsdoc',
          grp: 'bdtp',
          code: 'bdtdck',
        }"></c-docpre>


        
jianglong committed
72 73 74 75 76
      </c-col>

      <c-col :span="12">
        <c-row>
          <c-col :span="24">
77 78 79
            <el-form-item label="" prop="bddgrp.blk.docdisflg">
                <c-checkbox v-model="docdisflg" @change="changed" disabled>录入不符点</c-checkbox>
            </el-form-item>
jianglong committed
80 81 82 83 84 85 86 87
          </c-col>
        </c-row>
      </c-col>
    </c-row>
  </div>
</template>
<script>
import Api from "~/service/Api";
wangren committed
88
import commonProcess from "~/mixin/commonProcess";
jianglong committed
89
import CodeTable from "~/config/CodeTable";
90
import Utils from "~/utils";
jianglong committed
91
import Event from "~/model/Bdtdcr/Event";
92
import Docpre from "~/views/Public/Docpre";
jianglong committed
93 94

export default {
95 96 97
   components: {
    "c-docpre": Docpre,
  },
jianglong committed
98 99
  inject: ["root"],
  props: ["model", "codes"],
wangren committed
100
  mixins: [commonProcess],
jianglong committed
101 102
  data() {
    return {
103 104 105
      TableValue: [
        {
          id: 0,
106 107 108 109 110 111
          cmail1: "",
          cmail2: "",
          docnam: "",
          description: "",
          serialNum: "",
          tableName: "",
112 113 114 115 116 117 118
        },
      ],
      newValue: {
        id: 0,
        cmail1: "",
        cmail2: "",
        docnam: "",
119 120 121
        description: "",
        serialNum: "",
        tableName: "",
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
      },
      codeTable: [
        { label: "增值税发票", value: "1" },
        { label: "发票", value: "2" },
        { label: "装箱单", value: "3" },
        { label: "空运单", value: "4" },
        { label: "海运提单", value: "5" },
        { label: "铁路运单", value: "6" },
        { label: "货物收据", value: "7" },
        { label: "邮政收据", value: "8" },
      ],
      // columns: [
      //   '0 0 "lst1" 155',
      //   '1 1 "lst2" 155',
      //   '2 2 "document" 452'
      //   ],
jianglong committed
138 139 140 141
    };
  },
  methods: {
    ...Event,
142 143 144 145 146 147 148 149 150 151 152
    addTableValue(index) {
      var newTableValue = Object.assign({}, this.newValue);
      const serial = Utils.generateUUID();
      newTableValue.serialNum = serial;
      this.model.bdtp.docgrdm.docgrd.splice(index - 1, 0, newTableValue);
      // var index = this.TableValue.length;
      // var newTableValue = this.newValue;
      // if (index > 0) {
      //   newTableValue.id = this.TableValue[index - 1].id + 1;
      // }
      // this.TableValue.push(newTableValue);
153
    },
154 155 156 157 158 159 160 161
    deleteTable(index) {
      this.model.bdtp.docgrdm.docgrd.splice(index, 1);
      // for (let i = 0; i < this.TableValue.length; i++) {
      //   if (this.TableValue[i].id == row.id) {
      //     this.TableValue.splice(i, 1);
      //     break;
      //   }
      // }
162
    },
jianglong committed
163 164 165 166 167 168
    changed(e) {
      if (!e) {
        this.model.bddgrp.blk.docdis = "";
      }
    },
  },
169
  created: function () { },
170 171 172 173 174

  computed: {

    docdisflg: {
      get() {
175 176
        
        return this.model.advdisflg === "X" || this.model.advrefflg ==="X" ? true : false;
177 178 179 180 181 182 183
      },
      set(val) {
        this.model.bddgrp.blk.docdisflg = val ? "X" : "";
      },
    }

  }
jianglong committed
184 185 186 187 188 189 190 191
};
</script>
<style>
.c-checkbox {
  text-align: center;
  margin: 10px;
  font-size: 16px;
}
192 193

.messageLabel>>>.el-form-item__label {
194 195 196 197
  text-align: left;
  font-weight: bold;
  font-size: 12px;
}
jianglong committed
198
</style>