|
@@ -6,64 +6,12 @@
|
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
|
<i class="el-icon-search"></i>查询
|
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="Insert" v-if="activeName == 'option'">
|
|
|
+ <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
|
|
|
<i class="el-icon-plus"></i>新增
|
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="Issue" v-if="activeName == 'option'">
|
|
|
- <i class="el-icon-download"></i>下发
|
|
|
- </el-button>
|
|
|
</div>
|
|
|
<div class="transportOrder_bottom">
|
|
|
<el-tabs v-model="activeName">
|
|
|
- <!-- 未下发 -->
|
|
|
- <el-tab-pane label="未下发" name="option">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="option"
|
|
|
- ref="table"
|
|
|
- @selection-change="selectionChange"
|
|
|
- >
|
|
|
- <el-table-column fixed="right" label="操作" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="detailclick(scope.row)" type="text">
|
|
|
- 物资详情
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="addTruck(scope.row, 1)"
|
|
|
- v-if="!scope.row.capacityNumber"
|
|
|
- >
|
|
|
- 添加运力
|
|
|
- </el-button>
|
|
|
- <el-button type="text" @click="addTruck(scope.row, 2)" v-else>
|
|
|
- 修改
|
|
|
- </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"
|
|
|
- >
|
|
|
- <div v-if="false">{{ props }}</div>
|
|
|
- <div>
|
|
|
- <el-table :data="tableData">
|
|
|
- <el-table-column
|
|
|
- v-for="(item, i) in tableHead"
|
|
|
- :key="i"
|
|
|
- :prop="item.prop"
|
|
|
- :label="item.label"
|
|
|
- :width="item.width"
|
|
|
- ></el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </dilTable>
|
|
|
- </el-tab-pane>
|
|
|
<!-- 已下发 -->
|
|
|
<el-tab-pane label="已下发" name="first">
|
|
|
<dilTable v-bind.sync="first"></dilTable>
|
|
@@ -73,65 +21,7 @@
|
|
|
<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"
|
|
|
- :direction="direction"
|
|
|
- :destroy-on-close="true"
|
|
|
- :before-close="handleClose"
|
|
|
- >
|
|
|
- <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>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -148,17 +38,10 @@ export default {
|
|
|
//输入框的值
|
|
|
input: "",
|
|
|
//选项卡的当前选中的值
|
|
|
- activeName: "option",
|
|
|
- //未下发的表格
|
|
|
- option: {
|
|
|
- requestUrl:
|
|
|
- "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=3&carrierId=" + '',
|
|
|
- selectionType: "select",
|
|
|
- },
|
|
|
+ activeName: "first",
|
|
|
//已下发的表格
|
|
|
first: {
|
|
|
- requestUrl:
|
|
|
- "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" +'',
|
|
|
+ requestUrl:"",
|
|
|
},
|
|
|
//车辆信息的表格
|
|
|
truck: {
|
|
@@ -167,7 +50,7 @@ export default {
|
|
|
selectionType: "radio",
|
|
|
},
|
|
|
Received:{
|
|
|
- requestUrl: "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" +'',
|
|
|
+ requestUrl: "",
|
|
|
},
|
|
|
//物资信息的数据
|
|
|
tableData: [],
|
|
@@ -207,17 +90,18 @@ 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
|
|
|
+ console.log("-----")
|
|
|
+ console.log(getCookie('orgCode'))
|
|
|
+ console.log("-----")
|
|
|
+ if(getCookie('orgCode') == "dagangadmin"){
|
|
|
+ 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"
|
|
|
+ }else{
|
|
|
+ this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + this.carrierUserId ,
|
|
|
+ this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + this.carrierUserId
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- handleClose(done){
|
|
|
- this.determine();
|
|
|
- done();
|
|
|
- },
|
|
|
onclick(){
|
|
|
if(this.input != ''){
|
|
|
this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&con="+this.input +"&carrierId=" + getCookie('userId');
|
|
@@ -225,97 +109,6 @@ export default {
|
|
|
this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.userCarrierId
|
|
|
}
|
|
|
},
|
|
|
- //下发
|
|
|
- Issue() {
|
|
|
- if (this.selectionList.length == 0) {
|
|
|
- this.$message({
|
|
|
- message: "请选择订单!",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.selectionList.forEach((e) => {
|
|
|
- if (!e.capacityNumber) {
|
|
|
- this.$message({
|
|
|
- message: "订单号为: " + e.orderNumber + "没有车牌号!",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.axios.post("/api/v1/oms/dispatchOrder",{mapList:this.selectionList}).then((res) => {
|
|
|
- if (res.data.code == "200") {
|
|
|
- this.$message({
|
|
|
- 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"
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- //对话框点击确定,执行增加车牌号
|
|
|
- determine() {
|
|
|
- this.axios
|
|
|
- .post("/api/v1/oms/updateOmstruckOrder", {
|
|
|
- orderId: this.selectOrderId,
|
|
|
- capacityId: this.capacityId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == "200") {
|
|
|
- if (this.index == 1) {
|
|
|
- this.$message({
|
|
|
- message: "添加成功!",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- } else if (this.index == 2) {
|
|
|
- this.$message({
|
|
|
- message: "修改成功!",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- }
|
|
|
- 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"
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- //多选的选中的数据
|
|
|
- selectionChange(selection) {
|
|
|
- this.selectionList = [];
|
|
|
- selection.forEach((element) => {
|
|
|
- this.selectionList.push({
|
|
|
- orderId: element.orderId,
|
|
|
- capacityNumber: element.capacityNumber,
|
|
|
- orderNumber: element.orderNumber,
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- //单选按钮选中的值
|
|
|
- currentRadioChange(row) {
|
|
|
- this.capacityId = row.carrierId;
|
|
|
- this.capacityNumber = row.capacityNumber;
|
|
|
- },
|
|
|
- //打开模态窗口
|
|
|
- // onDrawer() {
|
|
|
- // this.drawer = true;
|
|
|
- // },
|
|
|
- //弹出消息窗口
|
|
|
- addTruck(row, index) {
|
|
|
- this.index = index;
|
|
|
- if (index == 1) {
|
|
|
- this.selectOrderId = row.orderId;
|
|
|
- this.drawer = true;
|
|
|
- } else if (index == 2) {
|
|
|
- this.selectOrderId = row.orderId;
|
|
|
- this.capacityNumber = row.capacityNumber;
|
|
|
- this.drawer = true;
|
|
|
- }
|
|
|
- },
|
|
|
// 查看物资详情
|
|
|
detailclick(row) {
|
|
|
// 记录重复点击次数
|
|
@@ -341,16 +134,6 @@ export default {
|
|
|
this.oldRow = row;
|
|
|
this.materialDetails(row.orderId);
|
|
|
},
|
|
|
- //框计算
|
|
|
- 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;
|
|
|
- }
|
|
|
- },
|
|
|
//查看当前订单的物资信息
|
|
|
materialDetails(orderId) {
|
|
|
this.axios
|