|
|
@@ -559,10 +559,15 @@
|
|
|
>批量删除</el-button
|
|
|
>
|
|
|
<!-- <el-button type="primary" plain size="small" :disabled="editDisabled">计算超期箱使费</el-button> -->
|
|
|
+ <el-button type="primary" plain size="small" :disabled="selectionfeedList.length == 0" @click="allClick('生成应付')"
|
|
|
+ >生成应付</el-button
|
|
|
+ >
|
|
|
<el-button type="primary" plain size="small" :disabled="selectionfeedList.length == 0" @click="allClick('D发票申请')"
|
|
|
>发票申请</el-button
|
|
|
>
|
|
|
- <el-button type="primary" plain size="small" :disabled="selectionfeedList.length" @click="allClick('D费用申请')">请核费用</el-button>
|
|
|
+ <el-button type="primary" plain size="small" :disabled="selectionfeedList.length == 0" @click="allClick('D费用申请')"
|
|
|
+ >请核费用</el-button
|
|
|
+ >
|
|
|
<el-button type="danger" plain size="small" :disabled="disabled || selectionfeecList.length == 0" @click="allClick('D撤销请核')"
|
|
|
>撤销请核</el-button
|
|
|
>
|
|
|
@@ -733,10 +738,15 @@
|
|
|
<el-button type="danger" plain size="small" :disabled="selectionfeecList.length == 0" @click="allClick('C费用批量删除')"
|
|
|
>批量删除</el-button
|
|
|
>
|
|
|
+ <el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0" @click="allClick('生成应收')"
|
|
|
+ >生成应收</el-button
|
|
|
+ >
|
|
|
<el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0" @click="allClick('C付费申请')"
|
|
|
>付费申请</el-button
|
|
|
>
|
|
|
- <el-button type="primary" plain size="small" :disabled="selectionfeedList.length" @click="allClick('C费用申请')">请核费用</el-button>
|
|
|
+ <el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0" @click="allClick('C费用申请')"
|
|
|
+ >请核费用</el-button
|
|
|
+ >
|
|
|
<el-button type="danger" plain size="small" :disabled="disabled || selectionfeecList.length == 0" @click="allClick('C撤销请核')"
|
|
|
>撤销请核</el-button
|
|
|
>
|
|
|
@@ -1209,6 +1219,7 @@ import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
import businessReports from "@/components/boxManagement/businessReports.vue";
|
|
|
import reports from "@/components/boxManagement/reports.vue";
|
|
|
+import { isProcurement } from "@/api/basicData/configuration";
|
|
|
import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
@@ -1219,6 +1230,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
owhyDialog: false,
|
|
|
+ userId: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id,
|
|
|
saberUserInfo: JSON.parse(localStorage.getItem("saber-userInfo")).content, // 当前登录人个人信息
|
|
|
selecPickList: [],
|
|
|
selecPerList: [],
|
|
|
@@ -3092,6 +3104,7 @@ export default {
|
|
|
cell: true,
|
|
|
type: "number",
|
|
|
controls: false,
|
|
|
+ precision: 0,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
@@ -3100,6 +3113,7 @@ export default {
|
|
|
cell: true,
|
|
|
type: "number",
|
|
|
controls: false,
|
|
|
+ precision: 0,
|
|
|
overHidden: true
|
|
|
},
|
|
|
{
|
|
|
@@ -3142,7 +3156,8 @@ export default {
|
|
|
updateFormKey: new Date().getTime(),
|
|
|
updateStationKey: new Date().getTime(),
|
|
|
deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
|
|
|
- fixData: true
|
|
|
+ fixData: true,
|
|
|
+ expenseApplication: 0
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
@@ -3173,6 +3188,11 @@ export default {
|
|
|
if (this.detailData.copyId) {
|
|
|
this.getCopydate(this.detailData.copyId);
|
|
|
}
|
|
|
+ isProcurement({ param: "expense.application" }).then(res => {
|
|
|
+ if (res.data.data) {
|
|
|
+ this.expenseApplication = res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
this.saveLocalCurrency(this.deptId);
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -4146,6 +4166,27 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ if (name == "生成应付") {
|
|
|
+ for (let item of this.selectionfeedList) {
|
|
|
+ let obj = {};
|
|
|
+ obj.pid = this.form.id;
|
|
|
+ obj.feesType = 1;
|
|
|
+ obj.dc = "D";
|
|
|
+ obj.feeId = item.feeId;
|
|
|
+ obj.feeCnName = item.feeCnName;
|
|
|
+ obj.feeCode = item.feeCode;
|
|
|
+ obj.unitNo = item.unitNo;
|
|
|
+ obj.curCode = item.curCode;
|
|
|
+ obj.exrate = item.exrate;
|
|
|
+ obj.quantity = item.quantity;
|
|
|
+ obj.price = item.price;
|
|
|
+ obj.amount = item.amount;
|
|
|
+ obj.amountCNY = item.amountCNY;
|
|
|
+ obj.amountUSD = item.amountUSD;
|
|
|
+ obj.remarks = item.remarks;
|
|
|
+ this.feeCenterListC.push({ $cellEdit: true, ...obj });
|
|
|
+ }
|
|
|
+ }
|
|
|
if (name == "C费用一键保存") {
|
|
|
if (!this.feeCenterListC.length) {
|
|
|
return this.$message.error("请添加数据");
|
|
|
@@ -4228,6 +4269,25 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ if (name == "生成应收") {
|
|
|
+ for (let item of this.selectionfeecList) {
|
|
|
+ let obj = {};
|
|
|
+ obj.pid = this.form.id;
|
|
|
+ obj.feeId = item.feeId;
|
|
|
+ obj.feeCnName = item.feeCnName;
|
|
|
+ obj.feeCode = item.feeCode;
|
|
|
+ obj.unitNo = item.unitNo;
|
|
|
+ obj.curCode = item.curCode;
|
|
|
+ obj.exrate = item.exrate;
|
|
|
+ obj.quantity = item.quantity;
|
|
|
+ obj.price = item.price;
|
|
|
+ obj.amount = item.amount;
|
|
|
+ obj.amountCNY = item.amountCNY;
|
|
|
+ obj.amountUSD = item.amountUSD;
|
|
|
+ obj.remarks = item.remarks;
|
|
|
+ this.feeCenterListD.push({ $cellEdit: true, ...obj });
|
|
|
+ }
|
|
|
+ }
|
|
|
if (name == "生成箱使费") {
|
|
|
let date = null;
|
|
|
if (this.form.tradingBoxItemsList.length > 0 && this.form.tradingBoxItemsList[0].rentEndDate) {
|
|
|
@@ -4357,6 +4417,15 @@ export default {
|
|
|
return this.$message.error("已申请费用,不允许重复申请");
|
|
|
}
|
|
|
}
|
|
|
+ if (
|
|
|
+ this.form.id &&
|
|
|
+ !(
|
|
|
+ this.selectionfeedList.filter(e => e.createUser == 0 || e.createUser == this.userId).length > 0 ||
|
|
|
+ this.roleName.indexOf("允许修改他人费用") >= 0
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ return this.$message.error("不允许申请他人费用");
|
|
|
+ }
|
|
|
this.$confirm("确定申请费用?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
@@ -4445,6 +4514,15 @@ export default {
|
|
|
return this.$message.error("已申请费用,不允许重复申请");
|
|
|
}
|
|
|
}
|
|
|
+ if (
|
|
|
+ this.form.id &&
|
|
|
+ !(
|
|
|
+ this.selectionfeecList.filter(e => e.createUser == 0 || e.createUser == this.userId).length > 0 ||
|
|
|
+ this.roleName.indexOf("允许修改他人费用") >= 0
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ return this.$message.error("不允许申请他人费用");
|
|
|
+ }
|
|
|
this.$confirm("确定申请费用?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
@@ -4483,7 +4561,7 @@ export default {
|
|
|
if (row.auditStatus == 0) {
|
|
|
return this.$message.error("未申请费用,不允许撤销");
|
|
|
}
|
|
|
- if (row.auditStatus > 2) {
|
|
|
+ if (row.auditStatus > 2 && this.expenseApplication == 1) {
|
|
|
return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
|
|
|
}
|
|
|
}
|
|
|
@@ -4525,7 +4603,7 @@ export default {
|
|
|
if (row.auditStatus == 0) {
|
|
|
return this.$message.error("未申请费用,不允许撤销");
|
|
|
}
|
|
|
- if (row.auditStatus > 2) {
|
|
|
+ if (row.auditStatus > 2 && this.expenseApplication == 1) {
|
|
|
return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
|
|
|
}
|
|
|
}
|