From 1511a7f94b1e3a88b4a54234ec144655a91eace7 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 13 十月 2026 09:26:53 +0800
Subject: [PATCH] 政策文件管理
---
src/views/project/travelexpensecheck/index.vue | 236 ++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 144 insertions(+), 92 deletions(-)
diff --git a/src/views/project/travelexpensecheck/index.vue b/src/views/project/travelexpensecheck/index.vue
index d390510..e2ccce5 100644
--- a/src/views/project/travelexpensecheck/index.vue
+++ b/src/views/project/travelexpensecheck/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+ <el-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">
@@ -25,23 +25,42 @@
</el-form-item>
</el-col>
<el-col :span="5">
+ <el-form-item align="left" label="涓氬姟缁�" prop="deptnos">
+ <el-select v-model="queryParams.deptnos" placeholder="璇烽�夋嫨妗堜緥鐘舵��">
+ <el-option v-for="item in deptList" :label="item.deptName" :value="item.deptId">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </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"
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
- </el-row>
- <el-row>
<el-col :span="5">
<el-form-item label="鎶ラ攢閲戦" prop="money" style="float: left">
<el-input v-model="queryParams.money" placeholder="璇疯緭鍏ョ敵璇蜂汉閲戦" clearable size="small"
@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" @blur="onpick"
- range-separator="鑷�" start-placeholder="鎶ラ攢鐢宠寮�濮嬫棩鏈�" end-placeholder="鎶ラ攢鐢宠缁撴潫鏃ユ湡"
+ <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="value1" type="daterange"
+ @blur="onpick" range-separator="鑷�" start-placeholder="鎶ラ攢鐢宠寮�濮嬫棩鏈�" end-placeholder="鎶ラ攢鐢宠缁撴潫鏃ユ湡"
@keyup.enter.native="handleQuery">
</el-date-picker>
</el-form-item>
@@ -71,16 +90,16 @@
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_travelexpensebelong" :value="scope.row.costtype" />
</template>
- </el-table-column>-->
- <el-table-column label="鎶ラ攢鍗曞彿" width="120" align="center" prop="bh" />
+</el-table-column>-->
+ <el-table-column label="鎶ラ攢鍗曞彿" width="150" align="center" prop="bh" />
<el-table-column label="鐢宠鏃ユ湡" width="120" align="center" prop="applyTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="鎶ラ攢閲戦" width="120" align="center" prop="amountrequested" />
- <el-table-column label="缁忓姙浜�" width="120" align="center" prop="username" />
- <el-table-column label="鐢宠鏉愭枡鐘舵��" width="140" align="center" prop="checkstatus">
+ <el-table-column label="缁忓姙浜�" width="100" align="center" prop="username" />
+ <el-table-column label="鏉愭枡棰勫鐘舵��" width="140" align="center" prop="checkstatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_stage_type" :value="scope.row.checkstatus" />
</template>
@@ -91,10 +110,10 @@
</template>
</el-table-column>
<el-table-column label="鍑哄樊浜嬬敱" align="center" prop="reason" />
- <el-table-column label="鎵�灞炵粍鍒�" width="120" align="center" prop="deptmentname" />
- <el-table-column label="缁勯暱" width="120" align="center" prop="managername" />
- <el-table-column label="鎹愮尞鑰�" width="120" align="center" prop="donorname" />
- <!--
+ <el-table-column label="鎵�灞炵粍鍒�" width="140" align="center" prop="deptmentname" />
+ <el-table-column label="缁勯暱" width="100" align="center" prop="managername" />
+ <el-table-column label="鎹愮尞鑰�" width="100" align="center" prop="donorname" />
+ <!--
<el-table-column label="鍑哄樊浜�" width="180" align="center" prop="travelers">
</el-table-column>
<el-table-column label="鑱旂郴鐢佃瘽" width="120" align="center" prop="phone">
@@ -103,14 +122,14 @@
</el-table-column>
<el-table-column label="閾惰鍗″彿" width="180" align="center" prop="bankcardno">
</el-table-column>
-
- <el-table-column label="缁勯暱瀹℃壒" align="center" prop="managername"/>
- <el-table-column label="涓氬姟鏍稿" align="center" prop="opochecher"/>
- <el-table-column label="涓氬姟瀹℃壒" align="center" prop="officedirector"/>
+
+ <el-table-column label="缁勯暱瀹℃壒" align="center" prop="managername"/>
+ <el-table-column label="涓氬姟鏍稿" align="center" prop="opochecher"/>
+ <el-table-column label="涓氬姟瀹℃壒" align="center" prop="officedirector"/>
<el-table-column label="璐㈠姟鏍稿" align="center" prop="financechecher"/>
<el-table-column label="璐㈠姟瀹℃牳" width="120" align="center" prop="financedirector"/>
-->
- <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width" width="270">
+ <el-table-column label="鎿嶄綔" align="center" fixed="right" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.checkFlag == 1"
@click="handleUpdate(scope.row)">瀹℃壒</el-button>
@@ -137,8 +156,8 @@
<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"
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="鐢宠鏃ユ湡">
+ <el-date-picker style="width: 100%" v-model="form.applyTime" :disabled="true" type="date" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" placeholder="鐢宠鏃ユ湡">
</el-date-picker>
</el-form-item>
</el-col>
@@ -184,7 +203,7 @@
<el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
<el-input v-model="form.phone" placeholder="鑱旂郴鐢佃瘽" />
</el-form-item>
- </el-col>
+ </el-col>
</el-row>
-->
<el-row>
@@ -208,7 +227,7 @@
<el-col :span="10">
<el-form-item label="澶у啓閲戦" prop="bigstrmoney">
<el-input v-model="form.bigstrmoney" placeholder="澶у啓閲戦" :disabled="true" />
- </el-form-item> </el-col><!--
+ </el-form-item> </el-col><!--
<el-col :span="6">
<el-form-item label="棰嗘閲戦" prop="amountrequested">
<el-input v-model="form.amountrequested" placeholder="棰嗘閲戦" />
@@ -285,8 +304,8 @@
);
}
}
- }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date"
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="寮�濮嬫棩鏈�" @blur="getallowance(scope.row)">
+ }" clearable size="small" style="width: 100%" v-model="scope.row.starttime" type="date" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" placeholder="寮�濮嬫棩鏈�" @blur="getallowance(scope.row)">
</el-date-picker>
</template>
</el-table-column>
@@ -301,8 +320,8 @@
);
}
}
- }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date"
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="缁撴潫鏃ユ湡" @blur="getallowance(scope.row)">
+ }" clearable size="small" style="width: 100%" v-model="scope.row.endtime" type="date" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" placeholder="缁撴潫鏃ユ湡" @blur="getallowance(scope.row)">
</el-date-picker>
</template>
</el-table-column>
@@ -345,10 +364,11 @@
</el-table-column>
<el-table-column prop="trafficexpense" label="浜ら�氳垂" align="center" width="80">
<template slot-scope="scope">
- <el-input v-model="scope.row.trafficexpense" placeholder="浜ら�氳垂" @blur="val => {
- sumTotalFee();
- }
- " />
+ <el-input v-model="scope.row.trafficexpense" placeholder="浜ら�氳垂" @blur="
+ val => {
+ sumTotalFee();
+ }
+ " />
</template>
</el-table-column>
<!--
@@ -365,44 +385,49 @@
-->
<el-table-column prop="hotelexpense" label="浣忓璐�" align="center" width="80">
<template slot-scope="scope">
- <el-input v-model="scope.row.hotelexpense" placeholder="浣忓璐�" @blur="val => {
- sumTotalFee();
- }
- " />
+ <el-input v-model="scope.row.hotelexpense" placeholder="浣忓璐�" @blur="
+ val => {
+ sumTotalFee();
+ }
+ " />
</template>
</el-table-column>
<el-table-column prop="foodexpenses" label="椁愯垂鎶ラ攢" align="center" width="80">
<template slot-scope="scope">
- <el-input v-model="scope.row.foodexpenses" placeholder="浼欓璐规姤閿�" @blur="val => {
- sumTotalFee();
- }
- " />
+ <el-input v-model="scope.row.foodexpenses" placeholder="浼欓璐规姤閿�" @blur="
+ val => {
+ sumTotalFee();
+ }
+ " />
</template>
</el-table-column>
<el-table-column prop="foodallowance" label="浼欓琛ュ姪" align="center" width="80">
<template slot-scope="scope">
- <el-input v-model="scope.row.foodallowance" placeholder="浼欓璐硅ˉ鍔�" @blur="val => {
- sumTotalFee();
- }
- " />
+ <el-input v-model="scope.row.foodallowance" placeholder="浼欓璐硅ˉ鍔�" @blur="
+ val => {
+ sumTotalFee();
+ }
+ " />
</template>
</el-table-column>
<el-table-column prop="otherexpense" label="鍏潅璐硅ˉ鍔�" align="center" width="80">
<template slot-scope="scope">
- <el-input v-model="scope.row.otherexpense" placeholder="鏉傝垂" @blur="val => {
- sumTotalFee();
- }
- " />
+ <el-input v-model="scope.row.otherexpense" placeholder="鏉傝垂" @blur="
+ val => {
+ sumTotalFee();
+ }
+ " />
</template>
</el-table-column>
<el-table-column prop="otherfeeamount" label="鍏朵粬璐圭敤" align="center" width="90">
<template slot-scope="scope">
- <el-input v-model="scope.row.otherfeeamount" placeholder="鍏朵粬璐圭敤" @blur="val => {
- sumTotalFee();
- }
- " />
+ <el-input v-model="scope.row.otherfeeamount" placeholder="鍏朵粬璐圭敤" @blur="
+ val => {
+ sumTotalFee();
+ }
+ " />
</template>
</el-table-column>
<el-table-column prop="departure" slot="" label="鍏朵粬璐圭敤璇存槑" align="center" width="120">
@@ -523,8 +548,9 @@
</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"
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="鎵撴鏃ユ湡" :disabled="true" @blur="getallowance(scope.row)">
+ <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" placeholder="鎵撴鏃ユ湡" :disabled="true"
+ @blur="getallowance(scope.row)">
</el-date-picker>
</template>
</el-table-column>
@@ -591,7 +617,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>
@@ -614,6 +640,7 @@
listbypowerone,
addShareData
} from "@/api/project/reimbursement";
+import { listDept } from "@/api/system/dept";
import {
provinceAndCityData,
regionData,
@@ -651,6 +678,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: {
@@ -668,6 +696,7 @@
],
data() {
return {
+ checkSubmitLoading: false,
checkObj: {
flowlevelone: null,
flowconclusion: null,
@@ -728,7 +757,7 @@
},
{
value: 3,
- label: "宸叉敹鍒版潗鏂�"
+ label: "宸叉敹鍒扮焊璐ㄦ潗鏂�"
}
],
// 鏌ヨ鍙傛暟
@@ -738,8 +767,11 @@
APPLICANT: null,
APPLICATIONBEGTIME: null,
APPLICATIONENDTIME: null,
- CHECKFLAG: 1
+ CHECKFLAG: 1,
+ money: null,
+ deptnos: null
},
+ deptList: [],
//鏌ヨ浠樻
queryParamsPayee: {
rbid: null
@@ -775,7 +807,9 @@
dialogType: "show"
};
},
- created() { },
+ created() {
+ this.listDept();
+ },
mounted() {
if (grtItem("travelexpensecheck")) {
this.queryParams = grtItem("travelexpensecheck");
@@ -787,6 +821,12 @@
selectapplication() {
this.queryParams.APPLICATIONBEGTIME = this.applyTime[0];
this.queryParams.APPLICATIONENDTIME = this.applyTime[1];
+ },
+ listDept() {
+ listDept({}).then(response => {
+ this.deptList = response.data;
+ this.loading = false;
+ });
},
getList() {
this.loading = true;
@@ -807,6 +847,7 @@
},
checksubmit() {
+ if (this.checkSubmitLoading) return;
let checkfundobj = {
flowconclusion: this.checkObj.flowlevelone,
flowcontent: this.checkObj.flowconclusion,
@@ -822,11 +863,18 @@
return;
}
+ this.checkSubmitLoading = true;
checkfund(checkfundobj).then(res => {
- this.reset();
- this.open = false;
- this.getList();
- this.$modal.msgSuccess("瀹℃牳瀹屾垚!");
+ this.checkSubmitLoading = false;
+ if (res.code == 200) {
+ this.reset();
+ this.open = false;
+ this.getList();
+ this.$modal.msgSuccess("瀹℃牳瀹屾垚!");
+ } else {
+ this.open = false;
+ this.$modal.msgError(res.msg || "鎿嶄綔澶辫触");
+ }
});
},
@@ -846,7 +894,26 @@
var aEle = document.createElement("a");
aEle.href =
curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
- aEle.click();
+ console.log(aEle.href);
+ // 娣诲姞Authorization澶撮儴
+ fetch(aEle.href, {
+ headers: this.headers
+ })
+ .then(response => {
+ // 灏嗘枃浠朵笅杞介摼鎺ヤ綔涓篵lob瀵硅薄杩涜涓嬭浇
+ return response.blob();
+ })
+ .then(blob => {
+ const url = window.URL.createObjectURL(new Blob([blob]));
+ console.log(url);
+ const link = document.createElement("a");
+ link.href = url;
+ const name = fileUrl["downloadName"];
+ link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
+ document.body.appendChild(link);
+ link.click();
+ link.parentNode.removeChild(link);
+ });
});
},
@@ -985,7 +1052,8 @@
APPLICANT: null,
APPLICATIONBEGTIME: null,
APPLICATIONENDTIME: null,
- CHECKFLAG: 1
+ CHECKFLAG: 1,
+ deptnos: null
}),
this.handleQuery();
},
@@ -1227,41 +1295,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