index.js 1.53 KB
import commonFunctions from '~/mixin/commonFunctions.js';
import Api from '~/service/Api';

export default {
  mixins: [commonFunctions],
  methods: {
    // 双击
    async dbClickRow (row) {
      let rtnmsg = await Api.post("/frontend/batdis/dblclick", {
        objtyp: row.objtyp,
        objinr: row.objinr,
      });
      console.log(rtnmsg)
      if (rtnmsg.respCode == SUCCESS) {
        this.routerPush({
          path: '/business/msgdtl',
          query: {
            mpsinr: rtnmsg.data.mpsinr
          }
        })
      }
    },
    // 详情
    async toDetails () {
      console.log(this.model.batgrp.dotlst)
      console.log(this.model.batgrp.dotlst[0].inr)
      let rtnmsg = await Api.post("/frontend/batdis/display", {
        inr: this.model.batgrp.dotlst[0].inr
      });
      if (rtnmsg.respCode == SUCCESS) {
        this.detailsInfo = rtnmsg.data.batgrp.doelst;
        this.$refs.infoShow.visible = true;
      }
    },
    // 取消关联
    toCancelRelate (row) {
      console.log(row)
      if (row.objtyp == 'smd') {
        this.$notify.error({
          title: '错误',
          message: '请选择交易待对账记录取消关联',
        });
        return;
      }
      if (row.sta != 0) {
        this.$notify.error({
          title: '错误',
          message: '当前记录未关联,无法取消关联',
        });
        return;
      }
      console.log("row:" + row.inr)
      this.routerPush({
        path: '/business/offrel',
        query: {
          inr: row.inr
        }
      })
    }
  }
}