|
@@ -6,94 +6,22 @@
|
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
|
<i class="el-icon-search"></i>查询
|
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="Issue" v-if="activeName == 'option'">
|
|
|
- <i class="el-icon-download"></i>下发
|
|
|
+ <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
|
|
|
+ <i class="el-icon-plus"></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-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<!-- 已下发 -->
|
|
|
<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-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>
|
|
|
|
|
@@ -110,37 +38,22 @@ export default {
|
|
|
//输入框的值
|
|
|
input: "",
|
|
|
//选项卡的当前选中的值
|
|
|
- activeName: "option",
|
|
|
- //未下发的表格
|
|
|
- option: {
|
|
|
- requestUrl:
|
|
|
- "" ,
|
|
|
- selectionType: "select",
|
|
|
- },
|
|
|
+ activeName: "first",
|
|
|
//已下发的表格
|
|
|
first: {
|
|
|
- requestUrl:
|
|
|
- "" ,
|
|
|
+ requestUrl:"",
|
|
|
},
|
|
|
//车辆信息的表格
|
|
|
truck: {
|
|
|
- requestUrl: "" ,
|
|
|
+ requestUrl: "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
|
|
|
// 控制显示当选列
|
|
|
selectionType: "radio",
|
|
|
},
|
|
|
Received:{
|
|
|
requestUrl: "",
|
|
|
},
|
|
|
- oldRow:"",
|
|
|
- oldRowCount:1,
|
|
|
- oldRow1:"",
|
|
|
- oldRowCount1:1,
|
|
|
- oldRow2:"",
|
|
|
- oldRowCount2:1,
|
|
|
//物资信息的数据
|
|
|
tableData: [],
|
|
|
- tableData1:[],
|
|
|
- tableData2:[],
|
|
|
//物资信息的表头
|
|
|
tableHead: [
|
|
|
{
|
|
@@ -176,125 +89,30 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created(){
|
|
|
- this.createdLike()
|
|
|
+ this.carrierUserId = getCookie('userId')
|
|
|
+ if(getCookie('orgCode') == "chengyunshang"){
|
|
|
+ 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
|
|
|
+ }else{
|
|
|
+ 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"
|
|
|
+ }
|
|
|
},
|
|
|
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();
|
|
|
- }
|
|
|
- else{
|
|
|
- this.determine();
|
|
|
- done();
|
|
|
- }
|
|
|
- },
|
|
|
- //下发
|
|
|
- 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.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"
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- //对话框点击确定,执行增加车牌号
|
|
|
- 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",
|
|
|
- });
|
|
|
- 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"
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- //多选的选中的数据
|
|
|
- selectionChange(selection) {
|
|
|
- this.selectionList = [];
|
|
|
- selection.forEach((element) => {
|
|
|
- this.selectionList.push({
|
|
|
- orderId: element.orderId,
|
|
|
- capacityNumber: element.capacityNumber,
|
|
|
- orderNumber: element.orderNumber,
|
|
|
- });
|
|
|
- });
|
|
|
+ getRequestUrl(){
|
|
|
+ if(getCookie('orgCode') == "chengyunshang"){
|
|
|
+ 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
|
|
|
+ }else{
|
|
|
+ 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"
|
|
|
+ }
|
|
|
},
|
|
|
- //单选按钮选中的值
|
|
|
- currentRadioChange(row) {
|
|
|
- this.capacityId = row.capacityId;
|
|
|
- this.capacityNumber = row.capacityNumber;
|
|
|
+ onclick(){
|
|
|
+ console.log("dianji")
|
|
|
},
|
|
|
- //弹出消息窗口
|
|
|
- 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;
|
|
|
- }
|
|
|
+ handleClick(tab, event) {
|
|
|
+ this.getRequestUrl()
|
|
|
},
|
|
|
// 查看物资详情
|
|
|
detailclick(row) {
|
|
@@ -321,86 +139,6 @@ 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.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) {
|
|
|
this.axios
|
|
@@ -411,6 +149,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ Insert(){
|
|
|
+ this.$router.push("addSporadicTransportOrder")
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|