新增批次号校验

master
anthonywj 3 years ago
parent e0fde36e71
commit 80700bc193

@ -150,7 +150,7 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
:disabled="scope.row.thirdId == null || scope.row.thirdId == '' || scope.row.flbm!=null" :disabled="scope.row.originUuid != null"
@click.native.stop="intentSelectUdi(scope.row)" @click.native.stop="intentSelectUdi(scope.row)"
>关联DI >关联DI
</el-button> </el-button>
@ -690,39 +690,24 @@
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col"> <el-col :span="24" class="el-col">
</el-col> <div style="margin-top: 18px;margin-bottom: 18px">
<el-col :span="4" class="el-col"> <el-checkbox v-model="checked" class=""
<el-form-item prop="name">
<el-checkbox v-model="checked" class="text item itemTag"
:disabled="!isUseDyCheck" :disabled="!isUseDyCheck"
>以使用单元数量入库 >以使用单元数量入库
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isDisable" class=""
</el-col>
<!-- <el-col :span="3" class="el-col">-->
<!-- <el-form-item prop="name">-->
<!-- <el-checkbox v-model="editQuery.isLock" class="text item itemTag"-->
<!-- >是否锁定-->
<!-- </el-checkbox>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag"
@change="diableChange" @change="diableChange"
>是否禁用 >是否禁用
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isAdavence" class=""
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isAdavence" class="text item itemTag"
>是否寄售 >是否寄售
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.allowNoBatch" class=""
>是否允许无批次号扫码
</el-checkbox>
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -852,6 +837,7 @@ export default {
isUseDy: false, isUseDy: false,
isLock: null, isLock: null,
isAdavence: null, isAdavence: null,
allowNoBatch: null
}, },
defaultSys: null, defaultSys: null,
isImport: false, isImport: false,

@ -673,39 +673,22 @@
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col"> <el-col :span="24" class="el-col">
</el-col> <div style="margin-top: 18px;margin-bottom: 18px">
<el-col :span="4" class="el-col"> <el-checkbox v-model="checked" disabled
<el-form-item prop="name">
<el-checkbox v-model="checked" class="text item itemTag"
:disabled="true"
>以使用单元数量入库 >以使用单元数量入库
</el-checkbox> </el-checkbox>
<!-- :disabled="!isUseDyCheck"--> <el-checkbox v-model="editQuery.isDisable" disabled
</el-form-item>
</el-col>
<!-- <el-col :span="3" class="el-col">-->
<!-- <el-form-item prop="name">-->
<!-- <el-checkbox v-model="editQuery.isLock" class="text item itemTag"-->
<!-- >是否锁定-->
<!-- </el-checkbox>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag" disabled
>是否禁用 >是否禁用
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isAdavence" disabled
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isAdavence" class="text item itemTag" disabled
>是否寄售 >是否寄售
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.allowNoBatch" disabled
>是否允许无批次号扫码
</el-checkbox>
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>

@ -144,9 +144,8 @@
v-if="isSpCombine" v-if="isSpCombine"
type="text" type="text"
size="small" size="small"
:disabled="scope.row.thirdId == null :disabled="
|| scope.row.thirdId == '' scope.row.originUuid!=null
|| scope.row.flbm!=null
|| scope.row.lockStatus===3" || scope.row.lockStatus===3"
@click.native.stop="intentSelectUdi(scope.row)" @click.native.stop="intentSelectUdi(scope.row)"
>关联DI >关联DI
@ -185,7 +184,7 @@
v-if="isSpCombine" v-if="isSpCombine"
type="text" type="text"
size="small" size="small"
:disabled="scope.row.thirdId==scope.row.nameCode || scope.row.thirdId==null || scope.row.nameCode==null" :disabled="scope.row.thirdId==scope.row.nameCode || scope.row.thirdId==null || scope.row.nameCode==null || scope.row.lockStatus===3"
@click.native.stop="splitSelectUdi(scope.row)" @click.native.stop="splitSelectUdi(scope.row)"
>拆分产品 >拆分产品
</el-button> </el-button>
@ -715,28 +714,21 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col"> <el-col :span="24" class="el-col">
</el-col> <div style="margin-top: 18px;margin-bottom: 18px">
<el-col :span="4" class="el-col"> <el-checkbox v-model="checked" :disabled="!isUseDyCheck"
<el-form-item prop="name">
<el-checkbox v-model="checked" class="text item itemTag"
>以使用单元数量入库 >以使用单元数量入库
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isDisable"
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag"
>是否禁用 >是否禁用
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isAdavence"
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isAdavence" class="text item itemTag"
>是否寄售 >是否寄售
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.allowNoBatch"
>是否允许无批次号扫码
</el-checkbox>
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -1260,37 +1252,31 @@
size="small" size="small"
splaceholder="请输入内容" splaceholder="请输入内容"
v-model="editQuery.versionNumber" v-model="editQuery.versionNumber"
disabled
></el-input> ></el-input>
<el-button type="text" size="small" @click.native.stop="selectVersion()" <!-- <el-button type="text" size="small" @click.native.stop="selectVersion()"-->
style="margin-left: 5%" <!-- style="margin-left: 5%"-->
>切换版本 <!-- >切换版本-->
</el-button> <!-- </el-button>-->
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col"> <el-col :span="24" class="el-col">
</el-col> <div style="margin-top: 18px;margin-bottom: 18px">
<el-col :span="4" class="el-col"> <el-checkbox v-model="checked" disabled
<el-form-item prop="name">
<el-checkbox v-model="checked" class="text item itemTag" disabled
>以使用单元数量入库 >以使用单元数量入库
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isDisable" disabled
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag" disabled
>是否禁用 >是否禁用
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isAdavence" disabled
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isAdavence" class="text item itemTag" disabled
>是否寄售 >是否寄售
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.allowNoBatch" disabled
>是否允许无批次号扫码
</el-checkbox>
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -1492,6 +1478,7 @@ export default {
5: '拒绝反审', 5: '拒绝反审',
}, },
lockStatusMap: {1: "未提交", 2: "已提交", 3: "已锁定"}, lockStatusMap: {1: "未提交", 2: "已提交", 3: "已锁定"},
isUseDyCheck: false,
}; };
}, },
@ -1552,9 +1539,15 @@ export default {
this.loading = true; this.loading = true;
filterByUuid(detailQuery) filterByUuid(detailQuery)
.then((response) => { .then((response) => {
this.isUseDyCheck = false;
this.loading = false; this.loading = false;
this.detailList = response.data || []; this.detailList = response.data || [];
this.productType = this.detailList[0].productType; this.productType = this.detailList[0].productType;
this.detailList.forEach((item, index, array) => {
if (item.zxxsbzbhsydysl > 1) {
this.isUseDyCheck = true;
}
});
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
@ -1919,14 +1912,16 @@ export default {
this.selectVersionVisible = false; this.selectVersionVisible = false;
}, },
onAddSubmit() { onAddSubmit() {
this.relevanceEdit.isDisable = this.editQuery.isDisable;
this.relevanceEdit.isLock = this.editQuery.isLock;
this.relevanceEdit.isAdavence = this.editQuery.isAdavence;
this.relevanceEdit = this.editQuery;
if (this.checked == true) { if (this.checked == true) {
this.relevanceEdit.isUseDy = 1; this.relevanceEdit.isUseDy = 1;
} else { } else {
this.relevanceEdit.isUseDy = 0; this.relevanceEdit.isUseDy = 0;
} }
this.relevanceEdit.isDisable = this.editQuery.isDisable; this.relevanceEdit.id = this.editQuery.rlId,
this.relevanceEdit.isAdavence = this.editQuery.isAdavence;
console.log(this.relevanceEdit.isUseDy); console.log(this.relevanceEdit.isUseDy);
updatetUdiInfos(this.relevanceEdit) updatetUdiInfos(this.relevanceEdit)
.then((response) => { .then((response) => {

@ -451,29 +451,21 @@
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col"> <el-col :span="24" class="el-col">
</el-col> <div style="margin-top: 18px;margin-bottom: 18px">
<el-col :span="4" class="el-col"> <el-checkbox v-model="checked"
<el-form-item prop="name">
<el-checkbox v-model="checked" class="text item itemTag"
:disabled="!isUseDyCheck"
>以使用单元数量入库 >以使用单元数量入库
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isDisable"
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isLock" class="text item itemTag" :disabled="true"
>是否锁定
</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="3" class="el-col">
<el-form-item prop="name">
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag" :disabled="true"
>是否禁用 >是否禁用
</el-checkbox> </el-checkbox>
</el-form-item> <el-checkbox v-model="editQuery.isAdavence"
>是否寄售
</el-checkbox>
<el-checkbox v-model="editQuery.allowNoBatch"
>是否允许无批次号扫码
</el-checkbox>
</div>
</el-col> </el-col>
</el-row> </el-row>
@ -723,18 +715,18 @@ export default {
id: this.curRow.id, id: this.curRow.id,
bindStatus: 0, bindStatus: 0,
bindRlFk: val.id, bindRlFk: val.id,
mySupId:this.curRow.unitFk, mySupId: this.curRow.unitFk,
}; };
updateBind(query).then((response) => { updateBind(query).then((response) => {
console.log(response.code+response.message) console.log(response.code + response.message)
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("绑定成功"); this.$message.success("绑定成功");
this.closeBindDialog(this.curRow.id); this.closeBindDialog(this.curRow.id);
} else { } else {
this.$message.error("-----503码"+response.message); this.$message.error("-----503码" + response.message);
if(response.code == 503){ if (response.code == 503) {
this.closeBindDialog(503); this.closeBindDialog(503);
} }

@ -414,7 +414,8 @@ export default {
dialogTableVisible: false, dialogTableVisible: false,
sitcomScan: false, sitcomScan: false,
selectRlTitle: "绑定产品", selectRlTitle: "绑定产品",
selectUnitTitle: "绑定供应商" selectUnitTitle: "绑定供应商",
sictomText: "",
}; };
}, },
components: { components: {
@ -487,6 +488,7 @@ export default {
} }
}, },
addCode(event) { addCode(event) {
this.sictomText = "";
this.formData.corpOrderId = this.formData.corpOrderId.trim(); this.formData.corpOrderId = this.formData.corpOrderId.trim();
this.actionEnable = true; this.actionEnable = true;
if (event == null) { if (event == null) {
@ -914,14 +916,16 @@ export default {
var inputer = document.getElementById("inputer"); var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) { sc.onInput = function (text) {
console.log("监听掃碼:"+text); console.log("监听掃碼:" + text);
//onInput500ms //onInput500ms
if (text.includes("delete")) { if (text.includes("delete")) {
that.formData.code = ""; that.formData.code = "";
that.sitcomScan = "";
return; return;
} }
if (that.sitcomScan) { if (that.sitcomScan) {
that.formData.code = that.formData.code; that.sictomText = that.sictomText + text;
that.formData.code = that.sictomText;
} else { } else {
that.formData.code = text; that.formData.code = text;
} }

@ -419,6 +419,7 @@ export default {
addCode(event) { addCode(event) {
if (event == null) { if (event == null) {
} else event.target.select(); } else event.target.select();
this.sictomText = "";
this.$refs.inputRef.select(); this.$refs.inputRef.select();
if (this.$isBlank(this.formData.billType)) { if (this.$isBlank(this.formData.billType)) {
this.$message.warning("请选择单据类型!"); this.$message.warning("请选择单据类型!");
@ -712,17 +713,20 @@ export default {
event.stopPropagation(); event.stopPropagation();
}; };
var that = this; var that = this;
var inputer = document.getElementById("inputer"); var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) { sc.onInput = function (text) {
console.log("监听掃碼:"+text); console.log("监听掃碼:" + text);
//onInput500ms //onInput500ms
if (text.includes("delete")) { if (text.includes("delete")) {
that.formData.code = ""; that.formData.code = "";
that.sictomText = "";
return; return;
} }
if (that.sitcomScan) { if (that.sitcomScan) {
that.formData.code = that.formData.code; that.sictomText = that.sictomText + text;
that.formData.code = that.sictomText;
} else { } else {
that.formData.code = text; that.formData.code = text;
} }

@ -644,8 +644,10 @@ export default {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
} }
if (this.$isBlank(this.codeArray[i].batchNo)) { if (this.$isBlank(this.codeArray[i].batchNo)) {
if (!this.codeArray[i].allowNoBatch) {
return this.$message.error('批次号不能为空'); return this.$message.error('批次号不能为空');
} }
}
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) { if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期与失效日期不能全部为空'); return this.$message.error('生产日期与失效日期不能全部为空');
} }

@ -576,8 +576,10 @@ export default {
} else { } else {
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].batchNo)) { if (this.$isBlank(this.codeArray[i].batchNo)) {
if (!this.codeArray[i].allowNoBatch) {
return this.$message.error('批次号不能为空'); return this.$message.error('批次号不能为空');
} }
}
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) { if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期与失效日期不能全部为空'); return this.$message.error('生产日期与失效日期不能全部为空');
} }

@ -919,6 +919,7 @@ export default {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) { if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code; this.query.locStorageCode = this.storageList[0].code;
this.getList();
} }
}) })
.catch(() => { .catch(() => {

@ -570,8 +570,10 @@ export default {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
} }
if (this.$isBlank(this.codeArray[i].batchNo)) { if (this.$isBlank(this.codeArray[i].batchNo)) {
if (!this.codeArray[i].allowNoBatch) {
return this.$message.error('批次号不能为空'); return this.$message.error('批次号不能为空');
} }
}
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) { if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期与失效日期不能全部为空'); return this.$message.error('生产日期与失效日期不能全部为空');
} }

Loading…
Cancel
Save