diff --git a/src/api/collect/splitCreateOrder.js b/src/api/collect/splitCreateOrder.js
index 8ca826c3..3b32f5c9 100644
--- a/src/api/collect/splitCreateOrder.js
+++ b/src/api/collect/splitCreateOrder.js
@@ -10,3 +10,31 @@ export function printSplitLabel(query) {
responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf
});
}
+
+
+export function tagCode(query) {
+ return axios({
+ url: "/udiwms/ioSplit/collect/order/tagCode",
+ method: "post",
+ data: query
+ });
+}
+
+
+export function finishOrder(query) {
+ return axios({
+ url: "/udiwms/basic/collect/order/finish",
+ method: "post",
+ data: query
+ });
+}
+
+
+export function draftOrder(query) {
+ return axios({
+ url: "/udiwms/basic/collect/order/draft",
+ method: "post",
+ data: query
+ });
+}
+
diff --git a/src/views/collect/DealOrder.vue b/src/views/collect/DealOrder.vue
index d4e99bda..d5232e70 100644
--- a/src/views/collect/DealOrder.vue
+++ b/src/views/collect/DealOrder.vue
@@ -14,22 +14,26 @@
下一单据
选入单据
单据挂起
处理完成
@@ -38,11 +42,13 @@
更多功能
- 工位上货
- 工位退货
- 工位存量
- 待处理单
- 已完成单
+ 工位上货
+ 工位退货
+
+ 工位存量
+ 待处理单
+
+ 已完成单
@@ -83,9 +89,10 @@
- {{ formData.code }}
- {{ formData.busType }}
- {{ formData.fromCorp }}
+ {{ formData.billNo }}
+ {{ formData.fromCorpName }}
+ {{ formData.busTypeName }}
+ {{ formData.fromType }}
{{ formData.billTime }}
{{ formData.remark }}
@@ -149,13 +156,13 @@ import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
import {executeFuc, getHead} from "@/utils/customConfig";
import {convertDate} from "@/utils/date";
-import {materialPrescribePage} from "@/api/inout/splitCode";
-import {detail, page as prescribePage, tagCode} from "@/api/basic/sicker/prescribeApi";
import selectPrescribeDialog from "@/views/collect/selectCollectOrderDialog";
import prescribeCodePanel from "./PanelOrderTagCode";
import PannelOrderBiz from "./PannelOrderBiz";
import {enterCodeWeb} from "@/api/inout/order";
+import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder";
+import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
export default {
/**
@@ -185,7 +192,9 @@ export default {
total: 0,
defaultSort: {prop: 'createTime', order: 'desc'},
- formData: {},
+ formData: {
+ tagStatus: -1,
+ },
selectPrescriptionVisible: false,
curRow: null,
panelALive: false,
@@ -197,7 +206,9 @@ export default {
msgTip: "信息提醒:",
originCode: "",
checkSuccess: false,
- scanResultType: "success"
+ scanResultType: "success",
+ isSelectOrder: false,
+ isFinishOrder: true,
}
},
@@ -213,13 +224,13 @@ export default {
},
handleClickOut(blankName) {
// let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId
- let url = window.location.origin+`#/`+ blankName+`?splitType=out&workplaceId=`+ this.workplaceId
+ let url = window.location.origin + `#/` + blankName + `?splitType=out&workplaceId=` + this.workplaceId
// this.$router.push( workplaceId)
window.open(url, '_blank');
},
handleClickReturn(blankName) {
// let url = window.location.origin+`#/tagCodeBlank?workplaceId=`+ this.stationList[index].workplaceId
- let url = window.location.origin+`#/`+ blankName+`?splitType=return&workplaceId=`+ this.workplaceId
+ let url = window.location.origin + `#/` + blankName + `?splitType=return&workplaceId=` + this.workplaceId
// this.$router.push( workplaceId)
window.open(url, '_blank');
},
@@ -233,94 +244,12 @@ export default {
}
return defaultRet;
},
- handleSortChange(column, prop, order) {
- if (column.order === 'descending') {
- this.query.sort = 'desc'
- } else {
- this.query.sort = 'asc'
- }
- this.query.orderBy = column.prop;
- this.getList();
- },
///界面配置相关------------end
hideSearch() {
this.showSearch = !this.showSearch;
},
- onReset() {
- this.filterQuery = {};
- this.actDateRange = [];
- this.getList();
- },
- onSubmit() {
- this.filterQuery.page = 1;
- this.getList();
- },
-
- getList() {
- this.loading = true;
- prescribePage(this.filterQuery).then(res => {
- this.loading = false
- this.list = res.data.list || []
- this.total = res.data.total || 0
- }).catch(() => {
- this.loading = false
- this.list = []
- this.total = 0
- })
- },
- handleCurrentChange(val) {
- this.filterQuery.page = val.page;
- this.getList();
- },
-
- prescribeClick(_this, row) {
- this.curRow = row;
- this.getPrescribeDetail(_this, row)
- this.getCodeDetail(_this, row)
- },
-
- getPrescribeDetail(_this, row) {
- if (row != null) {
- _this.preQuery.page = 1
- _this.preQuery.prescribeCode = row.code
- }
- _this.preLoading = true;
- detail(_this.preQuery).then(res => {
- _this.preLoading = false
- if (res.code != 20000) {
- _this.$message.error(res.message)
- return
- }
- _this.preDetailList = res.data.items
- _this.preLoading = false
- }).catch(() => {
- _this.preLoading = false
- _this.$message.error("数据加载失败")
- })
- },
-
- getCodeDetail(_this, row) {
- if (row != null) {
- _this.codeQuery.page = 1
- _this.codeQuery.prescribeNum = row.code
- }
- _this.codeLoading = true;
- materialPrescribePage(_this.codeQuery).then(res => {
- _this.codeLoading = false
- if (res.code != 20000) {
- _this.$message.error(res.message)
- return
- }
- _this.codeDetailList = res.data.list
- _this.codeLoading = false
- }).catch(() => {
- _this.codeLoading = false
- _this.$message.error("数据加载失败")
- })
-
- },
refreshCodesPanel(_this) {
@@ -330,16 +259,6 @@ export default {
});
},
- preHandleCurrentChange(val) {
- this.filterQuery.page = val.page;
- this.getPrescribeDetail(this, null);
- },
-
-
- codeHandleCurrentChange(val) {
- this.filterQuery.page = val.page;
- this.getCodeDetail(this, null);
- },
getInputFocus(event) {
event.currentTarget.select();
@@ -406,18 +325,67 @@ export default {
},
addCode() {
+ if (this.$isBlank(this.filterQuery.code)) {
+ this.filterQuery.code = this.scanCode.trim();
+ return;
+ }
+ if (this.$isBlank(this.filterQuery.code) && this.$isBlank(this.scanCode)) {
+ return;
+ }
let tagQuery = {
- prescribeNum: this.formData.code,
+ prescribeNum: this.formData.billNo,
code: this.filterQuery.code.trim(),
};
tagCode(tagQuery).then(res => {
this.loading = false
- this.getList()
+ if (res.code == 20000) {
+ this.formData.tagStatus = 2;
+ }
}).catch(() => {
this.loading = false
})
},
+ saveDraftOrder() {
+
+ this.$confirm('此操作将挂起当前正在处理单据,是否继续?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ draftOrder(this.formData).then(res => {
+ this.loading = false
+ if (res.code == 20000) {
+ this.formData = {tagStatus: -1};
+ }
+ }).catch(() => {
+ this.loading = false
+ })
+ }).catch(() => {
+ });
+
+
+ },
+
+ finishOrder() {
+ this.$confirm('是否确定完成此单据?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ finishOrder(this.formData).then(res => {
+ this.loading = false
+ if (res.code == 20000) {
+ this.formData = {tagStatus: -1};
+ }
+ }).catch(() => {
+ this.loading = false
+ })
+ }).catch(() => {
+ });
+
+ },
+
selectPrescribe() {
this.selectPrescriptionVisible = true;
},
@@ -429,12 +397,15 @@ export default {
confirmSelect(row) {
this.selectPrescriptionVisible = false;
this.formData = row;
+ this.curRow = row;
+ this.refreshCodesPanel(this);
},
+
printCodeResult(data, isSuccess) {
const resultParts = ["扫码解析结果:" + data.code];
if (data.udi) {
- resultParts.push("DI标识: " + data.udi);
+ resultParts.push("层级标识: " + data.udi);
}
if (data.batchNo) {
resultParts.push("批次号: " + data.batchNo);
@@ -451,7 +422,7 @@ export default {
this.result = resultParts.join(" , ");
},
handleCommand(command) {
- this.$message('click on item ' + command);
+ // this.$message('click on item ' + command);
}
},
created() {