|
@@ -1,13 +1,9 @@
|
|
// 新增厂内内转需求
|
|
// 新增厂内内转需求
|
|
<template>
|
|
<template>
|
|
- <div id="endMaintenance">
|
|
|
|
|
|
+ <div class="inwardRequirement">
|
|
<page-title>新增需求</page-title>
|
|
<page-title>新增需求</page-title>
|
|
- <div class="main">
|
|
|
|
-
|
|
|
|
- <span class="a"></span>
|
|
|
|
- </div>
|
|
|
|
<div>
|
|
<div>
|
|
- <div class="form-box f2">
|
|
|
|
|
|
+ <div class="material form">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form-item label="物资">
|
|
<el-form-item label="物资">
|
|
<el-input v-model="materialName" disabled> </el-input>
|
|
<el-input v-model="materialName" disabled> </el-input>
|
|
@@ -17,19 +13,46 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
- <div class="form-box f5">
|
|
|
|
|
|
+ <div class="materialWeight form">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
- <el-form-item label="用车地点">
|
|
|
|
- <el-input v-model="truckPoint" disabled> </el-input>
|
|
|
|
|
|
+ <el-form-item label="物资重量">
|
|
|
|
+ <el-input v-model="materialWeight"> </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item>
|
|
|
|
- <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
|
|
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="materialNum form">
|
|
|
|
+ <el-form :inline="true" class="demo-form-inline">
|
|
|
|
+ <el-form-item label="物资数量">
|
|
|
|
+ <el-input v-model="materialNum"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
- <div class="form-box f5">
|
|
|
|
|
|
+ <!-- 用车单位 -->
|
|
|
|
+ <div class="requireUnit form">
|
|
|
|
+ <el-form
|
|
|
|
+ :inline="true"
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
+ label-width="80px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="用车单位">
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ class="inline-input"
|
|
|
|
+ v-model="requireUnitName"
|
|
|
|
+ :fetch-suggestions="querySearchCarrier"
|
|
|
|
+ placeholder="请输入用车单位名称"
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
+ @select="handleSelectCarrier"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="{ item }">
|
|
|
|
+ <div class="name">{{ item.shipperName }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="unloadPoint form">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
- <el-form-item label="卸货地点">
|
|
|
|
|
|
+ <el-form-item label="卸车点">
|
|
<el-input v-model="truckPoint1" disabled> </el-input>
|
|
<el-input v-model="truckPoint1" disabled> </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -37,9 +60,9 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
- <div class="form-box f5">
|
|
|
|
|
|
+ <div class="loadPoint form">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
<el-form :inline="true" class="demo-form-inline">
|
|
- <el-form-item label="装货月台">
|
|
|
|
|
|
+ <el-form-item label="装车点">
|
|
<el-input v-model="requirementPlatformName" disabled> </el-input>
|
|
<el-input v-model="requirementPlatformName" disabled> </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -47,7 +70,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
- <div class="form-box" >
|
|
|
|
|
|
+ <div class="form-box">
|
|
<dil-form :formId="300" v-model="form"></dil-form>
|
|
<dil-form :formId="300" v-model="form"></dil-form>
|
|
</div>
|
|
</div>
|
|
<el-drawer
|
|
<el-drawer
|
|
@@ -59,7 +82,7 @@
|
|
<el-input
|
|
<el-input
|
|
placeholder="请输入内容"
|
|
placeholder="请输入内容"
|
|
v-model="input"
|
|
v-model="input"
|
|
- style="margin-top: 10px; margin-left: 20px"
|
|
|
|
|
|
+ style="margin-top: 10px; margin-left: 10px; width: 250px"
|
|
clearable
|
|
clearable
|
|
>
|
|
>
|
|
</el-input>
|
|
</el-input>
|
|
@@ -73,11 +96,23 @@
|
|
</el-button>
|
|
</el-button>
|
|
<div v-show="a == 1">
|
|
<div v-show="a == 1">
|
|
<dilTable
|
|
<dilTable
|
|
- v-bind.sync="second"
|
|
|
|
|
|
+ v-bind.sync="materialTable"
|
|
@radio-change="currentRadioChange1"
|
|
@radio-change="currentRadioChange1"
|
|
></dilTable>
|
|
></dilTable>
|
|
</div>
|
|
</div>
|
|
- <div v-show="a !== 1">
|
|
|
|
|
|
+ <div v-show="a == 2">
|
|
|
|
+ <dilTable
|
|
|
|
+ v-bind.sync="second1"
|
|
|
|
+ @radio-change="currentRadioChange2"
|
|
|
|
+ ></dilTable>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-show="a == 3">
|
|
|
|
+ <dilTable
|
|
|
|
+ v-bind.sync="second1"
|
|
|
|
+ @radio-change="currentRadioChange2"
|
|
|
|
+ ></dilTable>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-show="a == 4">
|
|
<dilTable
|
|
<dilTable
|
|
v-bind.sync="second1"
|
|
v-bind.sync="second1"
|
|
@radio-change="currentRadioChange2"
|
|
@radio-change="currentRadioChange2"
|
|
@@ -85,7 +120,7 @@
|
|
</div>
|
|
</div>
|
|
</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">确认新增</el-button>
|
|
<el-button type="primary" @click="cancel">返回</el-button>
|
|
<el-button type="primary" @click="cancel">返回</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -95,39 +130,68 @@
|
|
<script>
|
|
<script>
|
|
import PageTitle from "@/components/Page/Title";
|
|
import PageTitle from "@/components/Page/Title";
|
|
import { sjTime } from "@/utils/sharedJsFile";
|
|
import { sjTime } from "@/utils/sharedJsFile";
|
|
|
|
+import { getCookie } from "@/utils/util.js";
|
|
export default {
|
|
export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- purchaseOrder: "",
|
|
|
|
- foreignShipName: "",
|
|
|
|
- materialName: "",
|
|
|
|
- requirementPlatformName: "",
|
|
|
|
|
|
+ materialName: null,
|
|
|
|
+ requirementPlatformName: null,
|
|
|
|
+ materialNum:null,
|
|
|
|
+ materialWeight:null,
|
|
a: 1,
|
|
a: 1,
|
|
direction: "rtl",
|
|
direction: "rtl",
|
|
- input: "",
|
|
|
|
|
|
+ input:null,
|
|
requiremntUnitId: null,
|
|
requiremntUnitId: null,
|
|
requirementUnloadUnitId: null,
|
|
requirementUnloadUnitId: null,
|
|
- requirementPlatformId: null,
|
|
|
|
|
|
+ requirementPlatformId: null,
|
|
truckPoint: "",
|
|
truckPoint: "",
|
|
materialId: null,
|
|
materialId: null,
|
|
- truckPoint1:'',
|
|
|
|
|
|
+ requireUnitName:null,
|
|
|
|
+ shipperId:null,
|
|
|
|
+ truckPoint1: "",
|
|
drawer: false,
|
|
drawer: false,
|
|
form: {},
|
|
form: {},
|
|
- second: {
|
|
|
|
- requestUrl: "/api/v1/uc/queryMaterialByLike?apiId=244",
|
|
|
|
|
|
+ materialTable: {
|
|
|
|
+ requestUrl: "",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
- mapList1: [],
|
|
|
|
|
|
+ mapList1: []
|
|
},
|
|
},
|
|
second1: {
|
|
second1: {
|
|
requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
|
|
requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
|
|
selectionType: "radio",
|
|
selectionType: "radio",
|
|
- mapList2: [],
|
|
|
|
- },
|
|
|
|
|
|
+ mapList2: []
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //用车单位弹出层
|
|
|
|
+ handleSelectCarrier(item){
|
|
|
|
+ this.shipperId = item.shipperId
|
|
|
|
+ this.requireUnitName = item.shipperName
|
|
|
|
+ },
|
|
|
|
+ //以下是用车单位边输边查搜索
|
|
|
|
+ querySearchCarrier(queryString, cb) {
|
|
|
|
+ this.axios.post('/api/v1/uc/getRequireUnitName?index='+queryString).then((res)=>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ var restaurantsCarrier = res.data.data
|
|
|
|
+ console.log(restaurantsCarrier,"restaurantsCarrier");
|
|
|
|
+ var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ cb(results);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ createFilterCarrier(queryString) {
|
|
|
|
+ return (restaurantsCarrier) => {
|
|
|
|
+ return (restaurantsCarrier.shipperName.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //以上是用车单位边输边查搜索
|
|
ondrawer(num) {
|
|
ondrawer(num) {
|
|
|
|
+ if(num==1){
|
|
|
|
+ this.materialTable.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date()
|
|
|
|
+ }
|
|
this.drawer = true;
|
|
this.drawer = true;
|
|
this.a = num;
|
|
this.a = num;
|
|
},
|
|
},
|
|
@@ -135,31 +199,40 @@ export default {
|
|
done();
|
|
done();
|
|
},
|
|
},
|
|
onclick(a) {
|
|
onclick(a) {
|
|
- if (a == 1) {
|
|
|
|
- this.second.requestUrl =
|
|
|
|
|
|
+ if(this.input != null){
|
|
|
|
+ if (a == 1) {
|
|
|
|
+ this.materialTable.requestUrl =
|
|
"/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
|
|
"/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
|
|
- } else {
|
|
|
|
- console.log(a)
|
|
|
|
|
|
+ this.input = null
|
|
|
|
+ } else {
|
|
this.second1.requestUrl =
|
|
this.second1.requestUrl =
|
|
"/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
|
|
"/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
|
|
|
|
+ this.input = null
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.materialTable.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
currentRadioChange1(selection) {
|
|
currentRadioChange1(selection) {
|
|
- this.mapList1 = selection
|
|
|
|
- this.purchaseOrder = this.mapList1.purchaseOrderNo
|
|
|
|
- this.foreignShipName = this.mapList1.resultForeignShipName
|
|
|
|
- this.materialName = this.mapList1.materialName;
|
|
|
|
|
|
+ this.mapList1 = selection;
|
|
|
|
+ console.log(selection)
|
|
|
|
+ if(selection.materialSpecification==null||selection.materialModel==null){
|
|
|
|
+ this.materialName = this.mapList1.materialName
|
|
|
|
+ }else{
|
|
|
|
+ this.materialName = this.mapList1.materialName + selection.materialSpecification + '(' + selection.materialModel + ')';
|
|
|
|
+ }
|
|
|
|
+
|
|
this.materialId = selection.materialId;
|
|
this.materialId = selection.materialId;
|
|
},
|
|
},
|
|
currentRadioChange2(selection) {
|
|
currentRadioChange2(selection) {
|
|
- this.mapList2 = selection
|
|
|
|
- if(this.a == 2){
|
|
|
|
|
|
+ this.mapList2 = selection;
|
|
|
|
+ if (this.a == 2) {
|
|
this.truckPoint = selection.wareHouseName;
|
|
this.truckPoint = selection.wareHouseName;
|
|
this.requiremntUnitId = selection.wareHouseId;
|
|
this.requiremntUnitId = selection.wareHouseId;
|
|
- }else if(this.a == 3){
|
|
|
|
|
|
+ } else if (this.a == 3) {
|
|
this.requirementUnloadUnitId = selection.wareHouseId;
|
|
this.requirementUnloadUnitId = selection.wareHouseId;
|
|
this.truckPoint1 = selection.wareHouseName;
|
|
this.truckPoint1 = selection.wareHouseName;
|
|
- }else if(this.a == 4){
|
|
|
|
|
|
+ } else if (this.a == 4) {
|
|
this.requirementPlatformId = selection.wareHouseId;
|
|
this.requirementPlatformId = selection.wareHouseId;
|
|
this.requirementPlatformName = selection.wareHouseName;
|
|
this.requirementPlatformName = selection.wareHouseName;
|
|
}
|
|
}
|
|
@@ -168,29 +241,29 @@ export default {
|
|
makeSure() {
|
|
makeSure() {
|
|
let requiremnet = {
|
|
let requiremnet = {
|
|
materialId: this.materialId,
|
|
materialId: this.materialId,
|
|
- requiremntUnitId: this.requiremntUnitId,
|
|
|
|
- capacityTypeId: this.form.capacityTypeId,
|
|
|
|
- materialWeight: this.form.materialWeight,
|
|
|
|
- materialNumber: this.form.materialNumber,
|
|
|
|
|
|
+ materialWeight: Number(this.materialWeight),
|
|
|
|
+ materialNumber: Number(this.materialNum),
|
|
requirementEstimatedDuration: this.form.requirementEstimatedDuration,
|
|
requirementEstimatedDuration: this.form.requirementEstimatedDuration,
|
|
requirementOverlimit: this.form.requirementOverlimit,
|
|
requirementOverlimit: this.form.requirementOverlimit,
|
|
- requirementShipperId: this.form.requirementShipperId,
|
|
|
|
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,
|
|
requirementWorkEnvironment: this.form.requirementWorkEnvironment,
|
|
requirementWorkEnvironment: this.form.requirementWorkEnvironment,
|
|
requirementWorkType: this.form.requirementWorkType,
|
|
requirementWorkType: this.form.requirementWorkType,
|
|
- requirementUnloadUnitId:this.requirementUnloadUnitId,
|
|
|
|
- requirementPlatformId: this.requirementPlatformId
|
|
|
|
|
|
+ requirementUnloadUnitId: this.requirementUnloadUnitId,
|
|
|
|
+ requirementPlatformId: this.requirementPlatformId,
|
|
|
|
+ requirementShipperId: this.shipperId,
|
|
|
|
+ orgCode:getCookie("orgCode")
|
|
};
|
|
};
|
|
console.log(requiremnet);
|
|
console.log(requiremnet);
|
|
|
|
+ debugger
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/addTruckRequirement", requiremnet)
|
|
.post("/api/v1/ams/addTruckRequirement", requiremnet)
|
|
- .then((res) => {
|
|
|
|
|
|
+ .then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
type: "success",
|
|
type: "success",
|
|
- message: "新增成功!",
|
|
|
|
|
|
+ message: "新增成功!"
|
|
});
|
|
});
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
} else {
|
|
} else {
|
|
@@ -201,23 +274,104 @@ export default {
|
|
// 返回
|
|
// 返回
|
|
cancel() {
|
|
cancel() {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
-.el-form-item{
|
|
|
|
- display: flex;
|
|
|
|
-}
|
|
|
|
-.form-box,
|
|
|
|
-.button-box
|
|
|
|
-{
|
|
|
|
- display: flex;
|
|
|
|
- text-align: center;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- margin-top: 0.3125rem;
|
|
|
|
- margin-bottom: 1.25rem;
|
|
|
|
|
|
+.inwardRequirement {
|
|
|
|
+ .from {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
+ .material {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ .text {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 170px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ }
|
|
|
|
+ .input {
|
|
|
|
+ width: 250px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .materialWeight,
|
|
|
|
+ .materialNum {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-right: 100px;
|
|
|
|
+ .text {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 170px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ .input {
|
|
|
|
+ width: 250px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .requireUnit {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-right: 127px;
|
|
|
|
+ .text {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 170px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ .input {
|
|
|
|
+ width: 250px;
|
|
|
|
+ margin-right: 90px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .loadPoint,
|
|
|
|
+ .unloadPoint {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ .text {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 170px;
|
|
|
|
+ text-align: right;
|
|
|
|
+ .input {
|
|
|
|
+ width: 250px;
|
|
|
|
+ margin-right: 90px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .form-box {
|
|
|
|
+ display: flex;
|
|
|
|
+ text-align: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ margin-right: 212px;
|
|
|
|
+ .el-form-item {
|
|
|
|
+ display: flex;
|
|
|
|
+ .el-form-item__label {
|
|
|
|
+ width: 170px !important;
|
|
|
|
+ }
|
|
|
|
+ .el-input {
|
|
|
|
+ width: 210px !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .button-box {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-right: 90px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
</style>
|
|
</style>
|