|
@@ -1,23 +1,45 @@
|
|
|
//新增运输预约
|
|
|
<template>
|
|
|
<!-- 新增运输作业页面 -->
|
|
|
- <div id="contractDetails">
|
|
|
+ <div class="addSporadic">
|
|
|
<page-title>运输预约</page-title>
|
|
|
- <div class="truckList1">
|
|
|
- <div class="forwardingUnit from">
|
|
|
- <span class="text">发货单位:</span>
|
|
|
- <el-input v-model="supplierName" disabled> </el-input>
|
|
|
- <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="forwardingUnit from">
|
|
|
- <span class="text">收货单位:</span>
|
|
|
- <el-input v-model="receiveName" disabled> </el-input>
|
|
|
- <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
|
|
|
- </div>
|
|
|
- <div class="orderType from">
|
|
|
- <span class="text">流向:</span>
|
|
|
- <el-select v-model="orderType" placeholder="请选择">
|
|
|
+ <div class="form-box">
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="发货单位">
|
|
|
+ <el-input v-model="supplierName" placeholder="必填" disabled>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="收货单位">
|
|
|
+ <el-input v-model="receiveName" placeholder="必填" disabled>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="流向">
|
|
|
+ <el-select v-model="orderType" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in orderTypeList"
|
|
|
:key="item.value"
|
|
@@ -26,45 +48,67 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- </div>
|
|
|
- <div class="lineId from">
|
|
|
- <span class="text">选择路线:</span>
|
|
|
- <el-input v-model="lineName" disabled> </el-input>
|
|
|
- <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
|
|
|
- </div>
|
|
|
- <div class="truckList1">
|
|
|
- <div class="truckList from">
|
|
|
- <span class="text">选择承运商:</span>
|
|
|
- <el-autocomplete
|
|
|
- class="inline-input"
|
|
|
- v-model="state2"
|
|
|
- :fetch-suggestions="querySearch"
|
|
|
- placeholder="请输入承运商名称"
|
|
|
- :trigger-on-focus="false"
|
|
|
- @select="handleSelect"
|
|
|
- @input="oninput"
|
|
|
- >
|
|
|
- <template slot-scope="{ item }">
|
|
|
- <div class="name">{{ item.value }}</div>
|
|
|
- </template>
|
|
|
- </el-autocomplete>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="truckList1">
|
|
|
- <div class="truckList from">
|
|
|
- <span class="text">选择物资:</span>
|
|
|
- <el-button type="primary" @click=" table = true" class="truckBtn"
|
|
|
- >浏览</el-button
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="选择路线">
|
|
|
+ <el-input v-model="lineName" placeholder="必填" disabled>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="选择承运商">
|
|
|
+ <el-autocomplete
|
|
|
+ class="inline-input"
|
|
|
+ v-model="state2"
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
+ placeholder="请输入承运商名称"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @select="handleSelect"
|
|
|
+ @input="oninput"
|
|
|
>
|
|
|
- </div>
|
|
|
+ <template slot-scope="{ item }">
|
|
|
+ <div class="name">{{ item.value }}</div>
|
|
|
+ </template>
|
|
|
+ </el-autocomplete>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="选择物资">
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item >
|
|
|
+ <el-button type="primary" @click="drawTable" class="truckBtn"
|
|
|
+ >浏览</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
- <div class="switch" v-if="tableData.length > 0">
|
|
|
+ <div class="swtichTop">
|
|
|
+ <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
|
|
|
+ <div class="switch" v-if="tableData.length > 0">
|
|
|
<el-tooltip placement="top">
|
|
|
<div slot="content">下面表格已有数据,不能进行更改!!!</div>
|
|
|
<el-switch
|
|
|
v-model="value"
|
|
|
- active-text="重量"
|
|
|
- inactive-text="件数"
|
|
|
+ active-text="件数"
|
|
|
+ inactive-text="重量"
|
|
|
disabled
|
|
|
>
|
|
|
</el-switch>
|
|
@@ -73,10 +117,12 @@
|
|
|
<div class="switch" v-else>
|
|
|
<el-tooltip placement="top">
|
|
|
<div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
|
|
|
- <el-switch v-model="value" active-text="重量" inactive-text="件数">
|
|
|
+ <el-switch v-model="value" active-text="件数" inactive-text="重量">
|
|
|
</el-switch>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- 物资表格 -->
|
|
|
<div class="truckListTable">
|
|
|
<div class="selectionTable">
|
|
@@ -106,7 +152,7 @@
|
|
|
class="textinput"
|
|
|
v-model.number="scope.row.materialPriority"
|
|
|
></el-input>
|
|
|
- </template
|
|
|
+ </template>
|
|
|
<!-- 物资件数 -->
|
|
|
<template v-if="item.prop == 'orderMaterialNumber'">
|
|
|
<el-input
|
|
@@ -142,7 +188,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 物资模态框 -->
|
|
|
- <el-drawer
|
|
|
+ <div class="drawSty">
|
|
|
+ <el-drawer
|
|
|
title="选择物资信息"
|
|
|
:visible.sync="table"
|
|
|
direction="rtl"
|
|
@@ -166,7 +213,7 @@
|
|
|
<el-input
|
|
|
placeholder="请输入内容"
|
|
|
v-model="input"
|
|
|
- style="margin-top: 0.625rem; margin-left: 1.25rem"
|
|
|
+ style="margin-top: 20px"
|
|
|
clearable
|
|
|
></el-input>
|
|
|
<el-button
|
|
@@ -195,12 +242,6 @@
|
|
|
@selection-change="currentRadioChange3"
|
|
|
></dilTable>
|
|
|
</div>
|
|
|
- <div v-show="a == 4">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="unloadPoint"
|
|
|
- @radio-change="currentRadioChange4"
|
|
|
- ></dilTable>
|
|
|
- </div>
|
|
|
<div v-show="a == 5">
|
|
|
<dilTable
|
|
|
v-bind.sync="line"
|
|
@@ -208,7 +249,8 @@
|
|
|
></dilTable>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
- <div class="button_box">
|
|
|
+ </div>
|
|
|
+ <div class="button-box">
|
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
|
<el-button type="primary" @click="makeSure">确认</el-button>
|
|
|
</div>
|
|
@@ -216,6 +258,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import PageTitle from "@/components/Page/Title";
|
|
|
+import { Checkbox } from 'element-ui';
|
|
|
|
|
|
export default {
|
|
|
components: { PageTitle },
|
|
@@ -224,7 +267,7 @@ export default {
|
|
|
receiveName:'',
|
|
|
state2:null,
|
|
|
restaurants: [],
|
|
|
- orderTypeList:[
|
|
|
+ orderTypeList:[
|
|
|
{
|
|
|
value:12,
|
|
|
label:'进厂'
|
|
@@ -259,16 +302,17 @@ export default {
|
|
|
label: "规格型号",
|
|
|
width: "140",
|
|
|
},
|
|
|
- {
|
|
|
- prop: "orderMaterialNumber",
|
|
|
- label: "件数",
|
|
|
- slot: true,
|
|
|
- },
|
|
|
- {
|
|
|
+ {
|
|
|
prop: "materialPriority",
|
|
|
label: "装卸货优先级",
|
|
|
slot: true,
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: "orderMaterialWeight",
|
|
|
+ label: "重量",
|
|
|
+ slot: true,
|
|
|
+ },
|
|
|
+
|
|
|
],
|
|
|
// 收货单位ID
|
|
|
receiveId:null,
|
|
@@ -313,17 +357,6 @@ export default {
|
|
|
"/api/v1/uc/queryConsigneeByLike?apiId=396",
|
|
|
selectionType:"radio",
|
|
|
},
|
|
|
- third:{
|
|
|
- requestUrl:
|
|
|
- "/api/v1/uc/getCarrierMesByLike?apiId=244",
|
|
|
- selectionType:"radio",
|
|
|
- carriermapList:[]
|
|
|
- },
|
|
|
- unloadPoint: {
|
|
|
- requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
|
|
|
- selectionType: "radio",
|
|
|
- unloadMapList:[]
|
|
|
- },
|
|
|
line: {
|
|
|
requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
|
|
|
selectionType: "radio",
|
|
@@ -334,23 +367,31 @@ export default {
|
|
|
watch: {
|
|
|
value() {
|
|
|
if (this.value) {
|
|
|
+ console.log(this.value)
|
|
|
+ console.log(this.tableTop.length)
|
|
|
this.tableTop.splice(this.tableTop.length - 1, 1);
|
|
|
this.tableTop.push({
|
|
|
- prop: "orderMaterialWeight",
|
|
|
- label: "重量",
|
|
|
+ prop: "orderMaterialNumber",
|
|
|
+ label: "件数",
|
|
|
slot: true,
|
|
|
});
|
|
|
} else {
|
|
|
this.tableTop.splice(this.tableTop.length - 1, 1);
|
|
|
this.tableTop.push({
|
|
|
- prop: "orderMaterialNumber",
|
|
|
- label: "件数",
|
|
|
+ prop: "orderMaterialWeight",
|
|
|
+ label: "重量",
|
|
|
slot: true,
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ drawTable(){
|
|
|
+ console.log('jll')
|
|
|
+ this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=1"
|
|
|
+ this.selectionList1 = []
|
|
|
+ this.table = true
|
|
|
+ },
|
|
|
handleSelect(item){
|
|
|
this.carrierId = item.carrierId
|
|
|
item.carrierName = this.state2
|
|
@@ -383,7 +424,8 @@ export default {
|
|
|
},
|
|
|
// 返回主界面
|
|
|
makeSure1() {
|
|
|
- console.log(this.selectionList1)
|
|
|
+ console.log(this.selectionList1)
|
|
|
+ debugger
|
|
|
this.selectionList1.forEach((e) => {
|
|
|
var addmap = {
|
|
|
materialCode: e.materialCode,
|
|
@@ -393,10 +435,11 @@ export default {
|
|
|
materialId: e.materialId,
|
|
|
materialPriority:e.materialPriority,
|
|
|
};
|
|
|
- this.tableData.push(addmap);
|
|
|
+ this.tableData.push(addmap);
|
|
|
+ });
|
|
|
this.selectionList1 = [];
|
|
|
this.table = false;
|
|
|
- });
|
|
|
+ console.log(this.selectionList1)
|
|
|
},
|
|
|
//取消模态框多选
|
|
|
open() {
|
|
@@ -414,9 +457,6 @@ export default {
|
|
|
} else {
|
|
|
this.table = false;
|
|
|
}
|
|
|
- },
|
|
|
- onClick(index) {
|
|
|
- this.tableData.splice(index, 1);
|
|
|
},
|
|
|
// 返回选中的物资信息
|
|
|
selectionChange(selection) {
|
|
@@ -430,17 +470,9 @@ export default {
|
|
|
this.input;
|
|
|
} else if (a == 2) {
|
|
|
this.secend.requestUrl =
|
|
|
- "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
|
|
|
- this.materialId +
|
|
|
+ "/api/v1/uc/getSupplierMesByMaterialId?apiId=247" +
|
|
|
"&index=" +
|
|
|
this.input;
|
|
|
- } else if (a == 3) {
|
|
|
- this.third.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&index=" +
|
|
|
- this.input;
|
|
|
- } else if (a == 4) {
|
|
|
- this.third.requestUrl =
|
|
|
- "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
|
|
|
} else if (a == 5) {
|
|
|
this.option.requestUrl =
|
|
|
"/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
|
|
@@ -469,8 +501,13 @@ export default {
|
|
|
},
|
|
|
currentRadioChange5(selection) {
|
|
|
console.log(selection)
|
|
|
- this.lineName = selection.lineName+' '+selection.lineDesk
|
|
|
- this.lineId = selection.lineId;
|
|
|
+ if(selection.lineName == null &&selection.lineDesk == null){
|
|
|
+ this.lineName = ''
|
|
|
+ }else{
|
|
|
+ this.lineName = selection.lineName+' '+selection.lineDesk
|
|
|
+ this.lineId = selection.lineId;
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
currentRadioChange3(selection) {
|
|
|
this.carriermapList = [];
|
|
@@ -499,122 +536,51 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
-<style lang="scss" >
|
|
|
-.contractDetails {
|
|
|
+<style lang="scss" scoped>
|
|
|
+.addSporadic{
|
|
|
+ .contractDetails {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-.from {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- width: 40%;
|
|
|
- margin-top: 5px;
|
|
|
- margin-bottom: 20px;
|
|
|
-}
|
|
|
-.remark {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- .text {
|
|
|
- display: inline-block;
|
|
|
- width: 100px;
|
|
|
- text-align: right;
|
|
|
- }
|
|
|
- .input{
|
|
|
- width: 250px;
|
|
|
- margin-right: 20px;
|
|
|
+.drawSty{
|
|
|
+ .el-input{
|
|
|
+ width: 240px;
|
|
|
}
|
|
|
}
|
|
|
-.lineId {
|
|
|
+.swtichTop{
|
|
|
display: flex;
|
|
|
+ height: 40px;
|
|
|
+ align-content: center;
|
|
|
justify-content: center;
|
|
|
- .text {
|
|
|
- display: inline-block;
|
|
|
- width: 170px;
|
|
|
- text-align: right;
|
|
|
+ padding-right:20px ;
|
|
|
+ .titile{
|
|
|
+ color: red;
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
- .input{
|
|
|
- width: 250px;
|
|
|
- margin-right: 20px;
|
|
|
+ .switch{
|
|
|
+ margin-right: -60px
|
|
|
}
|
|
|
}
|
|
|
-.material {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin-top: 20px;
|
|
|
- .text {
|
|
|
- display: inline-block;
|
|
|
- width: 170px;
|
|
|
- text-align: right;
|
|
|
- }
|
|
|
- .input{
|
|
|
- width: 250px;
|
|
|
- margin-right: 20px;
|
|
|
+.form-box {
|
|
|
+ display: inline-block !important;
|
|
|
+ margin-left: 488px;
|
|
|
+ .el-input {
|
|
|
+ width: 320px;
|
|
|
}
|
|
|
-}
|
|
|
-.orderType{
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- .text {
|
|
|
- display: inline-block;
|
|
|
- width: 110px;
|
|
|
- text-align: right;
|
|
|
+ .el-select{
|
|
|
+ width: 320px;
|
|
|
}
|
|
|
- .select{
|
|
|
- width: 250px;
|
|
|
- }
|
|
|
- .span{
|
|
|
- display: inline-block;
|
|
|
- width: 30px;height: 10px;
|
|
|
- }
|
|
|
-}
|
|
|
-.contractTitle{
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- .el-form-item{
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- .el-form-item__label{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
- .el-input{
|
|
|
- width: 250px;
|
|
|
- }
|
|
|
+ .el-autocomplete{
|
|
|
+ width: 320px;
|
|
|
}
|
|
|
-}
|
|
|
-.forwardingUnit {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- .text {
|
|
|
- display: inline-block;
|
|
|
- width: 170px;
|
|
|
- text-align: right;
|
|
|
+ .el-form {
|
|
|
+ padding: 10px;
|
|
|
}
|
|
|
- .input{
|
|
|
- width: 250px;
|
|
|
- margin-right: 20px;
|
|
|
+ .truckBtn{
|
|
|
+ width: 320px;
|
|
|
}
|
|
|
}
|
|
|
-.truckList1 {
|
|
|
- width: 100%;
|
|
|
- .truckList {
|
|
|
- width: 96%;
|
|
|
- .text {
|
|
|
- display: inline-block;
|
|
|
- width: 120px;
|
|
|
- text-align: right;
|
|
|
- }
|
|
|
- .truckBtn {
|
|
|
- width: 250px;
|
|
|
- }
|
|
|
- }
|
|
|
+.button-box {
|
|
|
+ margin-left: 25px !important;
|
|
|
}
|
|
|
-.button_box {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- width: 100%;
|
|
|
- height: 100px;
|
|
|
}
|
|
|
</style>
|