|
@@ -6,7 +6,57 @@
|
|
<div class="form_box">
|
|
<div class="form_box">
|
|
<dil-form :formId="117" v-model="form1"></dil-form>
|
|
<dil-form :formId="117" v-model="form1"></dil-form>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <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-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="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="button_box">
|
|
<div class="button_box">
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
<el-button @click="onClickCancel">返回</el-button>
|
|
<el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
<el-button type="primary" @click="onClickConfirm">确认</el-button>
|
|
@@ -21,6 +71,12 @@ export default {
|
|
data(){
|
|
data(){
|
|
return {
|
|
return {
|
|
form1: {},
|
|
form1: {},
|
|
|
|
+ stateSupplier:null,
|
|
|
|
+ supplierId:null,
|
|
|
|
+ sendStationId:null,
|
|
|
|
+ toTheStationId:null,
|
|
|
|
+ sendStation:"",
|
|
|
|
+ toTheStation:""
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -34,12 +90,107 @@ export default {
|
|
.then((res) => {
|
|
.then((res) => {
|
|
res.data.data.forEach((e) => {
|
|
res.data.data.forEach((e) => {
|
|
this.form1 = e;
|
|
this.form1 = e;
|
|
|
|
+ console.log(e)
|
|
|
|
+ this.supplierId = e.supplierId
|
|
|
|
+ this.stateSupplier = e.supplierName
|
|
|
|
+ this.toTheStationId = e.toTheStationId
|
|
|
|
+ this.sendStationId = e.sendStationId
|
|
|
|
+ this.sendStation = e.sendName
|
|
|
|
+ this.toTheStation = e.arrivalName
|
|
|
|
+
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 返回
|
|
// 返回
|
|
onClickCancel() {
|
|
onClickCancel() {
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
|
|
+ },
|
|
|
|
+ //发货单位弹出层
|
|
|
|
+ handleSelectSupplier(item){
|
|
|
|
+ this.supplierId = item.supplierId
|
|
|
|
+ item.supplierName = this.stateSupplier
|
|
|
|
+ },
|
|
|
|
+ //以下是发货单位边输边查搜索
|
|
|
|
+ querySearchSupplier(queryString, cb) {
|
|
|
|
+ this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
|
|
|
|
+ if(res.data.code == "200"){
|
|
|
|
+ var restaurantsSupplier = res.data.data
|
|
|
|
+ var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ cb(results);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ createFilterSupplier(queryString) {
|
|
|
|
+ return (restaurantsSupplier) => {
|
|
|
|
+ return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //发站弹出层
|
|
|
|
+ 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
|
|
|
|
+ );
|
|
|
|
+ };
|
|
},
|
|
},
|
|
// 确认
|
|
// 确认
|
|
onClickConfirm() {
|
|
onClickConfirm() {
|
|
@@ -47,11 +198,12 @@ export default {
|
|
resultId: this.$route.params.resultId,
|
|
resultId: this.$route.params.resultId,
|
|
resultPlanDate: sjTime(this.form1.resultPlanDate),
|
|
resultPlanDate: sjTime(this.form1.resultPlanDate),
|
|
resultCategory: this.form1.resultCategory,
|
|
resultCategory: this.form1.resultCategory,
|
|
- shipperId: this.form1.shipperId,
|
|
|
|
- sendStationId: this.form1.sendStationId,
|
|
|
|
- toTheStationId: this.form1.toTheStationId,
|
|
|
|
|
|
+ supplierId: this.supplierId,
|
|
|
|
+ sendStationId: this.sendStationId,
|
|
|
|
+ toTheStationId: this.toTheStationId,
|
|
resultPleaseNumber: this.form1.resultPleaseNumber
|
|
resultPleaseNumber: this.form1.resultPleaseNumber
|
|
};
|
|
};
|
|
|
|
+ console.log(tmstrainPleaseApproveResult)
|
|
function isNumber() {
|
|
function isNumber() {
|
|
var value = tmstrainPleaseApproveResult.resultPleaseNumber;
|
|
var value = tmstrainPleaseApproveResult.resultPleaseNumber;
|
|
//验证是否为数字
|
|
//验证是否为数字
|
|
@@ -66,7 +218,6 @@ export default {
|
|
if (
|
|
if (
|
|
tmstrainPleaseApproveResult.resultPlanDate==null||
|
|
tmstrainPleaseApproveResult.resultPlanDate==null||
|
|
tmstrainPleaseApproveResult.resultCategory==null||
|
|
tmstrainPleaseApproveResult.resultCategory==null||
|
|
- tmstrainPleaseApproveResult.shipperId==null||
|
|
|
|
tmstrainPleaseApproveResult.sendStationId==null||
|
|
tmstrainPleaseApproveResult.sendStationId==null||
|
|
tmstrainPleaseApproveResult.toTheStationId==null||
|
|
tmstrainPleaseApproveResult.toTheStationId==null||
|
|
tmstrainPleaseApproveResult.resultPleaseNumber==null
|
|
tmstrainPleaseApproveResult.resultPleaseNumber==null
|