9/18 字段查询优化

yanshishuju
wangwei 7 months ago
parent 10fad9c0c6
commit f39038f960

@ -117,13 +117,13 @@
> >
<el-option <el-option
v-for="item in curWorkPlaces" v-for="item in curWorkPlaces"
:key="item.workplaceId" :key="item.code"
:label="item.workplaceName" :label="item.label"
:value="item.workplaceId" :value="item.code"
> >
<span style="float: left">{{ item.workplaceName }}</span> <span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ <span style="float: right; color: #8492a6; font-size: 13px">{{
item.workplaceId item.code
}}</span> }}</span>
</el-option> </el-option>
</el-select> </el-select>
@ -330,6 +330,7 @@ import {printSplitLabel} from "@/api/collect/splitCreateOrder";
import chooseDraftOrderDialog from "./chooseDraftOrderDialog" import chooseDraftOrderDialog from "./chooseDraftOrderDialog"
import {getUserBindWork} from '@/api/basic/collectPoint/userWorkplace' import {getUserBindWork} from '@/api/basic/collectPoint/userWorkplace'
import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage'
export default { export default {
name: "ioCreateOrder", name: "ioCreateOrder",
@ -1005,19 +1006,37 @@ export default {
}, },
// //
// findCurWorkPlaces(val) {
// let query = {
// userId: this.userInfo.userId,
// page: 1,
// limit: 100,
// }
// getUserBindWork(query).then((res) => {
// this.curWorkPlaces = res.data.list || [];
// if (this.curWorkPlaces.length == 1 && this.$isNotBlank(this.orderFormData.workPlaceCode)) {
// this.orderFormData.workPlaceCode = this.curWorkPlaces[0].workplaceId;
// this.defaultSplitType()
// }
// })
// },
findCurWorkPlaces(val) { findCurWorkPlaces(val) {
let query = { let query = {
userId: this.userInfo.userId, // chargeUser: _this.$store.getters.userId,
userIdFlag: true,
key: val,
page: 1, page: 1,
limit: 100, limit: 10,
} }
getUserBindWork(query).then((res) => { filterWorkOptimize(query)
this.curWorkPlaces = res.data.list || []; .then((response) => {
if (this.curWorkPlaces.length == 1 && this.$isNotBlank(this.orderFormData.workPlaceCode)) { this.loading = false;
this.orderFormData.workPlaceCode = this.curWorkPlaces[0].workplaceId; this.curWorkPlaces = response.data || [];
this.defaultSplitType() })
} .catch(() => {
}) this.loading = false;
this.curWorkPlaces = [];
});
}, },

@ -37,7 +37,7 @@
:label="item.columnDesc+`:`" :key="item.id"> :label="item.columnDesc+`:`" :key="item.id">
<el-input <el-input
v-model="filterQuery[item.columnName]" v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc == '模糊查询' ? '产品通用名/规格/批次号' : item.columnDesc" :placeholder="item.columnDesc == '模糊查询' ? '产品名/规格/批次号/生产企业' : item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)" :disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)" @keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable clearable

Loading…
Cancel
Save