|
@@ -11,7 +11,6 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
-
|
|
|
|
<el-tab-pane label="待分解" name="second">
|
|
<el-tab-pane label="待分解" name="second">
|
|
<dilTable v-bind.sync="second" ref="table1">
|
|
<dilTable v-bind.sync="second" ref="table1">
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
@@ -25,64 +24,63 @@
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- 物资详情抽屉 -->
|
|
|
|
- <el-table-column type="expand" width="1">
|
|
|
|
- <template slot-scope="props">
|
|
|
|
- <el-form label-position="center" inline class="demo-table-expand">
|
|
|
|
- <div v-if="false">{{ props }}</div>
|
|
|
|
- <div>
|
|
|
|
- <el-table :data="tableData" border >
|
|
|
|
- <el-table-column
|
|
|
|
- v-for="(item, i) in tableHead"
|
|
|
|
- :key="i"
|
|
|
|
- :prop="item.prop"
|
|
|
|
- :label="item.label"
|
|
|
|
- :width="item.width"
|
|
|
|
- ></el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- </el-form>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
</dilTable>
|
|
</dilTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="已分解" name="third">
|
|
<el-tab-pane label="已分解" name="third">
|
|
<dilTable v-bind.sync="third" ref="table2">
|
|
<dilTable v-bind.sync="third" ref="table2">
|
|
- <el-table-column fixed="right" label="操作" width="150">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="mini" @click="desponsePlan(scope)">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="desponsePlan(scope)"
|
|
|
|
+ >
|
|
继续分解
|
|
继续分解
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="text" size="mini" @click="getPlanOrder(scope)">
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="getPlanOrder(scope)"
|
|
|
|
+ >
|
|
运单
|
|
运单
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="closePlanOrder(scope)"
|
|
|
|
+ >
|
|
|
|
+ 关闭计划
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <!-- 物资详情抽屉 -->
|
|
|
|
+ <el-table-column type="expand" width="1">
|
|
|
|
+ <template slot-scope="props">
|
|
|
|
+ <el-form
|
|
|
|
+ label-position="center"
|
|
|
|
+ inline
|
|
|
|
+ class="demo-table-expand"
|
|
|
|
+ >
|
|
|
|
+ <div v-if="false">{{ props }}</div>
|
|
|
|
+ <div>
|
|
|
|
+ <el-table :data="tableData" border>
|
|
|
|
+ <el-table-column
|
|
|
|
+ v-for="(item, i) in tableHead"
|
|
|
|
+ :key="i"
|
|
|
|
+ :prop="item.prop"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :width="item.width"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- 物资详情抽屉 -->
|
|
|
|
- <el-table-column type="expand" width="1">
|
|
|
|
- <template slot-scope="props">
|
|
|
|
- <el-form label-position="center" inline class="demo-table-expand">
|
|
|
|
- <div v-if="false">{{ props }}</div>
|
|
|
|
- <div>
|
|
|
|
- <el-table :data="tableData" border >
|
|
|
|
- <el-table-column
|
|
|
|
- v-for="(item, i) in tableHead"
|
|
|
|
- :key="i"
|
|
|
|
- :prop="item.prop"
|
|
|
|
- :label="item.label"
|
|
|
|
- :width="item.width"
|
|
|
|
- ></el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- </el-form>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
</dilTable>
|
|
</dilTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
-
|
|
|
|
|
|
+
|
|
<el-tab-pane label="已完成" name="four">
|
|
<el-tab-pane label="已完成" name="four">
|
|
- <dilTable v-bind.sync="four" ref="table3">
|
|
|
|
- </dilTable>
|
|
|
|
|
|
+ <dilTable v-bind.sync="four" ref="table3"> </dilTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
@@ -95,81 +93,145 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
inputText: "",
|
|
inputText: "",
|
|
- carrierId:40,
|
|
|
|
|
|
+ carrierId: 40,
|
|
first: {
|
|
first: {
|
|
// first请求数据的地址
|
|
// first请求数据的地址
|
|
- requestUrl:"",
|
|
|
|
|
|
+ requestUrl: ""
|
|
},
|
|
},
|
|
second: {
|
|
second: {
|
|
// second请求数据的地址
|
|
// second请求数据的地址
|
|
- requestUrl:
|
|
|
|
- ""
|
|
|
|
|
|
+ requestUrl: ""
|
|
},
|
|
},
|
|
third: {
|
|
third: {
|
|
// second请求数据的地址
|
|
// second请求数据的地址
|
|
- requestUrl:
|
|
|
|
- ""
|
|
|
|
|
|
+ requestUrl: ""
|
|
},
|
|
},
|
|
- four:{
|
|
|
|
- requestUrl:""
|
|
|
|
|
|
+ four: {
|
|
|
|
+ requestUrl: ""
|
|
},
|
|
},
|
|
activeName: "second",
|
|
activeName: "second",
|
|
- tableData: [],
|
|
|
|
|
|
+ tableData: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created(){
|
|
|
|
- if(getCookie("orgCode") == "chengyunshang"){
|
|
|
|
- this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + getCookie("userId")
|
|
|
|
- this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + getCookie("userId")
|
|
|
|
- this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + getCookie("userId")
|
|
|
|
- this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" + getCookie("userId")
|
|
|
|
- }else{
|
|
|
|
- this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1"
|
|
|
|
- this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2"
|
|
|
|
- this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3"
|
|
|
|
- this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4"
|
|
|
|
- }
|
|
|
|
|
|
+ created() {
|
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
|
+ this.first.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" +
|
|
|
|
+ getCookie("userId");
|
|
|
|
+ this.second.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" +
|
|
|
|
+ getCookie("userId");
|
|
|
|
+ this.third.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" +
|
|
|
|
+ getCookie("userId");
|
|
|
|
+ this.four.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" +
|
|
|
|
+ getCookie("userId");
|
|
|
|
+ } else {
|
|
|
|
+ this.first.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1";
|
|
|
|
+ this.second.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2";
|
|
|
|
+ this.third.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3";
|
|
|
|
+ this.four.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4";
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handleClick(tab, event) {
|
|
|
|
- console.log("zhix")
|
|
|
|
- this.getRequestUrl()
|
|
|
|
- this.getRequirementMaterial()
|
|
|
|
|
|
+ handleClick(tab, event) {
|
|
|
|
+ console.log("zhix");
|
|
|
|
+ this.getRequestUrl();
|
|
|
|
+ this.getRequirementMaterial();
|
|
},
|
|
},
|
|
- getRequestUrl(){
|
|
|
|
- if(getCookie("orgCode") == "chengyunshang"){
|
|
|
|
- this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" + getCookie("userId") + "&i=" + new Date()
|
|
|
|
- this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" + getCookie("userId") + "&i=" + new Date()
|
|
|
|
- this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" + getCookie("userId") + "&i=" + new Date()
|
|
|
|
- this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" + getCookie("userId") + "&i=" + new Date()
|
|
|
|
- }else{
|
|
|
|
- this.first.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" + "&i=" + new Date()
|
|
|
|
- this.second.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2" + "&i=" + new Date()
|
|
|
|
- this.third.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3" + "&i=" + new Date()
|
|
|
|
- this.four.requestUrl = "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" + "&i=" + new Date()
|
|
|
|
- }
|
|
|
|
|
|
+ getRequestUrl() {
|
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
|
+ this.first.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1&carrierId=" +
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ this.second.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2&carrierId=" +
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ this.third.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3&carrierId=" +
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ this.four.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4&carrierId=" +
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ } else {
|
|
|
|
+ this.first.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=1" +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ this.second.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=2" +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ this.third.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=3" +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ this.four.requestUrl =
|
|
|
|
+ "/api/v1/ams/getTruckPlanList?apiId=258&planStatus=4" +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ closePlanOrder(scope) {
|
|
|
|
+ console.log(scope.row.planId);
|
|
|
|
+ this.$confirm(
|
|
|
|
+ "确定关闭该计划吗?该操作会将计划下未接收订单全部关闭",
|
|
|
|
+ "是否继续?",
|
|
|
|
+ {
|
|
|
|
+ center: true,
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消"
|
|
|
|
+ }
|
|
|
|
+ ).then(() => {
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/v1/oms/closeInwardOrderByPlan?planId=" + scope.row.planId)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ this.$message.success("关闭成功");
|
|
|
|
+ this.getRequestUrl();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("关闭失败");
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message.error("关闭失败");
|
|
|
|
+ });
|
|
|
|
+ });
|
|
},
|
|
},
|
|
receiver(scope) {
|
|
receiver(scope) {
|
|
this.$confirm("是否接收", "提示", {
|
|
this.$confirm("是否接收", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
- center: true,
|
|
|
|
|
|
+ center: true
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/receiveInwardPlan/" + scope.row.planId)
|
|
.post("/api/v1/ams/receiveInwardPlan/" + scope.row.planId)
|
|
- .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.getRequestUrl()
|
|
|
|
|
|
+ this.getRequestUrl();
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: "接收失败",
|
|
message: "接收失败",
|
|
- type: "warning",
|
|
|
|
|
|
+ type: "warning"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -177,7 +239,7 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
type: "info",
|
|
type: "info",
|
|
- message: "接收操作已取消!",
|
|
|
|
|
|
+ message: "接收操作已取消!"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -195,24 +257,24 @@ export default {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
- center: true,
|
|
|
|
|
|
+ center: true
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
this.axios
|
|
this.axios
|
|
.post(
|
|
.post(
|
|
"/api/v1/bms/deleteTrainSettlement/" + scope.row.requirementId
|
|
"/api/v1/bms/deleteTrainSettlement/" + scope.row.requirementId
|
|
)
|
|
)
|
|
- .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.getRequestUrl()
|
|
|
|
|
|
+ this.getRequestUrl();
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: "删除失败",
|
|
message: "删除失败",
|
|
- type: "warning",
|
|
|
|
|
|
+ type: "warning"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -220,7 +282,7 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
type: "info",
|
|
type: "info",
|
|
- message: "删除操作已取消!",
|
|
|
|
|
|
+ message: "删除操作已取消!"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -230,7 +292,7 @@ export default {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
- center: true,
|
|
|
|
|
|
+ center: true
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
this.axios
|
|
this.axios
|
|
@@ -238,17 +300,17 @@ export default {
|
|
"/api/v1/ams/addFixedAmsDispatchSaleOrder",
|
|
"/api/v1/ams/addFixedAmsDispatchSaleOrder",
|
|
this.first.mapList
|
|
this.first.mapList
|
|
)
|
|
)
|
|
- .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.getRequestUrl()
|
|
|
|
|
|
+ this.getRequestUrl();
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: "下发失败",
|
|
message: "下发失败",
|
|
- type: "warning",
|
|
|
|
|
|
+ type: "warning"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -256,23 +318,23 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
type: "info",
|
|
type: "info",
|
|
- message: "取消下发!",
|
|
|
|
|
|
+ message: "取消下发!"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
-.inwardDisPlan{
|
|
|
|
|
|
+.inwardDisPlan {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
- .sache{
|
|
|
|
|
|
+ .sache {
|
|
padding: 1.25rem 0.375rem;
|
|
padding: 1.25rem 0.375rem;
|
|
.el-input {
|
|
.el-input {
|
|
width: 20%;
|
|
width: 20%;
|
|
margin-right: 1.25rem;
|
|
margin-right: 1.25rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+}
|
|
</style>
|
|
</style>
|