Sel.vue 3.85 KB
<template>
  <div class="eibs-tab">
    <c-col :span="12" class="col-left">
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="发生日期" prop="eblmod.ebl.reldat">
            <c-date-picker :disabled="this.disflg == 'X'" type="date"  v-model="model.eblmod.ebl.reldat" style="width:100%"  placeholder="请选择授权日期"></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
	        <c-checkbox v-model="model.cfabut.basflg" true-label="X" false-label="" :disabled="this.calflg == 'X'">签约信息</c-checkbox>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="业务所属机构" prop="cfabut.ownextkey">
          <c-select :disabled="this.disflg == 'X'" v-model="model.cfabut.ownextkey" style="width:100%" placeholder="请输入业务所属机构" @change="getDecnum(model.cfabut.ownextkey)" >
            <el-option :key="item.inr" :label="item.branch + ' ' + item.bchname" :value="item.branch" v-for="item in ownExtkeyList">
            </el-option>
            </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item v-if="transName == 'eafall'" style="float: left">
					<c-checkbox true-label="" false-label="X" disabled>新增接口数据</c-checkbox>
				</el-form-item>
      </c-col>
      <c-col :span="24" >
        <el-form-item label="变动信息数目" prop="cfabut.newdcl" v-if="transName == 'eafall'">
          <c-input-currency v-model="model.cfabut.newdcl" :maxlength="1" :precision="0" placeholder="请输入" @change="changeDcl"></c-input-currency>
        </el-form-item>
      </c-col>
    </c-col>
    <c-col :span="12" class="col-right">
      <c-col :span="12">
	      <c-checkbox v-model="model.cfabut.dclflg" true-label="X" false-label="" :disabled="this.calflg == 'X'">变动信息</c-checkbox>
      </c-col>
    </c-col>
  </div>
</template>
<script>
import CommonEvent from '../../common/event/CommonEvent'
import event from "~/page/Business/Cfa/Eafadd/event";

export default {
    inject: ['root'],
    props:["model","codes","transName"],
    mixins: [event],
    data(){
        return {
          ownExtkeyList: [],
          disflg: '',
          calflg: '',
        }
    },
    computed: {
    },
    methods:{
      calDisabled() {
        if(this.transName == 'eafdel' || this.transName == 'eafinf' || this.transName == 'eafame' || this.transName == 'eafall') {
          this.disflg = 'X';
        } else if(this.transName == 'eafadd') {
          this.disflg = '';
        } else {
          this.disflg = 'X';
        }
      },

      calFlgDisabled() {
        if(this.transName == 'eafdel' || this.transName == 'eafinf' || this.transName == 'eafadd' || this.transName == 'eafall') {
          this.calflg = 'X';
        } else if(this.transName == 'eafame') {
          this.calflg = '';
        } else {
          this.calflg = 'X';
        }
      },

      

      changeDcl() {
			let count = Number(this.model.cfabut.newdcl)
      let sum = Number(this.model.dclp.length)
			if (count > sum) {
				for (let i = 0; i < (count - sum); i++) {
					this.model.dclp.push({
						inr: "",
					  sta: "", 
					  actiontype: "A", 
					  actiondesc: "", 
					  exdebtcode: "", 
					  buscode: "", 
					  changeno: "",
					  changtype: "",
					  chdate: "", 
					  chcurrency: "", 
					  fairvalue: "", 
					  remark: "",
					  acp: "X", 
					  chamount: "", 
					});
				}
			} else if(count < sum){
				//删除多的标签
				this.model.dclp.splice(count, sum - count);
			}
		},

    },
    created:function(){
      //初始化机构列表 
     this.getOwnExtkeyCondition();
     //界面可编辑初始化
     this.calDisabled();
     this.calFlgDisabled();
     //默认勾选新增接口
     this.model.cfabut.addnew = 'X';
     this.model.cfabut.newdcl = 0;
    },
    mounted() {
    
  },
}
</script>
<style>

</style>