index.js 2.2 KB
Newer Older
fukai committed
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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import Utils from "~/utils/index";
export default {
  mixins: [commonFunctions],
  methods: {
    // 获取业务编号
    async getOwnref() {
      if (this.model.mcdgrp.ade.pts.ptainr == "") {
        this.$notify.warning({
          title: '提示',
          message: '请先选择申请人!'
        });
        return;
      }
      if (this.model.mcdgrp.rec.mcttyp == "") {
        this.$notify.warning({
          title: '提示',
          message: '请先选择Transaction Type!'
        });
        return;
      }
      let params = {
        ownref: this.model.mcdgrp.rec.ownref,
        ptainr: this.model.mcdgrp.ade.pts.ptainr,
        mcttyp: this.model.mcdgrp.rec.mcttyp,
      }
      const loading = this.loading();
      let res = await Api.post(`/${this.moduleRouter()}/mctopn/getRef`, params);
      loading.close();
      if (res.respCode === SUCCESS) {
        this.model.mcdgrp.rec.ownref = res.data;
      } else {
        this.$message.error(res.respMsg);
      }
    },
    // 获取业务编号
    async getMctOwnref() {
      if (this.model.mcdgrp.ade.pts.ptainr == "") {
        this.$notify.warning({
          title: '提示',
          message: '请先选择申请人!'
        });
        return;
      }
      if (this.model.mcdgrp.rec.mcttyp == "") {
        this.$notify.warning({
          title: '提示',
          message: '请先选择Transaction Type!'
        });
        return;
      }
      let params = {
        ptainr: this.model.mcdgrp.ade.pts.ptainr,
        ptyinr: this.model.mcdgrp.ade.pts.ptyinr,
        mcttyp: this.model.mcdgrp.rec.mcttyp,
      }
      const loading = this.loading();
      let res = await Api.post(`/${this.moduleRouter()}/mctopn/getMctRef`, params);
      loading.close();
      if (res.respCode === SUCCESS) {
        this.model.mcdgrp.rec.ownref = res.data;
        this.model.mcdgrp.rec.nam = res.data;
      } else {
        this.$notify.warning({
          title: '提示',
          message: res.respMsg
        });
      }
    },

    adeChange() {
      this.model.mcdgrp.apl.pts = this.model.mcdgrp.ade.pts;
      this.model.mcdgrp.rec.ownref = "";
    }

  }
}