Wg.vue 3.38 KB
<template>
  <div class="eibs">
    <c-col :span="24" style="margin-top: 20px">
      <c-col :span="12" class="col-left">
        <el-form-item label="申报类型" label-width="120px" prop="bopmod.szflg">
          <c-select
            v-model="model.bopmod.szflg"
            style="width: 100%"
            placeholder="请选择申报类型"
          >
            <el-option
              v-for="item in codes.szflg"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="7" :offset="1">
        <c-checkbox
          v-model="model.bopmod.basflg"
          :disabled="model.bopmod.szflg === '3' || model.bopmod.szflg === ''"
          >基础数据</c-checkbox
        >
      </c-col>
    </c-col>

    <c-col :span="12" class="col-left">
      <c-col :span="24">
        <el-form-item label="款项去向" prop="bopmod.acttyp" label-width="120px">
          <c-select
            v-model="model.bopmod.acttyp"
            style="width: 100%"
            placeholder="请选择"
            :disabled="
              model.bopmod.szflg === '3' ||
              model.bopmod.szflg === '2' ||
              model.bopmod.szflg === ''
            "
          >
            <el-option
              v-for="item in codes.acttyp"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="地区机构号"
          prop="bopmod.ownextkey"
          label-width="120px"
        >
          <c-select
            v-model="model.bopmod.ownextkey"
            style="width: 100%"
            placeholder="请选择"
            :disabled="model.bopmod.szflg === '3' || model.bopmod.szflg === ''"
          >
            <el-option
              v-for="item in codesOwnextkey"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import event from "../event";
export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event],
  data() {
    return {
      temp: "不申报",
      options: [
        {
          value: "1",
          label: "申报",
        },
        {
          value: "2",
          label: "不申报",
        },
      ],
      codesOwnextkey: [
        {
          value: "",
          label: "",
        },
      ],
    };
  },
  methods: {},
  created: function () {
    //给人民币申报赋值
    this.model.cnybop.cnyflg = "2";
    this.model.cnybop.traflg = "2";
    this.model.cnybop.libflg = "2";
    this.model.cnybop.vouflg = "2";
  },
  watch: {
    "model.bopmod.ownextkey": function () {
      if (this.model.bopmod.ownextkey != "") {
        var instName = window.sessionStorage.instName || "北京分行";
        this.codesOwnextkey[0].value = this.model.bopmod.ownextkey;
        this.codesOwnextkey[0].label = this.model.bopmod.ownextkey + instName;
      } else {
        this.codesOwnextkey[0].value = "";
        this.codesOwnextkey[0].label = "";
      }
    },
  },
};
</script>
<style>
</style>