|
@@ -1,4 +1,4 @@
|
|
-//新增运输预约
|
|
|
|
|
|
+//新增运输需求
|
|
<template>
|
|
<template>
|
|
<!-- 新增运输作业页面 -->
|
|
<!-- 新增运输作业页面 -->
|
|
<div class="addSporadic">
|
|
<div class="addSporadic">
|
|
@@ -74,7 +74,7 @@
|
|
<el-button type="primary" @click="ondrawer(5)">浏览</el-button>
|
|
<el-button type="primary" @click="ondrawer(5)">浏览</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-form
|
|
|
|
|
|
+ <el-form
|
|
:inline="true"
|
|
:inline="true"
|
|
class="demo-form-inline"
|
|
class="demo-form-inline"
|
|
label-width="80px"
|
|
label-width="80px"
|
|
@@ -98,6 +98,22 @@
|
|
:inline="true"
|
|
:inline="true"
|
|
class="demo-form-inline"
|
|
class="demo-form-inline"
|
|
label-width="80px"
|
|
label-width="80px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="趟次">
|
|
|
|
+ <el-input
|
|
|
|
+ class="inline-input"
|
|
|
|
+ v-model="materialTimes"
|
|
|
|
+ placeholder="趟次"
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
+ @input="onInputTimes()"
|
|
|
|
+ >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
+ label-width="80px"
|
|
>
|
|
>
|
|
<el-form-item label="选择物资">
|
|
<el-form-item label="选择物资">
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -201,18 +217,18 @@
|
|
title="选择物资信息"
|
|
title="选择物资信息"
|
|
:visible.sync="table"
|
|
:visible.sync="table"
|
|
direction="rtl"
|
|
direction="rtl"
|
|
- size="35%"
|
|
|
|
|
|
+ size="40%"
|
|
:show-close="false"
|
|
:show-close="false"
|
|
>
|
|
>
|
|
- <el-input placeholder="请输入内容" v-model="input" clearable> </el-input
|
|
|
|
- ><el-button type="primary" class="btn" @click="onclick">
|
|
|
|
|
|
+ <el-input placeholder="请输入内容" v-model="inputMaterial" clearable > </el-input
|
|
|
|
+ ><el-button type="primary" class="btn" @click="onclickMaterial">
|
|
<i class="el-icon-search"></i>查询
|
|
<i class="el-icon-search"></i>查询
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button @click="open">取消</el-button>
|
|
|
|
|
|
+ <el-button @click="toggleSelection">取消</el-button>
|
|
<el-button type="primary" @click="makeSure1">确定</el-button>
|
|
<el-button type="primary" @click="makeSure1">确定</el-button>
|
|
<div class="tablecls">
|
|
<div class="tablecls">
|
|
<!-- 查询所有的物资 -->
|
|
<!-- 查询所有的物资 -->
|
|
- <dilTable v-bind.sync="materialOptions" @selection-change="selectionChange">
|
|
|
|
|
|
+ <dilTable ref="materialTable" v-bind.sync="materialOptions" @selection-change="selectionChange">
|
|
</dilTable>
|
|
</dilTable>
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
@@ -242,17 +258,20 @@
|
|
</div>
|
|
</div>
|
|
<div class="button-box">
|
|
<div class="button-box">
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
- <el-button type="primary" @click="makeSure">确认</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="makeSure" :disabled = "disabled">确认</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import PageTitle from "@/components/Page/Title";
|
|
import PageTitle from "@/components/Page/Title";
|
|
import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
import { sjTime,isNumber } from "@/utils/sharedJsFile";
|
|
|
|
+import { getCookie } from "@/utils/util.js";
|
|
export default {
|
|
export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ disabled:false,
|
|
|
|
+ materialTimes:null,
|
|
options: [],
|
|
options: [],
|
|
value: '',
|
|
value: '',
|
|
receiveName:'',
|
|
receiveName:'',
|
|
@@ -261,7 +280,7 @@ export default {
|
|
stateConsignee:null,
|
|
stateConsignee:null,
|
|
restaurantsConsignee:null,
|
|
restaurantsConsignee:null,
|
|
restaurantsSupplier:null,
|
|
restaurantsSupplier:null,
|
|
- restaurantsCarrier: [],
|
|
|
|
|
|
+ restaurantsCarrier:null,
|
|
orderTypeList:[
|
|
orderTypeList:[
|
|
{
|
|
{
|
|
value:12,
|
|
value:12,
|
|
@@ -271,7 +290,6 @@ export default {
|
|
label:'出厂'
|
|
label:'出厂'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- likeCarrierLike:'',
|
|
|
|
orderType:12,
|
|
orderType:12,
|
|
// 线路名称
|
|
// 线路名称
|
|
lineName: "",
|
|
lineName: "",
|
|
@@ -309,7 +327,6 @@ export default {
|
|
slot: true,
|
|
slot: true,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- consigneeId:null,
|
|
|
|
// 收货单位ID
|
|
// 收货单位ID
|
|
receiveId:null,
|
|
receiveId:null,
|
|
//承运商ID
|
|
//承运商ID
|
|
@@ -325,25 +342,21 @@ export default {
|
|
supplierId: null,
|
|
supplierId: null,
|
|
//物资id
|
|
//物资id
|
|
materialId: null,
|
|
materialId: null,
|
|
|
|
+ //承运商id
|
|
|
|
+ carrierId:null,
|
|
//是否需要打开模态窗口
|
|
//是否需要打开模态窗口
|
|
drawer: false,
|
|
drawer: false,
|
|
- //卸货点id
|
|
|
|
- unloadPointId: "",
|
|
|
|
- //卸货点名称
|
|
|
|
- unloadPointName: "",
|
|
|
|
- //订单类别
|
|
|
|
- orderType:12,
|
|
|
|
a: 1,
|
|
a: 1,
|
|
direction: "rtl",
|
|
direction: "rtl",
|
|
- input: "",
|
|
|
|
|
|
+ inputMaterial:null,
|
|
|
|
+ input:null,
|
|
//物资模态框
|
|
//物资模态框
|
|
materialOptions:{
|
|
materialOptions:{
|
|
- requestUrl:
|
|
|
|
- "/api/v1/uc/selectAllMaterialName?apiId=395",
|
|
|
|
- selectionType: "select",
|
|
|
|
|
|
+ requestUrl:"",
|
|
|
|
+ selectionType: "select",
|
|
},
|
|
},
|
|
line: {
|
|
line: {
|
|
- requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
|
|
|
|
|
|
+ requestUrl: "",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
},
|
|
},
|
|
row: {},
|
|
row: {},
|
|
@@ -371,13 +384,25 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onclickMaterial(){
|
|
|
|
+ if(this.inputMaterial != null){
|
|
|
|
+ this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"+ "&index=" + this.inputMaterial
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395"
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onInputTimes(){
|
|
|
|
+ if(!isNumber(this.materialTimes)){
|
|
|
|
+ this.$message.warning('趟次请输入数字')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
onInputPriority(scope){
|
|
onInputPriority(scope){
|
|
if(!isNumber(scope)){
|
|
if(!isNumber(scope)){
|
|
this.$message.warning('装卸货次序请输入数字')
|
|
this.$message.warning('装卸货次序请输入数字')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onInputWeight(scope){
|
|
onInputWeight(scope){
|
|
- console.log(scope)
|
|
|
|
if(!isNumber(scope)){
|
|
if(!isNumber(scope)){
|
|
this.$message.warning('重量请输入数字')
|
|
this.$message.warning('重量请输入数字')
|
|
}
|
|
}
|
|
@@ -388,18 +413,15 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
drawTable(){
|
|
drawTable(){
|
|
- console.log('jll')
|
|
|
|
- this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=1"
|
|
|
|
|
|
+ this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=" + new Date()
|
|
this.selectionList1 = []
|
|
this.selectionList1 = []
|
|
this.table = true
|
|
this.table = true
|
|
},
|
|
},
|
|
//收货单位弹出层
|
|
//收货单位弹出层
|
|
- handleSelectConsignee(item){
|
|
|
|
- console.log(this.consigneeId)
|
|
|
|
|
|
+ handleSelectConsignee(item){
|
|
this.consigneeId = item.consigneeId
|
|
this.consigneeId = item.consigneeId
|
|
item.consigneeCompanyName = this.consigneeCompanyName
|
|
item.consigneeCompanyName = this.consigneeCompanyName
|
|
- console.log(this.consigneeId)
|
|
|
|
- console.log('这是选中的收货单位')
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//以下是发货单位边输边查搜索
|
|
//以下是发货单位边输边查搜索
|
|
querySearchConsignee(queryString, cb) {
|
|
querySearchConsignee(queryString, cb) {
|
|
@@ -409,7 +431,6 @@ export default {
|
|
var restaurantsConsignee = res.data.data
|
|
var restaurantsConsignee = res.data.data
|
|
var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
|
|
var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
|
|
// 调用 callback 返回建议列表的数据
|
|
// 调用 callback 返回建议列表的数据
|
|
- console.log(results,"results");
|
|
|
|
cb(results);
|
|
cb(results);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -441,7 +462,6 @@ export default {
|
|
return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
|
|
return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- //以上是返回单位边输边查搜索
|
|
|
|
//承运商弹出层
|
|
//承运商弹出层
|
|
handleSelectCarrier(item){
|
|
handleSelectCarrier(item){
|
|
this.carrierId = item.carrierId
|
|
this.carrierId = item.carrierId
|
|
@@ -471,8 +491,7 @@ export default {
|
|
},
|
|
},
|
|
// 返回主界面
|
|
// 返回主界面
|
|
makeSure1() {
|
|
makeSure1() {
|
|
- console.log(this.selectionList1)
|
|
|
|
- //debugger
|
|
|
|
|
|
+ console.log(this.selectionList1)
|
|
this.selectionList1.forEach((e) => {
|
|
this.selectionList1.forEach((e) => {
|
|
var addmap = {
|
|
var addmap = {
|
|
materialCode: e.materialCode,
|
|
materialCode: e.materialCode,
|
|
@@ -480,7 +499,7 @@ export default {
|
|
Specification: e.materialSpecification+e.materialModel,
|
|
Specification: e.materialSpecification+e.materialModel,
|
|
orderMaterialWeight: null,
|
|
orderMaterialWeight: null,
|
|
materialId: e.materialId,
|
|
materialId: e.materialId,
|
|
- materialPriority:1
|
|
|
|
|
|
+ materialPriority:1,
|
|
};
|
|
};
|
|
this.tableData.push(addmap);
|
|
this.tableData.push(addmap);
|
|
});
|
|
});
|
|
@@ -511,44 +530,39 @@ export default {
|
|
this.selectionList1 = selection;
|
|
this.selectionList1 = selection;
|
|
},
|
|
},
|
|
onclick(a) {
|
|
onclick(a) {
|
|
- if (a == 1) {
|
|
|
|
- this.frist.requestUrl =
|
|
|
|
- "/api/v1/uc/queryAPOMaterialByLike?apiId=244&startNum=050&index=" +
|
|
|
|
- this.input;
|
|
|
|
- } else if (a == 2) {
|
|
|
|
- this.secend.requestUrl =
|
|
|
|
- "/api/v1/uc/getSupplierMesByMaterialId?apiId=247" +
|
|
|
|
- "&index=" +
|
|
|
|
- this.input;
|
|
|
|
- } else if (a == 5) {
|
|
|
|
- this.option.requestUrl =
|
|
|
|
|
|
+ if (a == 5) {
|
|
|
|
+ this.line.requestUrl =
|
|
"/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
|
|
"/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
ondrawer(num) {
|
|
ondrawer(num) {
|
|
|
|
+ this.line.requestUrl =
|
|
|
|
+ "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&test=1";
|
|
this.drawer = true;
|
|
this.drawer = true;
|
|
this.a = num;
|
|
this.a = num;
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
onClickCancel() {
|
|
onClickCancel() {
|
|
-
|
|
|
|
|
|
+ this.$router.push("/sporadicTransportAppoint");
|
|
},
|
|
},
|
|
currentRadioChange5(selection) {
|
|
currentRadioChange5(selection) {
|
|
- console.log(selection)
|
|
|
|
if(selection.lineName == null &&selection.lineDesk == null){
|
|
if(selection.lineName == null &&selection.lineDesk == null){
|
|
this.lineName = ''
|
|
this.lineName = ''
|
|
}else{
|
|
}else{
|
|
this.lineName = selection.lineName+' '+selection.lineDesk
|
|
this.lineName = selection.lineName+' '+selection.lineDesk
|
|
this.lineId = selection.lineId;
|
|
this.lineId = selection.lineId;
|
|
- }
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 确认
|
|
// 确认
|
|
makeSure() {
|
|
makeSure() {
|
|
- if(this.supplierId==null||this.lineId==null||this.carrierId==null||this.consigneeId==null){
|
|
|
|
- this.$alert('存在空值')
|
|
|
|
|
|
+ this.disabled = true
|
|
|
|
+ if(this.supplierId==null||this.lineId==null||this.consigneeId==null){
|
|
|
|
+ this.disabled = false
|
|
|
|
+ this.$message.warning("存在值未填写")
|
|
return
|
|
return
|
|
}else if(this.tableData.length == 0){
|
|
}else if(this.tableData.length == 0){
|
|
- this.$alert('请点击浏览勾选物资')
|
|
|
|
|
|
+ this.disabled = false
|
|
|
|
+ this.$message.warning("请点击浏览勾选物资")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var i = 0;
|
|
var i = 0;
|
|
@@ -561,10 +575,12 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if(i != 0){
|
|
if(i != 0){
|
|
- this.$alert('装卸货优先级未填写')
|
|
|
|
|
|
+ this.$message.warning("装卸货优先级未填写")
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
}else if(j != 0){
|
|
}else if(j != 0){
|
|
- this.$alert('物资重量未填写')
|
|
|
|
|
|
+ this.$message.warning("物资重量未填写")
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let amsOrder = {
|
|
let amsOrder = {
|
|
@@ -573,11 +589,16 @@ export default {
|
|
orderType:this.orderType,
|
|
orderType:this.orderType,
|
|
carrierId: this.carrierId,
|
|
carrierId: this.carrierId,
|
|
receiveId: this.consigneeId,
|
|
receiveId: this.consigneeId,
|
|
|
|
+ orderTime:this.materialTimes,
|
|
|
|
+ userId:getCookie("userId"),
|
|
mapList: this.tableData,
|
|
mapList: this.tableData,
|
|
- };
|
|
|
|
|
|
+ };
|
|
this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
|
|
this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
|
|
if (res.data.code == "200") {
|
|
if (res.data.code == "200") {
|
|
- this.$router.go(-1)
|
|
|
|
|
|
+ this.$router.push("/sporadicTransportAppoint")
|
|
|
|
+ this.disabled = false
|
|
|
|
+ }else{
|
|
|
|
+ this.disabled = false
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|