|
@@ -1,103 +1,139 @@
|
|
|
// 新增采购内转需求
|
|
|
<template>
|
|
|
- <div id="endMaintenance">
|
|
|
+ <div class="addInwardRequirement">
|
|
|
<page-title>新增需求</page-title>
|
|
|
- <div>
|
|
|
- <div class="form-box f2">
|
|
|
- <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
|
|
|
- <el-form-item label="采购订单号">
|
|
|
- <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>
|
|
|
- <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
|
|
|
- <el-form-item label="外轮船名">
|
|
|
- <el-input v-model="foreignShipName" disabled></el-input>
|
|
|
- </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="supplierName" disabled> </el-input>
|
|
|
- </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="shipperName" disabled> </el-input>
|
|
|
- </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="materialName" disabled> </el-input>
|
|
|
- </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="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>
|
|
|
- <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
|
|
|
- <el-form-item label="卸车点">
|
|
|
- <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>
|
|
|
- <el-drawer
|
|
|
- :visible.sync="drawer"
|
|
|
- :direction="direction"
|
|
|
- :before-close="handleClose"
|
|
|
- size="30%"
|
|
|
+ <div class="form-box f2">
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="采购订单号">
|
|
|
+ <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>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="外轮船名" class="tx">
|
|
|
+ <el-input v-model="foreignShipName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="发货单位" class="tx">
|
|
|
+ <el-input v-model="supplierName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="收货单位" class="tx">
|
|
|
+ <el-input v-model="shipperName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="物资名称" class="tx">
|
|
|
+ <el-input v-model="materialName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
>
|
|
|
- <el-input
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="input"
|
|
|
- style="margin-top: 10px ;width:50%"
|
|
|
- clearable
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- class="btn"
|
|
|
- @click="onclick(a)"
|
|
|
- style="margin-bottom: 15px"
|
|
|
- >
|
|
|
- <i class="el-icon-search"></i>查询
|
|
|
- </el-button>
|
|
|
- <div v-show="a == 1">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="second"
|
|
|
- @radio-change="currentRadioChange1"
|
|
|
- ></dilTable>
|
|
|
- </div>
|
|
|
- <div v-show="a == 2">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="second1"
|
|
|
- @radio-change="currentRadioChange2"
|
|
|
- ></dilTable>
|
|
|
- </div>
|
|
|
- <div v-show="a == 3">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="second2"
|
|
|
- @radio-change="currentRadioChange3"
|
|
|
- ></dilTable>
|
|
|
- </div>
|
|
|
- <div v-show="a == 4">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="second3"
|
|
|
- @radio-change="currentRadioChange4"
|
|
|
- ></dilTable>
|
|
|
- </div>
|
|
|
- </el-drawer>
|
|
|
+ <el-form-item label="装车点">
|
|
|
+ <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>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ class="demo-form-inline"
|
|
|
+ :label-position="left"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-form-item label="卸车点">
|
|
|
+ <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>
|
|
|
+ <el-drawer
|
|
|
+ :visible.sync="drawer"
|
|
|
+ :direction="direction"
|
|
|
+ :before-close="handleClose"
|
|
|
+ size="30%"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="input"
|
|
|
+ style="margin-top: 10px ;width:50%"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="btn"
|
|
|
+ @click="onclick(a)"
|
|
|
+ style="margin-bottom: 15px"
|
|
|
+ >
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ <div v-show="a == 1">
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="second"
|
|
|
+ @radio-change="currentRadioChange1"
|
|
|
+ ></dilTable>
|
|
|
+ </div>
|
|
|
+ <div v-show="a == 2">
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="second1"
|
|
|
+ @radio-change="currentRadioChange2"
|
|
|
+ ></dilTable>
|
|
|
+ </div>
|
|
|
+ <div v-show="a == 3">
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="second2"
|
|
|
+ @radio-change="currentRadioChange3"
|
|
|
+ ></dilTable>
|
|
|
+ </div>
|
|
|
+ <div v-show="a == 4">
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="second3"
|
|
|
+ @radio-change="currentRadioChange4"
|
|
|
+ ></dilTable>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
<div class="box-form">
|
|
|
- <dil-form :formId="300" v-model="form"></dil-form>
|
|
|
+ <dil-form :formId="300" v-model="form"></dil-form>
|
|
|
</div>
|
|
|
<div class="button-box">
|
|
|
<el-button type="primary" @click="makeSure">确认新增</el-button>
|
|
@@ -115,36 +151,36 @@ export default {
|
|
|
return {
|
|
|
purchaseOrder: null,
|
|
|
foreignShipName: null,
|
|
|
- materialName:null,
|
|
|
- shipperName:null,
|
|
|
- supplierName:null,
|
|
|
+ materialName: null,
|
|
|
+ shipperName: null,
|
|
|
+ supplierName: null,
|
|
|
a: 1,
|
|
|
direction: "rtl",
|
|
|
input: "",
|
|
|
truckPoint: null,
|
|
|
- truckPoint1:null,
|
|
|
+ truckPoint1: null,
|
|
|
drawer: false,
|
|
|
form: {},
|
|
|
second: {
|
|
|
requestUrl: "/api/v1/ams/getPurchaseIdByBatch?apiId=252",
|
|
|
selectionType: "radio",
|
|
|
- mapList1: [],
|
|
|
+ mapList1: []
|
|
|
},
|
|
|
second1: {
|
|
|
requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
|
|
|
selectionType: "radio",
|
|
|
- mapList2: [],
|
|
|
+ mapList2: []
|
|
|
},
|
|
|
- second2 :{
|
|
|
+ second2: {
|
|
|
requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
|
|
|
selectionType: "radio",
|
|
|
- mapList3: [],
|
|
|
+ mapList3: []
|
|
|
},
|
|
|
- second3 :{
|
|
|
+ second3: {
|
|
|
requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
|
|
|
selectionType: "radio",
|
|
|
- mapList4: [],
|
|
|
- },
|
|
|
+ mapList4: []
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -161,80 +197,85 @@ export default {
|
|
|
this.second.requestUrl =
|
|
|
"/api/v1/ams/getPurchaseIdByBatch?apiId=252&con=" + this.input;
|
|
|
} else {
|
|
|
- if(this.input == ""){
|
|
|
+ if (this.input == "") {
|
|
|
+ this.second1.requestUrl = "/api/v1/ams/getWareHouse?apiId=251";
|
|
|
+ } else {
|
|
|
this.second1.requestUrl =
|
|
|
- "/api/v1/ams/getWareHouse?apiId=251"
|
|
|
- }else{
|
|
|
- this.second1.requestUrl =
|
|
|
- "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input
|
|
|
- }
|
|
|
+ "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
currentRadioChange1(selection) {
|
|
|
- this.mapList1 = selection
|
|
|
- this.purchaseOrder = this.mapList1.purchaseOrderNo
|
|
|
- this.foreignShipName = this.mapList1.resultForeignShipName
|
|
|
- this.supplierName = this.mapList1.supplierName
|
|
|
- this.shipperName = this.mapList1.shipperName
|
|
|
+ this.mapList1 = selection;
|
|
|
+ this.purchaseOrder = this.mapList1.purchaseOrderNo;
|
|
|
+ this.foreignShipName = this.mapList1.resultForeignShipName;
|
|
|
+ this.supplierName = this.mapList1.supplierName;
|
|
|
+ this.shipperName = this.mapList1.shipperName;
|
|
|
this.materialName = this.mapList1.materialName;
|
|
|
},
|
|
|
currentRadioChange2(selection) {
|
|
|
- this.mapList2 = selection
|
|
|
- console.log(this.mapList2)
|
|
|
- if(this.mapList2.companyBranchName == null){
|
|
|
- this.mapList2.companyBranchName = ''
|
|
|
+ this.mapList2 = selection;
|
|
|
+ console.log(this.mapList2);
|
|
|
+ if (this.mapList2.companyBranchName == null) {
|
|
|
+ this.mapList2.companyBranchName = "";
|
|
|
}
|
|
|
- if(this.mapList2.branchFactory == null){
|
|
|
- this.mapList2.branchFactory = ''
|
|
|
+ if (this.mapList2.branchFactory == null) {
|
|
|
+ this.mapList2.branchFactory = "";
|
|
|
}
|
|
|
- if(this.mapList2.wareHouseName ==null){
|
|
|
- this.mapList2.wareHouseName = ''
|
|
|
+ if (this.mapList2.wareHouseName == null) {
|
|
|
+ this.mapList2.wareHouseName = "";
|
|
|
}
|
|
|
- this.truckPoint= this.mapList2.companyBranchName+this.mapList2.branchFactory+this.mapList2.wareHouseName
|
|
|
+ this.truckPoint =
|
|
|
+ this.mapList2.companyBranchName +
|
|
|
+ this.mapList2.branchFactory +
|
|
|
+ this.mapList2.wareHouseName;
|
|
|
},
|
|
|
currentRadioChange3(selection) {
|
|
|
- this.mapList3 = selection
|
|
|
- console.log(selection)
|
|
|
- if(this.mapList3.companyBranchName == null){
|
|
|
- this.mapList3.companyBranchName = ''
|
|
|
+ this.mapList3 = selection;
|
|
|
+ console.log(selection);
|
|
|
+ if (this.mapList3.companyBranchName == null) {
|
|
|
+ this.mapList3.companyBranchName = "";
|
|
|
}
|
|
|
- if(this.mapList3.branchFactory == null){
|
|
|
- this.mapList3.branchFactory = ''
|
|
|
+ if (this.mapList3.branchFactory == null) {
|
|
|
+ this.mapList3.branchFactory = "";
|
|
|
}
|
|
|
- if(this.mapList3.wareHouseName ==null){
|
|
|
- this.mapList3.wareHouseName = ''
|
|
|
+ if (this.mapList3.wareHouseName == null) {
|
|
|
+ this.mapList3.wareHouseName = "";
|
|
|
}
|
|
|
- this.truckPoint1 = this.mapList3.companyBranchName+this.mapList3.branchFactory+this.mapList3.wareHouseName
|
|
|
+ this.truckPoint1 =
|
|
|
+ this.mapList3.companyBranchName +
|
|
|
+ this.mapList3.branchFactory +
|
|
|
+ this.mapList3.wareHouseName;
|
|
|
},
|
|
|
// 新增
|
|
|
makeSure() {
|
|
|
- if(this.purchaseOrder == null){
|
|
|
- this.$alert('没有选择采购订单,请点击浏览选择采购订单!')
|
|
|
- return
|
|
|
- }else if(this.truckPoint == null){
|
|
|
- this.$alert('没有选择装车点,请点击浏览选择装车点!')
|
|
|
- return
|
|
|
- }else if(this.truckPoint1 == null){
|
|
|
- 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
|
|
|
+ if (this.purchaseOrder == null) {
|
|
|
+ this.$alert("没有选择采购订单,请点击浏览选择采购订单!");
|
|
|
+ return;
|
|
|
+ } else if (this.truckPoint == null) {
|
|
|
+ this.$alert("没有选择装车点,请点击浏览选择装车点!");
|
|
|
+ return;
|
|
|
+ } else if (this.truckPoint1 == null) {
|
|
|
+ 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;
|
|
|
}
|
|
|
let requiremnet = {
|
|
|
purchaseOrderId: this.mapList1.purchaseOrderId,
|
|
@@ -248,15 +289,15 @@ export default {
|
|
|
requirementWorkContent: this.form.requirementWorkContent,
|
|
|
requirementWorkEnvironment: this.form.requirementWorkEnvironment,
|
|
|
requirementWorkType: this.form.requirementWorkType,
|
|
|
- requirementUnloadUnitId:this.mapList3.wareHouseId
|
|
|
+ requirementUnloadUnitId: this.mapList3.wareHouseId
|
|
|
};
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/addTruckRequirement", requiremnet)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "新增成功!",
|
|
|
+ message: "新增成功!"
|
|
|
});
|
|
|
this.$router.go(-1);
|
|
|
} else {
|
|
@@ -267,37 +308,41 @@ export default {
|
|
|
// 返回
|
|
|
cancel() {
|
|
|
this.$router.go(-1);
|
|
|
- },
|
|
|
-}};
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
-
|
|
|
-<style lang="scss">
|
|
|
-.form-box{
|
|
|
- display: inline-block;
|
|
|
+<style lang="scss" scoped>
|
|
|
+.addInwardRequirement{
|
|
|
+.form-box {
|
|
|
+ display: inline-block !important;
|
|
|
margin-left: 38%;
|
|
|
- .el-input{
|
|
|
- width:288px
|
|
|
+ .el-input {
|
|
|
+ width: 288px;
|
|
|
}
|
|
|
- .el-form{
|
|
|
+ .el-form {
|
|
|
padding: 10px;
|
|
|
}
|
|
|
+ .tx{
|
|
|
+ margin-left: -75px;
|
|
|
+ }
|
|
|
}
|
|
|
-.box-form{
|
|
|
- display: inline-block;
|
|
|
+.box-form {
|
|
|
+ display: inline-block ;
|
|
|
padding-left: 38%;
|
|
|
- .el-form-item{
|
|
|
- display: flex;
|
|
|
- padding: 10px;
|
|
|
- .el-form-item__label{
|
|
|
- width: 80px !important;
|
|
|
- }
|
|
|
- .el-input{
|
|
|
- width:288px
|
|
|
- }
|
|
|
+ .el-form-item {
|
|
|
+ display: flex;
|
|
|
+ padding: 10px;
|
|
|
+ .el-form-item__label {
|
|
|
+ width: 80px !important;
|
|
|
+ }
|
|
|
+ .el-input {
|
|
|
+ width: 288px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-.button-box{
|
|
|
- margin-left: 48%;
|
|
|
-
|
|
|
+.button-box {
|
|
|
+ margin-left: 25px !important;
|
|
|
+}
|
|
|
}
|
|
|
</style>
|