diff --git a/src/api/collect/collectOrder.js b/src/api/collect/collectOrder.js index 7fb6b9b3..801605aa 100644 --- a/src/api/collect/collectOrder.js +++ b/src/api/collect/collectOrder.js @@ -161,3 +161,14 @@ export function getSplitCode(query) { params: query }); } + + + + +export function downloadOrder(query) { + return axios({ + url: "/udiwms/basic/collect/origin/order/download", + method: "post", + data: query + }); +} diff --git a/src/views/collect/CollectOrderNew.vue b/src/views/collect/CollectOrderNew.vue index 44c48a68..c2aeff75 100644 --- a/src/views/collect/CollectOrderNew.vue +++ b/src/views/collect/CollectOrderNew.vue @@ -93,6 +93,10 @@ >查询 + 下载数据 + 初始化演示数据 { + if (res.code == 20000){ + return this.$message.success(res.data) + }else { + return this.$message.error("获取错误") + } + }) + }, clearAllOrder() { this.loading = true; clearAllOrder().then(res => { @@ -454,6 +480,51 @@ export default { }); } , + findWorkPlace(_this, val) { + let query = { + key: val, + page: 1, + limit: 10 + } + filterWorkOptimize(query) + .then((response) => { + _this.loading = false + _this.options.findWorkPlace = response.data || [] + if (_this.options.findWorkPlace.length == 1) { + _this.filterQuery.workPlaceCode = _this.options.findWorkPlace[0].code + } + }) + .catch(() => { + _this.loading = false + _this.options.findWorkPlace = [] + }) + }, + changePlace(_this, query) { + _this.getWorkBindBusTypes(_this, query) + }, + getWorkBindBusTypes(_this, query) { + _this.busQuery.workplaceCode = query + getWorkBindBusTypes(this.busQuery).then(res => { + if (res.code == 20000) { + let busTypes = res.data.list || []; + // _this.options.getWorkPlace = res.data.list || []; + let getWorkPlace = busTypes.map(busType => { + return { + code: busType.documentTypeCode, + label: busType.busName + }; + }); + _this.options.getBusType = getWorkPlace + if (_this.options.getBusType.length == 1) { + _this.filterQuery.busType = _this.options.getBusType[0].code + } + else { + _this.filterQuery.busType = null + } + } + return + }) + }, }, @@ -467,6 +538,7 @@ export default { this.getList(); }); this.filterQuery.tagStatus = this.tagStatus + this.findWorkPlace(this,'') } }