feat: 处理单据切换界面下拉单据

20240912_adapter_z
chenhc 8 months ago
parent 6baee8400f
commit 2174f8c21f

@ -8,6 +8,13 @@ export function orderPage(query) {
params: query params: query
}); });
} }
export function findByBill(query) {
return axios({
url: "/udiwms/basic/collect/order/findByBill",
method: "get",
params: query
});
}
export function getNextOrder(query) { export function getNextOrder(query) {
return axios({ return axios({

@ -326,7 +326,7 @@ import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder"; import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
import {getCurOrder, getNextOrder} from "@/api/collect/collectOrder"; import {getCurOrder, getNextOrder,findByBill} from "@/api/collect/collectOrder";
import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail"; import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
@ -365,6 +365,7 @@ export default {
curWorkPlaces: [], curWorkPlaces: [],
erpList: [], erpList: [],
formData: { formData: {
billNo:null,
tagStatus: -1, tagStatus: -1,
invCode: null, invCode: null,
busType: null, busType: null,
@ -416,6 +417,21 @@ export default {
PanelOrderAllDetail PanelOrderAllDetail
}, },
methods: { methods: {
getBillNo(billNo){
let post = {
billNo: billNo,
page: 1,
limit: 10,
}
findByBill(post).then(res => {
if (res.code == 20000) {
if (res.data.list.length > 0){
this.formData = res.data.list[0]
}
}
})
},
selectBusType(val) { selectBusType(val) {
this.formData.busType = val this.formData.busType = val
this.selectBusTypeDisabled = false this.selectBusTypeDisabled = false
@ -438,7 +454,12 @@ export default {
if (this.formDataVisible.scanType == 1) { if (this.formDataVisible.scanType == 1) {
this.findFromInvList(""); this.findFromInvList("");
} }
this.findCurOrder(); if (this.formData.billNo != null){
this.getBillNo(this.formData.billNo)
}else {
this.findCurOrder();
}
} else { } else {
this.formData.busType = null this.formData.busType = null
} }
@ -844,6 +865,9 @@ export default {
}); });
this.findCurWorkPlaces(); this.findCurWorkPlaces();
this.formData.invCode = this.$store.getters.locInvCode; this.formData.invCode = this.$store.getters.locInvCode;
if (this.$route.query.billNo != null) {
this.formData.billNo = this.$route.query.billNo
}
if (this.$route.query.workplaceId != null) { if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true this.isLinkDisabled = true
this.selectBusTypeDisabled = true this.selectBusTypeDisabled = true
@ -853,6 +877,8 @@ export default {
} }
} }
} }

@ -326,7 +326,7 @@ import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder"; import {draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
import {getCurOrder, getNextOrder} from "@/api/collect/collectOrder"; import {getCurOrder, getNextOrder,findByBill} from "@/api/collect/collectOrder";
import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail"; import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments' import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
@ -365,6 +365,7 @@ export default {
curWorkPlaces: [], curWorkPlaces: [],
erpList: [], erpList: [],
formData: { formData: {
billNo:null,
tagStatus: -1, tagStatus: -1,
invCode: null, invCode: null,
busType: null, busType: null,
@ -416,6 +417,23 @@ export default {
PanelOrderAllDetail PanelOrderAllDetail
}, },
methods: { methods: {
getBillNo(billNo,workPlaceCode){
let post = {
billNo: billNo,
workPlaceCode: workPlaceCode,
page: 1,
limit: 10,
}
findByBill(post).then(res => {
if (res.code == 20000) {
if (res.data.billNo != null){
this.formData = res.data
this.startDeal();
}
}
})
},
selectBusType(val) { selectBusType(val) {
this.formData.busType = val this.formData.busType = val
this.selectBusTypeDisabled = false this.selectBusTypeDisabled = false
@ -438,7 +456,12 @@ export default {
if (this.formDataVisible.scanType == 1) { if (this.formDataVisible.scanType == 1) {
this.findFromInvList(""); this.findFromInvList("");
} }
this.findCurOrder(); if (this.formData.billNo != null){
this.getBillNo(this.formData.billNo,this.formData.workPlaceCode)
}else {
this.findCurOrder();
}
} else { } else {
this.formData.busType = null this.formData.busType = null
} }
@ -844,6 +867,9 @@ export default {
}); });
this.findCurWorkPlaces(); this.findCurWorkPlaces();
this.formData.invCode = this.$store.getters.locInvCode; this.formData.invCode = this.$store.getters.locInvCode;
if (this.$route.query.billNo != null) {
this.formData.billNo = this.$route.query.billNo
}
if (this.$route.query.workplaceId != null) { if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true this.isLinkDisabled = true
this.selectBusTypeDisabled = true this.selectBusTypeDisabled = true
@ -853,6 +879,8 @@ export default {
} }
} }
} }

Loading…
Cancel
Save