fix: 页面工位业务类型联动

20240912_adapter_z
chenhc 10 months ago
parent 8f96d271c8
commit 0965d17312

@ -235,6 +235,8 @@ import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownload
import prescribeOriginPanel from "./PannelOrderBiz";
import {orderPage} from "@/api/collect/collectOrder";
import { selectCorpList } from '@/api/basic/basicUnitMaintain'
import {filterWorkOptimize} from "@/api/basic/workPlace/sysWorkplaceManage";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
export default {
name: "selectPrescribeDialog",
@ -262,6 +264,12 @@ export default {
},
data() {
return {
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 100
},
//
//
tableHeader: [],
@ -272,7 +280,10 @@ export default {
//-------------end
showSearch: true,
isLinkDisabled: false,
filterQuery: {
busType: null,
workPlaceCode: null,
billNo: null,
page: 1,
limit: 10,
@ -289,6 +300,8 @@ export default {
panelALive: false,
options: {
fromCorp: [],
findWorkPlace: [],
getBusType: [],
},
}
},
@ -394,9 +407,59 @@ export default {
this.radioCheck = val.id;
this.currentRow = val;
},
findWorkPlace(_this, val) {
let query = {
chargeUser: _this.$store.getters.userId,
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
})
},
},
created() {
if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true
this.filterQuery.workPlaceCode = this.$route.query.workplaceId
}
this.findWorkPlace(this, "");
getHead("prescribeDownload", "1").then((re) => {
//
this.tableObj = re.data;

Loading…
Cancel
Save