|
@@ -4,78 +4,51 @@
|
|
|
<page-title>新增需求</page-title>
|
|
|
<div>
|
|
|
<div class="form-box f2">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="采购订单号">
|
|
|
- <el-input v-model="purchaseOrder" disabled> </el-input>
|
|
|
+ <el-input v-model="purchaseOrder" placeholder="必填" disabled > </el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="ondrawer(1)">浏览</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- </div>
|
|
|
- <div class="form-box f3">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="外轮船名">
|
|
|
<el-input v-model="foreignShipName" disabled>浏览</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" disabled>船名</el-button>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
- </div>
|
|
|
- <div class="form-box f2">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="发货单位">
|
|
|
<el-input v-model="supplierName" disabled> </el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" disabled>发货单位</el-button>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
- </div>
|
|
|
- <div class="form-box f2">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="收货单位">
|
|
|
<el-input v-model="shipperName" disabled> </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" disabled>收货单位</el-button>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
- </div>
|
|
|
- <div class="form-box f4">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="物资名称">
|
|
|
<el-input v-model="materialName" disabled> </el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" disabled>物资</el-button>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
- </div>
|
|
|
- <div class="form-box f5">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="装车点">
|
|
|
- <el-input v-model="truckPoint" disabled> </el-input>
|
|
|
+ <el-input v-model="truckPoint" placeholder="必填" disabled> </el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- </div>
|
|
|
- <div class="form-box f5">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px">
|
|
|
<el-form-item label="卸车点">
|
|
|
- <el-input v-model="truckPoint1" disabled> </el-input>
|
|
|
+ <el-input v-model="truckPoint1" placeholder="必填" disabled> </el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="ondrawer(3)">浏览</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <div class="form-box">
|
|
|
- <dil-form :formId="300" v-model="form"></dil-form>
|
|
|
- </div>
|
|
|
<el-drawer
|
|
|
:visible.sync="drawer"
|
|
|
:direction="direction"
|
|
@@ -123,6 +96,9 @@
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
+ <div class="box-form">
|
|
|
+ <dil-form :formId="300" v-model="form"></dil-form>
|
|
|
+ </div>
|
|
|
<div class="button-box">
|
|
|
<el-button type="primary" @click="makeSure">确认新增</el-button>
|
|
|
<el-button type="primary" @click="cancel">返回</el-button>
|
|
@@ -175,7 +151,6 @@ export default {
|
|
|
ondrawer(num) {
|
|
|
this.drawer = true;
|
|
|
this.a = num;
|
|
|
- console.log(this.a)
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
done();
|
|
@@ -186,8 +161,13 @@ export default {
|
|
|
this.second.requestUrl =
|
|
|
"/api/v1/ams/getPurchaseIdByBatch?apiId=252&con=" + this.input;
|
|
|
} else {
|
|
|
- this.second1.requestUrl =
|
|
|
- "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
|
|
|
+ if(this.input == ""){
|
|
|
+ this.second1.requestUrl =
|
|
|
+ "/api/v1/ams/getWareHouse?apiId=251"
|
|
|
+ }else{
|
|
|
+ this.second1.requestUrl =
|
|
|
+ "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
currentRadioChange1(selection) {
|
|
@@ -200,37 +180,66 @@ export default {
|
|
|
},
|
|
|
currentRadioChange2(selection) {
|
|
|
this.mapList2 = selection
|
|
|
- console.log(this.mapList2)
|
|
|
- var s1 = "";
|
|
|
- this.truckPoint= s1.concat(this.mapList2.companyBranchName,this.mapList2.companyBranchName,this.mapList2.wareHouseName)
|
|
|
- this.mapList2.companyBranchName+' '+this.mapList2.companyBranchName+this.mapList2.wareHouseName
|
|
|
+ console.log(this.mapList2)
|
|
|
+ if(this.mapList2.companyBranchName == null){
|
|
|
+ this.mapList2.companyBranchName = ''
|
|
|
+ }
|
|
|
+ if(this.mapList2.branchFactory == null){
|
|
|
+ this.mapList2.branchFactory = ''
|
|
|
+ }
|
|
|
+ if(this.mapList2.wareHouseName ==null){
|
|
|
+ this.mapList2.wareHouseName = ''
|
|
|
+ }
|
|
|
+ this.truckPoint= this.mapList2.companyBranchName+this.mapList2.branchFactory+this.mapList2.wareHouseName
|
|
|
},
|
|
|
currentRadioChange3(selection) {
|
|
|
this.mapList3 = selection
|
|
|
- this.truckPoint1 = this.mapList3.companyBranchName+this.mapList3.companyBranchName+this.mapList3.wareHouseName
|
|
|
- },
|
|
|
+ console.log(selection)
|
|
|
+ if(this.mapList3.companyBranchName == null){
|
|
|
+ this.mapList3.companyBranchName = ''
|
|
|
+ }
|
|
|
+ if(this.mapList3.branchFactory == null){
|
|
|
+ this.mapList3.branchFactory = ''
|
|
|
+ }
|
|
|
+ if(this.mapList3.wareHouseName ==null){
|
|
|
+ this.mapList3.wareHouseName = ''
|
|
|
+ }
|
|
|
+ this.truckPoint1 = this.mapList3.companyBranchName+this.mapList3.branchFactory+this.mapList3.wareHouseName
|
|
|
},
|
|
|
// 新增
|
|
|
makeSure() {
|
|
|
- console.log(this.form.materialNumber)
|
|
|
- console.log(this.form.materialWeight);
|
|
|
- console.log(typeof(this.form.materialNumber));
|
|
|
if(this.purchaseOrder == null){
|
|
|
- this.$alert('没有选择采购订单,请点击浏览选择采购订单')
|
|
|
+ this.$alert('没有选择采购订单,请点击浏览选择采购订单!')
|
|
|
+ return
|
|
|
}else if(this.truckPoint == null){
|
|
|
- this.$alert('没有选择用车地点,请点击浏览选择用车地点')
|
|
|
+ this.$alert('没有选择装车点,请点击浏览选择装车点!')
|
|
|
+ return
|
|
|
}else if(this.truckPoint1 == null){
|
|
|
- this.$alert('没有选择卸货点,请点击浏览选择卸货点')
|
|
|
+ this.$alert('没有选择卸货点,请点击浏览选择卸货点!')
|
|
|
+ return
|
|
|
+ }else if(typeof(this.form.materialWeight)=='undefined'){
|
|
|
+ this.$alert('没有输入物资重量,请输入!')
|
|
|
+ return
|
|
|
+ }else if(typeof(this.form.requirementType)=='undefined'){
|
|
|
+ this.$alert('没有选择需求类型,请选择!')
|
|
|
+ return
|
|
|
+ }else if(typeof(this.form.requirementTruckTime)=='undefined'){
|
|
|
+ this.$alert('没有选择用车时间,请选择!')
|
|
|
+ return
|
|
|
+ }else if(typeof(this.form.requirementShipperId)=='undefined'){
|
|
|
+ this.$alert('没有选择用车单位,请选择!')
|
|
|
+ return
|
|
|
+ }else if(typeof(this.form.requirementWorkType)=='undefined'){
|
|
|
+ this.$alert('没有选择费用类别,请选择!')
|
|
|
+ return
|
|
|
+ }else if(typeof(this.form.requirementEstimatedDuration)=='undefined'){
|
|
|
+ this.$alert('没有输入预计作业时长,请输入!')
|
|
|
+ return
|
|
|
}
|
|
|
- // }else if(typeof(this.form.materialNumber) =="undefined"&typeof(this.form.materialWeight) =="undefined"){
|
|
|
- // this.$alert('请输入物资数量或者物资重量')
|
|
|
- // }
|
|
|
let requiremnet = {
|
|
|
purchaseOrderId: this.mapList1.purchaseOrderId,
|
|
|
requiremntUnitId: this.mapList2.wareHouseId,
|
|
|
- capacityTypeId: this.form.capacityTypeId,
|
|
|
materialWeight: this.form.materialWeight,
|
|
|
- materialNumber: this.form.materialNumber,
|
|
|
requirementEstimatedDuration: this.form.requirementEstimatedDuration,
|
|
|
requirementOverlimit: this.form.requirementOverlimit,
|
|
|
requirementShipperId: this.form.requirementShipperId,
|
|
@@ -241,7 +250,6 @@ export default {
|
|
|
requirementWorkType: this.form.requirementWorkType,
|
|
|
requirementUnloadUnitId:this.mapList3.wareHouseId
|
|
|
};
|
|
|
- console.log(requiremnet);
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/addTruckRequirement", requiremnet)
|
|
|
.then((res) => {
|
|
@@ -259,23 +267,29 @@ export default {
|
|
|
// 返回
|
|
|
cancel() {
|
|
|
this.$router.go(-1);
|
|
|
- },
|
|
|
-
|
|
|
-};
|
|
|
+ },
|
|
|
+}};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-.el-form-item{
|
|
|
- display: flex;
|
|
|
+.form-box{
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 38%;
|
|
|
+ .el-input{
|
|
|
+ width:288px
|
|
|
+ }
|
|
|
+ .el-form{
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
-.form-box,
|
|
|
-.button-box
|
|
|
-{
|
|
|
+.box-form{
|
|
|
+ display: flex;
|
|
|
+ .el-form-item{
|
|
|
display: flex;
|
|
|
- text-align: center;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin-top: 0.3125rem;
|
|
|
- margin-bottom: 1.25rem;
|
|
|
+ }
|
|
|
+}
|
|
|
+.button-box{
|
|
|
+ margin-left: 38%;
|
|
|
+
|
|
|
}
|
|
|
</style>
|