|
@@ -653,7 +653,7 @@
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
- @click="addRelevt"
|
|
|
+ @click="addRelevt4"
|
|
|
>添加费用</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -681,9 +681,10 @@
|
|
|
filterable
|
|
|
size="mini"
|
|
|
style="width: 160px"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(dict, index) in fMblnoOptions2"
|
|
|
+ v-for="(dict, index) in allfMblnoOptions"
|
|
|
:key="index.fId"
|
|
|
:label="dict.fName"
|
|
|
:value="dict.fId"
|
|
@@ -703,6 +704,7 @@
|
|
|
filterable
|
|
|
remote
|
|
|
placeholder="费用名称"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(dict, index) in fWbuOptions"
|
|
@@ -715,7 +717,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="fDc" label="收付" align="center" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select v-model="scope.row.fDc" placeholder="请选择">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.fDc"
|
|
|
+ placeholder="请选择"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
+ >
|
|
|
<el-option label="收" value="D"></el-option>
|
|
|
<el-option label="付" value="C"></el-option>
|
|
|
</el-select>
|
|
@@ -731,6 +737,7 @@
|
|
|
<el-select
|
|
|
v-model="scope.row.fFeeunitid"
|
|
|
placeholder="请选择计费单位"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
clearable
|
|
|
>
|
|
|
<el-option
|
|
@@ -752,6 +759,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.fBillingQty"
|
|
|
placeholder="请输入内容"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
@input="total(scope.row)"
|
|
|
v-input-limit="2"
|
|
|
></el-input>
|
|
@@ -767,6 +775,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.fUnitprice"
|
|
|
placeholder="请输入内容"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
@input="total(scope.row)"
|
|
|
v-input-limit="2"
|
|
|
></el-input>
|
|
@@ -781,6 +790,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
|
v-model="scope.row.fCurrency"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
</template>
|
|
@@ -794,6 +804,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
|
v-model="scope.row.fExrate"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
</template>
|
|
@@ -807,6 +818,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
|
v-model="scope.row.fAmount"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
</template>
|
|
@@ -820,6 +832,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
|
v-model="scope.row.fTaxrate"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
placeholder="请输入内容"
|
|
|
></el-input>
|
|
|
</template>
|
|
@@ -834,6 +847,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.remarks"
|
|
|
placeholder="请输入内容"
|
|
|
+ :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -848,14 +862,43 @@
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
fixed="right"
|
|
|
- width="100px"
|
|
|
+ width="240px"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
+ icon="el-icon-document-checked"
|
|
|
+ :disabled="
|
|
|
+ scope.row.fBillstatus == 6 || scope.row.fBillstatus == 3
|
|
|
+ "
|
|
|
+ @click.native.prevent="addFees(scope.row)"
|
|
|
+ >提交</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ :disabled="scope.row.fBillstatus == 3"
|
|
|
+ @click.native.prevent="fixFees(scope.row)"
|
|
|
+ >变更</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-document-delete"
|
|
|
+ :disabled="scope.row.fBillstatus < 6"
|
|
|
+ @click.native.prevent="revokeFees(scope.row)"
|
|
|
+ >撤销</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
icon="el-icon-delete"
|
|
|
- @click.native.prevent="deleteRow(scope.$index)"
|
|
|
+ :disabled="scope.row.fBillstatus == 6"
|
|
|
+ @click.native.prevent="
|
|
|
+ delFees(scope.$index, chiFeesList, scope.row)
|
|
|
+ "
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -1028,6 +1071,9 @@
|
|
|
<el-button type="primary" @click="submitForm('waybillDate')"
|
|
|
>回 单</el-button
|
|
|
>
|
|
|
+ <el-button type="primary" @click="driversubmitForm"
|
|
|
+ >提 交</el-button
|
|
|
+ >
|
|
|
<el-button type="success" @click="submitAllowChanges">修 改</el-button>
|
|
|
<el-button type="info" @click="submitSave">保 存</el-button>
|
|
|
<!-- <el-button type="warning" @click="submitRetreat">撤 回</el-button> -->
|
|
@@ -1044,9 +1090,10 @@ import {
|
|
|
} from "@/api/fleet/ftmsorderbillscars";
|
|
|
import { getBasicInformation } from "@/api/kaihe/basicdata/container";
|
|
|
import { listGoods } from "@/api/basicdata/goods";
|
|
|
-import { listCorps,selectCorpList } from "@/api/basicdata/corps";
|
|
|
+import { listCorps } from "@/api/basicdata/corps";
|
|
|
import { listFees } from "@/api/basicdata/fees";
|
|
|
import UploadFile from "@/components/Uploadfile";
|
|
|
+import { submit, changeFees ,revokeFees,deleteFees,driverSubmit} from "@/api/track/singleCost";
|
|
|
import Cookies from "js-cookie";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
export default {
|
|
@@ -1078,13 +1125,17 @@ export default {
|
|
|
type: Array,
|
|
|
default: [],
|
|
|
},
|
|
|
+ allfMblnoOptions: {
|
|
|
+ type: Array,
|
|
|
+ default: [],
|
|
|
+ },
|
|
|
},
|
|
|
components: {
|
|
|
UploadFile,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- chiFeesList:[],
|
|
|
+ chiFeesList: [],
|
|
|
// 控制弹出框显示隐藏
|
|
|
showDialog: false,
|
|
|
billTypeList: [],
|
|
@@ -1097,7 +1148,7 @@ export default {
|
|
|
username: null,
|
|
|
collapses: [],
|
|
|
fMblnoOptions: [],
|
|
|
- fMblnoOptions2: [],
|
|
|
+ fMblnoOptions2: [],
|
|
|
cntrId2List: [],
|
|
|
goodsOptions: [],
|
|
|
fWbuOptions: [],
|
|
@@ -1108,7 +1159,7 @@ export default {
|
|
|
headers: {
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
},
|
|
|
- jFeetunitOptions:[]
|
|
|
+ jFeetunitOptions: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1149,9 +1200,6 @@ export default {
|
|
|
listCorps().then((response) => {
|
|
|
this.fMblnoOptions = response.rows;
|
|
|
});
|
|
|
- // selectCorpList().then((response) => {
|
|
|
- // this.allfMblnoOptions = response;
|
|
|
- // });
|
|
|
listGoods().then((response) => {
|
|
|
this.goodsOptions = response.rows;
|
|
|
});
|
|
@@ -1163,6 +1211,23 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 新增附件上传
|
|
|
+ addRelevt4() {
|
|
|
+ this.feesList.push({
|
|
|
+ actId: "1090",
|
|
|
+ fCorpid: this.form.fCorpId,
|
|
|
+ fFeeid: "",
|
|
|
+ fDc: "",
|
|
|
+ fFeeunitid: "1",
|
|
|
+ fBillingQty: 0,
|
|
|
+ fUnitprice: 0,
|
|
|
+ fCurrency: "RMB",
|
|
|
+ fTaxrate: null,
|
|
|
+ fAmount: 0,
|
|
|
+ fExrate: 1,
|
|
|
+ remarks: "",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 新增附件上传
|
|
|
addRelevt() {
|
|
|
this.relevantAttachments.push({
|
|
|
attachUrl: null,
|
|
@@ -1234,8 +1299,10 @@ export default {
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.chiFeesList =this.chiFeesList.filter((e) => e.actId != "1080");
|
|
|
- this.addRelevt3();
|
|
|
+ this.chiFeesList = this.chiFeesList.filter(
|
|
|
+ (e) => e.actId != "1080"
|
|
|
+ );
|
|
|
+ this.addRelevt3();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
@@ -1488,7 +1555,6 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
- // this.$emit('getComponentsdate',this.chiFeesList)
|
|
|
},
|
|
|
// 弹出框关闭后触发
|
|
|
handleClose() {
|
|
@@ -1519,10 +1585,6 @@ export default {
|
|
|
let formData = new window.FormData();
|
|
|
formData.append("cars", JSON.stringify(this.form));
|
|
|
formData.append("attachs", JSON.stringify(this.relevantAttachments));
|
|
|
- formData.append(
|
|
|
- "fees",
|
|
|
- JSON.stringify(this.DList.concat(this.CList))
|
|
|
- );
|
|
|
formData.append("operationType", butType);
|
|
|
insertDriverFtmsorderbillscars(formData).then((response) => {
|
|
|
if (response.code == 200) {
|
|
@@ -1542,16 +1604,10 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
submitSave() {
|
|
|
- this.DList.map((e) => {
|
|
|
- return (e.fDc = "D");
|
|
|
- });
|
|
|
- this.CList.map((e) => {
|
|
|
- return (e.fDc = "C");
|
|
|
- });
|
|
|
let formData = new window.FormData();
|
|
|
formData.append("cars", JSON.stringify(this.form));
|
|
|
formData.append("attachs", JSON.stringify(this.relevantAttachments));
|
|
|
- formData.append("fees", JSON.stringify(this.DList.concat(this.CList)));
|
|
|
+ formData.append("fees", JSON.stringify(this.chiFeesList));
|
|
|
formData.append("operationType", "unLoadDate");
|
|
|
driverSaveFtmsorderbillscars(formData).then((response) => {
|
|
|
if (response.code == 200) {
|
|
@@ -1572,7 +1628,81 @@ export default {
|
|
|
this.msgSuccess("不允许修改");
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ driversubmitForm(){
|
|
|
+ if(this.chiFeesList.length==0){
|
|
|
+ return this.$message.error("确认费用不能为空");
|
|
|
+ }
|
|
|
+ let formData = new window.FormData();
|
|
|
+ formData.append("cars", JSON.stringify(this.form));
|
|
|
+ formData.append("attachs", JSON.stringify(this.relevantAttachments));
|
|
|
+ formData.append("fees", JSON.stringify(this.chiFeesList));
|
|
|
+ driverSubmit(formData).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.msgSuccess("提交成功");
|
|
|
+ this.showDialog=false;
|
|
|
+ this.$parent.getList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addFees(row) {
|
|
|
+ if (row.fBillstatus == 1) {
|
|
|
+ row.fBillstatus = 6;
|
|
|
+ }
|
|
|
+ if (row.fBillstatus == 6) {
|
|
|
+ return this.$message.error("已提交,请勿重复提交");
|
|
|
+ }
|
|
|
+ let formDatae = new window.FormData();
|
|
|
+ formDatae.append("status", 6);
|
|
|
+ formDatae.append("cars", JSON.stringify(this.form));
|
|
|
+ formDatae.append("ftmsorderbillsfees", JSON.stringify(row));
|
|
|
+ submit(formDatae).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success("提交成功");
|
|
|
+ this.$set(row, "fId", response.data.ftmsorderbillsfeesList.fId);
|
|
|
+ this.$set(
|
|
|
+ row,
|
|
|
+ "fBillstatus",
|
|
|
+ response.data.ftmsorderbillsfeesList.fBillstatus
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fixFees(row) {
|
|
|
+ if (row.fBillstatus == 0) {
|
|
|
+ return this.$message.error("已进行变更,请勿重复点击");
|
|
|
+ }
|
|
|
+ if (row.fId) {
|
|
|
+ changeFees(row.fId).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success("允许修改");
|
|
|
+ this.$set(row, "fBillstatus", 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delFees(index, rows, row) {
|
|
|
+ if (row.fBillstatus == 2 || row.fBillstatus == 3) {
|
|
|
+ deleteFees(row.fId).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ rows.splice(index, 1);
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else if (!row.fBillstatus){
|
|
|
+ rows.splice(index, 1);
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }else{
|
|
|
+ this.$message.error("不允许删除");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ revokeFees(row){
|
|
|
+ revokeFees(row.fId).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.$set(row, "fBillstatus", 3);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//单条订单调度提交
|
|
|
addscarsRow(row) {},
|
|
|
delscarsRow(index, rows, row) {
|
|
@@ -1604,8 +1734,8 @@ export default {
|
|
|
this.showDialog = this.addOrUpdateVisible;
|
|
|
},
|
|
|
feesList(newVal, oldVal) {
|
|
|
- this.chiFeesList=newVal
|
|
|
- }
|
|
|
+ this.chiFeesList = newVal;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|