|
@@ -112,7 +112,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="item.slot">
|
|
<template v-if="item.slot">
|
|
<!-- 装货点 -->
|
|
<!-- 装货点 -->
|
|
- <template v-if="item.prop == 'requirementPlatformName'">
|
|
|
|
|
|
+ <template v-if="item.prop == 'requirementPlatformName'" style="width:400px">
|
|
<el-input
|
|
<el-input
|
|
class="textinput"
|
|
class="textinput"
|
|
v-model="scope.row.requirementPlatformName"
|
|
v-model="scope.row.requirementPlatformName"
|
|
@@ -236,7 +236,7 @@
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</div>
|
|
</div>
|
|
<div class="button-box">
|
|
<div class="button-box">
|
|
- <el-button type="primary" @click="makeSure">确认新增</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="makeSure" :disabled = "disabled">确认新增</el-button>
|
|
<el-button type="primary" @click="cancel">返回</el-button>
|
|
<el-button type="primary" @click="cancel">返回</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -254,7 +254,7 @@ export default {
|
|
disabled:false,
|
|
disabled:false,
|
|
options: [],
|
|
options: [],
|
|
value: '',
|
|
value: '',
|
|
- isOpenDueTime : false,
|
|
|
|
|
|
+ isOpenDueTime : true,
|
|
DueTime:null,
|
|
DueTime:null,
|
|
// 件数与重量的开关
|
|
// 件数与重量的开关
|
|
value: false,
|
|
value: false,
|
|
@@ -314,10 +314,11 @@ export default {
|
|
mapList1: []
|
|
mapList1: []
|
|
},
|
|
},
|
|
second1: {
|
|
second1: {
|
|
- requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
|
|
|
|
|
|
+ requestUrl: "",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
mapList2: []
|
|
mapList2: []
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ form:{}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -354,6 +355,9 @@ export default {
|
|
this.shipperId = item.shipperId
|
|
this.shipperId = item.shipperId
|
|
this.requireUnitName = item.shipperName
|
|
this.requireUnitName = item.shipperName
|
|
},
|
|
},
|
|
|
|
+ getUnloadRequestUrl(){
|
|
|
|
+ this.second1.requestUrl = "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date()
|
|
|
|
+ },
|
|
//以下是用车单位边输边查搜索
|
|
//以下是用车单位边输边查搜索
|
|
querySearchCarrier(queryString, cb) {
|
|
querySearchCarrier(queryString, cb) {
|
|
this.axios.post('/api/v1/uc/getRequireUnitName?index='+queryString).then((res)=>{
|
|
this.axios.post('/api/v1/uc/getRequireUnitName?index='+queryString).then((res)=>{
|
|
@@ -377,16 +381,16 @@ export default {
|
|
this.selectionList1 = selection;
|
|
this.selectionList1 = selection;
|
|
},
|
|
},
|
|
unloadPoint(index) {
|
|
unloadPoint(index) {
|
|
- // console.log(index)
|
|
|
|
|
|
+ this.getUnloadRequestUrl()
|
|
this.index= index
|
|
this.index= index
|
|
this.a = 3
|
|
this.a = 3
|
|
- this.drawer = true;
|
|
|
|
|
|
+ this.drawer = true;
|
|
},
|
|
},
|
|
loadPoint(index) {
|
|
loadPoint(index) {
|
|
- // console.log(index)
|
|
|
|
|
|
+ this.getUnloadRequestUrl()
|
|
this.index = index
|
|
this.index = index
|
|
this.a = 4
|
|
this.a = 4
|
|
- this.drawer = true;
|
|
|
|
|
|
+ this.drawer = true;
|
|
},
|
|
},
|
|
//以上是用车单位边输边查搜索
|
|
//以上是用车单位边输边查搜索
|
|
ondrawer(num) {
|
|
ondrawer(num) {
|
|
@@ -417,6 +421,15 @@ export default {
|
|
},
|
|
},
|
|
// 返回主界面
|
|
// 返回主界面
|
|
makeSure1() {
|
|
makeSure1() {
|
|
|
|
+ console.log(this.tableData.length);
|
|
|
|
+ if(this.tableData.length > 0&&this.selectionList1.length>0){
|
|
|
|
+ this.$message.warning("一个需求只允许填写一个物资")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.selectionList1.length > 1){
|
|
|
|
+ this.$message.warning("一个需求只允许填写一个物资")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.selectionList1.forEach((e) => {
|
|
this.selectionList1.forEach((e) => {
|
|
// console.log(e.materialModel,e.materialSpecification)
|
|
// console.log(e.materialModel,e.materialSpecification)
|
|
if(e.materialSpecification == null){
|
|
if(e.materialSpecification == null){
|
|
@@ -495,24 +508,34 @@ export default {
|
|
},
|
|
},
|
|
// 新增
|
|
// 新增
|
|
makeSure() {
|
|
makeSure() {
|
|
|
|
+ this.disabled = true
|
|
if(this.shipperId == null){
|
|
if(this.shipperId == null){
|
|
this.$message.error("请选择用车单位")
|
|
this.$message.error("请选择用车单位")
|
|
- return
|
|
|
|
- }if(typeof(this.form.requirementEstimatedDuration) == 'undefined'){
|
|
|
|
- this.$message.error("请输入预计用车时长")
|
|
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
}if(typeof(this.form.requirementTruckTime) == 'undefined'){
|
|
}if(typeof(this.form.requirementTruckTime) == 'undefined'){
|
|
this.$message.error("请输入用车时间")
|
|
this.$message.error("请输入用车时间")
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
}if(typeof(this.form.requirementType) == 'undefined'){
|
|
}if(typeof(this.form.requirementType) == 'undefined'){
|
|
this.$message.error("请选择需求类型")
|
|
this.$message.error("请选择需求类型")
|
|
- return
|
|
|
|
- }if(typeof(this.form.requirementWorkType) == 'undefined'){
|
|
|
|
- this.$message.error("请输入费用类别")
|
|
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
}if(this.tableData.length == 0){
|
|
}if(this.tableData.length == 0){
|
|
this.$message.error("请点击浏览选择物资")
|
|
this.$message.error("请点击浏览选择物资")
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
|
|
+ }if(typeof(this.form.requirementOverlimit) != 'undefined'){
|
|
|
|
+ console.log((typeof(this.form.remark) == 'undefined'))
|
|
|
|
+ if((typeof(this.form.remark) == 'undefined')){
|
|
|
|
+ this.$message.error("请填写超限备注")
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }if(typeof(this.form.Tel) == 'undefined'){
|
|
|
|
+ this.$message.error("请填写联系电话")
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return
|
|
}
|
|
}
|
|
var i=0
|
|
var i=0
|
|
this.tableData.forEach((e) =>{
|
|
this.tableData.forEach((e) =>{
|
|
@@ -522,10 +545,16 @@ export default {
|
|
})
|
|
})
|
|
if(i==0){
|
|
if(i==0){
|
|
this.$message.error("请选择装卸点")
|
|
this.$message.error("请选择装卸点")
|
|
|
|
+ this.disabled = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
// console.log(this.tableData)
|
|
// console.log(this.tableData)
|
|
var DueTime;
|
|
var DueTime;
|
|
|
|
+ if(this.DueTime == null){
|
|
|
|
+ this.$message.warning("截止日期必填")
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if(this.DueTime==null){
|
|
if(this.DueTime==null){
|
|
DueTime = null;
|
|
DueTime = null;
|
|
}else{
|
|
}else{
|
|
@@ -533,7 +562,7 @@ export default {
|
|
}
|
|
}
|
|
let requiremnet = {
|
|
let requiremnet = {
|
|
requirementEstimatedDuration: this.form.requirementEstimatedDuration,
|
|
requirementEstimatedDuration: this.form.requirementEstimatedDuration,
|
|
- requirementOverlimit: this.form.requirementOverlimit,
|
|
|
|
|
|
+ requirementOverlimit: this.form.requirementOverlimit + this.form.remark + '米',
|
|
requirementTruckTime: sjTime(this.form.requirementTruckTime),
|
|
requirementTruckTime: sjTime(this.form.requirementTruckTime),
|
|
requirementType: this.form.requirementType,
|
|
requirementType: this.form.requirementType,
|
|
requirementWorkContent: this.form.requirementWorkContent,
|
|
requirementWorkContent: this.form.requirementWorkContent,
|
|
@@ -543,9 +572,10 @@ export default {
|
|
// 用车截日期
|
|
// 用车截日期
|
|
DueTime:DueTime,
|
|
DueTime:DueTime,
|
|
mapList:this.tableData,
|
|
mapList:this.tableData,
|
|
- orgCode:getCookie("orgCode")
|
|
|
|
|
|
+ orgCode:getCookie("orgCode"),
|
|
|
|
+ remark:this.form.Tel + this.form.capacityType
|
|
};
|
|
};
|
|
- // console.log("requirement",requiremnet);
|
|
|
|
|
|
+ console.log("requirement",requiremnet);
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/addTruckRequirement", requiremnet)
|
|
.post("/api/v1/ams/addTruckRequirement", requiremnet)
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -557,8 +587,13 @@ export default {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
} else {
|
|
} else {
|
|
this.$message.error("新增失败!");
|
|
this.$message.error("新增失败!");
|
|
|
|
+ this.disabled = false
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+ func(res) {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.isKuang = false;
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
cancel() {
|
|
cancel() {
|