|
@@ -1,44 +1,77 @@
|
|
|
<template>
|
|
|
<!-- 新增请作业页面 -->
|
|
|
- <div class="contractDetails">
|
|
|
+ <div class="contractDetails">
|
|
|
<page-title>返回</page-title>
|
|
|
|
|
|
<div class="form">
|
|
|
<div class="form_box">
|
|
|
- <dil-form :formId="122" v-model="form1" ></dil-form>
|
|
|
+ <dil-form :formId="122" v-model="form1"></dil-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="fromOther">
|
|
|
- <el-form
|
|
|
+ <div class="fromOther">
|
|
|
+ <el-form
|
|
|
:inline="true"
|
|
|
class="demo-form-inline"
|
|
|
label-width="80px"
|
|
|
- >
|
|
|
+ style="margin-left: 525px"
|
|
|
+ >
|
|
|
<el-form-item label="发货单位">
|
|
|
- <el-autocomplete
|
|
|
- class="inline-input"
|
|
|
- v-model="stateSupplier"
|
|
|
- :fetch-suggestions="querySearchSupplier"
|
|
|
- placeholder="请输入发货单位名称"
|
|
|
- :trigger-on-focus="false"
|
|
|
- @select="handleSelectSupplier"
|
|
|
- >
|
|
|
- <template slot-scope="{ item }">
|
|
|
- <div class="name">{{ item.supplierName }}</div>
|
|
|
- </template>
|
|
|
- </el-autocomplete>
|
|
|
+ <el-autocomplete
|
|
|
+ class="inline-input"
|
|
|
+ v-model="stateSupplier"
|
|
|
+ :fetch-suggestions="querySearchSupplier"
|
|
|
+ placeholder="请输入发货单位名称"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @select="handleSelectSupplier"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ item }">
|
|
|
+ <div class="name">{{ item.supplierName }}</div>
|
|
|
+ </template>
|
|
|
+ </el-autocomplete>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </el-form>
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
|
|
|
+ <el-form-item label="发站">
|
|
|
+ <el-autocomplete
|
|
|
+ class="inline-input"
|
|
|
+ v-model="sendStation"
|
|
|
+ :fetch-suggestions="querySearchSendStation"
|
|
|
+ placeholder="请输入发站名称"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @select="handleSelectSendStation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ item }">
|
|
|
+ <div class="name">{{ item.arrivalName }}</div>
|
|
|
+ </template>
|
|
|
+ </el-autocomplete>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
|
|
|
+ <el-form-item label="到站">
|
|
|
+ <el-autocomplete
|
|
|
+ class="inline-input"
|
|
|
+ v-model="toTheStation"
|
|
|
+ :fetch-suggestions="querySearchToTheStation"
|
|
|
+ placeholder="请输入到站名称"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @select="handleSelectToTheStation"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ item }">
|
|
|
+ <div class="name">{{ item.arrivalName }}</div>
|
|
|
+ </template>
|
|
|
+ </el-autocomplete>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
- <div class="trainTransport">
|
|
|
- <!-- 确定和取消 -->
|
|
|
- <div class="button_box">
|
|
|
- <el-button @click="onClickCancel">返回</el-button>
|
|
|
- <el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
|
+ <div class="trainTransport">
|
|
|
+ <!-- 确定和取消 -->
|
|
|
+ <div class="button_box">
|
|
|
+ <el-button @click="onClickCancel">返回</el-button>
|
|
|
+ <el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -54,15 +87,90 @@ export default {
|
|
|
supplierId: null,
|
|
|
supplierName: "",
|
|
|
stateSupplier: "",
|
|
|
+ sendStationId:null,
|
|
|
+ toTheStationId:1,
|
|
|
+ sendStation:null,
|
|
|
+ toTheStation:"达州站"
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
// this.unit();
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.form1 = {
|
|
|
+ toTheStationId: 1,
|
|
|
+ };
|
|
|
+ },
|
|
|
methods: {
|
|
|
handleCheckedCitiesChange(value) {
|
|
|
console.log(value);
|
|
|
},
|
|
|
+ //发站弹出层
|
|
|
+ handleSelectSendStation(item) {
|
|
|
+ this.sendStationId = item.arrivalId;
|
|
|
+ this.sendStation = item.arrivalName;
|
|
|
+ },
|
|
|
+ //以下是发站边输边查搜索
|
|
|
+ querySearchSendStation(queryString, cb) {
|
|
|
+ this.axios
|
|
|
+ .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ var restaurantsSupplier = res.data.data;
|
|
|
+ console.log(restaurantsSupplier)
|
|
|
+ var results = queryString
|
|
|
+ ? restaurantsSupplier.filter(
|
|
|
+ this.createFilterSendStation(queryString)
|
|
|
+ )
|
|
|
+ : restaurantsSupplier;
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
+ cb(results);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //发站
|
|
|
+ createFilterSendStation(queryString) {
|
|
|
+ return (restaurantsSupplier) => {
|
|
|
+ return (
|
|
|
+ restaurantsSupplier.arrivalName
|
|
|
+ .toLowerCase()
|
|
|
+ .indexOf(queryString.toLowerCase()) > -1
|
|
|
+ );
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //到站弹出层
|
|
|
+ handleSelectToTheStation(item) {
|
|
|
+ this.toTheStationId = item.arrivalId;
|
|
|
+ this.toTheStation = item.arrivalName;
|
|
|
+ },
|
|
|
+ //以下是到站边输边查搜索
|
|
|
+ querySearchToTheStation(queryString, cb) {
|
|
|
+ this.axios
|
|
|
+ .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ var restaurantsSupplier = res.data.data;
|
|
|
+ console.log(restaurantsSupplier)
|
|
|
+ var results = queryString
|
|
|
+ ? restaurantsSupplier.filter(
|
|
|
+ this.createFilterToTheStation(queryString)
|
|
|
+ )
|
|
|
+ : restaurantsSupplier;
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
+ cb(results);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //到站
|
|
|
+ createFilterToTheStation(queryString) {
|
|
|
+ return (restaurantsSupplier) => {
|
|
|
+ return (
|
|
|
+ restaurantsSupplier.arrivalName
|
|
|
+ .toLowerCase()
|
|
|
+ .indexOf(queryString.toLowerCase()) > -1
|
|
|
+ );
|
|
|
+ };
|
|
|
+ },
|
|
|
//发货单位弹出层
|
|
|
handleSelectSupplier(item) {
|
|
|
this.supplierId = item.supplierId;
|
|
@@ -104,8 +212,8 @@ export default {
|
|
|
resultPlanDate: sjTime(this.form1.resultPlanDate),
|
|
|
resultCategory: this.form1.resultCategory,
|
|
|
supplierId: this.supplierId,
|
|
|
- sendStationId: this.form1.sendStationId,
|
|
|
- toTheStationId: this.form1.toTheStationId,
|
|
|
+ sendStationId: this.sendStationId,
|
|
|
+ toTheStationId: this.toTheStationId,
|
|
|
resultPleaseNumber: this.form1.resultPleaseNumber,
|
|
|
userId: getCookie("orgCode"),
|
|
|
resultType: 3,
|
|
@@ -135,11 +243,11 @@ export default {
|
|
|
this.axios
|
|
|
.post("/api/v1/tms/addWagonPlease", tmstrainPleaseApproveResult)
|
|
|
.then(() => {
|
|
|
+ this.$router.go(-1);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "新增成功!",
|
|
|
});
|
|
|
- this.$router.go(-1);
|
|
|
});
|
|
|
},
|
|
|
},
|
|
@@ -174,19 +282,19 @@ export default {
|
|
|
margin-top: 55px;
|
|
|
}
|
|
|
}
|
|
|
- .fromOther {
|
|
|
- margin-left: 34.5%;
|
|
|
- width: 50%;
|
|
|
- .inline-input {
|
|
|
- width: 300px;
|
|
|
- .button_box {
|
|
|
- margin-left: 45%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.trainTransport {
|
|
|
+ margin-left: 41.25%;
|
|
|
+ width: 50%;
|
|
|
+ .inline-input {
|
|
|
+ width: 300px;
|
|
|
+ .button_box {
|
|
|
+ margin-left: 52.5%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|