yxh
2023-05-17 f7aff93b978fb1563f56fcd901798acb841bed46
修改了财务差旅费审批
已修改2个文件
82 ■■■■ 文件已修改
src/views/project/travelexpenseslist/index.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/travelexpenseslist/index.vue
@@ -62,7 +62,7 @@
    <el-table border v-loading="loading" :data="reimbursementList" @selection-change="handleSelectionChange">
      <!-- <el-table-column type="selection" width="55" align="center" /> -->
      <el-table-column label="记录状态" align="center" prop="recordstatus" width="180">
      <el-table-column label="记录状态" align="center" prop="recordstatus" width="160">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" />
        </template>
@@ -73,18 +73,18 @@
          <dict-tag :options="dict.type.sys_travelexpensebelong" :value="scope.row.costtype" />
        </template>
      </el-table-column>-->
      <el-table-column label="申请时间" width="120" align="center" prop="createTime">
      <el-table-column label="申请时间" width="150" align="center" prop="createTime">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="经办人" width="120" align="center" prop="username">
      <el-table-column label="经办人" width="150" align="center" prop="username">
      </el-table-column><!--
      <el-table-column label="出差人" width="180" align="center" prop="travelers">
      </el-table-column>-->
      <el-table-column label="报销金额" width="120" align="center" prop="amountrequested">
      <el-table-column label="报销金额" width="150" align="center" prop="amountrequested">
      </el-table-column>
      <el-table-column label="出差事由" align="center" width="280" prop="reason">
      <el-table-column label="出差事由" align="center" width="500" prop="reason">
      </el-table-column>
      <!-- <el-table-column label="联系电话" width="120" align="center" prop="phone">
      </el-table-column>
@@ -94,9 +94,9 @@
      </el-table-column>
      <el-table-column label="报销合计" align="center" prop="financechecher"/>-->
      <!-- <el-table-column label="财务审核" width="120" align="center" prop="financechecher" /> -->
      <el-table-column label="捐献者" width="120" align="center" prop="donorname">
      <el-table-column label="捐献者" width="150" align="center" prop="donorname">
      </el-table-column>
      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="300">
      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
            icon="el-icon-upload2" @click="handleup(scope.row)">上报</el-button>
@@ -168,6 +168,13 @@
                <el-option v-for="dict in dict.type.sys_recordstatus" :key="dict.value" :label="dict.label"
                  :value="dict.value" />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="20">
            <el-form-item label="出差事由" prop="reason">
              <el-input v-model="form.reason" placeholder="出差事由" />
            </el-form-item>
          </el-col>
        </el-row>
@@ -649,7 +656,6 @@
    "sys_travelexpensebelong",
    "sys_traffictype",
    "sys_area_name",
    "sys_traffictype"
  ],
  data() {
    return {
@@ -925,34 +931,29 @@
        row.endtime != null
      ) {
        //计算天数
        row.days = 1 + Math.floor(Math.abs(Date.parse(row.starttime) - Date.parse(row.endtime)) / (1099 * 3699 * 24))
        /*let aDate, oDate1, oDate2, Date_end,Date_start;
        Date_end = row.endtime.split(" "); //将时间以空格划分为两个数组  第一个数组是 2019-05-20 第二个数组是 00:00:00
        aDate = Date_end[0].split("-"); //获取第一个数组的值
        oDate1 = new Date(aDate[0], aDate[1], aDate[2]);  //将前半个数组以-拆分,每一个是一个数值
        Date_start = row.starttime.split(" ");
        aDate = Date_start[0].split("-");
        oDate2 = new Date(aDate[0], aDate[1], aDate[2]);
        row.days = 1+parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24);    //把相差的毫秒数转换为天数
        */
        row.days = (Math.floor(Math.abs(Date.parse(row.starttime) - Date.parse(row.endtime)) / (1000 * 3600 * 24)) + 1).toString()
      } else {
        row.days = ''
        row.days = '';
      };
      //公杂费补助:杭州桐庐,建德,淳安60,杭州其他地区0,非杭州地区80
      if (row.destination2 != "") {
        var str = row.destination2;
        var tempStr = row.destination2;
        //验证城市
        ////if (str.indexOf("桐庐,建德,淳安") !== -1) { };
        if (str.includes("杭州")) { row.otherexpense = parseInt(row.days) * 0 }
        else if (str.includes("桐庐") || str.includes("建德") || str.includes("淳安")) { row.otherexpense = parseInt(row.days) * 60 }
        else { row.otherexpense = parseInt(row.days) * 80 };
        if (tempStr == "杭州") {
          row.otherexpense = '';
        }
        else if (tempStr == "杭州-桐庐" || tempStr == "杭州-建德" || tempStr == "杭州-淳安") {
          row.otherexpense = (parseInt(row.days) * 60).toString();
        }
        else {
          row.otherexpense = (parseInt(row.days) * 80).toString();
        };
      }
      //伙食费补助:城市(西藏,新疆,青海.120)(其他100)
      row.foodallowance = parseInt(row.days) * 100
      row.foodallowance = (parseInt(row.days) * 100).toString();
      //计算合计
      this.sumTotalFee();
@@ -994,6 +995,7 @@
          patowncode: this.$refs["residenceSelect_" + row.index].getQu(),
          standardlevel: this.standardlevel,
        };
        getTravelStandard(info)
          .then((response) => {
            let fee = 0;
@@ -1216,7 +1218,7 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "新增报销申请";
      this.dialogType = "edit";
@@ -1246,7 +1248,7 @@
        //获取报销明细信息
        getReimbursementdetaillist(ids).then((res) => {
          this.rbDetails = res.data;
          if (this.rbDetails.length==0) {this.addDetailRow(0);}
          if (this.rbDetails.length == 0) { this.addDetailRow(0); }
          //解析出差地址
          /*
          for (let i = 0; i < this.rbDetails.length; i++) {
@@ -1263,10 +1265,10 @@
        });
        //获取报销打款信息
        this.queryParamsPayee.rbid=ids;
        this.queryParamsPayee.rbid = ids;
        listReimbursementpayee(this.queryParamsPayee).then((res) => {
          this.rbPayees = res.rows;
          if (this.rbPayees.length==0) {this.addPayeeRow(0);}
          if (this.rbPayees.length == 0) { this.addPayeeRow(0); }
        });
      });
    },
@@ -1276,7 +1278,7 @@
      this.dialogType = "detail";
      this.title = "查看报销申请";
      this.reset();
      this.reset();
      this.open = true;
      const id = row.id || this.ids;
@@ -1312,10 +1314,10 @@
        });
        //账户        
        this.queryParamsPayee.rbid=ids;
        this.queryParamsPayee.rbid = ids;
        listReimbursementpayee(this.queryParamsPayee).then((res) => {
          this.rbPayees = res.rows;
          if (this.rbPayees.length==0) {this.addPayeeRow(0);}
          if (this.rbPayees.length == 0) { this.addPayeeRow(0); }
        });
      });
@@ -1346,11 +1348,11 @@
             });
             return;
           }
           let emptyStartTimeindex = this.rbDetails.findIndex(
             (item) => item.starttime == null || item.starttime == undefined || item.starttime == ""
           );
           if (emptyStartTimeindex > -1) {
             this.$message({
               message: "第" + (emptyStartTimeindex + 1) + "行出发日期为空",
@@ -1358,11 +1360,11 @@
             });
             return;
           }
           let emptyEndTimeindex = this.rbDetails.findIndex(
             (item) => item.endtime == null || item.endtime == undefined || item.endtime == ""
           );
           if (emptyEndTimeindex > -1) {
             this.$message({
               message: "第" + (emptyEndTimeindex + 1) + "行到达日期为空",
@@ -1370,7 +1372,7 @@
             });
             return;
           }           
          //费用归属
          let belongArr = this.dict.type.sys_travelexpensebelong;
          let costtypeindex = belongArr.findIndex(
@@ -1510,6 +1512,7 @@
        days: null,
        trafficexpense: 0,
        traffictype: null,
        traffictype2: null,
        cityfee: 0,
        hotelexpense: 0,
        invoicecount: null,
vue.config.js
@@ -34,7 +34,6 @@
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {        
        target:`http://localhost:8080`,
        //target: `http://192.168.2.3:8080`,
        //target:`http://116.62.18.175:8080`,
        //target: `https://slb.hospitalstar.com:9093`,
        changeOrigin: true,