|
@@ -1,6 +1,6 @@
|
|
// 分派计划
|
|
// 分派计划
|
|
<template>
|
|
<template>
|
|
- <div class="steel_inbound">
|
|
|
|
|
|
+ <div class="inwardOrder">
|
|
<div class="sache">
|
|
<div class="sache">
|
|
<el-input placeholder="请输入内容" v-model="inputText" clearable>
|
|
<el-input placeholder="请输入内容" v-model="inputText" clearable>
|
|
</el-input>
|
|
</el-input>
|
|
@@ -8,6 +8,25 @@
|
|
<i class="el-icon-search"></i>查询
|
|
<i class="el-icon-search"></i>查询
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 车辆信息 -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="车辆信息"
|
|
|
|
+ :visible.sync="dialogTableVisible"
|
|
|
|
+ :before-close="handleClose"
|
|
|
|
+ >
|
|
|
|
+ <el-input v-model="truckInput" style="width:250px"></el-input>
|
|
|
|
+ <el-button type="primary" @click="clickTruck">查询</el-button>
|
|
|
|
+ <dilTable
|
|
|
|
+ v-bind.sync="truck"
|
|
|
|
+ @radio-change="currentRadioChange1"
|
|
|
|
+ >
|
|
|
|
+ </dilTable>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="cancelUpdate()">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="updateTruckCapacity()"
|
|
|
|
+ >确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
@@ -22,28 +41,14 @@
|
|
>
|
|
>
|
|
物资详情
|
|
物资详情
|
|
</el-button>
|
|
</el-button>
|
|
- <!-- <el-button type="text" size="mini" @click="updatePlan(scope)">
|
|
|
|
|
|
+ <el-button type="text" size="mini" @click="updatePlan(scope)">
|
|
修改
|
|
修改
|
|
- </el-button> -->
|
|
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="text" size="mini" @click="deleteClick(scope)">
|
|
|
|
+ 删除
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- 车辆信息 -->
|
|
|
|
- <el-dialog
|
|
|
|
- title="车辆信息"
|
|
|
|
- :visible.sync="dialogTableVisible"
|
|
|
|
- :before-close="handleClose"
|
|
|
|
- >
|
|
|
|
- <dilTable
|
|
|
|
- v-bind.sync="truck"
|
|
|
|
- @radio-change="currentRadioChange1"
|
|
|
|
- ></dilTable>
|
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="cancelUpdate()">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="updateTruckCapacity()"
|
|
|
|
- >确 定</el-button
|
|
|
|
- >
|
|
|
|
- </span>
|
|
|
|
- </el-dialog>
|
|
|
|
<!-- 物资详情抽屉 -->
|
|
<!-- 物资详情抽屉 -->
|
|
<el-table-column type="expand" width="1">
|
|
<el-table-column type="expand" width="1">
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
@@ -83,6 +88,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
inputText: "",
|
|
inputText: "",
|
|
|
|
+ truckInput:null,
|
|
userCarrierId: "",
|
|
userCarrierId: "",
|
|
//是否弹出对话框
|
|
//是否弹出对话框
|
|
dialogTableVisible: false,
|
|
dialogTableVisible: false,
|
|
@@ -164,48 +170,73 @@ export default {
|
|
if (getCookie("orgCode") == "chengyunshang") {
|
|
if (getCookie("orgCode") == "chengyunshang") {
|
|
this.first.requestUrl =
|
|
this.first.requestUrl =
|
|
"/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
|
|
"/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
|
|
- getCookie("userId") +
|
|
|
|
|
|
+ getCookie("userId") + "&i=" +
|
|
new Date();
|
|
new Date();
|
|
this.second.requestUrl =
|
|
this.second.requestUrl =
|
|
"/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" +
|
|
"/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" +
|
|
- getCookie("userId") +
|
|
|
|
|
|
+ getCookie("userId") + "&i=" +
|
|
new Date();
|
|
new Date();
|
|
} else {
|
|
} else {
|
|
this.first.requestUrl =
|
|
this.first.requestUrl =
|
|
- "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4";
|
|
|
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4" + "&i=" +
|
|
|
|
+ new Date();
|
|
this.second.requestUrl =
|
|
this.second.requestUrl =
|
|
- "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5";
|
|
|
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5" + "&i=" +
|
|
|
|
+ new Date();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
- // //修改运力
|
|
|
|
- // updatePlan() {
|
|
|
|
- // if (this.capacityId == null) {
|
|
|
|
- // this.$message.error("未选中运力");
|
|
|
|
- // return;
|
|
|
|
- // }
|
|
|
|
- // this.axios
|
|
|
|
- // .post("/api/v1/oms/updateCapacityId", {
|
|
|
|
- // capacityId: this.capacityId,
|
|
|
|
- // orderId: this.orderId,
|
|
|
|
- // })
|
|
|
|
- // .then((res) => {
|
|
|
|
- // if (res.data.code == "200") {
|
|
|
|
- // this.$message.success("修改运力成功");
|
|
|
|
- // this.getRequestUrl();
|
|
|
|
- // this.dialogTableVisible = false;
|
|
|
|
- // } else {
|
|
|
|
- // this.$message.error("修改运力失败");
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // },
|
|
|
|
-
|
|
|
|
- // cancelUpdate() {
|
|
|
|
- // this.dialogTableVisible = false;
|
|
|
|
- // this.$message.info("取消修改运力");
|
|
|
|
- // },
|
|
|
|
handleClick() {
|
|
handleClick() {
|
|
this.getRequirementMaterial();
|
|
this.getRequirementMaterial();
|
|
|
|
+ this.getRequest()
|
|
|
|
+ },
|
|
|
|
+ handleClose(done){
|
|
|
|
+ done()
|
|
|
|
+ this.$message.info("取消修改运力")
|
|
|
|
+ },
|
|
|
|
+ currentRadioChange1(row){
|
|
|
|
+ console.log(row)
|
|
|
|
+ this.capacityId = row.capacityId
|
|
|
|
+ },
|
|
|
|
+ getTruckRequestUrl(){
|
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
|
+ getCookie("userId") + "&test=" + new Date();
|
|
|
|
+ } else {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&test=" + new Date();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //修改运输订单
|
|
|
|
+ updatePlan(scope){
|
|
|
|
+ this.getTruckRequestUrl()
|
|
|
|
+ this.orderId = scope.row.orderId
|
|
|
|
+ this.dialogTableVisible = true
|
|
|
|
+ console.log(scope.row.orderId)
|
|
|
|
+ },
|
|
|
|
+ updateTruckCapacity(){
|
|
|
|
+ if(this.capacityId == null){
|
|
|
|
+ this.$message.error("未选中运力")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.axios.post("/api/v1/oms/updateCapacityId",{
|
|
|
|
+ capacityId:this.capacityId,
|
|
|
|
+ orderId :this.orderId
|
|
|
|
+ }).then((res) =>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ this.$message.success("修改运力成功")
|
|
|
|
+ this.dialogTableVisible = false
|
|
|
|
+ this.getRequest()
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error("修改运力失败")
|
|
|
|
+ this.dialogTableVisible = false
|
|
|
|
+ this.getRequest()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ clickTruck(){
|
|
|
|
+ this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
|
|
},
|
|
},
|
|
getRequirementMaterial(row) {
|
|
getRequirementMaterial(row) {
|
|
// 记录重复点击次数
|
|
// 记录重复点击次数
|
|
@@ -240,24 +271,22 @@ export default {
|
|
console.log(res.data.data);
|
|
console.log(res.data.data);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- deletePlan(scope) {
|
|
|
|
- this.$confirm("是否删除", "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning",
|
|
|
|
- center: true,
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- this.axios
|
|
|
|
- .post(
|
|
|
|
- "/api/v1/bms/deleteTrainSettlement/" + scope.row.requirementId
|
|
|
|
- )
|
|
|
|
|
|
+ //删除运输订单
|
|
|
|
+ deleteClick(scope){
|
|
|
|
+ this.$confirm('是否删除?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
message: "删除成功!",
|
|
message: "删除成功!",
|
|
- });
|
|
|
|
|
|
+ });
|
|
|
|
+ this.getRequest()
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: "删除失败",
|
|
message: "删除失败",
|
|
@@ -265,19 +294,20 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- })
|
|
|
|
- .catch(() => {
|
|
|
|
|
|
+ }).catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
- type: "info",
|
|
|
|
- message: "删除操作已取消!",
|
|
|
|
- });
|
|
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消删除'
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
-.steel_inbound {
|
|
|
|
|
|
+.inwardOrder {
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-left: 20px;
|
|
.sache {
|
|
.sache {
|
|
padding: 1.25rem 0.375rem;
|
|
padding: 1.25rem 0.375rem;
|
|
.el-input {
|
|
.el-input {
|