From c75027743ea7c3ecc2d0885f01d11d2ad78679a3 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 23 十月 2026 14:23:26 +0800
Subject: [PATCH] Merge branch 'yxh' of http://116.62.18.175:6699/r/~yxh/opo-web
---
src/views/project/travelexpensecheck/index.vue | 85 ++++++++++++++++++++----------------------
1 files changed, 41 insertions(+), 44 deletions(-)
diff --git a/src/views/project/travelexpensecheck/index.vue b/src/views/project/travelexpensecheck/index.vue
index 5fcc7c6..8cbfa53 100644
--- a/src/views/project/travelexpensecheck/index.vue
+++ b/src/views/project/travelexpensecheck/index.vue
@@ -1,6 +1,7 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
+ <el-form
+ class="opo-query-form" :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
<el-row>
<el-col :span="5">
<el-form-item label="鎹愮尞妗堜緥" prop="name">
@@ -33,7 +34,16 @@
</el-form-item>
</el-col>
</el-row>
- <el-row>
+ <el-row> <el-col :span="5">
+ <el-form-item label="鎶ラ攢绫诲埆" prop="costtype">
+ <el-input v-model="queryParams.costtype" placeholder="璇烽�夋嫨鎶ラ攢绫诲埆" clearable size="small" v-if="0"
+ @keyup.enter.native="handleQuery" />
+ <el-select v-model="queryParams.costtype" placeholder="璇烽�夋嫨鎶ラ攢绫诲埆" clearable size="small">
+ <el-option v-for="dict in dict.type.sys_travelexpensebelong" :key="dict.value" :label="dict.label"
+ :value="dict.label" />
+ </el-select>
+ </el-form-item>
+ </el-col>
<el-col :span="5">
<el-form-item label="缁忓姙浜�" prop="username">
<el-input v-model="queryParams.username" placeholder="璇疯緭鍏ユ姤閿�浜�" clearable size="small"
@@ -46,9 +56,11 @@
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
+ </el-row>
+ <el-row>
<el-col :span="8">
<el-form-item label="鐢宠鏃ユ湡" prop="applyTime">
- <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="value1" type="daterange"
+ <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" v-model="value1" type="daterange"
@blur="onpick" range-separator="鑷�" start-placeholder="鎶ラ攢鐢宠寮�濮嬫棩鏈�" end-placeholder="鎶ラ攢鐢宠缁撴潫鏃ユ湡"
@keyup.enter.native="handleQuery">
</el-date-picker>
@@ -145,7 +157,7 @@
<el-row>
<el-col :span="5">
<el-form-item label="鐢宠鏃ユ湡" prop="applyTime">
- <el-date-picker style="width: 100%" v-model="form.applyTime" :disabled="true" type="date"
+ <el-date-picker style="width: 100%" v-model="form.applyTime" :disabled="true" type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="鐢宠鏃ユ湡">
</el-date-picker>
</el-form-item>
@@ -293,7 +305,7 @@
);
}
}
- }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date"
+ }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="寮�濮嬫棩鏈�" @blur="getallowance(scope.row)">
</el-date-picker>
</template>
@@ -309,7 +321,7 @@
);
}
}
- }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date"
+ }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="缁撴潫鏃ユ湡" @blur="getallowance(scope.row)">
</el-date-picker>
</template>
@@ -537,7 +549,7 @@
</template> </el-table-column><el-table-column prop="paiddate" slot="" label="鎵撴鏃ユ湡" fixed align="center"
width="150">
<template slot-scope="scope">
- <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date"
+ <el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.paiddate" type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true"
@blur="getallowance(scope.row)">
</el-date-picker>
@@ -564,7 +576,7 @@
<!-- <file-upload ref="fileUpload" :fileType=fileType :limit="1" :on-success="handleUploadSuccess"></file-upload> -->
<el-upload size="mini" class="upload-demo" :action="uploadFileUrl" :file-list="fileList" multiple
:limit="20" :headers="headers" :on-success="(response, file, fileList) =>
- uploadSccess(response, file, fileList)
+ uploadSccess(response, file, fileList)
" :on-preview="downFile" :disabled="dialogType == 'detail'" :on-error="handleUploadError"
:on-exceed="handleExceed" :on-remove="remove" accept="image/*,.pdf">
<el-button :disabled="dialogType == 'detail'" size="small" type="primary">涓婁紶</el-button>
@@ -606,7 +618,7 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="checksubmit" v-if="dialogType == 'edit'">淇� 瀛�</el-button>
+ <el-button type="primary" :loading="checkSubmitLoading" :disabled="checkSubmitLoading" @click="checksubmit" v-if="dialogType == 'edit'">淇� 瀛�</el-button>
<el-button @click="cancel">鍙� 娑�</el-button>
</div>
</el-dialog>
@@ -667,6 +679,7 @@
import { getUserProfile } from "@/api/system/user";
import { getToken } from "@/utils/auth";
import { setItem, grtItem, removeItem } from "@/utils/storage.js";
+import { moneySum } from "@/utils/money";
export default {
components: {
@@ -684,6 +697,7 @@
],
data() {
return {
+ checkSubmitLoading: false,
checkObj: {
flowlevelone: null,
flowconclusion: null,
@@ -834,6 +848,7 @@
},
checksubmit() {
+ if (this.checkSubmitLoading) return;
let checkfundobj = {
flowconclusion: this.checkObj.flowlevelone,
flowcontent: this.checkObj.flowconclusion,
@@ -849,7 +864,9 @@
return;
}
+ this.checkSubmitLoading = true;
checkfund(checkfundobj).then(res => {
+ this.checkSubmitLoading = false;
if (res.code == 200) {
this.reset();
this.open = false;
@@ -857,11 +874,7 @@
this.$modal.msgSuccess("瀹℃牳瀹屾垚!");
} else {
this.open = false;
- if (res.msg) {
- this.$modal.msgError("鎿嶄綔澶辫");
- } else {
- this.$modal.msgError(res.msg);
- }
+ this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
}
});
},
@@ -1283,41 +1296,25 @@
});
},
- //璁$畻璐圭敤鍚堣
+ //璁$畻璐圭敤鍚堣锛堥噾棰濅竴寰嬭蛋绮剧‘杩愮畻锛岀姝� parseFloat 绱姞锛�
sumTotalFee(scope) {
- let allSum = 0;
try {
for (let i = 0; i < this.rbDetails.length; i++) {
- let totalFee = 0;
+ const row = this.rbDetails[i];
//璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣
- if (!isNaN(parseFloat(this.rbDetails[i].trafficexpense))) {
- totalFee += parseFloat(this.rbDetails[i].trafficexpense);
- }
- if (!isNaN(parseFloat(this.rbDetails[i].cityfee))) {
- totalFee += parseFloat(this.rbDetails[i].cityfee);
- }
- if (!isNaN(parseFloat(this.rbDetails[i].hotelexpense))) {
- totalFee += parseFloat(this.rbDetails[i].hotelexpense);
- }
- if (!isNaN(parseFloat(this.rbDetails[i].otherexpense))) {
- totalFee += parseFloat(this.rbDetails[i].otherexpense);
- }
- if (!isNaN(parseFloat(this.rbDetails[i].foodexpenses))) {
- totalFee += parseFloat(this.rbDetails[i].foodexpenses);
- }
- if (!isNaN(parseFloat(this.rbDetails[i].foodallowance))) {
- totalFee += parseFloat(this.rbDetails[i].foodallowance);
- }
- if (!isNaN(parseFloat(this.rbDetails[i].otherfeeamount))) {
- totalFee += parseFloat(this.rbDetails[i].otherfeeamount);
- }
- this.rbDetails[i].total = parseFloat(totalFee).toFixed(2);
- this.$set(this.rbDetails, scope.$index, this.rbDetails[i]);
- if (!isNaN(parseFloat(this.rbDetails[i].total))) {
- allSum += parseFloat(this.rbDetails[i].total);
- }
+ const totalFee = moneySum([
+ row.trafficexpense,
+ row.cityfee,
+ row.hotelexpense,
+ row.otherexpense,
+ row.foodexpenses,
+ row.foodallowance,
+ row.otherfeeamount
+ ]);
+ row.total = totalFee.toFixed(2);
+ this.$set(this.rbDetails, scope.$index, row);
}
- this.form.amountrequested = allSum.toFixed(2);
+ this.form.amountrequested = moneySum(this.rbDetails, "total").toFixed(2);
this.form.bigstrmoney = this.convertCurrency(this.form.amountrequested);
} catch { }
},
--
Gitblit v1.9.3