Merge remote-tracking branch 'origin/20240912_adapter' into 20240912_adapter_z

20240912_adapter_z
wangwei 7 months ago
commit aceee3f304

@ -132,6 +132,14 @@ export function enterCodeWeb(query) {
});
}
export function enterCodeBillNo(query) {
return axios({
url: "/warehouse/inout/enterCodeBillNo",
method: "post",
data: query
});
}
export function postOrdersWeb(query) {
return axios({

@ -327,6 +327,12 @@
margin-top: 15px
}
.right-search{
position: relative;
float: left;
margin-top: 15px
}
.dialog-one {
width: 45%;

@ -90,6 +90,26 @@
</template>
</el-row>
</el-form>
<div class="right-search" v-if="!showSearch">
<!-- 关键字搜索 按需配置 -->
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true) && item.columnName == 'keywords'"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
</template>
</el-row>
</el-form>
</div>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
@ -454,7 +474,7 @@ export default {
convertDateFun: convertDate,
//-------------end
showSearch: true,
showSearch: false,
filterQuery: {
busType: null,
billNo: null,
@ -698,7 +718,7 @@ export default {
type: "warning",
})
.then(() => {
_this.deleteOrders(row.code);
_this.deleteOrders(row.billNo);
})
.catch(() => {
});

@ -81,6 +81,26 @@
</template>
</el-row>
</el-form>
<div class="right-search" v-if="!showSearch">
<!-- 关键字搜索 按需配置 -->
<el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true) && item.columnName == 'keywords'"
class="query-form-item"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
</template>
</el-row>
</el-form>
</div>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
@ -448,7 +468,7 @@ export default {
convertDateFun: convertDate,
//-------------end
showSearch: true,
showSearch: false,
filterQuery: {
tagStatus: this.tagStatus, //
tagStatusList: this.tagStatusList, //

@ -162,8 +162,8 @@
type="tel"
placeholder="请点击输入框进行扫码设置或者扫码录入"
v-model="scanCode"
:disabled="scanDisabled"
></el-input>
<!-- :disabled="scanDisabled"-->
</el-form-item>
</el-col>
<el-col :span="4">
@ -171,7 +171,7 @@
<el-button
type="primary"
size="mini"
icon="el-icon-plus"
icon="el-icon-search"
@click.native.stop="addCode()"
style="margin-left: 15px"
>
@ -354,7 +354,7 @@ import prescribeOriginPanel from "./PannelOrderBiz";
import prescribeCodePanel from "./PanelOrderTagCode";
import PannelOrderBiz from "./PannelOrderBiz";
import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
import {enterCodeWeb} from "@/api/inout/order";
import {enterCodeWeb,batchVailCode,enterCodeBillNo} from "@/api/inout/order";
import {cancelOrder, draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder";
@ -362,6 +362,8 @@ import PanelOrderAllDetail from "@/views/collect/PanelOrderAllDetail";
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {getInvListByUser} from "@/api/system/invWarehouse";
import {orderbatchAddCode} from "@/api/inout/splitCode";
import {isBlank} from "@/utils/strUtil";
export default {
/**
* 处理处方
@ -454,7 +456,11 @@ export default {
invList: [],
viewType: 1,
scanDisabled: false,
valiCodes: []
valiCodes: [],
warnResult: "",
errResult: "",
warnVisible: false,
errVisible: false,
}
},
@ -630,6 +636,10 @@ export default {
enterKey() {
if (this.formData.billNo == null){
this.enterBillNoKey()
return;
}
this.checkSuccess = true;
this.filterQuery.code = this.scanCode;
let tQuery = {
@ -704,16 +714,94 @@ export default {
});
},
addCode() {
enterBillNoKey() {
this.checkSuccess = true;
this.filterQuery.code = this.scanCode;
let tQuery = {
viewType: "tagCode",
workPlaceCode: this.workplaceId,
originCode: this.originCode,
busType: this.formData.busType,
code: this.filterQuery.code.trim(),
};
enterCodeBillNo(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;
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();
})
.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.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();
},
});
}
}
this.loading = false;
});
},
addCode(code) {
if (this.$isNotBlank(code)) {
this.filterQuery.code = code;
}
if (this.$isBlank(this.filterQuery.code)) {
this.filterQuery.code = this.scanCode.trim();
}
if (this.$isBlank(this.filterQuery.code) && this.$isBlank(this.scanCode)) {
return;
}
if (this.$isNotBlank(this.scanCode)) {
this.filterQuery.code = this.scanCode.trim();
}
// if (this.$isNotBlank(this.scanCode)) {
// this.filterQuery.code = this.scanCode.trim();
// }
let tagQuery = {
workPlaceCode: this.formData.workPlaceCode,
fromCorp: this.formData.fromCorp,
@ -832,6 +920,7 @@ export default {
updateOrder() {
this.formData.workPlaceCode = this.workplaceId;
updateOrder(this.formData).then(res => {
this.loading = false
}).catch(() => {
@ -888,15 +977,17 @@ export default {
}).catch(() => {
});
} else if (temp.tagStatus === 2) {
this.$confirm('检测到当前工位存在正在处理单据,是否继续上一次单据处理?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.formData = temp;
this.startDeal();
}).catch(() => {
});
this.formData = temp;
this.startDeal();
// this.$confirm('?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
//
// }).catch(() => {
// });
}
@ -980,6 +1071,42 @@ export default {
this.result = this.result + "\n" + message;
}
},
popupTip(data) {
this.$confirm(data.errMsg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.formData.insert = true
this.addCode(data.code);
}).catch(() => {
});
},
async printMutiCodeResult(vailCodeResultResponses) {
this.warnVisible = false;
this.errVisible = false;
for (let i = 0; i < vailCodeResultResponses.length; i++) {
let data = vailCodeResultResponses[i]
if (data.status == 1)
this.result = this.result + ";" + vailCodeResultResponses[i].code;
else if (data.status == 2) {
this.warnResult = this.warnResult + "\n" + vailCodeResultResponses[i].code + ":" + vailCodeResultResponses[i].errMsg;
} else if (data.status == 3) {
this.result = this.result + "\n" + vailCodeResultResponses[i].code;
// this.warnResult = this.warnResult + "\n" + vailCodeResultResponses[i].code + ":" + vailCodeResultResponses[i].errMsg;
await this.popupTip(data)
}
// else
// this.errResult = this.errResult + "\n" + vailCodeResultResponses[i].code + ":" + vailCodeResultResponses[i].errMsg;
}
if (!isBlank(this.warnResult))
this.warnVisible = true;
if (!isBlank(this.errResult))
this.errVisible = true;
},
handleCommand(command) {
// this.$message('click on item ' + command);
},
@ -1028,47 +1155,58 @@ export default {
},
//
handleRecCodesEvent(event) {
console.log('接收 recCodes event:',event.detail.recCodes);
console.log('接收 recCodes event:', event.detail.recCodes);
let params = {
codeList: event.detail.recCodes,
codeList: event.detail.recCodes,
};
//
batchVailCode(params).then((res) => {
if (res.code === 20000) {
this.valiCodes = [];
console.log("==滴码接收==",res.data);
let list = res.data;
list.forEach(item => {
if (item.status === 1) {
this.valiCodes.push(item.code);
if (res.code === 20000) {
this.valiCodes = [];
let list = res.data;
list.forEach(item => {
if (item.status === 1) {
this.valiCodes.push(item.code);
}
});
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,
}
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)
}
});
}else{
this.$message.error(res.message)
}
});
if(this.valiCodes != null && this.valiCodes.length > 0){
//
let params2 = {
workPlaceCode:this.formData.workPlaceCode,
codeList:this.valiCodes
}
orderbatchAddCode(params2).then((res) => {
if (res.code === 20000) {
this.$message.success("添加成功")
}else{
this.$message.error(res.message)
this.scanCode = this.valiCodes.join(";");
}
});
this.scanCode = this.valiCodes.join(";");
} else {
this.$message.error(res.message)
}
});
}
},
mounted() {
this.$refs.inputRef.focus();
//
if(window.navigator.userAgent.indexOf("GLXP_PC") != -1){
if (window.navigator.userAgent.indexOf("GLXP_PC") != -1) {
this.scanDisabled = true;
window.removeEventListener('djcl', this.handleRecCodesEvent);
window.addEventListener('djcl', this.handleRecCodesEvent);
}
},

Loading…
Cancel
Save