index.vue 5.36 KB
Newer Older
zhoukai committed
1
<template>
2 3
  <c-page title="到单">
    <div class="eContainer">
liuxin committed
4 5 6 7 8 9 10
      <!-- <c-bus-button :$pntvm="this"></c-bus-button> -->
      <c-function-btn
        :handleSubmit="handleSubmit"
        :handleCheck="handleCheck"
        :handleStash="handleStash"
      >
        </c-function-btn>
11 12 13 14 15 16 17 18 19 20 21 22 23 24
      <el-form
        :model="model"
        :rules="rules"
        ref="modelForm"
        label-width="150px"
        label-position="right"
        size="small"
        :validate-on-rule-change="false"
      >
      
        <c-tabs :value="tabVal" ref="elment" type="card" @tab-click="tabClick">
          <!--PD000047 -->
          <el-tab-pane label="单据概况" name="litdckp">
            <c-content>
25
              <m-litdckp :model="model" :codes="codes" v-on:changeShowDocpre="changeShowDocpre"/>
26 27 28 29 30
            </c-content>
          </el-tab-pane>

          <!--PD000137 -->
          <!-- <el-tab-pane label="ovwp" name="ovwp">
zhoukai committed
31 32
                <m-ovwp :model="model" :codes="codes"/>
           </el-tab-pane> -->
33 34

          <!--PD000062 -->
35
        <el-tab-pane label="单据详情" name="docpre" v-if="isShowDocpre">
36
            <m-docpre :model="model" :codes="codes" />
37 38
        </el-tab-pane>
          
39 40 41

          <!--PD000079 -->
          <!-- <el-tab-pane label="Shipping Detail" name="shpdet">
zhoukai committed
42 43 44
                <m-shpdet :model="model" :codes="codes"/>
           </el-tab-pane> -->

45
          <!-- <el-tab-pane label="或有" name="engp">
zhoukai committed
46
            <m-engp :model="model" :codes="codes" />
47
          </el-tab-pane> -->
zhoukai committed
48

liushikai committed
49
          <el-tab-pane label="费用及账务" name="setpan">
zhoukai committed
50 51 52
            <m-setpan :model="model" :codes="codes" />
          </el-tab-pane>

53
          <!-- <el-tab-pane label="分录" name="glepan">
zhoukai committed
54
            <m-glepan :model="model" :codes="codes" ref="glepan" />
55
          </el-tab-pane> -->
zhoukai committed
56

57
          <!-- <el-tab-pane label="保证金" name="ccvpan">
zhoukai committed
58
            <m-ccvpan :model="model" :codes="codes" />
59
          </el-tab-pane> -->
zhoukai committed
60 61 62 63

          <el-tab-pane label="附言" name="coninfp">
            <m-coninfp :model="model" :codes="codes" />
          </el-tab-pane>
64

zhoukai committed
65 66 67 68
          <el-tab-pane label="面函" name="docpan">
            <m-docpan :model="model" :codes="codes" ref="docpan" />
          </el-tab-pane>

liushikai committed
69
          <el-tab-pane label="授信额度" name="limitbody">
zhoukai committed
70 71 72
            <m-limitbody :model="model" :codes="codes" />
          </el-tab-pane>
        </c-tabs>
73
      </el-form>
74 75
         <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty">
	  </c-grid-ety-prompt-dialog>
76 77
    </div>
  </c-page>
zhoukai committed
78 79
</template>
<script>
80 81 82 83 84
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";
import Ditdck from "~/model/Ditdck";
import CommonProcess from "~/mixin/CommonProcess";
liuxin committed
85
import CommonFuncs from "~/mixin/CommonFuncs";
86
import Pattern from "~/model/Ditdck/Pattern";
zhoukai committed
87 88
import Default from "~/model/Ditdck/Default";
import Check from "~/model/Ditdck/Check";
89 90 91 92
import Litdckp from "./Litdckp";
import Ovwp from "./Ovwp";
import Docpre from "./Docpre";
import Shpdet from "./Shpdet";
liushikai committed
93
// import Limitbody from "./Limitbody";
zhoukai committed
94 95 96 97 98 99 100

import Glepan from "~/views/Public/Glepan";
import Setpan from "~/views/Public/Setpan";
import Docpan from "~/views/Public/Docpan";
import Engp from "~/views/Public/Engp";
import Ccvpan from "~/views/Public/Ccvpan";
import Coninfp from "~/views/Public/Coninfp";
liushikai committed
101
import Limitbody from "~/views/Public/Limitbody";
zhoukai committed
102 103

export default {
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
  name: "Infdid",
  components: {
    "m-litdckp": Litdckp,
    "m-ovwp": Ovwp,
    "m-docpre": Docpre,
    "m-shpdet": Shpdet,
    "m-engp": Engp,
    "m-setpan": Setpan,
    "m-glepan": Glepan,
    "m-docpan": Docpan,
    "m-limitbody": Limitbody,
    "m-coninfp": Coninfp,
    "m-ccvpan": Ccvpan,
  },
  provide() {
    return {
      root: this,
    };
  },
liuxin committed
123
  mixins: [CommonProcess, CommonFuncs], // 里面包含了Default、Check等的公共处理
124 125
  data() {
    return {
126
      isShowDocpre:false,
127 128 129 130 131 132 133 134 135 136 137 138 139 140
      tabVal: "litdckp",
      trnName: "ditdck",
      model: new Ditdck().data,
      // checkRules: Check,
      defaultRules: Default,   
      pattern: Pattern,
      rules: null,
      codes: { ...CodeTable,
      invtypCodes:[
		{ label: "type1", value: "1" }
	], },
    };
  },
  methods: {
141
    
142 143 144
  },
  created: async function () {
    console.log("进入ditdck交易");
145 146 147 148 149 150 151 152 153 154
    let rtnmsg = await this.init(this.$route.query)
    if(rtnmsg.respCode == SUCCESS)
    {
       //TODO 处理数据逻辑
        console.log(rtnmsg)
        Utils.copyValueFromVO(this.model,rtnmsg.data)
        console.log(this.model);
        if(this.isInDisplay){
            this.restoreDisplay()
        }
zhoukai committed
155
    }
liuxin committed
156 157 158
    if(this.model.bddgrp.rec.dscinsflg == "X"){
        this.isShowDocpre = true;
    }
159 160 161 162 163 164 165 166 167 168 169 170
    else
    {
        this.$notify.error({title: '错误',message: '服务请求失败!'});
    }

    // console.log("进入ditdck交易");
    // let rtnmsg = await this.init({});
    // if (rtnmsg.respCode == SUCCESS) {
    //   Utils.copyValueFromVO(this.model, rtnmsg.data);
    // } else {
    //   this.$notify.error({ title: "错误", message: "服务请求失败!" });
    // }
171
  },
172 173 174 175 176
  methods: {
      changeShowDocpre(val) {
          this.isShowDocpre = val
      }
  }
177
};
zhoukai committed
178 179 180
</script>
<style>
</style>