From cef0ffebad11bf1444be8ff3d54172c83800c78d Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 07 八月 2023 16:39:29 +0800
Subject: [PATCH] yxh
---
src/views/project/travelexpenseslist/Modifydetails/index.vue | 202 +++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 165 insertions(+), 37 deletions(-)
diff --git a/src/views/project/travelexpenseslist/Modifydetails/index.vue b/src/views/project/travelexpenseslist/Modifydetails/index.vue
index be3fc18..e6243ef 100644
--- a/src/views/project/travelexpenseslist/Modifydetails/index.vue
+++ b/src/views/project/travelexpenseslist/Modifydetails/index.vue
@@ -439,7 +439,7 @@
</el-table>
</el-row>
- <el-row v-if="dialogType == 'detail'">
+ <el-row v-if="dialogType == 'detail' || dialogType == 'check'">
<el-table :data="fundflowList" border>
<el-table-column label="瀹℃牳浜�" align="center" width="120" prop="checkusername" />
<el-table-column label="瀹℃牳鏃ユ湡" align="center" width="160" prop="createTime" />
@@ -450,9 +450,27 @@
<el-table-column label="瀹℃牳澶囨敞" align="center" prop="flowcontent" />
</el-table>
</el-row>
+ <el-row style="margin-top: 25px; margin-bottom: 5px" v-if="dialogType == '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>
+ <el-radio label="2">涓嶉�氳繃</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row v-if="dialogType == 'check'">
+ <el-col :span="17">
+ <el-form-item label="瀹℃牳澶囨敞" align="left">
+ <el-input v-model="checkObj.flowconclusion" placeholder="澶囨敞" />
+ </el-form-item>
+ </el-col>
+ </el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" v-if="dialogType == 'edit'">淇� 瀛�</el-button>
+ <el-button type="primary" @click="checksubmit" v-if="dialogType == 'check'">鎻� 浜�</el-button>
<!--<el-button @click="cancel">閫� 鍑�</el-button>-->
</div>
</div>
@@ -485,11 +503,6 @@
<div v-else class="pdfimgmins">{{ hintitle }}</div>
</div>
</el-dialog>
-
- <!-- <div class="container">
- <pdf :src="iframeurl"></pdf>
- </div> -->
- <!-- <embed :src="iframeurl" type="application/pdf" width="1000" height="800" /> -->
</div>
</template>
@@ -511,6 +524,7 @@
updateReimbursement,
exportReimbursement,
getdownload,
+ checkfund,
fundSubmit
} from "@/api/project/reimbursement";
import {
@@ -666,7 +680,18 @@
headers: {
Authorization: "Bearer " + getToken()
- }
+ },
+
+ //瀹℃壒淇℃伅
+ checkObj: {
+ flowlevelone: null,
+ flowconclusion: null,
+ fundid: null,
+ },
+
+ //淇濆瓨鎸夐挳鎺у埗
+ idisabled: false,
+
};
},
@@ -720,6 +745,9 @@
else if (pos == 3) {
this.handleDetail(ids);
}
+ else if (pos == 4) {
+ this.handleCheck(ids);
+ }
},
methods: {
@@ -754,7 +782,8 @@
console.log(this.fileListto);
this.rbDetails[this.atpresent].annexfilesList = this.fileListto;
} else {
- this.$modal.msgError(response.msg);
+ console.log(response.msg);;
+ console.log(response.msg);
}
},
// 鐐瑰嚮绁ㄦ嵁
@@ -901,34 +930,36 @@
//璁$畻琛ュ姪
this.getallowance(row);
+
},
//璁$畻琛ュ姪
getallowance(row) {
- console.log("ro", row);
- //鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80
- if (row.destination != "") {
- var tempStr = row.destination;
+ if (row.persontype == "涓撹亴浜哄憳" || row.persontype == "鍗忚皟鍛�" || row.persontype == "绠$悊浜哄憳") {
+ //鍏潅璐硅ˉ鍔╋細鏉窞妗愬簮锛屽缓寰凤紝娣冲畨60锛屾澀宸炲叾浠栧湴鍖�0锛岄潪鏉窞鍦板尯80
+ if (row.destination != "") {
+ var tempStr = row.destination;
- //楠岃瘉鍩庡競
- if (tempStr == "鏉窞") {
- row.otherexpense = "";
- } else if (
- tempStr == "鏉窞-妗愬簮" ||
- tempStr == "鏉窞-寤哄痉" ||
- tempStr == "鏉窞-娣冲畨"
- ) {
- row.otherexpense = (parseInt(row.days) * 60).toString();
- } else {
- row.otherexpense = (parseInt(row.days) * 80).toString();
+ //楠岃瘉鍩庡競
+ 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).toString();
+
+ //璁$畻鍚堣
+ this.sumRowFee(row);
}
-
- //浼欓璐硅ˉ鍔╋細鍩庡競锛堣タ钘忥紝鏂扮枂锛岄潚娴�.120锛夛紙鍏朵粬100锛�
- row.foodallowance = (parseInt(row.days) * 100).toString();
-
- //璁$畻鍚堣
- this.sumRowFee(row);
},
getStandard(row) {
@@ -1210,11 +1241,12 @@
//鑾峰彇鎶ラ攢鏄庣粏淇℃伅
getReimbursementdetaillist(ids).then(res => {
this.rbDetails = res.data;
- console.log(this.rbDetails);
if (this.rbDetails.length == 0) {
this.addDetailRow(0);
}
+ //瀹炴椂鍚堣閲戦
+ //this.sumTotalFee();
for (let i = 0; i < this.rbDetails.length; i++) {
this.sumRowFee(this.rbDetails[i]);
//瑙f瀽鍑哄樊鍦板潃
@@ -1226,9 +1258,6 @@
qu: this.rbDetails[i].traveltownname,
}; */
}
-
- //瀹炴椂鍚堣閲戦
- //this.sumTotalFee();
});
//鑾峰彇鎶ラ攢鎵撴淇℃伅
@@ -1250,6 +1279,67 @@
this.reset();
this.open = true;
const id = ids || this.ids;
+
+ getReimbursement(id).then(response => {
+ this.form = response.data;
+ //绁ㄦ嵁
+ this.fileListto = this.form.annexfiles
+ ? this.form.annexfiles
+ .split(",")
+ .map(item => ({ url: item, name: item }))
+ : [];
+
+ //瀹℃牳鐘舵��
+ this.form.recordstatus = response.data.recordstatus + "";
+ let ids = response.data.id;
+ let listFundflowparams = {
+ fundid: ids,
+ fundtype: 1
+ };
+ listFundflow(listFundflowparams).then(res => {
+ this.fundflowList = res.rows;
+ });
+
+ //鎶ラ攢鏄庣粏
+ getReimbursementdetaillist(ids).then(res => {
+ this.rbDetails = res.data;
+ /*
+ for (let i = 0; i < this.rbDetails.length; i++) {
+ this.rbDetails[i].index = i;
+ this.rbDetails[i].searchAddress = {
+ sheng: this.rbDetails[i].travelprovincename,
+ shi: this.rbDetails[i].travelcityname,
+ qu: this.rbDetails[i].traveltownname,
+ };
+ }
+ */
+ //鍚堣璐圭敤
+ // if (this.rbDetails.length > 0) this.sumTotalFee();
+ for (let i = 0; i < this.rbDetails.length; i++) {
+ this.sumRowFee(this.rbDetails[i]);
+ }
+ });
+
+ //浠樻淇℃伅
+ this.queryParamsPayee.rbid = ids;
+ listReimbursementpayee(this.queryParamsPayee).then(res => {
+ this.rbPayees = res.rows;
+ if (this.rbPayees.length == 0) {
+ this.addPayeeRow(0);
+ }
+ });
+ });
+ },
+
+ /** 瀹℃牳鎸夐挳鎿嶄綔 */
+ handleCheck(ids) {
+ this.dialogType = "check";
+ this.title = "鎶ラ攢鐢宠璇︽儏";
+
+ this.reset();
+ this.open = true;
+ const id = ids || this.ids;
+ this.checkObj.fundid = id;
getReimbursement(id).then(response => {
this.form = response.data;
@@ -1285,9 +1375,13 @@
};
}
*/
- });
- if (this.rbDetails.length > 0) this.sumTotalFee();
+ //鍚堣璐圭敤
+ // if (this.rbDetails.length > 0) this.sumTotalFee();
+ for (let i = 0; i < this.rbDetails.length; i++) {
+ this.sumRowFee(this.rbDetails[i]);
+ }
+ });
//浠樻淇℃伅
this.queryParamsPayee.rbid = ids;
@@ -1300,10 +1394,36 @@
});
},
+ //鎻愪氦瀹℃牳鎰忚
+ checksubmit() {
+ let checkfundobj = {
+ flowconclusion: this.checkObj.flowlevelone,
+ flowcontent: this.checkObj.flowconclusion,
+ fundid: this.checkObj.fundid,
+ };
+
+ if (
+ checkfundobj.flowconclusion == null ||
+ checkfundobj.flowconclusion == undefined ||
+ checkfundobj.flowconclusion == ""
+ ) {
+ this.$modal.msgError("璇烽�夋嫨瀹℃牳缁撹鍚庡啀鎻愪氦瀹℃壒缁撴灉!");
+ return;
+ }
+
+ checkfund(checkfundobj).then((res) => {
+ this.reset();
+ this.open = false;
+ this.getList();
+ this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
+ });
+ },
+
/** 鎻愪氦淇濆瓨鎸夐挳 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
+ // idisabled=true;
/**
let indexErrTime = this.rbDetails.findIndex((item) => {
if (item.endtime && item.starttime) {
@@ -1412,6 +1532,9 @@
this.$modal.msgSuccess("淇敼鎶ラ攢鍗曚繚瀛樻垚鍔�!");
this.open = false;
+
+ // 鍏抽棴绐楀彛
+ this.$router.go(-1);
// this.getList();
// })
// .catch(err => {
@@ -1437,12 +1560,17 @@
this.$modal.msgSuccess("鏂板鎶ラ攢鍗曚繚瀛樻垚鍔�!");
this.open = false;
- // this.getList();
+
+ // 鍏抽棴绐楀彛
+ this.$router.go(-1);
+
})
.catch(err => {
this.$modal.msgError("鏂板鎶ラ攢鍗曚繚瀛樺け璐ワ紒");
});
}
+
+
}
});
},
@@ -1940,7 +2068,7 @@
border: 1px solid #dcdfe6;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
- box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix.
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix.
}
.pdftit {
--
Gitblit v1.9.3