|
@@ -11,12 +11,35 @@
|
|
|
<i class="el-icon-refresh"></i>刷新
|
|
|
</el-button>
|
|
|
</div>
|
|
|
+ <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
|
|
|
+ <el-input placeholder="请输入内容" v-model="inputTruck" clearable style="width:200px">
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" class="btn" @click="onClickTruck">
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="truck"
|
|
|
+ @radio-change="currentRadioChange1"
|
|
|
+ >
|
|
|
+ </dilTable>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogTableVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<el-tabs v-model="activeName">
|
|
|
<!-- 未接收 -->
|
|
|
<el-tab-pane label="未接收" name="third">
|
|
|
<dilTable v-bind.sync="option3" ref="table2">
|
|
|
- <el-table-column fixed="right" label="操作" width="120">
|
|
|
+ <el-table-column fixed="right" label="操作" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="updateCapacity(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ 修改运力
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
@click="detailclick2(scope.row)"
|
|
|
type="text"
|
|
@@ -132,6 +155,7 @@ import { getCookie } from "@/utils/util.js";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ inputTruck:null,
|
|
|
inputText: "",
|
|
|
option1: {
|
|
|
// option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
|
|
@@ -151,6 +175,11 @@ export default {
|
|
|
"/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
|
|
|
getCookie("userId"),
|
|
|
},
|
|
|
+ truck: {
|
|
|
+ requestUrl:
|
|
|
+ "",
|
|
|
+ selectionType:"radio"
|
|
|
+ },
|
|
|
activeName: "third",
|
|
|
//记录旧的row对象(已接收)
|
|
|
oldRow: "",
|
|
@@ -189,12 +218,82 @@ export default {
|
|
|
tableData: [],
|
|
|
tableData1: [],
|
|
|
tableData2: [],
|
|
|
+ capacityId:null,
|
|
|
+ dialogTableVisible:false,
|
|
|
+ orderId:null
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ onClickTruck(){
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" +
|
|
|
+ getCookie("userId") + "&index="+this.inputTruck;
|
|
|
+ } else {
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=" + null + "&index="+this.inputTruck;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getRequestUrl(){
|
|
|
+ this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=5&carrierSsoId=" +
|
|
|
+ getCookie("userId") + "&t=" + new Date(),
|
|
|
+ this.option2.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=6&carrierSsoId=" +
|
|
|
+ getCookie("userId") + "&t=" + new Date(),
|
|
|
+ this.option3.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=2&orderStatus=4&carrierSsoId=" +
|
|
|
+ getCookie("userId") + "&t=" + new Date()
|
|
|
+ },
|
|
|
refresh(){
|
|
|
this.$router.go(0);
|
|
|
},
|
|
|
+ handleClose(done){
|
|
|
+ done()
|
|
|
+ this.$message.info("取消修改运力")
|
|
|
+ },
|
|
|
+ updateCapacity(row){
|
|
|
+ console.log("更新车牌号")
|
|
|
+ this.getTruckRequestUrl()
|
|
|
+ this.orderId = row.orderId
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ console.log(row.orderId)
|
|
|
+ },
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updateClick(scope){
|
|
|
+ this.getTruckRequestUrl()
|
|
|
+ this.orderId = scope.row.orderId
|
|
|
+ this.dialogTableVisible = true
|
|
|
+ console.log(scope.row.orderId)
|
|
|
+ },
|
|
|
+ currentRadioChange1(row){
|
|
|
+ console.log(row)
|
|
|
+ this.capacityId = row.capacityId
|
|
|
+ },
|
|
|
+ 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("修改运力失败")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
onClick() {
|
|
|
if (this.activeName == "first") {
|
|
|
this.option1.requestUrl =
|