界面优化

20240912_adapter_z
anthonywj 11 months ago
parent aa8a7ddf22
commit 048fd0a0fe

@ -83,6 +83,19 @@ export function bindWork(query) {
}); });
} }
export function importOrder(query) {
return axios({
url: "/udiwms/collect/order/import",
method: "get",
params: query
});
}
export function clearAllOrder(query) {
return axios({
url: "/udiwms/collect/order/clearAll",
method: "get",
params: query
});
}

@ -93,10 +93,14 @@
>查询 >查询
</el-button </el-button
> >
<!-- <el-button type="primary" icon="el-icon-download" @click="downloadPrescription"--> <el-button type="primary" icon="el-icon-download" @click="downloadPrescription"
<!-- >下载单据--> >下载单据
<!-- </el-button--> </el-button
<!-- >--> >
<el-button type="primary" icon="el-icon-delete" @click="clearAllOrder"
>清除单据
</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
@ -242,7 +246,7 @@ import {convertDate} from "@/utils/date";
import {detail} from "@/api/basic/sicker/prescribeApi"; import {detail} from "@/api/basic/sicker/prescribeApi";
import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownloadDialog"; import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownloadDialog";
import prescribeOriginPanel from "./PannelOrderBiz"; import prescribeOriginPanel from "./PannelOrderBiz";
import {deleteByOrder, orderPage} from "@/api/collect/collectOrder"; import {clearAllOrder, deleteByOrder, importOrder, orderPage} from "@/api/collect/collectOrder";
import {filterSubAllOptimize} from "@/api/system/invSubWarehouse"; import {filterSubAllOptimize} from "@/api/system/invSubWarehouse";
import {filterWorkOptimize} from "@/api/basic/sysWorkplaceManage"; import {filterWorkOptimize} from "@/api/basic/sysWorkplaceManage";
@ -339,16 +343,47 @@ export default {
this.getList(); this.getList();
}, },
downloadPrescription() { downloadPrescription() {
this.downloadPrescriptionVisible = true // this.downloadPrescriptionVisible = true
this.loading = true;
importOrder().then(res => {
this.loading = false
if (res.code == 20000) {
this.$message.success("下载成功!")
this.getList()
} else {
this.$message.error(res.message)
}
}
).catch(() => {
this.loading = false
})
}, },
clearAllOrder() {
this.loading = true;
clearAllOrder().then(res => {
this.loading = false
if (res.code == 20000) {
this.$message.success("清除成功!")
this.getList()
} else {
this.$message.error(res.message)
}
}).catch(() => {
this.loading = false
})
}
,
closeDialog() { closeDialog() {
this.downloadPrescriptionVisible = false; this.downloadPrescriptionVisible = false;
this.getList(); this.getList();
}, }
,
onSubmit() { onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList(); this.getList();
}, }
,
getList() { getList() {
this.loading = true; this.loading = true;
@ -361,22 +396,26 @@ export default {
this.list = [] this.list = []
this.total = 0 this.total = 0
}) })
}, }
,
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page;
this.getList(); this.getList();
}, }
,
prescribeClick(_this, row) { prescribeClick(_this, row) {
_this.curRow = row; _this.curRow = row;
_this.refreshCodesPanel(_this); _this.refreshCodesPanel(_this);
}, }
,
refreshCodesPanel(_this) { refreshCodesPanel(_this) {
_this.panelALive = false; _this.panelALive = false;
_this.$nextTick(() => { _this.$nextTick(() => {
_this.panelALive = true; _this.panelALive = true;
}); });
}, }
,
deleteDialog(_this, row) { deleteDialog(_this, row) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", { _this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
@ -389,7 +428,8 @@ export default {
}) })
.catch(() => { .catch(() => {
}); });
}, }
,
deleteOrders(data) { deleteOrders(data) {
this.loading = true; this.loading = true;
this.deleteData.billNo = data; this.deleteData.billNo = data;
@ -412,7 +452,8 @@ export default {
}) })
.catch(() => { .catch(() => {
}); });
}, }
,
}, },

@ -45,19 +45,19 @@
type="primary" type="primary"
:disabled="isSelectOrder" :disabled="isSelectOrder"
@click.native="selectPrescribe()" @click.native="selectPrescribe()"
>选入单据 >选入单据1
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:disabled="formData.tagStatus<2" :disabled="formData.tagStatus<2"
@click.native="saveDraftOrder()" @click.native="saveDraftOrder()"
>单据挂起 >单据挂起1
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:disabled="formData.tagStatus<2" :disabled="formData.tagStatus<2"
@click.native="finishOrder()" @click.native="finishOrder()"
>处理完成 >处理完成1
</el-button> </el-button>
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
@ -216,6 +216,7 @@
append-to-body append-to-body
> >
<selectPrescribeDialog <selectPrescribeDialog
:workPlaceCode="this.formData.workPlaceCode"
:confirmSelect="this.confirmSelect" :confirmSelect="this.confirmSelect"
:closeDialog="this.closeDialog" :closeDialog="this.closeDialog"
></selectPrescribeDialog> ></selectPrescribeDialog>
@ -521,6 +522,7 @@ export default {
// //
selectPrescribe() { selectPrescribe() {
console.log(this.formData.workPlaceCode)
this.selectPrescriptionVisible = true; this.selectPrescriptionVisible = true;
}, },

@ -38,26 +38,26 @@
<el-button <el-button
type="primary" type="primary"
:disabled="isSelectOrder" :disabled="isSelectOrder"
@click.native="selectPrescribe()" @click.native="nextCollectOrder()"
>下一单据 >下一单据
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:disabled="isSelectOrder" :disabled="isSelectOrder"
@click.native="selectPrescribe()" @click.native="selectPrescribe()"
>选入单据 >选入单据1
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:disabled="formData.tagStatus<2" :disabled="formData.tagStatus<2"
@click.native="saveDraftOrder()" @click.native="saveDraftOrder()"
>单据挂起 >单据挂起1
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:disabled="formData.tagStatus<2" :disabled="formData.tagStatus<2"
@click.native="finishOrder()" @click.native="finishOrder()"
>处理完成 >处理完成1
</el-button> </el-button>
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
@ -216,6 +216,7 @@
append-to-body append-to-body
> >
<selectPrescribeDialog <selectPrescribeDialog
:workPlaceCode="this.formData.workPlaceCode"
:confirmSelect="this.confirmSelect" :confirmSelect="this.confirmSelect"
:closeDialog="this.closeDialog" :closeDialog="this.closeDialog"
></selectPrescribeDialog> ></selectPrescribeDialog>
@ -234,9 +235,10 @@ import prescribeCodePanel from "./PanelOrderTagCode";
import PannelOrderBiz from "./PannelOrderBiz"; 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, startSplit, tagCode} 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 {getNextOrder} from "@/api/collect/collectOrder";
export default { export default {
/** /**
@ -319,8 +321,11 @@ export default {
}); });
}, },
workPlaceCodeChange(value) { workPlaceCodeChange(value) {
this.curWorkPlaces.forEach(item => {if(item.workplaceId == value){ this.formDataVisible = item this.curWorkPlaces.forEach(item => {
} }) if (item.workplaceId == value) {
this.formDataVisible = item
}
})
if (this.formDataVisible.operationType == 1) { if (this.formDataVisible.operationType == 1) {
this.findFromInvList(""); this.findFromInvList("");
} }
@ -454,12 +459,13 @@ export default {
addCode() { addCode() {
if (this.$isBlank(this.filterQuery.code)) { if (this.$isBlank(this.filterQuery.code)) {
this.filterQuery.code = this.scanCode.trim(); this.filterQuery.code = this.scanCode.trim();
return;
} }
if (this.$isBlank(this.filterQuery.code) && this.$isBlank(this.scanCode)) { if (this.$isBlank(this.filterQuery.code) && this.$isBlank(this.scanCode)) {
return; return;
} }
let tagQuery = { let tagQuery = {
workPlaceCode: this.formData.workPlaceCode,
fromCorp: this.formData.fromCorp,
billNo: this.formData.billNo, billNo: this.formData.billNo,
code: this.filterQuery.code.trim(), code: this.filterQuery.code.trim(),
}; };
@ -468,6 +474,7 @@ export default {
if (res.code == 20000) { if (res.code == 20000) {
this.formData.tagStatus = 2; this.formData.tagStatus = 2;
this.formData = res.data; this.formData = res.data;
this.refreshCodesPanel(this);
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
@ -513,10 +520,27 @@ export default {
}, },
//
selectPrescribe() { selectPrescribe() {
console.log(this.formData.workPlaceCode)
this.selectPrescriptionVisible = true; this.selectPrescriptionVisible = true;
}, },
//
nextCollectOrder() {
getNextOrder(this.formData).then(res => {
this.loading = false
if (res.code == 20000) {
this.formData = res.data;
this.dealSplitOrder()
} else {
this.$message.error(res.message)
}
}).catch(() => {
this.loading = false
})
},
closeDialog() { closeDialog() {
this.selectPrescriptionVisible = false; this.selectPrescriptionVisible = false;
}, },
@ -525,9 +549,27 @@ export default {
this.selectPrescriptionVisible = false; this.selectPrescriptionVisible = false;
this.formData = row; this.formData = row;
this.curRow = row; this.curRow = row;
this.dealSplitOrder()
this.refreshCodesPanel(this);
},
//
dealSplitOrder() {
startSplit(this.formData).then(res => {
this.loading = false
if (res.code == 20000) {
console.log(res.data)
this.refreshCodesPanel(this); this.refreshCodesPanel(this);
} else {
console.log(res.message)
}
}).catch(() => {
this.loading = false
})
}, },
printCodeResult(data, isSuccess) { printCodeResult(data, isSuccess) {
const resultParts = ["追溯码:" + data.code + "\r\n"]; const resultParts = ["追溯码:" + data.code + "\r\n"];

@ -220,7 +220,7 @@ export default {
}, },
created() { created() {
getHead("prescribeOriginPanel", "1").then((re) => { getHead("selectTagPrescribe-1", "1").then((re) => {
// //
this.tableObj1 = re.data; this.tableObj1 = re.data;
this.tableHeader1 = re.data.tableList; this.tableHeader1 = re.data.tableList;

@ -231,7 +231,6 @@ import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder"; import errOrder from "@/views/inout/IoCreateErrorOrder";
import {executeFuc, getHead} from "@/utils/customConfig"; import {executeFuc, getHead} from "@/utils/customConfig";
import {convertDate} from "@/utils/date"; import {convertDate} from "@/utils/date";
import {page as prescribePage} from "@/api/basic/sicker/prescribeApi";
import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownloadDialog"; import prescribeDownloadDialog from "@/views/collect/prescribe/prescribeDownloadDialog";
import prescribeOriginPanel from "./PannelOrderBiz"; import prescribeOriginPanel from "./PannelOrderBiz";
import {orderPage} from "@/api/collect/collectOrder"; import {orderPage} from "@/api/collect/collectOrder";
@ -247,6 +246,10 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
workPlaceCode: {
type: String,
required: true,
},
}, },
data() { data() {
return { return {
@ -325,6 +328,10 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
this.filterQuery.workPlaceCode = this.workPlaceCode
console.log(this.filterQuery.workPlaceCode)
console.log(this.workPlaceCode)
debugger
orderPage(this.filterQuery).then(res => { orderPage(this.filterQuery).then(res => {
this.loading = false this.loading = false
this.list = res.data.list || [] this.list = res.data.list || []

Loading…
Cancel
Save