index.js 1.84 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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import { cloneDeep } from "lodash";
import Pts from '~/components/business/commonModel/Pts.js';

export default {
	mixins: [commonFunctions],
  methods: {
    changeDocprbrolbe1(){
      if(this.model.btdgrp.rec.docprbrolbe1=="PRB"){
          const restObj = {
              pts: new Pts().data,
          }
          this.model.btdgrp.prp.ptainr = ""
          this.model.btdgrp.prp = cloneDeep(restObj);
          this.model.btdgrp.prp.pts.ref = this.model.btdgrp.be1.pts.ref
      }else{
          this.model.btdgrp.prp = cloneDeep(this.model.btdgrp.be1);
      }
    },

    //获取弹框表格数据
    async getButtxmsel(){
      let params = {
        // btdgrp:{
          blk: this.model.btdgrp.blk
        // }
      };
      let res = await Api.post("/Lc/commonrule/buttxmselList", params);
      if (res.respCode == SUCCESS) {
        this.tableList = res.data
        this.dialogTableVisible = true;
      }
    },

    // 选中弹框表格的行数据
     selectButtxmselData(row) {
      if(this.model.btdgrp.blk.intdis == ''){
        this.model.btdgrp.blk.intdis = row.txt
      }else{
        this.model.btdgrp.blk.intdis =this.model.btdgrp.blk.intdis + '\n' + row.txt
      }
      this.dialogTableVisible = false;
      // let params = {
      //   ...row,
      // };
      // let res = await Api.post("/Lc/commonrule/buttxmsel", params);
      // if (res.respCode == SUCCESS) {
      //   this.model.btdgrp.blk.indis = res.data
        
      // }
    },

    onDocdisflgChange() {
      if (this.model.btdgrp.blk.docdisflg == "") {
        this.model.btdgrp.blk.docdis =  this.model.oldbtdgrp.blk.docdis;
        this.isDocdisDisabled = true;
        this.isButtxmselDisabled = true;
      } else {
        this.isDocdisDisabled = false;
        }
    },
    

  }
}