djfDjSf.vue 9.05 KB
<!--
 * @Description  :收费表单组件
 * @Autor        : miaofang
 * @LastEditTime : 2023-05-17 16:47:37
-->
<template>
  <div class="registrationChargeInfo itemForm">
    <el-form :model="ruleForm" :rules="rules" ref="formList" label-width="135px" :key="key">
      <el-row>
        <el-col :span="8">
          <el-form-item prop="YSDM" class="borderTopNone">
            <span slot="label">
              要素代码: <br />
              <p class="label-detail">(YSDM)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.YSDM"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="YWH" class="borderTopNone">
            <span slot="label">
              业务号: <br />
              <p class="label-detail">(YWH)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.YWH"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="JFRY" class="borderTopNone">
            <span slot="label">
              计费人员: <br />
              <p class="label-detail">(JFRY)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.JFRY"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="JFRQ">
            <span slot="label">
              计费日期: <br />
              <p class="label-detail">(JFRQ)</p>
            </span>
            <el-date-picker :disabled="$store.state.business.Edit" type="datetime" clearable v-model="ruleForm.JFRQ"
              value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SFKMMC">
            <span slot="label">
              收费科目名称: <br />
              <p class="label-detail">(SFKMMC)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.SFKMMC"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SFEWSF">
            <span slot="label">
              是否额外收费: <br />
              <p class="label-detail">(SFEWSF)</p>
            </span>
            <el-select :disabled="$store.state.business.Edit" v-model="ruleForm.SFEWSF">
              <el-option v-for="item in dicData['A6']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="SFJS" :rules="{ type: 'number' }">
            <span slot="label">
              收费基数: <br />
              <p class="label-detail">(SFJS)</p>
            </span>
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
              v-model.number="ruleForm.SFJS" title="" type="number"
              v-only-number="{ max: 999999999999999, min: 0, precision: 4 }"></el-input-number>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SFLX">
            <span slot="label">
              收费类型: <br />
              <p class="label-detail">(SFLX)</p>
            </span>
            <el-select :disabled="$store.state.business.Edit" v-model="ruleForm.SFLX">
              <el-option v-for="item in dicData['A39']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="YSJE" :rules="{ type: 'number' }">
            <span slot="label">
              应收金额: <br />
              <p class="label-detail">(YSJE)</p>
            </span>
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
              v-model.number="ruleForm.YSJE" title="" type="number"
              v-only-number="{ max: 999999999999999, min: 0, precision: 4 }"></el-input-number>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="ZKHYSJE" :rules="{ type: 'number' }">
            <span slot="label">
              折扣后应收金额: <br />
              <p class="label-detail">(ZKHYSJE)</p>
            </span>
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
              v-model.number="ruleForm.ZKHYSJE" title="" type="number"
              v-only-number="{ max: 999999999999999, min: 0, precision: 4 }"></el-input-number>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SFRY">
            <span slot="label">
              收费人员: <br />
              <p class="label-detail">(SFRY)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.SFRY"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SFRQ">
            <span slot="label">
              收费日期: <br />
              <p class="label-detail">(SFRQ)</p>
            </span>
            <el-date-picker :disabled="$store.state.business.Edit" type="datetime" clearable v-model="ruleForm.SFRQ"
              value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="FFF">
            <span slot="label">
              付费方: <br />
              <p class="label-detail">(FFF)</p>
            </span>
            <el-select :disabled="$store.state.business.Edit" v-model="ruleForm.FFF">
              <el-option v-for="item in dicData['A33']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SJFFR">
            <span slot="label">
              实际付费人: <br />
              <p class="label-detail">(SJFFR)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.SJFFR"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="SSJE" :rules="{ type: 'number' }">
            <span slot="label">
              实收金额: <br />
              <p class="label-detail">(SSJE)</p>
            </span>
            <el-input-number controls-position="right" :disabled="$store.state.business.Edit"
              v-model.number="ruleForm.SSJE" title="" type="number"
              v-only-number="{ max: 999999999999999, min: 0, precision: 4 }"></el-input-number>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item prop="SFDW">
            <span slot="label">
              收费单位: <br />
              <p class="label-detail">(SFDW)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.SFDW"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item prop="QXDM">
            <span slot="label">
              区县代码: <br />
              <p class="label-detail">(QXDM)</p>
            </span>
            <el-input :disabled="$store.state.business.Edit" v-model="ruleForm.QXDM"></el-input>
          </el-form-item>
        </el-col>

      </el-row>
    </el-form>
    <message-tips ref="msg" />
  </div>
</template>
<script>
// 登记收费信息
import djfDjSf from "@/api/djfDjSf";
import ruleMixin from "@/mixins/ruleMixin.js";
export default {
  mixins: [ruleMixin],
  props: {
    bsmSjsb: {
      type: String,
      default: "",
    },
    bsmYwsjb: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      ruleForm: {
        YSDM: "",
        YWH: "",
        JFRY: "",
        JFRQ: "",
        SFKMMC: "",
        SFEWSF: "",
        SFJS: "",
        SFLX: "",
        YSJE: "",
        ZKHYSJE: "",
        SFRY: "",
        SFRQ: "",
        FFF: "",
        SJFFR: "",
        SSJE: "",
        SFDW: "",
        QXDM: "",
      },
    };
  },
  methods: {
    async featchData() {
      try {
        let { result: res } = await djfDjSf.getDjfDjSfById(this.bsmSjsb);
        this.ruleForm = res;
        //this.featchRule()
      } catch (error) {
        this.$refs.msg.messageShow();
      }
    },
    handleUpdateForm() {
      return new Promise(async (resolve) => {
        try {
          let res = await djfDjSf.updateDjfDjSf(this.ruleForm);
          // this.$refs['formList'].resetFields();
          resolve(res.code);
        } catch (error) {
          this.$refs.msg.messageShow();
        }
      });
    },
  },
};
</script>
<style scoped lang="scss">
@import "./css/itemForm.scss";
</style>