|
@@ -10,15 +10,51 @@
|
|
<i class="el-icon-plus"></i>新增
|
|
<i class="el-icon-plus"></i>新增
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog title="车辆信息" :visible.sync="dialogTableVisible">
|
|
|
|
+ <dilTable
|
|
|
|
+ v-bind.sync="truck"
|
|
|
|
+ @radio-change="currentRadioChange1"
|
|
|
|
+ ></dilTable>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
|
|
|
|
+ <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
<div class="transportOrder_bottom">
|
|
<div class="transportOrder_bottom">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
- <!-- 已下发 -->
|
|
|
|
- <el-tab-pane label="已下发" name="first">
|
|
|
|
- <dilTable v-bind.sync="first"></dilTable>
|
|
|
|
|
|
+ <el-tab-pane label="未接收" name="first">
|
|
|
|
+ <dilTable v-bind.sync="first">
|
|
|
|
+ <el-table-column
|
|
|
|
+ fixed="right"
|
|
|
|
+ label="操作"
|
|
|
|
+ width="100"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button @click="updateClick(scope)" type="text" size="small">
|
|
|
|
+ 修改
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button @click="deleteClick(scope)" type="text" size="small">
|
|
|
|
+ 删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </dilTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<!-- 已接收 -->
|
|
<!-- 已接收 -->
|
|
<el-tab-pane label="已接收" name="Received">
|
|
<el-tab-pane label="已接收" name="Received">
|
|
- <dilTable v-bind.sync="Received"></dilTable>
|
|
|
|
|
|
+ <dilTable v-bind.sync="Received">
|
|
|
|
+ <el-table-column
|
|
|
|
+ fixed="right"
|
|
|
|
+ label="操作"
|
|
|
|
+ width="100"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button @click="deleteClick(scope)" type="text" size="small">
|
|
|
|
+ 关闭
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </dilTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
@@ -78,6 +114,7 @@ export default {
|
|
capacityNumber: "",
|
|
capacityNumber: "",
|
|
//选中的运力id
|
|
//选中的运力id
|
|
capacityId: null,
|
|
capacityId: null,
|
|
|
|
+ orderId:null,
|
|
//是否关闭模态框
|
|
//是否关闭模态框
|
|
drawer: false,
|
|
drawer: false,
|
|
//模态框从左往右打开
|
|
//模态框从左往右打开
|
|
@@ -89,6 +126,15 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
|
+ getCookie("userId");
|
|
|
|
+ } else {
|
|
|
|
+ this.truck.requestUrl =
|
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
|
|
|
|
+ }
|
|
|
|
+ console.log("一车多趟")
|
|
if(getCookie('orgCode') == "chengyunshang"){
|
|
if(getCookie('orgCode') == "chengyunshang"){
|
|
this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") ,
|
|
this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") ,
|
|
this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId")
|
|
this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId")
|
|
@@ -96,23 +142,94 @@ export default {
|
|
this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4"
|
|
this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4"
|
|
this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5"
|
|
this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5"
|
|
}else{
|
|
}else{
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("userId")
|
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("userId")
|
|
|
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode")
|
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode")
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
methods: {
|
|
methods: {
|
|
getRequestUrl(){
|
|
getRequestUrl(){
|
|
if(getCookie('orgCode') == "chengyunshang"){
|
|
if(getCookie('orgCode') == "chengyunshang"){
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId"),
|
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId")
|
|
|
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date(),
|
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
|
|
}else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
|
|
}else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4"
|
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5"
|
|
|
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&test=" + new Date()
|
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&test=" + new Date()
|
|
}else{
|
|
}else{
|
|
- this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("userId")
|
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("userId")
|
|
|
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
|
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //删除运输订单
|
|
|
|
+ deleteClick(scope){
|
|
|
|
+ this.$confirm('是否删除?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "删除成功!",
|
|
|
|
+ });
|
|
|
|
+ this.getRequestUrl()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "删除失败",
|
|
|
|
+ type: "warning",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消删除'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ console.log(scope.row.orderId)
|
|
|
|
+ },
|
|
|
|
+ //修改运输订单
|
|
|
|
+ updateClick(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.getRequestUrl()
|
|
|
|
+ this.dialogTableVisible = false
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error("修改运力失败")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ 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();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ currentRadioChange1(row){
|
|
|
|
+ console.log(row)
|
|
|
|
+ this.capacityId = row.capacityId
|
|
|
|
+ },
|
|
onclick(){
|
|
onclick(){
|
|
console.log("dianji")
|
|
console.log("dianji")
|
|
},
|
|
},
|