Srmp.vue 3.11 KB
Newer Older
1
<template>
Wuyuqiu committed
2
  <div class="eibs">
Wuyuqiu committed
3
    <el-col :span="12" style="padding-right: 20px;">
4 5 6 7 8 9 10 11 12 13 14
    <c-col :span="24">
        <el-form-item label="单据类型" prop="brdgrp.srm.djutyp">
            <c-select v-model="model.brdgrp.srm.djutyp" style="width:100%" placeholder="请选择单据类型"
            :code="codes.djutyp"
            >
              </c-select>
        </el-form-item>
       </c-col>
    
     <c-col :span="24">
        <el-form-item label="单据出具人" prop="brdgrp.srm.djuusr">
15
            <c-input :disabled="this.typ1" v-model="model.brdgrp.srm.djuusr" maxlength="80"  placeholder="请输入单据出具人"></c-input>
16 17 18
        </el-form-item>
       </c-col>
       </el-col>
Wuyuqiu committed
19
    <el-col :span="12" style="padding-left: 20px;">
20 21
         <c-col :span="24">
        <el-form-item label="单据出具日期" prop="brdgrp.srm.djudat">
22
            <c-date-picker :disabled="this.typ1" type="date"  v-model="model.brdgrp.srm.djudat" style="width:100%"  placeholder="请选择单据出具日期"></c-date-picker>
23 24 25 26 27
        </el-form-item>
       </c-col>
                                   
       <c-col :span="24">
        <el-form-item label="货权单据编号" prop="brdgrp.srm.djuref">
28
            <c-input  :disabled="this.typ1" v-model="model.brdgrp.srm.djuref" maxlength="40"  placeholder="请输入货权单据编号"></c-input>
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
        </el-form-item>
       </c-col>
    </el-col>
                                               
       
                                   
      
                                   
      
  </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Litdck/Event"

export default {
    inject: ['root'],
    props:["model","codes"],
    mixins: [commonProcess],
    data(){
        return {
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
          typ1:true
        }
    },
    watch:{
      "model.brdgrp.srm.djutyp":{
        immediate:true,
        handler(val,oldval){
          if(this.model.brdgrp.srm.djutyp == 'D'){
            this.typ1 = true
            // ommonProcess里的 changeFormItemRequired (property,Boolean)
            this.changeFormItemRequired('brdgrp.srm.djuusr', false)
            this.changeFormItemRequired('brdgrp.srm.djudat', false)
            this.changeFormItemRequired('brdgrp.srm.djuref', false)
            this.model.brdgrp.srm.djuusr =''
            this.model.brdgrp.srm.djudat =''
            this.model.brdgrp.srm.djuref =''
68

69 70 71 72 73 74 75 76 77 78 79 80
          }else if(this.model.brdgrp.srm.djutyp == ''){
            this.typ1 = true 
            this.changeFormItemRequired('brdgrp.srm.djuusr', false)
            this.changeFormItemRequired('brdgrp.srm.djudat', false)
            this.changeFormItemRequired('brdgrp.srm.djuref', false)
          }
          else{
            this.typ1 = false
            this.changeFormItemRequired('brdgrp.srm.djuusr', true)
            this.changeFormItemRequired('brdgrp.srm.djudat', true)
            this.changeFormItemRequired('brdgrp.srm.djuref', true)
          }
81
        }
82 83
      }

84 85 86 87 88 89 90 91 92 93
    },
    methods:{...Event},
    created:function(){

    }
}
</script>
<style>

</style>