feat: 页面修改

20240912_adapter_z
chenhc 11 months ago
parent 68b805ef2c
commit a9bbcfd46a

@ -87,6 +87,7 @@
style="width: 90%" style="width: 90%"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
filterable filterable
@change="workPlaceCodeChange"
> >
<el-option <el-option
v-for="item in curWorkPlaces" v-for="item in curWorkPlaces"
@ -103,21 +104,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" v-if="this.formDataVisible != null && this.formDataVisible.operationType == 1">
<el-form-item prop="erpId" class="query-form-item" label="往来单位:"> <el-form-item class="query-form-item" :label="this.formDataVisible.unitTittle + ':'">
<el-select <el-select v-model="formData.fromCorp"
v-model="formData.fromCorp" filterable
placeholder="往来单位" remote
style="width: 90%" reserve-keyword
filterable placeholder="请选择往来单位" clearable style="width: 90%">
>
<el-option <el-option
v-for="item in erpList" v-for="item in fromInvOptions"
:key="item.id" :key="item.erpId"
:label="item.name" :label="item.name"
:value="item.id" :value="item.erpId"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -234,6 +235,7 @@ import PannelOrderBiz from "./PannelOrderBiz";
import {listPage} from "@/api/basic/sysWorkplaceManage"; import {listPage} from "@/api/basic/sysWorkplaceManage";
import {enterCodeWeb} from "@/api/inout/order"; import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder"; import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
export default { export default {
@ -243,6 +245,7 @@ export default {
name: "prescribeTagCodeDeal", name: "prescribeTagCodeDeal",
data() { data() {
return { return {
fromInvOptions: [],
// //
// //
loading: false, loading: false,
@ -262,14 +265,18 @@ export default {
list: [], list: [],
total: 0, total: 0,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
formDataVisible:{
operationType: null,
unitTittle: "往来单位",
corpType: 1,
},
curWorkPlaces: [], curWorkPlaces: [],
erpList: [], erpList: [],
formData: { formData: {
tagStatus: -1, tagStatus: -1,
invCode: null, invCode: null,
workPlaceCode: null, workPlaceCode: null,
erpId: null, fromCorp: null,
}, },
selectPrescriptionVisible: false, selectPrescriptionVisible: false,
corpOrderIdDisabled: false, corpOrderIdDisabled: false,
@ -300,6 +307,22 @@ export default {
addOrder, errOrder, selectPrescribeDialog, prescribeCodePanel, PannelOrderBiz addOrder, errOrder, selectPrescribeDialog, prescribeCodePanel, PannelOrderBiz
}, },
methods: { methods: {
findFromInvList(val) {
let cQuery = {
corpType:this.formDataVisible.corpType,
};
selectCorpList(cQuery)
.then((response) => {
this.fromInvOptions = response.data || [];
})
.catch(() => {
});
},
workPlaceCodeChange(value){
this.curWorkPlaces.forEach(item => {if(item.workplaceId == value){ this.formDataVisible = item
} })
return
},
handleClick(blankName) { handleClick(blankName) {
// let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId // let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId
let url = window.location.origin + `#/` + blankName + `?workplaceId=` + this.workplaceId let url = window.location.origin + `#/` + blankName + `?workplaceId=` + this.workplaceId
@ -329,9 +352,10 @@ export default {
} }
listPage(query).then((res) => { listPage(query).then((res) => {
this.curWorkPlaces = res.data.list || []; this.curWorkPlaces = res.data.list || [];
if (this.curWorkPlaces.length == 1) { if (this.curWorkPlaces.length == 1 && this.formData.workPlaceCode == null) {
this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId; this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId;
} }
this.workPlaceCodeChange(this.formData.workPlaceCode);
}) })
}, },
//------------ //------------
@ -537,9 +561,11 @@ export default {
if (this.$route.query.workplaceId != null) { if (this.$route.query.workplaceId != null) {
this.isLinkDisabled = true this.isLinkDisabled = true
this.corpOrderIdDisabled = true this.corpOrderIdDisabled = true
this.formData.workplaceCode = Number(this.$route.query.workplaceId); this.formData.workPlaceCode = Number(this.$route.query.workplaceId);
} }
this.findCurWorkPlaces(); this.findCurWorkPlaces();
this.findFromInvList("");
} }

@ -3,7 +3,7 @@
<el-form :model="formData" class="order-el-form" ref="formData" label-width="120px"> <el-form :model="formData" class="order-el-form" ref="formData" label-width="120px">
<el-card> <el-card>
<el-row :gutter="0" v-if="isLinkDisabled"> <el-row :gutter="0" v-if="isLinkDisabled">
<el-col :span="24" align="right"> <el-col :span="24" align="right">
<div class="inv-hos-title"> <div class="inv-hos-title">
<span <span
@ -87,6 +87,7 @@
style="width: 90%" style="width: 90%"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
filterable filterable
@change="workPlaceCodeChange"
> >
<el-option <el-option
v-for="item in curWorkPlaces" v-for="item in curWorkPlaces"
@ -103,21 +104,21 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" v-if="this.formDataVisible != null && this.formDataVisible.operationType == 1">
<el-form-item prop="erpId" class="query-form-item" label="往来单位:"> <el-form-item class="query-form-item" :label="this.formDataVisible.unitTittle + ':'">
<el-select <el-select v-model="formData.fromCorp"
v-model="formData.erpId" filterable
placeholder="往来单位" remote
style="width: 90%" reserve-keyword
filterable placeholder="请选择往来单位" clearable style="width: 90%">
>
<el-option <el-option
v-for="item in erpList" v-for="item in fromInvOptions"
:key="item.id" :key="item.erpId"
:label="item.name" :label="item.name"
:value="item.id" :value="item.erpId"
> >
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -170,7 +171,7 @@
</el-card> </el-card>
<el-tabs type="border-card" style="margin: 15px"> <el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="手动扫码"> <el-tab-pane label="扫码详情">
<PannelOrderBiz <PannelOrderBiz
v-if="panelALive" v-if="panelALive"
:dealStatus="2" :dealStatus="2"
@ -179,14 +180,15 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="自动赋码明细"> <el-tab-pane label="码明细">
<prescribeCodePanel <prescribeCodePanel
v-if="panelALive" v-if="panelALive"
:fifoSplit="3"
:prescribeData="curRow" :prescribeData="curRow"
></prescribeCodePanel> ></prescribeCodePanel>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="拆零赋码明细"> <el-tab-pane label="拆零明细">
<prescribeCodePanel <prescribeCodePanel
v-if="panelALive" v-if="panelALive"
:prescribeData="curRow" :prescribeData="curRow"
@ -194,7 +196,7 @@
></prescribeCodePanel> ></prescribeCodePanel>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="整取赋码明细"> <el-tab-pane label="整取明细">
<prescribeCodePanel <prescribeCodePanel
v-if="panelALive" v-if="panelALive"
:prescribeData="curRow" :prescribeData="curRow"
@ -233,6 +235,7 @@ import PannelOrderBiz from "./PannelOrderBiz";
import {listPage} from "@/api/basic/sysWorkplaceManage"; import {listPage} from "@/api/basic/sysWorkplaceManage";
import {enterCodeWeb} from "@/api/inout/order"; import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder"; import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos"; import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
export default { export default {
@ -242,6 +245,7 @@ export default {
name: "prescribeTagCodeDeal", name: "prescribeTagCodeDeal",
data() { data() {
return { return {
fromInvOptions: [],
// //
// //
loading: false, loading: false,
@ -261,19 +265,23 @@ export default {
list: [], list: [],
total: 0, total: 0,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
formDataVisible:{
operationType: null,
unitTittle: "往来单位",
corpType: 1,
},
curWorkPlaces: [], curWorkPlaces: [],
erpList: [], erpList: [],
formData: { formData: {
tagStatus: -1, tagStatus: -1,
invCode:null, invCode: null,
workPlaceCode:null, workPlaceCode: null,
erpId:null, fromCorp: null,
}, },
selectPrescriptionVisible: false, selectPrescriptionVisible: false,
corpOrderIdDisabled: false, corpOrderIdDisabled: false,
isLinkDisabled: false, isLinkDisabled: false,
userInfo:{ userInfo: {
inv: this.$store.getters.locInvName, inv: this.$store.getters.locInvName,
deptName: this.$store.getters.locDeptName, deptName: this.$store.getters.locDeptName,
userName: this.$store.getters.name, userName: this.$store.getters.name,
@ -299,6 +307,22 @@ export default {
addOrder, errOrder, selectPrescribeDialog, prescribeCodePanel, PannelOrderBiz addOrder, errOrder, selectPrescribeDialog, prescribeCodePanel, PannelOrderBiz
}, },
methods: { methods: {
findFromInvList(val) {
let cQuery = {
corpType:this.formDataVisible.corpType,
};
selectCorpList(cQuery)
.then((response) => {
this.fromInvOptions = response.data || [];
})
.catch(() => {
});
},
workPlaceCodeChange(value){
this.curWorkPlaces.forEach(item => {if(item.workplaceId == value){ this.formDataVisible = item
} })
return
},
handleClick(blankName) { handleClick(blankName) {
// let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId // let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId
let url = window.location.origin + `#/` + blankName + `?workplaceId=` + this.workplaceId let url = window.location.origin + `#/` + blankName + `?workplaceId=` + this.workplaceId
@ -328,9 +352,10 @@ export default {
} }
listPage(query).then((res) => { listPage(query).then((res) => {
this.curWorkPlaces = res.data.list || []; this.curWorkPlaces = res.data.list || [];
if (this.curWorkPlaces.length == 1 ) { if (this.curWorkPlaces.length == 1 && this.formData.workPlaceCode == null) {
this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId; this.formData.workPlaceCode = this.curWorkPlaces[0].workplaceId;
} }
this.workPlaceCodeChange(this.formData.workPlaceCode);
}) })
}, },
//------------ //------------
@ -432,13 +457,16 @@ export default {
return; return;
} }
let tagQuery = { let tagQuery = {
prescribeNum: this.formData.billNo, billNo: this.formData.billNo,
code: this.filterQuery.code.trim(), code: this.filterQuery.code.trim(),
}; };
tagCode(tagQuery).then(res => { tagCode(tagQuery).then(res => {
this.loading = false this.loading = false
if (res.code == 20000) { if (res.code == 20000) {
this.formData.tagStatus = 2; this.formData.tagStatus = 2;
this.formData = res.data;
} else {
this.$message.error(res.message)
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
@ -446,7 +474,6 @@ export default {
}, },
saveDraftOrder() { saveDraftOrder() {
this.$confirm('此操作将挂起当前正在处理单据,是否继续?', '提示', { this.$confirm('此操作将挂起当前正在处理单据,是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -462,8 +489,6 @@ export default {
}) })
}).catch(() => { }).catch(() => {
}); });
}, },
finishOrder() { finishOrder() {
@ -501,7 +526,7 @@ export default {
}, },
printCodeResult(data, isSuccess) { printCodeResult(data, isSuccess) {
const resultParts = ["扫码解析结果" + data.code]; const resultParts = ["追溯码" + data.code + "\r\n"];
if (data.udi) { if (data.udi) {
resultParts.push("层级标识: " + data.udi); resultParts.push("层级标识: " + data.udi);
@ -533,13 +558,14 @@ export default {
this.fromList = re.data.fromList; this.fromList = re.data.fromList;
}); });
this.formData.invCode = this.$store.getters.locInvCode; this.formData.invCode = this.$store.getters.locInvCode;
this.findCurWorkPlaces(); if (this.$route.query.workplaceId != null) {
if (this.$route.query.workplaceId != null){
this.isLinkDisabled = true this.isLinkDisabled = true
this.corpOrderIdDisabled = true this.corpOrderIdDisabled = true
this.formData.workplaceCode = Number(this.$route.query.workplaceId); this.formData.workPlaceCode = Number(this.$route.query.workplaceId);
} }
this.findCurWorkPlaces();
this.findFromInvList("");
} }

Loading…
Cancel
Save