|
@@ -63,51 +63,16 @@
|
|
|
</el-tab-pane>
|
|
|
<!-- 已下发 -->
|
|
|
<el-tab-pane label="已下发" name="first">
|
|
|
- <dilTable v-bind.sync="first"></dilTable>
|
|
|
+ <dilTable v-bind.sync="first">
|
|
|
+ </dilTable>
|
|
|
</el-tab-pane>
|
|
|
<!-- 已接收 -->
|
|
|
<el-tab-pane label="已接收" name="Received">
|
|
|
- <dilTable v-bind.sync="Received"></dilTable>
|
|
|
+ <dilTable v-bind.sync="Received">
|
|
|
+ </dilTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- <el-dialog
|
|
|
- title="请选择车辆"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false"
|
|
|
- :destroy-on-close="true"
|
|
|
- width="30%"
|
|
|
- show-close
|
|
|
- modal
|
|
|
- lock-scroll
|
|
|
- >
|
|
|
- <el-drawer
|
|
|
- title="请选择车辆信息"
|
|
|
- :visible.sync="drawer"
|
|
|
- :direction="direction"
|
|
|
- :close-on-press-escape="false"
|
|
|
- :destroy-on-close="true"
|
|
|
- :wrapperClosable="false"
|
|
|
- modal
|
|
|
- show-close
|
|
|
- >
|
|
|
- <div class="drawer_top">
|
|
|
- <el-input placeholder="请输入内容" v-model="inputText" clearable>
|
|
|
- </el-input>
|
|
|
- <el-button type="primary" class="btn" @click="inputClick">
|
|
|
- <i class="el-icon-search"></i>查询
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div class="drawer_bottom">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="truck"
|
|
|
- @radio-change="currentRadioChange"
|
|
|
- ></dilTable>
|
|
|
- </div>
|
|
|
- </el-drawer>
|
|
|
- </el-dialog> -->
|
|
|
<el-drawer
|
|
|
title="请选择车辆信息"
|
|
|
:visible.sync="drawer"
|
|
@@ -149,25 +114,33 @@ export default {
|
|
|
//未下发的表格
|
|
|
option: {
|
|
|
requestUrl:
|
|
|
- "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + '',
|
|
|
+ "" ,
|
|
|
selectionType: "select",
|
|
|
},
|
|
|
//已下发的表格
|
|
|
first: {
|
|
|
requestUrl:
|
|
|
- "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" +'',
|
|
|
+ "" ,
|
|
|
},
|
|
|
//车辆信息的表格
|
|
|
truck: {
|
|
|
- requestUrl: "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
|
|
|
+ requestUrl: "" ,
|
|
|
// 控制显示当选列
|
|
|
selectionType: "radio",
|
|
|
},
|
|
|
Received:{
|
|
|
- requestUrl: "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" +'',
|
|
|
+ requestUrl: "",
|
|
|
},
|
|
|
+ oldRow:"",
|
|
|
+ oldRowCount:1,
|
|
|
+ oldRow1:"",
|
|
|
+ oldRowCount1:1,
|
|
|
+ oldRow2:"",
|
|
|
+ oldRowCount2:1,
|
|
|
//物资信息的数据
|
|
|
tableData: [],
|
|
|
+ tableData1:[],
|
|
|
+ tableData2:[],
|
|
|
//物资信息的表头
|
|
|
tableHead: [
|
|
|
{
|
|
@@ -203,14 +176,26 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created(){
|
|
|
- this.carrierUserId = getCookie('userId')
|
|
|
- console.log(this.carrierUserId)
|
|
|
- this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + this.carrierUserId ,
|
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId ,
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId ,
|
|
|
- this.truck.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.carrierUserId
|
|
|
+ this.createdLike()
|
|
|
},
|
|
|
methods: {
|
|
|
+ createdLike(){
|
|
|
+ if(getCookie("orgCode") == "chengyunshang"){
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
|
|
|
+ getCookie("userId");
|
|
|
+ this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + getCookie("userId")
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId")
|
|
|
+ this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + getCookie("userId")
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId")
|
|
|
+ }else{
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null ;
|
|
|
+ this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3"
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4"
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5"
|
|
|
+ }
|
|
|
+ },
|
|
|
handleClose(done){
|
|
|
if(this.capacityId == null){
|
|
|
done();
|
|
@@ -220,13 +205,6 @@ export default {
|
|
|
done();
|
|
|
}
|
|
|
},
|
|
|
- onclick(){
|
|
|
- if(this.input != ''){
|
|
|
- this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&con="+this.input +"&carrierId=" + getCookie('userId');
|
|
|
- }else{
|
|
|
- this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.userCarrierId
|
|
|
- }
|
|
|
- },
|
|
|
//下发
|
|
|
Issue() {
|
|
|
if (this.selectionList.length == 0) {
|
|
@@ -248,10 +226,10 @@ export default {
|
|
|
message: "下发成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + this.carrierUserId +"&test=1",
|
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId +"&test=1",
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId +"&test=1" ,
|
|
|
- this.truck.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.carrierUserId +"&test=1"
|
|
|
+ this.first.requestUrl = this.first.requestUrl + "&test=1"
|
|
|
+ this.option.requestUrl = this.option.requestUrl + "&test=1"
|
|
|
+ this.Received.requestUrl = this.Received.requestUrl + "&test=1"
|
|
|
+ this.truck.requestUrl = this.truck.requestUrl + "&test=1"
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -272,17 +250,21 @@ export default {
|
|
|
message: "添加成功!",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.first.requestUrl = this.first.requestUrl + "&test=1"
|
|
|
+ this.option.requestUrl = this.option.requestUrl + "&test=1"
|
|
|
+ this.Received.requestUrl = this.Received.requestUrl + "&test=1"
|
|
|
+ this.truck.requestUrl = this.truck.requestUrl + "&test=1"
|
|
|
} else if (this.index == 2) {
|
|
|
this.$message({
|
|
|
message: "修改成功!",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ this.first.requestUrl = this.first.requestUrl + "&test=1"
|
|
|
+ this.option.requestUrl = this.option.requestUrl + "&test=1"
|
|
|
+ this.Received.requestUrl = this.Received.requestUrl + "&test=1"
|
|
|
+ this.truck.requestUrl = this.truck.requestUrl + "&test=1"
|
|
|
}
|
|
|
- this.dialogVisible = false;
|
|
|
- this.option.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + this.carrierUserId +"&test=1",
|
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + this.carrierUserId +"&test=1",
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + this.carrierUserId +"&test=1" ,
|
|
|
- this.truck.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.carrierUserId +"&test=1"
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -299,13 +281,9 @@ export default {
|
|
|
},
|
|
|
//单选按钮选中的值
|
|
|
currentRadioChange(row) {
|
|
|
- this.capacityId = row.carrierId;
|
|
|
+ this.capacityId = row.capacityId;
|
|
|
this.capacityNumber = row.capacityNumber;
|
|
|
},
|
|
|
- //打开模态窗口
|
|
|
- // onDrawer() {
|
|
|
- // this.drawer = true;
|
|
|
- // },
|
|
|
//弹出消息窗口
|
|
|
addTruck(row, index) {
|
|
|
this.index = index;
|
|
@@ -343,15 +321,85 @@ export default {
|
|
|
this.oldRow = row;
|
|
|
this.materialDetails(row.orderId);
|
|
|
},
|
|
|
+ // 查看物资详情
|
|
|
+ detailclick1(row) {
|
|
|
+ console.log(row)
|
|
|
+ // 记录重复点击次数
|
|
|
+ if (this.oldRow1 === row) {
|
|
|
+ this.oldRowCount1 += 1;
|
|
|
+ }
|
|
|
+ // 切换当前详情表
|
|
|
+ this.$refs.table1.toggleRowExpansion(row);
|
|
|
+ // 打开前关闭上一个详情表
|
|
|
+ if (this.oldRow1 != "") {
|
|
|
+ if (this.oldRow1 != row) {
|
|
|
+ if (this.oldRowCount1 % 2 === 1) {
|
|
|
+ this.$refs.table1.toggleRowExpansion(this.oldRow1);
|
|
|
+ } else {
|
|
|
+ this.oldRowCount1 = 1;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.oldRow1 = null;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 重置上一个点击对象
|
|
|
+ this.oldRow1 = row;
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + row.orderId)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.tableData1 = res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ // 查看物资详情
|
|
|
+ detailclick2(row) {
|
|
|
+ // 记录重复点击次数
|
|
|
+ if (this.oldRow2 === row) {
|
|
|
+ this.oldRowCount2 += 1;
|
|
|
+ }
|
|
|
+ // 切换当前详情表
|
|
|
+ this.$refs.table2.toggleRowExpansion(row);
|
|
|
+ // 打开前关闭上一个详情表
|
|
|
+ if (this.oldRow2 != "") {
|
|
|
+ if (this.oldRow2 != row) {
|
|
|
+ if (this.oldRowCount2 % 2 === 1) {
|
|
|
+ this.$refs.table2.toggleRowExpansion(this.oldRow);
|
|
|
+ } else {
|
|
|
+ this.oldRowCount2 = 1;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.oldRow2 = null;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 重置上一个点击对象
|
|
|
+ this.oldRow2 = row;
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + row.orderId)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.tableData2 = res.data.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//框计算
|
|
|
onclick() {
|
|
|
- if (this.activeName == "option") {
|
|
|
- this.option.requestUrl =
|
|
|
- "/api/v1/oms/getOthersOrderMesToSend?apiId= &type=2&con=" +
|
|
|
- this.input;
|
|
|
- } else {
|
|
|
- this.first.requestUrl = "con=" + this.input;
|
|
|
+ if(this.inputText != null){
|
|
|
+ if(this.activeName == 'first'){
|
|
|
+ this.first.requestUrl = this.first.requestUrl + "&con=" + this.inputText
|
|
|
+ }else if(this.activeName = 'option'){
|
|
|
+ this.option.requestUrl = this.option.requestUrl + "&con=" + this.inputText
|
|
|
+ }else if(this.activeName = 'Received'){
|
|
|
+ this.Received.requestUrl = this.Received.requestUrl + "&con=" + this.inputText
|
|
|
+ }else{
|
|
|
+ this.truck.requestUrl = this.truck.requestUrl + "&con=" + this.inputText
|
|
|
}
|
|
|
+ }else{
|
|
|
+ this.createdLike()
|
|
|
+ }
|
|
|
},
|
|
|
//查看当前订单的物资信息
|
|
|
materialDetails(orderId) {
|