Setp.vue 11 KB
Newer Older
wangbinfei committed
1 2
<template>
  <div class="eibs-tab">
wangna committed
3 4
    <!-- ====================左边======================= -->
    <c-col :span="11">
wangna committed
5
      <c-col :span="24">
nanrui committed
6
        <el-form-item label="光票托收编号" prop="ccdgrp.rec.ownref">
wangna committed
7 8 9 10
          <c-fullbox>
            <c-input
              v-model="model.ccdgrp.rec.ownref"
              maxlength="8"
nanrui committed
11
              placeholder="请输入光票托收编号"
wangna committed
12 13 14
              disabled
            ></c-input>
            <template slot="footer">
15
              <c-button size="small" type="primary" disabled>
nanrui committed
16
                <i class="el-icon-info"></i>
wangna committed
17 18 19
              </c-button>
            </template>
          </c-fullbox>
wangna committed
20 21 22 23
        </el-form-item>
      </c-col>

      <c-col :span="12">
nanrui committed
24
        <el-form-item label="光票托收币种金额" prop="ccdgrp.cbs.max.cur">
wangna committed
25 26 27
          <c-select
            v-model="model.ccdgrp.cbs.max.cur"
            style="width: 100%"
nanrui committed
28
            placeholder="请选择光票托收币种"
wangna committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
            disabled
          >
            <el-option
              v-for="item in codes.curtxt1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item
          style="text-align: left"
          label-width="20px"
          prop="ccdgrp.cbs.max.amt"
        >
          <c-input-currency
            v-model="model.ccdgrp.cbs.max.amt"
            style="text-align: left; width: 100%"
nanrui committed
50
            placeholder="请输入光票托收金额"
wangna committed
51 52 53 54 55 56 57 58 59
            @keyup.enter.native="
              defaultFunction('ccdgrp.cbs.max.amt', model.ccdgrp.cbs.max.amt)
            "
            disabled
          ></c-input-currency>
        </el-form-item>
      </c-col>

      <c-col :span="12">
nanrui committed
60
        <el-form-item label="光票托收币种余额" prop="ccdgrp.cbs.opn1.cur">
wangna committed
61 62 63 64
          <c-select
            disabled
            v-model="model.ccdgrp.cbs.opn1.cur"
            style="width: 100%"
nanrui committed
65
            placeholder="请选择光票托收币种"
wangna committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
          >
            <el-option
              v-for="item in codes.curtxt1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item
          style="text-align: left"
          label-width="20px"
          prop="ccdgrp.cbs.opn1.amt"
        >
          <c-input-currency
            v-model="model.ccdgrp.cbs.opn1.amt"
            style="text-align: left; width: 100%"
nanrui committed
86
            placeholder="请输入光票托收余额"
wangna committed
87 88 89 90 91 92 93 94 95
            @keyup.enter.native="
              defaultFunction('ccdgrp.cbs.opn1.amt', model.ccdgrp.cbs.opn1.amt)
            "
            disabled
          ></c-input-currency>
        </el-form-item>
      </c-col>

      <c-col :span="24">
nanrui committed
96
        <el-form-item label="出票日期" prop="ccdgrp.rec.chkdat">
wangna committed
97 98 99 100
          <c-date-picker
            type="date"
            v-model="model.ccdgrp.rec.chkdat"
            style="width: 100%"
nanrui committed
101
            placeholder="请选择出票日期"
wangna committed
102 103 104 105 106 107
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
nanrui committed
108
        <el-form-item label="光票托收形式" prop="ccdgrp.rec.ccform">
wangna committed
109 110 111
          <c-select
            v-model="model.ccdgrp.rec.ccform"
            style="width: 100%"
nanrui committed
112
            placeholder="请选择光票托收形式"
wangna committed
113 114 115 116 117 118 119 120
            :code="codes.ccform"
            disabled
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
nanrui committed
121
        <el-form-item label="付款方式 " prop="ccdgrp.rec.purflg">
wangna committed
122 123 124
          <c-select
            v-model="model.ccdgrp.rec.purflg"
            style="width: 100%"
nanrui committed
125
            placeholder="请选择付款方式 "
wangna committed
126 127 128 129 130 131 132 133
            :code="codes.purflg"
            disabled
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24" style="height: 24px; margin-top: 20px">
nanrui committed
134
        <el-form-item label="结算期限:" class="messageLabel"></el-form-item>
wangna committed
135 136
      </c-col>
      <c-col :span="24" style="margin-bottom: 35px">
137
        <el-form-item label-width="0" prop="liaall.tenstm">
wangna committed
138
        <c-istream-table
nanrui committed
139
          label="结算期限"
wangna committed
140 141 142 143 144 145 146 147
          ref="table"
          :list="model.liaall.tenstm.rows || []"
          :columns="stmData.columns"
          :showSelection="true"
          v-on:multipleSelect="multipleSelect"
          prop="liaall.tenstm"
        >
        </c-istream-table>
148
      </el-form-item>
wangna committed
149 150 151
      </c-col>

      <c-col :span="12">
nanrui committed
152
        <el-form-item label="收汇金额" prop="setmod.doccur">
wangna committed
153 154 155 156
          <c-select
            disabled
            v-model="model.setmod.doccur"
            style="width: 100%"
nanrui committed
157
            placeholder="请选择收汇金额"
wangna committed
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
          >
            <el-option
              v-for="item in codes.curtxt1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item
          style="text-align: left"
          label-width="20px"
          prop="setmod.docamt"
        >
          <c-input-currency
            v-model="model.setmod.docamt"
            style="text-align: left; width: 100%"
            placeholder="请输入"
          ></c-input-currency>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- ====================右边======================= -->
    <c-col :span="11" :offset="1">
      <c-col :span="24">
nanrui committed
187
        <el-form-item label="业务名称" prop="ccdgrp.rec.nam">
wangna committed
188 189 190
          <c-input
            v-model="model.ccdgrp.rec.nam"
            maxlength="40"
nanrui committed
191
            placeholder="请输入业务名称"
wangna committed
192 193 194 195 196 197
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
nanrui committed
198
        <el-form-item label="汇票提交人" prop="ccdgrp.pre.pts.ref">
wangna committed
199 200 201
          <c-input
            v-model="model.ccdgrp.pre.pts.ref"
            maxlength="40"
nanrui committed
202
            placeholder="请输入汇票提交人"
wangna committed
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="ccdgrp.pre.pts.nam">
          <c-input
            v-model="model.ccdgrp.pre.pts.nam"
            maxlength="40"
            placeholder="请输入"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
nanrui committed
220
        <el-form-item label="承兑汇票银行" prop="ccdgrp.dro.pts.ref">
wangna committed
221 222 223
          <c-input
            v-model="model.ccdgrp.dro.pts.ref"
            maxlength="40"
nanrui committed
224
            placeholder="请输入承兑汇票银行"
wangna committed
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="ccdgrp.dro.pts.nam">
          <c-input
            v-model="model.ccdgrp.dro.pts.nam"
            maxlength="40"
            placeholder="请输入"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
nanrui committed
242
        <el-form-item label="代收行参考号" prop="ccdgrp.col.pts.ref">
wangna committed
243 244 245
          <c-input
            v-model="model.ccdgrp.col.pts.ref"
            maxlength="40"
nanrui committed
246
            placeholder="请输入代收行参考号"
wangna committed
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="ccdgrp.col.pts.nam">
          <c-input
            v-model="model.ccdgrp.col.pts.nam"
            maxlength="40"
            placeholder="请输入"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="ccdgrp.rec.frepayflg">
          <c-checkbox v-model="model.ccdgrp.rec.frepayflg"
266
          @click="frepayFlagChange"
nanrui committed
267
            >无偿放单选项</c-checkbox
wangna committed
268 269 270 271 272
          >
        </el-form-item>
      </c-col>

      <c-col :span="12">
nanrui committed
273
        <el-form-item label="票据金额" prop="setmod.doccur">
wangna committed
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
          <c-select
            disabled
            v-model="model.setmod.doccur"
            style="width: 100%"
            placeholder="请选择Currency"
          >
            <el-option
              v-for="item in codes.curtxt1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="12">
        <el-form-item
          style="text-align: left"
          label-width="5px"
          prop="setmod.redamt"
        >
          <c-input-currency
            :disabled="model.ccdgrp.rec.frepayflg == 'X'"
            v-model="model.setmod.redamt"
            style="text-align: left; width: 100%"
nanrui committed
300
            placeholder="请输入票据金额"
wangna committed
301
          ></c-input-currency>
wangbinfei committed
302
        </el-form-item>
wangna committed
303 304
      </c-col>
    </c-col>
wangbinfei committed
305 306 307
  </div>
</template>
<script>
wangna committed
308
import Api from "~/service/Api";
wangren committed
309
import commonProcess from "~/mixin/commonProcess";
wangna committed
310 311
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Cctset/Event";
wangbinfei committed
312 313

export default {
wangna committed
314 315 316 317 318 319 320
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      stmData: {
        columns: [
nanrui committed
321
          '1 1 "类型" 80',
wangna committed
322 323
          '2 2 "Dbt" 80',
          '3 3 "Cdt" 80',
nanrui committed
324 325
          '4 4 "币种" 80',
          '5 5 "金额" 110 2 8 1 4',
wangna committed
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
          {
            index: 6,
            position: 6,
            width: 110,
            render: (item, scope) => {
              return scope.row[item.prop] === "null"
                ? ""
                : scope.row[item.prop];
            },
            label: "Mat.Dat.",
          },
        ],
        data: [],
      },
    };
  },
  methods: {
    ...Event,
344 345 346 347 348

    async frepayFlagChange(){
      let rtnmsg = await this.executeDefault("setmod.redamt");
      if (rtnmsg.respCode == SUCCESS) {
        Utils.copyValueFromVO(this.model, rtnmsg.data);
wangna committed
349 350
      }
    },
wangbinfei committed
351

wangna committed
352 353 354
    async multipleSelect(selection) {
      if (selection.length > 1) {
        this.$notify({
wangna committed
355 356
          title: "错误",
          message: "您不能选择多个期限",
wangna committed
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
          type: "error",
        });
      } else {
        let chkIds;
        if (selection.length === 0) {
          chkIds = [];
          this.model.liaall.tensetstm.rows = [];
          this.model.setmod.docamt = "0.00";
        } else {
          chkIds = [selection[0] + 1];
          this.model.setmod.docamt = this.model.ccdgrp.cbs.max.amt;
        }
        console.log(this.model.liaall.tensetstm);
        let params = { chkDst: "liaall.tenstm", chkIds };
        console.log(params);
        const rtnmsg = await this.executeRule("liaall.tenstm", params);
        console.log(rtnmsg);
        if (rtnmsg.respCode == SUCCESS) {
          this.updateModel(rtnmsg.data);
        } else {
          this.$notify.error({ title: "错误", message: "服务请求失败!" });
wangbinfei committed
378
        }
wangna committed
379
      }
wangbinfei committed
380
    },
wangna committed
381 382 383
  },
  created: function () {},
};
wangbinfei committed
384 385 386
</script>
<style>
</style>