From e55484fc73e5d7dd3ae0a904a9d4eb56260cd6a4 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 13 十月 2023 10:31:13 +0800
Subject: [PATCH] 11
---
src/views/project/travelexpenseapply/travelexpensedetail/index.vue | 146 +++++++++++++++++++++++++-----------------------
1 files changed, 77 insertions(+), 69 deletions(-)
diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index b2a3e5a..bb80450 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -84,7 +84,7 @@
/>
</el-form-item>
</el-col>
- <el-col :span="10">
+ <el-col :span="7">
<el-form-item label="澶у啓閲戦" prop="bigstrmoney">
<el-input
:disabled="true"
@@ -92,7 +92,7 @@
placeholder="鎶ラ攢澶у啓閲戦"
/>
</el-form-item> </el-col
- ><el-col :span="5">
+ ><el-col :span="4">
<el-form-item label="瀹℃牳鐘舵��" prop="flowlevel">
<el-select
v-model="form.recordstatus"
@@ -107,6 +107,23 @@
:label="dict.label"
:value="dict.value"
/>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="鐢宠鏉愭枡鐘舵��" prop="infoid">
+ <el-select
+ v-model="form.checkstatus"
+ filterable
+ placeholder="璇烽�夋嫨鐢宠鏉愭枡鐘舵��"
+ >
+ <el-option
+ v-for="item in baselisttages"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id"
+ >
+ </el-option>
</el-select>
</el-form-item>
</el-col>
@@ -900,6 +917,25 @@
v-if="operationType == 'check'"
>
<el-col :span="7">
+ <el-form-item label="鐢宠鏉愭枡鐘舵��" prop="infoid">
+ <el-radio-group
+ v-model="form.checkstatus"
+ align="left"
+ :disabled="userprofile.nickName != '闄堟厱鍗�'"
+ >
+ <el-radio label="1">寰呯敵璇锋潗鏂�</el-radio>
+ <el-radio label="2">鐢宠鏉愭枡閫氳繃绛夊緟鏉愭枡</el-radio>
+ <el-radio label="3">宸叉敹鍒版姤閿�鏉愭枡</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row
+ style="margin-top: 25px; margin-bottom: 5px"
+ v-if="operationType == 'check'"
+ >
+ <el-col :span="7">
<el-form-item label="瀹℃牳缁撴灉" align="left">
<el-radio-group v-model="checkObj.flowlevelone" align="left">
<el-radio label="1">閫氳繃</el-radio>
@@ -920,14 +956,14 @@
<el-button
type="primary"
@click="submitForm"
- v-if="operationType == 'edit'"
+ v-if="operationType == 'edit'||userprofile.nickName == '闄堟厱鍗�'"
>淇� 瀛�</el-button
>
<el-button
type="primary"
@click="checksubmit"
v-if="operationType == 'check'"
- >鎻� 浜�</el-button
+ >鎻愪氦瀹℃牳</el-button
>
<!--<el-button @click="cancel">閫� 鍑�</el-button>-->
</div>
@@ -946,8 +982,7 @@
<el-table-column prop="orderno" label="搴忓彿"> </el-table-column>
<el-table-column prop="personname" label="璐圭敤浜哄憳">
</el-table-column>
- <el-table-column prop="createTime" label="寮�濮嬫棩鏈�">
- </el-table-column>
+ <el-table-column prop="starttime" label="寮�濮嬫棩鏈�"> </el-table-column>
<el-table-column prop="endtime" label="缁撴潫鏃ユ湡"> </el-table-column>
<el-table-column prop="departure" label="鍑哄彂鍦�"> </el-table-column>
<el-table-column prop="destination" label="鍒拌揪鍦�"> </el-table-column>
@@ -1227,6 +1262,8 @@
queryParamsPayee: {
rbid: null
},
+ // 褰撳墠鐢ㄦ埛淇℃伅
+ userprofile: {},
// 琛ㄥ崟鍙傛暟
form: {},
reimbursementList: [],
@@ -1254,6 +1291,20 @@
rbDetails: [],
rbPayees: [],
arrr2: [],
+ baselisttages: [
+ {
+ id: 1,
+ name: "寰呯敵璇锋潗鏂�"
+ },
+ {
+ id: 2,
+ name: "鐢宠鏉愭枡閫氳繃绛夊緟鏉愭枡"
+ },
+ {
+ id: 3,
+ name: "宸叉敹鍒版姤閿�鏉愭枡"
+ }
+ ],
baselist: [],
donatorList: [],
standardlevel: 0,
@@ -1271,7 +1322,6 @@
persontype: null,
//鍒拌揪鍦�
arriveAddr: null,
-
headers: {
Authorization: "Bearer " + getToken()
},
@@ -1300,6 +1350,7 @@
//鑾峰彇鐧诲綍鑰呬俊鎭�
getUserProfile().then(response => {
+ this.userprofile = response.data;
this.defaultperson = response.data;
this.standardlevel = response.data.standardlevel;
console.log("this.defaultperson", this.defaultperson);
@@ -1348,6 +1399,9 @@
this.$refs["table"].doLayout();
});
},
+ destroyed() {
+ window.removeEventListener("beforeunload", e => this.beforeunloadFn(e));
+ }, //鐢熷懡鍛ㄦ湡 - 閿�姣佸畬鎴�
methods: {
// 娴忚鍣ㄩ〉闈㈠叧闂垨鍒锋柊鎻愮ず
@@ -2102,6 +2156,14 @@
//鎻愪氦瀹℃牳鎰忚
checksubmit() {
+ if (
+ this.form.checkstatus != 3 &&
+ this.userprofile.nickName == "闄堟厱鍗�" &&
+ this.checkObj.flowlevelone == 1
+ ) {
+ this.$modal.msgError("璇烽�夌‘璁ゆ潗鏂欑姸鎬佸凡鏀跺埌锛�");
+ return;
+ }
let checkfundobj = {
flowconclusion: this.checkObj.flowlevelone,
flowcontent: this.checkObj.flowconclusion,
@@ -2121,6 +2183,9 @@
this.reset();
this.open = false;
this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
+ if (this.userprofile.nickName == "闄堟厱鍗�") {
+ this.submitForm();
+ }
// 鍏抽棴绐楀彛
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
@@ -2131,63 +2196,6 @@
submitForm: debounce(function(data) {
this.$refs["form"].validate(valid => {
if (valid) {
- // idisabled=true;
- /**
- let indexErrTime = this.rbDetails.findIndex((item) => {
- if (item.endtime && item.starttime) {
- let d = this.$moment(item.endtime).diff(this.$moment(item.starttime), "d");
- if (d < 0) {
- return true;
- } else {
- return false;
- }
- } else {
- false;
- }
- });
-
- if (indexErrTime > -1) {
- this.$message({
- message: "绗�" + (indexErrTime + 1) + "琛屽埌杈炬棩鏈熸棭浜庡嚭鍙戞棩鏈�",
- type: "warning",
- });
- return;
- }
-
- let emptyStartTimeindex = this.rbDetails.findIndex(
- (item) => item.starttime == null || item.starttime == undefined || item.starttime == ""
- );
-
- if (emptyStartTimeindex > -1) {
- this.$message({
- message: "绗�" + (emptyStartTimeindex + 1) + "琛屽嚭鍙戞棩鏈熶负绌�",
- type: "warning",
- });
- return;
- }
-
- let emptyEndTimeindex = this.rbDetails.findIndex(
- (item) => item.endtime == null || item.endtime == undefined || item.endtime == ""
- );
-
- if (emptyEndTimeindex > -1) {
- this.$message({
- message: "绗�" + (emptyEndTimeindex + 1) + "琛屽埌杈炬棩鏈熶负绌�",
- type: "warning",
- });
- return;
- }
-
- //璐圭敤褰掑睘
- let belongArr = this.dict.type.sys_travelexpensebelong;
- let costtypeindex = belongArr.findIndex(
- (item) => this.form.costtype == item.value
- );
- if (costtypeindex > -1) {
- this.form.costtypename = belongArr[costtypeindex].label;
- }
- */
-
//绁ㄦ嵁鏂囦欢澶勭悊
const addnumber = this.rbPayees.reduce(
(amount, item) => amount + Number(item.amount),
@@ -2233,8 +2241,9 @@
addReimbursementpayee(rbPayees[i]);
}
}
-
- this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
+ if (this.userprofile.nickName != "闄堟厱鍗�") {
+ this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔燂紒");
+ }
this.open = false;
// 鍏抽棴绐楀彛
@@ -2541,7 +2550,7 @@
})
.then(() => {
console.log(row);
- let arrow=[];
+ let arrow = [];
arrow.push(row.id);
if (row.id !== null) {
delReimbursementpayee(arrow).then(res => {
@@ -2830,8 +2839,7 @@
"departure",
"destination",
"traffictype",
- "traffictype2",
- "departure"
+ "traffictype2"
];
columns.forEach((column, index) => {
if (index === 0) {
--
Gitblit v1.9.3