|
@@ -23,7 +23,7 @@
|
|
|
placeholder="请输入内容"
|
|
|
v-model="inputTruck"
|
|
|
clearable
|
|
|
- style="width:200px"
|
|
|
+ style="width: 200px"
|
|
|
>
|
|
|
</el-input>
|
|
|
<el-button type="primary" class="btn" @click="onClickTruck">
|
|
@@ -185,7 +185,7 @@ import { getCookie } from "@/utils/util.js";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- shiyHeigth: 140,
|
|
|
+ shiyHeigth: 190,
|
|
|
isHeigth: true,
|
|
|
pageSize: 100,
|
|
|
isKuang: false,
|
|
@@ -195,25 +195,25 @@ export default {
|
|
|
// option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
|
|
|
requestUrl:
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId")
|
|
|
+ "",
|
|
|
},
|
|
|
option2: {
|
|
|
// option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
|
|
|
requestUrl:
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId")
|
|
|
+ "",
|
|
|
},
|
|
|
option3: {
|
|
|
// option3请求数据的地址
|
|
|
requestUrl:
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId"),
|
|
|
+ "",
|
|
|
selectionType: "select",
|
|
|
- mapList: []
|
|
|
+ mapList: [],
|
|
|
},
|
|
|
truck: {
|
|
|
requestUrl: "",
|
|
|
- selectionType: "radio"
|
|
|
+ selectionType: "radio",
|
|
|
},
|
|
|
activeName: "third",
|
|
|
//记录旧的row对象(已接收)
|
|
@@ -232,32 +232,75 @@ export default {
|
|
|
{
|
|
|
prop: "materialName",
|
|
|
label: "物资名称",
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
prop: "specificationModel",
|
|
|
label: "规格型号",
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
prop: "materialNumber",
|
|
|
label: "物资件数",
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
prop: "materialWeight",
|
|
|
label: "物资重量",
|
|
|
- width: 100
|
|
|
- }
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
],
|
|
|
tableData: [],
|
|
|
tableData1: [],
|
|
|
tableData2: [],
|
|
|
capacityId: null,
|
|
|
dialogTableVisible: false,
|
|
|
- orderId: null
|
|
|
+ orderId: null,
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ } else if (this.activeName == "second") {
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ } else {
|
|
|
+ this.option3.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ } else if (this.activeName == "second") {
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ } else {
|
|
|
+ this.option3.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
onClickTruck() {
|
|
|
if (getCookie("orgCode") == "chengyunshang") {
|
|
@@ -275,21 +318,39 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getRequestUrl() {
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
- this.option3.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&t=" +
|
|
|
- new Date();
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ this.option3.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ } else {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ this.option3.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&t=" +
|
|
|
+ new Date();
|
|
|
+ }
|
|
|
},
|
|
|
selectionChange(selection) {
|
|
|
this.option3.mapList = selection;
|
|
@@ -298,34 +359,34 @@ export default {
|
|
|
if (this.option3.mapList.length == 0) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "请先选择要关闭的订单!"
|
|
|
+ message: "请先选择要关闭的订单!",
|
|
|
});
|
|
|
} else {
|
|
|
this.$confirm("是否关闭这些订单", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true
|
|
|
+ center: true,
|
|
|
})
|
|
|
.then(() => {
|
|
|
//初始化maplist
|
|
|
var mapList = [];
|
|
|
- this.option3.mapList.forEach(item => {
|
|
|
+ this.option3.mapList.forEach((item) => {
|
|
|
//初始化mapItem
|
|
|
var mapItem = {
|
|
|
//销售订单物资中间表id
|
|
|
- orderId: 0
|
|
|
+ orderId: 0,
|
|
|
};
|
|
|
mapItem.orderId = item.orderId;
|
|
|
mapList.push(mapItem);
|
|
|
});
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "关闭成功!"
|
|
|
+ message: "关闭成功!",
|
|
|
});
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/batchCloseOrder", mapList)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.getRequestUrl();
|
|
|
}
|
|
@@ -334,7 +395,7 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "取消关闭!"
|
|
|
+ message: "取消关闭!",
|
|
|
});
|
|
|
});
|
|
|
}
|
|
@@ -386,9 +447,9 @@ export default {
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/updateCapacityId", {
|
|
|
capacityId: this.capacityId,
|
|
|
- orderId: this.orderId
|
|
|
+ orderId: this.orderId,
|
|
|
})
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.$message.success("修改运力成功");
|
|
|
this.getRequestUrl();
|
|
@@ -399,24 +460,46 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
onClick() {
|
|
|
- if (this.activeName == "first") {
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&con=" +
|
|
|
- this.inputText;
|
|
|
- } else if (this.activeName == "second") {
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&con=" +
|
|
|
- this.inputText;
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&con=" +
|
|
|
+ this.inputText;
|
|
|
+ } else if (this.activeName == "second") {
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&con=" +
|
|
|
+ this.inputText;
|
|
|
+ } else {
|
|
|
+ this.option3.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&con=" +
|
|
|
+ this.inputText;
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.option3.requestUrl =
|
|
|
- "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
- getCookie("userId") +
|
|
|
- "&con=" +
|
|
|
- this.inputText;
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&con=" +
|
|
|
+ this.inputText;
|
|
|
+ } else if (this.activeName == "second") {
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&con=" +
|
|
|
+ this.inputText;
|
|
|
+ } else {
|
|
|
+ this.option3.requestUrl =
|
|
|
+ "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&shipperId=1&carrierSsoId=" +
|
|
|
+ "" +
|
|
|
+ "&con=" +
|
|
|
+ this.inputText;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// -------查看物资详情 (已接收)
|
|
@@ -445,7 +528,7 @@ export default {
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
console.log("res.data.data", res.data.data);
|
|
|
this.tableData = res.data.data;
|
|
|
});
|
|
@@ -477,7 +560,7 @@ export default {
|
|
|
// 根据销售订单物资中间表id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
console.log("res.data.data", res.data.data);
|
|
|
this.tableData1 = res.data.data;
|
|
|
});
|
|
@@ -509,7 +592,7 @@ export default {
|
|
|
// 根据销售订单物资中间表id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.tableData2 = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -519,16 +602,16 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true
|
|
|
+ center: true,
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "关闭成功!"
|
|
|
+ message: "关闭成功!",
|
|
|
});
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.getRequestUrl();
|
|
|
}
|
|
@@ -537,11 +620,11 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "取消关闭!"
|
|
|
+ message: "取消关闭!",
|
|
|
});
|
|
|
});
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scode>
|