10/30 处理单据扫码剔除和工位分格

20240912_adapter
wangwei 5 months ago
parent 7828bbf1aa
commit b5b91d7018

@ -0,0 +1,49 @@
import axios from "@/utils/request";
import request from "@/utils/request";
export function createQueueCode(query) {
return axios({
url: "/udiwms/sysWorkplace/createQueueCode",
method: "post",
data: query
});
}
export function addQueue(query) {
return axios({
url: "/udiwms/sysWorkplaceQueue/addQueue",
method: "post",
data: query
});
}
export function updateQueue(query) {
return axios({
url: "/udiwms/sysWorkplaceQueue/update",
method: "post",
data: query
});
}
export function getQueueList(query) {
return axios({
url: "/udiwms/sysWorkplaceQueue/page",
method: "get",
params: query
});
}
export function deleteQueue(query) {
return axios({
url: "/udiwms/sysWorkplaceQueue/delete",
method: "post",
data: query
});
}

@ -121,6 +121,15 @@ export function codeRemove(query) {
}
export function removeByScanCode(query) {
return axios({
url: "/udiwms/ioSplit/collect/code/removeByScanCode",
method: "post",
data: query
});
}
export function bindWork(query) {
return axios({
url: "/udiwms/basic/collect/order/bindWork",

@ -0,0 +1,144 @@
<template>
<div>
<el-form :model="formData" style="width: 100%;" ref="dataForm" :rules="formRules"
label-width="auto"
>
<el-row :gutter="24">
<el-col :span="12" class="el-col">
<el-form-item label="分格编码:" prop="code" class="query-form-item">
<el-input
disabled
v-model="formData.code" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="分格名称:" class="query-form-item" prop="name" placeholder="请输入分格名称">
<el-input
v-model="formData.name" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12" class="el-col">
<el-form-item label="备注:" prop="remake" class="query-form-item">
<el-input
v-model="formData.remark" style="width: 80%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
<el-button
type="primary"
@click.native="formSubmit()"
>提交
</el-button
>
</div>
</div>
</template>
<script>
import { addQueue, createQueueCode, updateQueue } from '@/api/basic/workPlace/SysWorkplaceQueue'
export default {
props: {
closeDialog: {
type: Function,
required: true
},
workplaceId: {
type: Object,
required: true
},
queueData: {
type: Object,
required: true
},
},
components: {},
data() {
return {
formData: {
code: "",
name: "",
remark: "",
workPlaceIdFk: "",
},
formRules: {
name: [
{ required: true, message: '请输入分格名称', trigger: 'blur' }
],
}
}
},
computed: {},
methods: {
getPlaidCode(){
createQueueCode().then(res => {
if (res.code == 20000){
this.formData.code = res.data
}
}).catch(() => {
})
},
formSubmit(){
this.formData.workPlaceIdFk = this.workplaceId
this.$refs['dataForm'].validate((rules) => {
if (rules) {
if (this.queueData != null){
updateQueue(this.formData).then(res => {
if (res.code == 20000){
this.$message.success("更新成功")
this.closeDialog()
}else {
this.$message.error(res.message)
}
})
}else {
addQueue(this.formData).then(res => {
if (res.code == 20000){
this.$message.success("新增成功")
this.closeDialog()
}else {
this.$message.error(res.message)
}
})
}
}
})
},
hideForm(){
this.closeDialog()
}
},
created() {
if (this.queueData != null){
this.formData = this.queueData
}else {
//
this.getPlaidCode()
}
}
}
</script>
<style scoped>
.dialog-footer {
text-align: center;
}
</style>

@ -247,6 +247,84 @@
>
</pagination>
</el-tab-pane>
<el-tab-pane>
<!-- {{ workplaceName }}--->
<span slot="label">工位分格</span>
<el-form :inline="true" :model="queueQuery" class="query-form" size="mini"
style="margin-bottom: 10px"
>
<el-form-item class="query-form-item" label="名称/编号:">
<el-input
v-model="queueQuery.key"
placeholder="请输入分格名称或分格编号"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onQueueList"
>重置
</el-button>
<el-button type="primary" @click="loadQueueList"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addPlaid"
icon="el-icon-plus"
>新增工位分格
</el-button
>
<!--<el-button type="primary" @click="choosePlaid"-->
<!-- icon="el-icon-plus"-->
<!--&gt;选入工位分格-->
<!--</el-button-->
<!--&gt;-->
</el-button-group>
</el-form-item>
</el-form>
<el-table :data="queueList" style="width: 100%;" :row-style="{height: '32px' }"
highlight-current-row
>
<el-table-column type="index" label="序号"></el-table-column>
<!-- <el-table-column label="业务类型编码 " prop="documentTypeCode" width="100"></el-table-column>-->
<el-table-column label="格子名称" prop="name"></el-table-column>
<el-table-column label="格子编号 " prop="code"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="printQueue(scope.row)"
>打印
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="updateQueue(scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="removeQueue(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:total="collectTotal"
:limit.sync="cargowQuery.limit"
:page.sync="cargowQuery.page"
@pagination="getCargowBindCollectList()"
>
</pagination>
</el-tab-pane>
</el-tabs>
</el-col>
@ -460,6 +538,24 @@
</div>
</el-dialog>
<el-dialog
:title="plaids[plaidName]"
:visible.sync="plaidDialogVisible"
width="60%"
v-if="plaidDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close=""
>
<addPlaidDialog
:workplaceId="workplaceId"
:closeDialog="closePlaidDialog"
:queueData="queueData"
>
</addPlaidDialog>
</el-dialog>
</el-row>
</el-card>
</div>
@ -480,9 +576,11 @@ import {
import { addTree, deleteTree, getTree, updateTree } from '@/api/basic/collectPoint/collectPointManage'
import { delCollect, getBindCollectList } from '@/api/basic/collectPoint/cargowWorkplaceManage'
import addCollectWorkplace from './addCollectWorkplace'
import addPlaidDialog from './addPlaidDialog'
import { deleteQueue, getQueueList } from '@/api/basic/workPlace/SysWorkplaceQueue'
export default {
components: { addCollectWorkplace },
components: { addCollectWorkplace, addPlaidDialog },
data() {
return {
Dictionary: false,
@ -506,6 +604,7 @@ export default {
DeptList: [],
list: [],
collectList: [],
queueList: [],
collectList1: [],
collectAndTypeIds: [],
users: [],
@ -605,7 +704,15 @@ export default {
keyWords: null,
workPlaceCode: null
},
collectTotal:0,
queueQuery: {
page: 1,
limit: 10,
key: null,
workPlaceIdFk: null
},
queueData: null,
collectTotal: 0,
queueTotal: 0,
busQuery: {
busKey: '',
workplaceCode: null,
@ -613,10 +720,16 @@ export default {
limit: 10
},
chooseCollectDialogVisible: false,
plaidDialogVisible: false,
workplaceId: null,
collectWorkPlaceCodes: [],
collectBusTypeCodes: [],
collectWorks: [],
plaidName: 'add',
plaids: {
'add': '新增工位分格',
'edit': '编辑工位分格'
},
fromName: 'add',
fromMap: {
'add': '新增上货工位',
@ -656,7 +769,7 @@ export default {
// workplaceType: [
// { required: true, message: '', trigger: 'blur' }
// ]
},
}
}
},
@ -756,6 +869,7 @@ export default {
// this.getUserBindWork(this.cargowQuery)
// this.getWorkBindBusTypes()
this.getCargowBindCollectList()
this.getQueueList()
},
getCargowBindCollectList() {
this.cargowQuery.workPlaceCode = this.rowData.workplaceId
@ -768,6 +882,36 @@ export default {
})
},
getQueueList() {
this.queueQuery.workPlaceIdFk = this.rowData.workplaceId
getQueueList(this.queueQuery).then(res => {
if (res.code == 20000) {
this.queueList = res.data.list || []
this.queueTotal = res.data.total || 0
}
})
},
removeQueue(row) {
this.$confirm('此操作将永久删除该工位分格, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteQueue(row).then(res => {
if (res.code == 20000) {
this.$message.success('删除成功')
this.getQueueList()
} else {
this.$message.error(res.message)
}
})
})
},
updateQueue(row) {
this.queueData = row
this.plaidName = 'edit'
this.plaidDialogVisible = true
},
onCollectList() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
@ -780,9 +924,24 @@ export default {
limit: 10,
keyWords: null,
workPlaceCode: null
},
}
this.getCargowBindCollectList()
},
onQueueList() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
}
this.$router.push({
path: ''
})
this.queueQuery = {
page: 1,
limit: 10,
key: null,
workPlaceIdFk: null
}
this.getQueueList()
},
loadCollectList() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
@ -790,6 +949,13 @@ export default {
this.cargowQuery.page = 1
this.getCargowBindCollectList()
},
loadQueueList() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
}
this.queueQuery.page = 1
this.getQueueList()
},
chooseCollect() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
@ -809,7 +975,14 @@ export default {
// this.collectWorks = this.collectWorkPlaceCodes.concat(this.collectBusTypeCodes);
},
removeCollect(row){
addPlaid() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
}
this.queueData = null
this.plaidDialogVisible = true
},
removeCollect(row) {
this.$confirm('此操作将永久删除该采集工位, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -819,7 +992,7 @@ export default {
if (res.code != 20000) {
this.$message.error(res.message)
} else {
this.$message.success("删除成功")
this.$message.success('删除成功')
this.getCargowBindCollectList()
}
})
@ -839,6 +1012,10 @@ export default {
this.getCargowBindCollectList()
this.chooseCollectDialogVisible = false
},
closePlaidDialog() {
this.plaidDialogVisible = false
this.getQueueList()
},
printLabel(row) {
row.labelId = 6
printWorkLabel(row).then((response) => {
@ -1047,7 +1224,7 @@ export default {
})
this.getTree()
this.addWorkplaceDialogVisible = true
},
}
},
created() {
this.getDepts()

@ -299,6 +299,7 @@ export default {
busQuery: {
busKey: '',
isPopular: 1,
// userId : this.$store.getters.adminId,
workplaceCode: null,
page: 1,
limit: 100
@ -583,7 +584,7 @@ export default {
key: val,
status: 1,
// invCode: this.formData.invCode,
// workPlaceClass: this.workPlaceClass,
workPlaceClass: this.$route.query.workPlaceClass ,
page: 1,
limit: 100,
}

@ -13,6 +13,16 @@
<el-row :gutter="0" style="margin-top: 15px">
<el-col :span="24" align="right">
<el-button-group>
<el-button type="primary" @click.native="deleteCode"
v-if="labelName == 1"
:disabled="formData.billNo == null"
>扫码剔除
</el-button>
<el-button size="mini" type="primary"
v-if="labelName == 2"
@click.native="overdeleteCode"
>结束剔除
</el-button>
<el-button
type="primary"
:disabled="formData.billNo || (this.formDataVisible != null && this.formDataVisible.scanType == 1)"
@ -155,7 +165,7 @@
<div style="border: 1px solid #ebeef5;border-radius: 2px;margin-top: 15px;padding: 15px">
<el-row :gutter="0" style="margin-top: 5px">
<el-col :span="20">
<el-form-item prop="code" label="扫码录入:" label-width="80px">
<el-form-item prop="code" :label="labels[labelName]" label-width="80px">
<el-input
id="inputer"
@focus="getInputFocus($event)"
@ -398,7 +408,7 @@ import {
vailOrderFinish
} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder";
import { getCurOrder, getNextOrder, findByBill, findFromCorp, removeByScanCode } from '@/api/collect/collectOrder'
import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {getInvListByUser} from "@/api/system/invWarehouse";
@ -507,6 +517,14 @@ export default {
errVisible: false,
workplaceId: null,
ws: null,
//
labels: {
1: '扫码录入:',
2: '扫码剔除:'
},
labelName: 1,
scanStatus: null, // 1:; null
}
},
@ -732,69 +750,80 @@ export default {
busType: this.formData.busType,
code: this.filterQuery.code.trim(),
};
enterCodeWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.isSuccess = true;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.scanCode = ""
this.originCode = ""
this.addCode();
} else {
if (response.code == 502) {
this.checkSuccess = false;
this.isSuccess = false;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.originCode = response.data.code;
this.scanCode = ""
} else if (response.code == 501) {
this.checkSuccess = false;
this.$message.error(response.message);
this.scanCode = ""
} else if (response.code == 503) {
this.checkSuccess = false;
this.isSuccess = false;
if (this.scanStatus == 1){
const codeArray = this.filterQuery.code.split(";");
let query = {
orderId :this.formData.billNo,
codeList: codeArray
}
//
this.removeCodesTemp(query)
}else {
enterCodeWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.isSuccess = true;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.scanCode = ""
this.$confirm(response.message, "提示", {
type: "warning",
})
.then(() => {
this.filterQuery.code = response.data.code;
this.addCode();
this.originCode = ""
this.addCode();
} else {
if (response.code == 502) {
this.checkSuccess = false;
this.isSuccess = false;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.originCode = response.data.code;
this.scanCode = ""
} else if (response.code == 501) {
this.checkSuccess = false;
this.$message.error(response.message);
this.scanCode = ""
} else if (response.code == 503) {
this.checkSuccess = false;
this.isSuccess = false;
this.printCodeResult(response.data, response.message)
this.filterQuery.code = response.data.code;
this.scanCode = ""
this.$confirm(response.message, "提示", {
type: "warning",
})
.catch(() => {
this.filterQuery.code = response.data.code;
});
} else if (response.code == 508) {
this.originCode = "";
this.filterQuery.code = "01" + response.data.nameCode;
this.originCode = this.filterQuery.code;
} else if (response.code == 601) {
this.formData.billNo = response.data.billNo
this.placeholder = "已选入单据请扫UDI码进行作业"
this.getBillNo(this.formData.billNo)
this.startDeal();
.then(() => {
this.filterQuery.code = response.data.code;
this.addCode();
})
.catch(() => {
this.filterQuery.code = response.data.code;
});
} else if (response.code == 508) {
this.originCode = "";
this.filterQuery.code = "01" + response.data.nameCode;
this.originCode = this.filterQuery.code;
} else if (response.code == 601) {
this.formData.billNo = response.data.billNo
this.placeholder = "已选入单据请扫UDI码进行作业"
this.getBillNo(this.formData.billNo)
this.startDeal();
} else {
this.scanCode = ""
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
type: "warning",
closeOnClickModal: true,
callback: (action) => {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
},
});
} else {
this.scanCode = ""
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
type: "warning",
closeOnClickModal: true,
callback: (action) => {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
},
});
}
}
}
this.loading = false;
});
this.loading = false;
});
}
},
enterBillNoKey(billNo) {
@ -928,6 +957,9 @@ export default {
},
saveDraftOrder() {
if (this.scanStatus == 1){
this.overdeleteCode()
}
this.$confirm('此操作将挂起当前正在处理单据,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -1298,52 +1330,79 @@ export default {
batchVailCode(params) {
batchVailCode(params).then((res) => {
if (res.code === 20000) {
this.valiCodes = [];
let list = res.data;
list.forEach(item => {
if (item.status === 1) {
this.valiCodes.push(item.code);
}
});
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.printMutiCodeResult(list)
if (this.valiCodes != null && this.valiCodes.length > 0) {
//
let params2 = {
workPlaceCode: this.formData.workPlaceCode,
codeList: this.valiCodes,
fromCorp: this.formData.fromCorp,
billNo: this.formData.billNo,
insert: this.formData.insert,
busType: this.formData.busType,
fromCorpName: this.formData.fromCorpName,
invCode: this.formData.invCode,
}
orderbatchAddCode(params2).then((res) => {
if (res.code === 20000) {
this.formData.tagStatus = 2;
this.formData.insert = false;
this.curRow = this.formData;
this.$refs.inputRef.focus();
this.refreshCodesPanel(this);
this.printMutiCodeResult(res.data.vailCodeResultResponses)
} else {
this.$message.error(res.message)
if (this.scanStatus == 1){
//
// const codeArray = this.codeFormData.code.split(';')
let query = {
orderId : this.formData.billNo,
codeList: params
}
//
this.removeCodesTemp(query)
}else {
batchVailCode(params).then((res) => {
if (res.code === 20000) {
this.valiCodes = [];
let list = res.data;
list.forEach(item => {
if (item.status === 1) {
this.valiCodes.push(item.code);
}
});
// this.scanCode = this.valiCodes.join(";");
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.printMutiCodeResult(list)
if (this.valiCodes != null && this.valiCodes.length > 0) {
//
let params2 = {
workPlaceCode: this.formData.workPlaceCode,
codeList: this.valiCodes,
fromCorp: this.formData.fromCorp,
billNo: this.formData.billNo,
insert: this.formData.insert,
busType: this.formData.busType,
fromCorpName: this.formData.fromCorpName,
invCode: this.formData.invCode,
}
orderbatchAddCode(params2).then((res) => {
if (res.code === 20000) {
this.formData.tagStatus = 2;
this.formData.insert = false;
this.curRow = this.formData;
this.$refs.inputRef.focus();
this.refreshCodesPanel(this);
this.printMutiCodeResult(res.data.vailCodeResultResponses)
} else {
this.$message.error(res.message)
}
});
// this.scanCode = this.valiCodes.join(";");
}
} else {
this.$message.error(res.message)
}
});
}
} else {
},
removeCodesTemp(query){
removeByScanCode(query).then(res => {
if (res.code == 20000){
this.$message.success("剔除成功")
this.scanCode = ""
this.panelALive = false
this.$nextTick(() => {
this.panelALive = true;
});
this.result = ""
}else {
this.result = ""
this.scanCode = ""
this.$message.error(res.message)
}
});
})
},
//
addGs() {
const input = this.$refs.inputRef.$refs.input;
@ -1460,6 +1519,18 @@ export default {
}
}
},
//
deleteCode(){
this.labelName = 2
this.placeholder = "请点击输入框进行扫码剔除"
this.scanStatus = 1
},
overdeleteCode() {
this.labelName = 1
this.scanStatus = null
this.placeholder = '请点击输入框进行选择单据'
},
},
mounted() {
this.$refs.inputRef.focus();

@ -1793,9 +1793,11 @@ export default {
this.printCodeResult(response.data)
this.codeFormData.code = response.data.code
this.originCode = this.codeFormData.code
this.originCode = ""
} else if (response.code == 501) {
this.checkSuccess = false
this.scanCode = ''
this.originCode = ""
this.$message.error(response.message)
} else if (response.code == 503) {
this.checkSuccess = false

@ -786,6 +786,7 @@ export default {
destroyOutDialogVisible: false,
prescribeData: {},
destroyType: 1,//1 2.code
}
},
@ -858,6 +859,9 @@ export default {
page: 1,
limit: 10,
};
if (this.$route.query.workplaceId != null) {
this.filterQuery.workPlaceCode = Number(this.$route.query.workplaceId)
}
this.actDateRange = [];
this.getList();
this.resultDetailList = []

@ -102,7 +102,7 @@
<!-- :loading="loading"-->
<!-- >术式套包录入-->
<!-- </el-button>-->
<el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">品录入
<el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">品录入
</el-button>
<!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入计划单</el-button>-->
</el-button-group>

@ -369,7 +369,7 @@ export default {
this.getList();
},
getList() {
this.listQuery.attributeType = this.attributeType
// this.listQuery.attributeType = this.attributeType
if (this.listType == null)
this.getApplyList();
else {
@ -539,7 +539,7 @@ export default {
created() {
this.findBasicProductSet();
this.listQuery.attributeType = this.attributeType
// this.listQuery.attributeType = this.attributeType
if (this.$isNotBlank(this.data)) {
this.ids = [];
if (this.data.stockOrderLists.length > 0) {

Loading…
Cancel
Save