界面优化

20240912_adapter_z
anthonywj 11 months ago
parent f657d09fd3
commit 78d53333d9

@ -10,3 +10,31 @@ export function printSplitLabel(query) {
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf 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
});
}

@ -14,22 +14,26 @@
<el-button-group> <el-button-group>
<el-button <el-button
type="primary" type="primary"
:disabled="isSelectOrder"
@click.native="selectPrescribe()" @click.native="selectPrescribe()"
>下一单据 >下一单据
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
:disabled="isSelectOrder"
@click.native="selectPrescribe()" @click.native="selectPrescribe()"
>选入单据 >选入单据
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
@click.native="selectPrescribe()" :disabled="formData.tagStatus<2"
@click.native="saveDraftOrder()"
>单据挂起 >单据挂起
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
@click.native="selectPrescribe()" :disabled="formData.tagStatus<2"
@click.native="finishOrder()"
>处理完成 >处理完成
</el-button> </el-button>
@ -38,11 +42,13 @@
更多功能<i class="el-icon-arrow-down el-icon--right"></i> 更多功能<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item divided @click.native="handleClickOut('IoCreateOrderBlank')">工位上货</el-dropdown-item> <el-dropdown-item divided @click.native="handleClickOut('IoCreateOrderBlank')">工位上货</el-dropdown-item>
<el-dropdown-item divided @click.native="handleClickReturn('IoCreateOrderBlank')">工位退货</el-dropdown-item> <el-dropdown-item divided @click.native="handleClickReturn('IoCreateOrderBlank')">工位退货
<el-dropdown-item divided @click.native="handleClick('ioSplitFifoCodeBlank')">工位存量</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item divided @click.native="handleClick('CollectOrderAllotBlank')">待处理单</el-dropdown-item> <el-dropdown-item divided @click.native="handleClick('ioSplitFifoCodeBlank')">工位存量</el-dropdown-item>
<el-dropdown-item divided @click.native="handleClick('CollectOrderEndBlank')">已完成单</el-dropdown-item> <el-dropdown-item divided @click.native="handleClick('CollectOrderAllotBlank')">待处理单
</el-dropdown-item>
<el-dropdown-item divided @click.native="handleClick('CollectOrderEndBlank')">已完成单</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-button-group> </el-button-group>
@ -83,9 +89,10 @@
</div> </div>
<el-descriptions title="单据信息" :column="4" border style="margin-top: 15px"> <el-descriptions title="单据信息" :column="4" border style="margin-top: 15px">
<el-descriptions-item label="单据编号">{{ formData.code }}</el-descriptions-item> <el-descriptions-item label="业务单号">{{ formData.billNo }}</el-descriptions-item>
<el-descriptions-item label="业务来源">{{ formData.busType }}</el-descriptions-item> <el-descriptions-item label="往来信息">{{ formData.fromCorpName }}</el-descriptions-item>
<el-descriptions-item label="往来信息">{{ formData.fromCorp }}</el-descriptions-item> <el-descriptions-item label="单据类型">{{ formData.busTypeName }}</el-descriptions-item>
<el-descriptions-item label="来源系统">{{ formData.fromType }}</el-descriptions-item>
<el-descriptions-item label="单据时间">{{ formData.billTime }}</el-descriptions-item> <el-descriptions-item label="单据时间">{{ formData.billTime }}</el-descriptions-item>
<el-descriptions-item label="单据备注">{{ formData.remark }}</el-descriptions-item> <el-descriptions-item label="单据备注">{{ formData.remark }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -149,13 +156,13 @@ 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 {materialPrescribePage} from "@/api/inout/splitCode";
import {detail, page as prescribePage, tagCode} from "@/api/basic/sicker/prescribeApi";
import selectPrescribeDialog from "@/views/collect/selectCollectOrderDialog"; import selectPrescribeDialog from "@/views/collect/selectCollectOrderDialog";
import prescribeCodePanel from "./PanelOrderTagCode"; import prescribeCodePanel from "./PanelOrderTagCode";
import PannelOrderBiz from "./PannelOrderBiz"; import PannelOrderBiz from "./PannelOrderBiz";
import {enterCodeWeb} from "@/api/inout/order"; import {enterCodeWeb} from "@/api/inout/order";
import {draftOrder, finishOrder, tagCode} from "@/api/collect/splitCreateOrder";
import {delDrugLevel} from "@/api/basic/product/drugUdiinfos";
export default { export default {
/** /**
@ -185,7 +192,9 @@ export default {
total: 0, total: 0,
defaultSort: {prop: 'createTime', order: 'desc'}, defaultSort: {prop: 'createTime', order: 'desc'},
formData: {}, formData: {
tagStatus: -1,
},
selectPrescriptionVisible: false, selectPrescriptionVisible: false,
curRow: null, curRow: null,
panelALive: false, panelALive: false,
@ -197,7 +206,9 @@ export default {
msgTip: "信息提醒:", msgTip: "信息提醒:",
originCode: "", originCode: "",
checkSuccess: false, checkSuccess: false,
scanResultType: "success" scanResultType: "success",
isSelectOrder: false,
isFinishOrder: true,
} }
}, },
@ -213,13 +224,13 @@ export default {
}, },
handleClickOut(blankName) { handleClickOut(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+`?splitType=out&workplaceId=`+ this.workplaceId let url = window.location.origin + `#/` + blankName + `?splitType=out&workplaceId=` + this.workplaceId
// this.$router.push( workplaceId) // this.$router.push( workplaceId)
window.open(url, '_blank'); window.open(url, '_blank');
}, },
handleClickReturn(blankName) { handleClickReturn(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+`?splitType=return&workplaceId=`+ this.workplaceId let url = window.location.origin + `#/` + blankName + `?splitType=return&workplaceId=` + this.workplaceId
// this.$router.push( workplaceId) // this.$router.push( workplaceId)
window.open(url, '_blank'); window.open(url, '_blank');
}, },
@ -233,94 +244,12 @@ export default {
} }
return defaultRet; 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 ///------------end
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; 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) { 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) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select();
@ -406,18 +325,67 @@ export default {
}, },
addCode() { 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 = { let tagQuery = {
prescribeNum: this.formData.code, prescribeNum: 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
this.getList() if (res.code == 20000) {
this.formData.tagStatus = 2;
}
}).catch(() => { }).catch(() => {
this.loading = false 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() { selectPrescribe() {
this.selectPrescriptionVisible = true; this.selectPrescriptionVisible = true;
}, },
@ -429,12 +397,15 @@ export default {
confirmSelect(row) { confirmSelect(row) {
this.selectPrescriptionVisible = false; this.selectPrescriptionVisible = false;
this.formData = row; this.formData = row;
this.curRow = row;
this.refreshCodesPanel(this);
}, },
printCodeResult(data, isSuccess) { printCodeResult(data, isSuccess) {
const resultParts = ["扫码解析结果:" + data.code]; const resultParts = ["扫码解析结果:" + data.code];
if (data.udi) { if (data.udi) {
resultParts.push("DI标识: " + data.udi); resultParts.push("层级标识: " + data.udi);
} }
if (data.batchNo) { if (data.batchNo) {
resultParts.push("批次号: " + data.batchNo); resultParts.push("批次号: " + data.batchNo);
@ -451,7 +422,7 @@ export default {
this.result = resultParts.join(" , "); this.result = resultParts.join(" , ");
}, },
handleCommand(command) { handleCommand(command) {
this.$message('click on item ' + command); // this.$message('click on item ' + command);
} }
}, },
created() { created() {

Loading…
Cancel
Save