liusheng
2023-05-08 e56129377bb4405425c50315dd4ffae1fbb27988
前端代码提交
已修改2个文件
64 ■■■■■ 文件已修改
src/api/project/reimbursementdetail.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/travelexpenseslist/index.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/project/reimbursementdetail.js
@@ -30,7 +30,7 @@
// /project/reimbursement/getRBDetailList/{rbid}
// 修改details列表
export function updateReimbursementdetaillist(data) {
export function addOrupdateReimbursementdetaillist(data) {
  return request({
    url: '/project/reimbursementdetail/updateRDlList',
    method: 'post',
src/views/project/travelexpenseslist/index.vue
@@ -495,22 +495,29 @@
                </el-select>
              </template>
            </el-table-column>
            <el-table-column prop="col_bank" slot="" label="收款银行" align="center" fixed width="260">
            <el-table-column prop="col_bank" slot="" label="收款银行" align="center" fixed width="200">
              <template slot-scope="scope">
                <el-input v-model="scope.row.col_bank" placeholder="收款银行" />
              </template>
            </el-table-column>
            <el-table-column prop="col_accounts" slot="" label="收款帐号" align="center" fixed width="230">
            <el-table-column prop="col_accounts" slot="" label="收款帐号" align="center" fixed width="200">
              <template slot-scope="scope">
                <el-input v-model="scope.row.col_accounts" placeholder="收款帐号" />
              </template>
              </template>
            </el-table-column>
            <el-table-column prop="col_date" slot="" label="付款日期" align="center" fixed width="150">
            <el-table-column prop="col_money" slot="" label="收款金额" align="center" fixed width="130">
              <template slot-scope="scope">
                <el-input v-model="scope.row.col_date" placeholder="付款日期" />
                <el-input v-model="scope.row.col_money" placeholder="收款金额" />
              </template>
            </el-table-column>
            <el-table-column prop="col_date" slot="" label="付款日期" fixed align="center" width="150">
              <template slot-scope="scope">
                <el-date-picker  clearable size="small" style="width: 100%" v-model="scope.row.col_date" type="date"
                  value-format="yyyy-MM-dd HH:mm:ss" placeholder="付款日期" @blur="getallowance(scope.row)">
                </el-date-picker>
              </template>
            </el-table-column>
            <el-table-column prop="col_illustrate" slot="" label="说明" align="center" fixed width="310">
            <el-table-column prop="col_illustrate" slot="" label="说明" align="center" fixed width="280">
              <template slot-scope="scope">
                <el-input v-model="scope.row.col_illustrate" placeholder="说明" />
              </template>
@@ -617,7 +624,7 @@
  listReimbursementdetailid,
  getReimbursementdetaillist,
  delReimbursementdetail,
  updateReimbursementdetaillist,
  addOrupdateReimbursementdetaillist,
  getTravelStandard,
} from "@/api/project/reimbursementdetail";
import { listFundflow } from "@/api/project/fundflow";
@@ -642,6 +649,7 @@
    "sys_travelexpensebelong",
    "sys_traffictype",
    "sys_area_name",
    "sys_traffictype"
  ],
  data() {
    return {
@@ -694,7 +702,8 @@
        destination2: null,
        uploadFlag: null,
        uploadTime: null,
        orderByColumn: "id",
       // orderByColumn: "createTime",
         orderByColumn: "id",
        isAsc: "desc",
      },
      queryParams2: {
@@ -807,6 +816,7 @@
      for (let i = 0; i < persontypeArr.length; i++) {
        this.tempArrr = [];
        listReportname(persontypeArr[i]).then((res) => {
          console.log(res);
          this.tempArrr = res.data;
          this.personList = this.personList.concat(this.tempArrr);
        });
@@ -876,6 +886,8 @@
    getUserList() {
      listUser().then((res) => {
        this.userlist = res.data;
      });
    },
    selectedTraveler() {
@@ -1122,6 +1134,7 @@
        this.reimbursementList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
@@ -1248,6 +1261,7 @@
          if (res.data.length == 0) {
            return;
          }
          this.applicationDetailArr = res.data;
          for (let i = 0; i < this.applicationDetailArr.length; i++) {
            debugger;
@@ -1391,30 +1405,36 @@
              this.applicationDetailArr[i].rbid = rbid;
            }
            updateReimbursement(this.form).then((response) => {
              updateReimbursementdetaillist(this.applicationDetailArr).then((response) => {
              addOrupdateReimbursementdetaillist(this.applicationDetailArr).then((response) => {
                //更新支付表信息
                for (let i = 0; i < this.applicationDetailArr2.length; i++) {
                  this.applicationDetailArr2[i].rbid = rbid;
                }
                addOrUpdateRBpayee(this.applicationDetailArr2);
                for (let i = 0; i < this.applicationDetailArr.length; i++) {
                  if (this.applicationDetailArr[i].rbid != null) {
                    updateReimbursementdetail(this.applicationDetailArr[i]);
                  } else {
                    this.applicationDetailArr[i].rbid = this.form.id;
                    addReimbursementdetail(this.applicationDetailArr[i]);
                  }
                }
                // for (let i = 0; i < this.applicationDetailArr.length; i++) {
                //   if (this.applicationDetailArr[i].rbid != null) {
                //     updateReimbursementdetail(this.applicationDetailArr[i]);
                //   } else {
                //     this.applicationDetailArr[i].rbid = this.form.id;
                //     addReimbursementdetail(this.applicationDetailArr[i]);
                //   }
                // }
                this.$modal.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              });
            });
            }).catch(err=>{
              console.log(err);
            })
          } else {
            this.form.recordstatus = -1;
            const applicationDetailArr = [...this.applicationDetailArr]
            const applicationDetailArr2 = [...this.applicationDetailArr2]
            addReimbursement(this.form).then((response) => {
              for (let i = 0; i < applicationDetailArr.length; i++) {
                  applicationDetailArr[i].rbid = response.data;
                }
              addOrupdateReimbursementdetaillist(applicationDetailArr).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
@@ -1433,8 +1453,9 @@
                  applicationDetailArr2[i].rbid = id;
                }
                addOrUpdateRBpayee(applicationDetailArr2);
              });
            });
              })
            })
          })
          }
        }
      });
@@ -1533,6 +1554,7 @@
        col_illustrate: null,
        col_orderno: null,
        col_personname2: null,
        col_money : null,
      };
      if (rowIndex == undefined || rowIndex == null || rowIndex < 0) {
        this.applicationDetailArr2.push(rowData);