|
@@ -8,34 +8,35 @@
|
|
|
<i class="el-icon-search"></i>查询
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <template>
|
|
|
- <div>
|
|
|
<el-tabs v-model="activeName">
|
|
|
- <!-- 已接收 -->
|
|
|
- <el-tab-pane label="已接收" name="first">
|
|
|
- <dilTable v-bind.sync="first" ref="table">
|
|
|
- <el-table-column fixed="right" label="操作" width="50">
|
|
|
+ <!-- 未接收 -->
|
|
|
+ <el-tab-pane label="未接收" name="third">
|
|
|
+ <dilTable v-bind.sync="option3" ref="table2">
|
|
|
+ <el-table-column fixed="right" label="操作" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- @click="detailclick(scope.row)"
|
|
|
+ @click="detailclick2(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
>
|
|
|
物资详情
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="closeOrder(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 关闭订单
|
|
|
+ </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"
|
|
|
- >
|
|
|
+ <el-form label-position="center" inline class="demo-table-expand">
|
|
|
<div v-if="false">{{ props }}</div>
|
|
|
<div>
|
|
|
- <el-table :data="tableData" border>
|
|
|
+ <el-table :data="tableData2" border>
|
|
|
<el-table-column
|
|
|
v-for="(item, i) in tableHead"
|
|
|
:key="i"
|
|
@@ -50,13 +51,13 @@
|
|
|
</el-table-column>
|
|
|
</dilTable>
|
|
|
</el-tab-pane>
|
|
|
- <!-- 已拒绝 -->
|
|
|
- <el-tab-pane label="已拒绝" name="second">
|
|
|
- <dilTable v-bind.sync="second" ref="table1">
|
|
|
+ <!-- 已接收 -->
|
|
|
+ <el-tab-pane label="已接收" name="first">
|
|
|
+ <dilTable v-bind.sync="option1" ref="table">
|
|
|
<el-table-column fixed="right" label="操作" width="50">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- @click="detailclick1(scope.row)"
|
|
|
+ @click="detailclick(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
>
|
|
@@ -67,14 +68,10 @@
|
|
|
<!-- 物资详情抽屉 -->
|
|
|
<el-table-column type="expand" width="1">
|
|
|
<template slot-scope="props">
|
|
|
- <el-form
|
|
|
- label-position="center"
|
|
|
- inline
|
|
|
- class="demo-table-expand"
|
|
|
- >
|
|
|
+ <el-form label-position="center" inline class="demo-table-expand">
|
|
|
<div v-if="false">{{ props }}</div>
|
|
|
<div>
|
|
|
- <el-table :data="tableData1" border>
|
|
|
+ <el-table :data="tableData" border >
|
|
|
<el-table-column
|
|
|
v-for="(item, i) in tableHead"
|
|
|
:key="i"
|
|
@@ -89,13 +86,13 @@
|
|
|
</el-table-column>
|
|
|
</dilTable>
|
|
|
</el-tab-pane>
|
|
|
- <!-- 未接收 -->
|
|
|
- <el-tab-pane label="未接收" name="third">
|
|
|
- <dilTable v-bind.sync="third" ref="table2">
|
|
|
+ <!-- 已拒绝 -->
|
|
|
+ <el-tab-pane label="已拒绝" name="second">
|
|
|
+ <dilTable v-bind.sync="option2" ref="table1">
|
|
|
<el-table-column fixed="right" label="操作" width="50">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- @click="detailclick2(scope.row)"
|
|
|
+ @click="detailclick1(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
>
|
|
@@ -106,14 +103,10 @@
|
|
|
<!-- 物资详情抽屉 -->
|
|
|
<el-table-column type="expand" width="1">
|
|
|
<template slot-scope="props">
|
|
|
- <el-form
|
|
|
- label-position="center"
|
|
|
- inline
|
|
|
- class="demo-table-expand"
|
|
|
- >
|
|
|
+ <el-form label-position="center" inline class="demo-table-expand">
|
|
|
<div v-if="false">{{ props }}</div>
|
|
|
<div>
|
|
|
- <el-table :data="tableData2" border>
|
|
|
+ <el-table :data="tableData1" border>
|
|
|
<el-table-column
|
|
|
v-for="(item, i) in tableHead"
|
|
|
:key="i"
|
|
@@ -129,8 +122,6 @@
|
|
|
</dilTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -139,25 +130,25 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
inputText: "",
|
|
|
- first: {
|
|
|
- // first请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
|
|
|
+ option1: {
|
|
|
+ // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
|
|
|
requestUrl:
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
|
|
|
getCookie("userId"),
|
|
|
},
|
|
|
- second: {
|
|
|
- // second请求数据的地址,承运商暂时设置为默认(运输订单状态为)
|
|
|
+ option2: {
|
|
|
+ // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
|
|
|
requestUrl:
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
|
|
|
getCookie("userId"),
|
|
|
},
|
|
|
- third: {
|
|
|
- // second请求数据的地址
|
|
|
+ option3: {
|
|
|
+ // option3请求数据的地址
|
|
|
requestUrl:
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
|
|
|
getCookie("userId"),
|
|
|
},
|
|
|
- activeName: "first",
|
|
|
+ activeName: "third",
|
|
|
//记录旧的row对象(已接收)
|
|
|
oldRow: "",
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
|
|
@@ -167,9 +158,9 @@ export default {
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
|
|
|
oldRowCount1: 1,
|
|
|
//记录旧的row对象(未接收)
|
|
|
- oldRow1: "",
|
|
|
+ oldRow2: "",
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
|
|
|
- oldRowCount1: 1,
|
|
|
+ oldRowCount2: 1,
|
|
|
tableHead: [
|
|
|
{
|
|
|
prop: "materialName",
|
|
@@ -219,7 +210,7 @@ export default {
|
|
|
this.input;
|
|
|
}
|
|
|
},
|
|
|
- // -------查看物资详情(已接收)
|
|
|
+ // -------查看物资详情 (已接收)
|
|
|
detailclick(row) {
|
|
|
// 记录重复点击次数
|
|
|
if (this.oldRow === row) {
|
|
@@ -242,10 +233,11 @@ export default {
|
|
|
}
|
|
|
// 重置上一个点击对象
|
|
|
this.oldRow = row;
|
|
|
- // 根据销售订单物资中间表id查询物资信息
|
|
|
+// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
- .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
+ .post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
.then((res) => {
|
|
|
+ console.log("res.data.data",res.data.data)
|
|
|
this.tableData = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -277,6 +269,7 @@ export default {
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/getOrderMaterialList?orderId=" + row.orderId)
|
|
|
.then((res) => {
|
|
|
+ console.log("res.data.data",res.data.data)
|
|
|
this.tableData1 = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -311,6 +304,18 @@ export default {
|
|
|
this.tableData2 = res.data.data;
|
|
|
});
|
|
|
},
|
|
|
+ //关闭选中行的订单
|
|
|
+ closeOrder(row){
|
|
|
+ this.$message.success('关闭成功');
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/oms/closeOrder?orderId=" + row.orderId)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.data.code == '200'){
|
|
|
+ this.$router.go(0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|