|
|
|
@ -8,11 +8,13 @@
|
|
|
|
|
label-width="110px"
|
|
|
|
|
>
|
|
|
|
|
<el-card>
|
|
|
|
|
<el-row style="margin-top: 5px; display: flex; align-items: center;">
|
|
|
|
|
<el-row style="margin-top: 5px;margin-bottom: 12px; display: flex; align-items: center;">
|
|
|
|
|
<div style="flex: 1;font-size: 24px">
|
|
|
|
|
<span v-if="parentCode"><strong>{{ relFormData.packUnit }}</strong></span>
|
|
|
|
|
<span v-if="parentCode" style="margin-left: 30px"><strong>{{ relFormData.packLayer }}层级</strong></span>
|
|
|
|
|
<span v-if="parentCode" style="margin-left: 30px"><strong>{{ parentCode || '暂未录入'}}</strong> <strong> (<span style="color: #FF0000;">{{ syxjsl || 0}}</span>/<span >{{ bhxjsl || 0}}</span>)</strong></span>
|
|
|
|
|
<span v-if="parentCode"
|
|
|
|
|
style="margin-left: 30px"><strong>{{ parentCode || '暂未录入' }}</strong> <strong> (<span
|
|
|
|
|
style="color: #FF0000;">{{ syxjsl || 0 }}</span>/<span>{{ bhxjsl || 0 }}</span>)</strong></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-left: auto;">
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="spellBox()" :loading="submitLoading"
|
|
|
|
@ -188,18 +190,19 @@
|
|
|
|
|
<sonRelCode
|
|
|
|
|
:closeDialog="this.popCloseDialog"
|
|
|
|
|
:opeParentCode="this.popParentCode"
|
|
|
|
|
:opeRelFormData ="this.popRelFormData"
|
|
|
|
|
:opeRelFormData="this.popRelFormData"
|
|
|
|
|
></sonRelCode>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {enterCodeWeb} from "@/api/inout/order";
|
|
|
|
|
import {addRelCodeSpellBox, scanCodeRelCode, deleteDetail, deleteAllDetail} from "@/api/collect/relCode";
|
|
|
|
|
import sonRelCode from './sonRelCodeSpell.vue';
|
|
|
|
|
import A from "@/plugins/KeyScaner";
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {enterCodeWeb} from "@/api/inout/order";
|
|
|
|
|
import {addRelCodeSpellBox,scanCodeRelCode,deleteDetail,deleteAllDetail} from "@/api/collect/relCode";
|
|
|
|
|
import sonRelCode from './sonRelCodeSpell.vue';
|
|
|
|
|
import A from "@/plugins/KeyScaner";
|
|
|
|
|
export default {
|
|
|
|
|
export default {
|
|
|
|
|
name: "operateRelCode",
|
|
|
|
|
props: {
|
|
|
|
|
orderQuery: {
|
|
|
|
@ -244,7 +247,7 @@
|
|
|
|
|
packUnit: null,
|
|
|
|
|
bhxjsl: null,
|
|
|
|
|
packLayer: null,
|
|
|
|
|
detailList:[]
|
|
|
|
|
detailList: []
|
|
|
|
|
},
|
|
|
|
|
detailList: [],
|
|
|
|
|
checkPreInArray: [],
|
|
|
|
@ -291,14 +294,14 @@
|
|
|
|
|
errResult: "",
|
|
|
|
|
warnVisible: false,
|
|
|
|
|
errVisible: false,
|
|
|
|
|
parentCode:null,
|
|
|
|
|
bhxjsl:0,
|
|
|
|
|
syxjsl:0,
|
|
|
|
|
parentCode: null,
|
|
|
|
|
bhxjsl: 0,
|
|
|
|
|
syxjsl: 0,
|
|
|
|
|
packLayer: null,
|
|
|
|
|
popDialogVisible:false,
|
|
|
|
|
title:null,
|
|
|
|
|
popParentCode:null,
|
|
|
|
|
popRelFormData:{
|
|
|
|
|
popDialogVisible: false,
|
|
|
|
|
title: null,
|
|
|
|
|
popParentCode: null,
|
|
|
|
|
popRelFormData: {
|
|
|
|
|
productCode: null,
|
|
|
|
|
subTypeNo: null,
|
|
|
|
|
cascadeRatio: null,
|
|
|
|
@ -312,11 +315,11 @@
|
|
|
|
|
lineManager: null,
|
|
|
|
|
packUnit: null,
|
|
|
|
|
bhxjsl: null,
|
|
|
|
|
detailList:[]
|
|
|
|
|
detailList: []
|
|
|
|
|
},
|
|
|
|
|
relFormDatas:[],
|
|
|
|
|
relFormDatas: [],
|
|
|
|
|
detailListSpell: [],
|
|
|
|
|
popLevel:1,
|
|
|
|
|
popLevel: 1,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -338,7 +341,7 @@
|
|
|
|
|
if (row.packLayer > 1) {
|
|
|
|
|
this.loading = true
|
|
|
|
|
//去后端触发删除当前码的关系
|
|
|
|
|
deleteDetail({ curCode: curCode }).then((response) => {
|
|
|
|
|
deleteDetail({curCode: curCode}).then((response) => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.$message.success('删除成功!')
|
|
|
|
@ -364,7 +367,7 @@
|
|
|
|
|
this.popDialogVisible = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( this.bhxjsl === this.syxjsl){
|
|
|
|
|
if (this.bhxjsl === this.syxjsl) {
|
|
|
|
|
this.$confirm("该层级已录入完成, 是否关闭?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
@ -376,7 +379,7 @@
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -408,12 +411,12 @@
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
this.isSuccess = true;
|
|
|
|
|
let data = response.data;
|
|
|
|
|
if(data !== null){
|
|
|
|
|
if (data !== null) {
|
|
|
|
|
//1.确定是否为最大层级
|
|
|
|
|
if (this.parentCode == null){
|
|
|
|
|
if (this.parentCode == null) {
|
|
|
|
|
if (data.packLayer == 1) {
|
|
|
|
|
this.$message.warning("该层级为最小包装层级无需进行码关联操作!");
|
|
|
|
|
if (this.closeCodeDialog != null){
|
|
|
|
|
if (this.closeCodeDialog != null) {
|
|
|
|
|
this.closeCodeDialog()
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
@ -433,20 +436,20 @@
|
|
|
|
|
this.parentCode = data.curCode;
|
|
|
|
|
this.bhxjsl = data.bhxjsl;
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
}else {
|
|
|
|
|
if(this.detailList.some(item => item.curCode === data.curCode)) {
|
|
|
|
|
} else {
|
|
|
|
|
if (this.detailList.some(item => item.curCode === data.curCode)) {
|
|
|
|
|
//码重复提示
|
|
|
|
|
this.$message.warning("录入码重复!");
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
if(this.bhxjsl === this.syxjsl){
|
|
|
|
|
if (this.bhxjsl === this.syxjsl) {
|
|
|
|
|
//满了自动保存
|
|
|
|
|
this.$message.warning("包含下级码已录满!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//判断是否是下级
|
|
|
|
|
if(data.packLayer == this.relFormData.packLayer) {
|
|
|
|
|
if (data.packLayer == this.relFormData.packLayer) {
|
|
|
|
|
//非当前编码的子层级码 是否进行替换操作
|
|
|
|
|
this.$confirm("非当前编码的子层级码,是否进行替换操作?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
@ -472,7 +475,7 @@
|
|
|
|
|
.catch(() => {
|
|
|
|
|
return;
|
|
|
|
|
});
|
|
|
|
|
}else if(data.packLayer == (this.relFormData.packLayer-1) ) {
|
|
|
|
|
} else if (data.packLayer == (this.relFormData.packLayer - 1)) {
|
|
|
|
|
//下级码
|
|
|
|
|
this.detailList.push(data);
|
|
|
|
|
this.detailListSpell.push(data);
|
|
|
|
@ -480,7 +483,7 @@
|
|
|
|
|
this.syxjsl = this.detailList.length;
|
|
|
|
|
|
|
|
|
|
//判断是否还有下级码 如果有进行弹窗 关联
|
|
|
|
|
if (data.packLayer > 1 && data.bhxjsl > 0){
|
|
|
|
|
if (data.packLayer > 1 && data.bhxjsl > 0) {
|
|
|
|
|
this.popRelFormData.cpmctymc = data.cpmctymc;
|
|
|
|
|
this.popRelFormData.productCode = data.productCode;
|
|
|
|
|
this.popRelFormData.subTypeNo = data.subTypeNo;
|
|
|
|
@ -501,8 +504,8 @@
|
|
|
|
|
this.popDialogVisible = true;
|
|
|
|
|
this.title = "手工关联:" + data.curCode;
|
|
|
|
|
this.popParentCode = data.curCode;
|
|
|
|
|
}else {
|
|
|
|
|
if( this.bhxjsl === this.syxjsl){
|
|
|
|
|
} else {
|
|
|
|
|
if (this.bhxjsl === this.syxjsl) {
|
|
|
|
|
this.$confirm("该层级已录入完成, 是否关闭?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
@ -519,7 +522,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -581,9 +584,15 @@
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
spellBox() {
|
|
|
|
|
this.$confirm("拼箱后,需重新录入批次信息,请确认是否进行拼箱?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
const temp = JSON.parse(JSON.stringify(this.relFormData));
|
|
|
|
|
temp.detailList = []
|
|
|
|
|
this.detailListSpell.forEach( item =>{
|
|
|
|
|
this.detailListSpell.forEach(item => {
|
|
|
|
|
item.flag = 2
|
|
|
|
|
temp.detailList.push(item)
|
|
|
|
|
});
|
|
|
|
@ -595,9 +604,14 @@
|
|
|
|
|
this.relFormData.validateDate = null
|
|
|
|
|
// console.log("拼凑箱子详情",this.relFormDatas)
|
|
|
|
|
this.inputDisabled = false
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
submit(val) {
|
|
|
|
|
if(this.detailList == null || this.detailList.length == 0){
|
|
|
|
|
if (this.detailList == null || this.detailList.length == 0) {
|
|
|
|
|
this.$message.warning("请先录入关联码!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -615,7 +629,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//增加数量是否完全判断
|
|
|
|
|
if( this.bhxjsl != this.syxjsl){
|
|
|
|
|
if (this.bhxjsl != this.syxjsl) {
|
|
|
|
|
this.$confirm("该层级已录入数量与应录入数量不符, 是否继续提交?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
@ -626,7 +640,7 @@
|
|
|
|
|
|
|
|
|
|
const temp = JSON.parse(JSON.stringify(this.relFormData));
|
|
|
|
|
temp.detailList = []
|
|
|
|
|
this.detailListSpell.forEach( item =>{
|
|
|
|
|
this.detailListSpell.forEach(item => {
|
|
|
|
|
item.flag = 2
|
|
|
|
|
temp.detailList.push(item)
|
|
|
|
|
});
|
|
|
|
@ -648,12 +662,12 @@
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
|
|
const temp = JSON.parse(JSON.stringify(this.relFormData));
|
|
|
|
|
temp.detailList = []
|
|
|
|
|
this.detailListSpell.forEach( item =>{
|
|
|
|
|
this.detailListSpell.forEach(item => {
|
|
|
|
|
item.flag = 2
|
|
|
|
|
temp.detailList.push(item)
|
|
|
|
|
});
|
|
|
|
@ -793,7 +807,7 @@
|
|
|
|
|
lineName: null,
|
|
|
|
|
lineManager: null,
|
|
|
|
|
packUnit: null,
|
|
|
|
|
cpmctymc:null,
|
|
|
|
|
cpmctymc: null,
|
|
|
|
|
}
|
|
|
|
|
this.scanCode = "";
|
|
|
|
|
this.result = "";
|
|
|
|
@ -804,12 +818,12 @@
|
|
|
|
|
this.parentCode = null;
|
|
|
|
|
this.inputDisabled = false
|
|
|
|
|
this.refreshCodesPanel()
|
|
|
|
|
if (this.closeCodeDialog != null){
|
|
|
|
|
if (this.closeCodeDialog != null) {
|
|
|
|
|
this.closeCodeDialog()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
init(){
|
|
|
|
|
if(this.orderQuery != null){
|
|
|
|
|
init() {
|
|
|
|
|
if (this.orderQuery != null) {
|
|
|
|
|
this.scanCode = this.orderQuery.code
|
|
|
|
|
// this.scanCode = "82015700010101701314"
|
|
|
|
|
this.enterKey();
|
|
|
|
@ -850,12 +864,12 @@
|
|
|
|
|
created() {
|
|
|
|
|
this.init();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.scroll-alert {
|
|
|
|
|
<style scoped>
|
|
|
|
|
.scroll-alert {
|
|
|
|
|
width: 100%; /* 或者你需要的宽度 */
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
@ -864,29 +878,29 @@
|
|
|
|
|
background-color: rgba(255, 235, 59, 0.1); /* 类似于 Element UI 警告框的背景色 */
|
|
|
|
|
padding: 10px;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scroll-text {
|
|
|
|
|
.scroll-text {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding-left: 100%; /* 初始位置在容器右侧 */
|
|
|
|
|
animation: scroll 10s linear infinite; /* 滚动动画 */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes scroll {
|
|
|
|
|
@keyframes scroll {
|
|
|
|
|
from {
|
|
|
|
|
transform: translateX(0);
|
|
|
|
|
}
|
|
|
|
|
to {
|
|
|
|
|
transform: translateX(-100%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.query-form-item {
|
|
|
|
|
.query-form-item {
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#inputer {
|
|
|
|
|
#inputer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 30px;
|
|
|
|
|
background-color: white;
|
|
|
|
@ -894,9 +908,9 @@
|
|
|
|
|
border-style: solid;
|
|
|
|
|
border-width: 0.1px;
|
|
|
|
|
color: #4a4a4a;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#inputer:focus {
|
|
|
|
|
#inputer:focus {
|
|
|
|
|
width: 100%;
|
|
|
|
|
min-height: 30px;
|
|
|
|
|
background-color: white;
|
|
|
|
@ -904,13 +918,13 @@
|
|
|
|
|
border-style: solid;
|
|
|
|
|
border-width: 0.1px;
|
|
|
|
|
color: #4a4a4a;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ime-disabled {
|
|
|
|
|
.ime-disabled {
|
|
|
|
|
ime-mode: disabled;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-display {
|
|
|
|
|
.result-display {
|
|
|
|
|
border: 2px solid #ccc; /* 默认外框颜色 */
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
margin-top: 5px;
|
|
|
|
@ -918,33 +932,33 @@
|
|
|
|
|
margin-right: 25px;
|
|
|
|
|
padding-left: 25px;
|
|
|
|
|
/* 不设置背景颜色 */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-success {
|
|
|
|
|
.result-success {
|
|
|
|
|
border-color: #4CAF50; /* 成功时外框颜色 */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-failure {
|
|
|
|
|
.result-failure {
|
|
|
|
|
border-color: #0080ff; /* 失败时外框颜色 */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-text {
|
|
|
|
|
.result-text {
|
|
|
|
|
height: 18px;
|
|
|
|
|
/* 你可以在这里设置默认的文本颜色或其他样式 */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-text-success {
|
|
|
|
|
.result-text-success {
|
|
|
|
|
color: #4CAF50; /* 成功时文本颜色 */
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-text-failure {
|
|
|
|
|
.result-text-failure {
|
|
|
|
|
color: #0080ff; /* 失败时文本颜色 */
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mar-left {
|
|
|
|
|
.mar-left {
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|