|
|
@ -12,14 +12,18 @@
|
|
|
|
<el-button-group
|
|
|
|
<el-button-group
|
|
|
|
style="display: flex; margin-top: 5px; float: right"
|
|
|
|
style="display: flex; margin-top: 5px; float: right"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="giveUp()" :loading="submitLoading"
|
|
|
|
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
|
|
|
>放弃
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
>添加草稿
|
|
|
|
>保存
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
>添加完成
|
|
|
|
>提交
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-button-group>
|
|
|
|
</el-button-group>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
@ -95,6 +99,7 @@
|
|
|
|
v-model="relFormData.batchNo"
|
|
|
|
v-model="relFormData.batchNo"
|
|
|
|
auto-complete="off"
|
|
|
|
auto-complete="off"
|
|
|
|
style="width: 90%"
|
|
|
|
style="width: 90%"
|
|
|
|
|
|
|
|
:disabled="this.parentCode"
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
></el-input>
|
|
|
|
></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -108,6 +113,7 @@
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
style="width: 90%"
|
|
|
|
style="width: 90%"
|
|
|
|
|
|
|
|
:disabled="this.parentCode"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -121,6 +127,7 @@
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
style="width: 90%"
|
|
|
|
style="width: 90%"
|
|
|
|
|
|
|
|
:disabled="this.parentCode"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -133,6 +140,7 @@
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
style="width: 90%"
|
|
|
|
style="width: 90%"
|
|
|
|
placeholder="请输入备注"
|
|
|
|
placeholder="请输入备注"
|
|
|
|
|
|
|
|
:disabled="this.parentCode"
|
|
|
|
></el-input>
|
|
|
|
></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -165,7 +173,7 @@
|
|
|
|
</el-button-group>
|
|
|
|
</el-button-group>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-alert
|
|
|
|
<el-alert
|
|
|
|
title="扫码结果:"
|
|
|
|
title="扫码结果:"
|
|
|
|
:type="scanResultType"
|
|
|
|
:type="scanResultType"
|
|
|
@ -196,8 +204,8 @@
|
|
|
|
<span><strong>父级编码:{{ parentCode || '暂未录入'}}</strong> <strong> (<span style="color: #FF0000;">{{ syxjsl || 0}}</span>/<span >{{ bhxjsl || 0}}</span>)</strong></span>
|
|
|
|
<span><strong>父级编码:{{ parentCode || '暂未录入'}}</strong> <strong> (<span style="color: #FF0000;">{{ syxjsl || 0}}</span>/<span >{{ bhxjsl || 0}}</span>)</strong></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-table v-loading="loading"
|
|
|
|
<el-table v-loading="loading"
|
|
|
|
:data="detailList"
|
|
|
|
:data="detailList"
|
|
|
|
style="width: 100%;" max-height="350" height="350"
|
|
|
|
style="width: 100%;" max-height="350" height="350"
|
|
|
|
border
|
|
|
|
border
|
|
|
|
:row-style="rowStyle"
|
|
|
|
:row-style="rowStyle"
|
|
|
@ -210,7 +218,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
<el-dialog
|
|
|
|
:title="title"
|
|
|
|
:title="title"
|
|
|
|
:visible.sync="popDialogVisible"
|
|
|
|
:visible.sync="popDialogVisible"
|
|
|
@ -220,46 +228,28 @@
|
|
|
|
v-if="popDialogVisible"
|
|
|
|
v-if="popDialogVisible"
|
|
|
|
@close='popCloseDialog'
|
|
|
|
@close='popCloseDialog'
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<popRelCode
|
|
|
|
<sonRelCode
|
|
|
|
:popCloseDialog="popCloseDialog"
|
|
|
|
:closeDialog="this.popCloseDialog"
|
|
|
|
:popParentCode="popParentCode"
|
|
|
|
:opeParentCode="this.popParentCode"
|
|
|
|
:popRelFormData ="popRelFormData"
|
|
|
|
:opeRelFormData ="this.popRelFormData"
|
|
|
|
></popRelCode>
|
|
|
|
></sonRelCode>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {enterCodeWeb} from "@/api/inout/order";
|
|
|
|
import {enterCodeWeb} from "@/api/inout/order";
|
|
|
|
import {addRelCode,scanCodeRelCode} from "@/api/collect/relCode";
|
|
|
|
import {addRelCode,scanCodeRelCode} from "@/api/collect/relCode";
|
|
|
|
import popRelCode from './popRelCode.vue';
|
|
|
|
import sonRelCode from './sonRelCode.vue';
|
|
|
|
import A from "@/plugins/KeyScaner";
|
|
|
|
import A from "@/plugins/KeyScaner";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "operateRelCode",
|
|
|
|
name: "operateRelCode",
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
closeDialog: {
|
|
|
|
|
|
|
|
type: Function,
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
orderQuery: {
|
|
|
|
orderQuery: {
|
|
|
|
type: Object,
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
default: {}
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
|
|
|
|
resetKey: {
|
|
|
|
|
|
|
|
type: Function,
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
opeParentCode:{
|
|
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
default: ""
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
opeRelFormData:{
|
|
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
default: {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
resetKey(newVal, oldVal) {
|
|
|
|
resetKey(newVal, oldVal) {
|
|
|
@ -268,13 +258,6 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
userInfo: {
|
|
|
|
|
|
|
|
inv: this.$store.getters.locInvName,
|
|
|
|
|
|
|
|
deptName: this.$store.getters.locDeptName,
|
|
|
|
|
|
|
|
userName: this.$store.getters.name,
|
|
|
|
|
|
|
|
userId: this.$store.getters.userId,
|
|
|
|
|
|
|
|
companyName: this.$store.getters.companyName,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//扫码相关
|
|
|
|
//扫码相关
|
|
|
|
codeFormData: {
|
|
|
|
codeFormData: {
|
|
|
|
code: "",
|
|
|
|
code: "",
|
|
|
@ -296,6 +279,9 @@
|
|
|
|
workShop: null,
|
|
|
|
workShop: null,
|
|
|
|
lineName: null,
|
|
|
|
lineName: null,
|
|
|
|
lineManager: null,
|
|
|
|
lineManager: null,
|
|
|
|
|
|
|
|
packUnit: null,
|
|
|
|
|
|
|
|
bhxjsl: null,
|
|
|
|
|
|
|
|
packLayer: null,
|
|
|
|
detailList:[]
|
|
|
|
detailList:[]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
detailList: [],
|
|
|
|
detailList: [],
|
|
|
@ -303,27 +289,15 @@
|
|
|
|
errView: 0,
|
|
|
|
errView: 0,
|
|
|
|
actionEnable: false,
|
|
|
|
actionEnable: false,
|
|
|
|
formRules: {
|
|
|
|
formRules: {
|
|
|
|
// productCode: [
|
|
|
|
|
|
|
|
// {required: true, message: "请输入产品编号", trigger: "blur"},
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// subTypeNo: [
|
|
|
|
|
|
|
|
// {required: true, message: "请输入类型编号", trigger: "blur"},
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// cascadeRatio: [
|
|
|
|
|
|
|
|
// {required: true, message: "请输入包装比例", trigger: "change"},
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// packageSpec: [
|
|
|
|
|
|
|
|
// {required: true, message: "请输入包装规格", trigger: "change"},
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
batchNo: [
|
|
|
|
batchNo: [
|
|
|
|
{required: true, message: "请输入批次号", trigger: "blur"},
|
|
|
|
{required: true, message: " ", trigger: "blur"},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
madeDate: [
|
|
|
|
madeDate: [
|
|
|
|
{required: true, message: "请选入生产日期", trigger: "blur"},
|
|
|
|
{required: true, message: " ", trigger: "blur"},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
validateDate: [
|
|
|
|
validateDate: [
|
|
|
|
{required: true, message: "请选入有效日期", trigger: "blur"},
|
|
|
|
{required: true, message: " ", trigger: "blur"},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
isScan: true,
|
|
|
|
isScan: true,
|
|
|
|
scanText: "扫码录入:",
|
|
|
|
scanText: "扫码录入:",
|
|
|
@ -358,15 +332,31 @@
|
|
|
|
parentCode:null,
|
|
|
|
parentCode:null,
|
|
|
|
bhxjsl:0,
|
|
|
|
bhxjsl:0,
|
|
|
|
syxjsl:0,
|
|
|
|
syxjsl:0,
|
|
|
|
|
|
|
|
packLayer: null,
|
|
|
|
popDialogVisible:false,
|
|
|
|
popDialogVisible:false,
|
|
|
|
title:null,
|
|
|
|
title:null,
|
|
|
|
popParentCode:null,
|
|
|
|
popParentCode:null,
|
|
|
|
popRelFormData:null,
|
|
|
|
popRelFormData:{
|
|
|
|
|
|
|
|
productCode: null,
|
|
|
|
|
|
|
|
subTypeNo: null,
|
|
|
|
|
|
|
|
cascadeRatio: null,
|
|
|
|
|
|
|
|
packageSpec: null,
|
|
|
|
|
|
|
|
comment: null,
|
|
|
|
|
|
|
|
batchNo: null,
|
|
|
|
|
|
|
|
madeDate: null,
|
|
|
|
|
|
|
|
validateDate: null,
|
|
|
|
|
|
|
|
workShop: null,
|
|
|
|
|
|
|
|
lineName: null,
|
|
|
|
|
|
|
|
lineManager: null,
|
|
|
|
|
|
|
|
packUnit: null,
|
|
|
|
|
|
|
|
bhxjsl: null,
|
|
|
|
|
|
|
|
detailList:[]
|
|
|
|
|
|
|
|
},
|
|
|
|
popLevel:1,
|
|
|
|
popLevel:1,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
popRelCode
|
|
|
|
sonRelCode
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
splitChange() {
|
|
|
|
splitChange() {
|
|
|
@ -374,15 +364,39 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
popCloseDialog() {
|
|
|
|
popCloseDialog() {
|
|
|
|
this.popDialogVisible = false;
|
|
|
|
this.popDialogVisible = false;
|
|
|
|
//清空
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
this.detailList = [];
|
|
|
|
|
|
|
|
this.bhxjsl = 0;
|
|
|
|
if( this.bhxjsl === this.syxjsl){
|
|
|
|
this.syxjsl = 0;
|
|
|
|
this.$confirm("该层级已录入完成, 是否关闭?", "提示", {
|
|
|
|
this.parentCode = null
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.relFormData.detailList = this.detailList
|
|
|
|
|
|
|
|
this.submit()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//添加条码
|
|
|
|
//添加条码
|
|
|
|
addCode() {
|
|
|
|
addCode() {
|
|
|
|
|
|
|
|
//控制三期
|
|
|
|
|
|
|
|
if (this.relFormData.batchNo == null) {
|
|
|
|
|
|
|
|
this.$message.warning("请输入批次号!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.relFormData.madeDate == null) {
|
|
|
|
|
|
|
|
this.$message.warning("请选择生产日期!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.relFormData.validateDate == null) {
|
|
|
|
|
|
|
|
this.$message.warning("请选择失效日期!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let tQuery = Object.assign(this.codeFormData);
|
|
|
|
let tQuery = Object.assign(this.codeFormData);
|
|
|
|
tQuery.curCode = this.codeFormData.code;
|
|
|
|
tQuery.curCode = this.codeFormData.code;
|
|
|
|
tQuery.parentCode = this.parentCode;
|
|
|
|
tQuery.parentCode = this.parentCode;
|
|
|
@ -393,32 +407,113 @@
|
|
|
|
this.isSuccess = true;
|
|
|
|
this.isSuccess = true;
|
|
|
|
let data = response.data;
|
|
|
|
let data = response.data;
|
|
|
|
if(data !== null){
|
|
|
|
if(data !== null){
|
|
|
|
if(this.detailList.some(item => item.curCode === data.curCode)) {
|
|
|
|
//1.确定是否为最大层级
|
|
|
|
//码重复提示
|
|
|
|
if (this.parentCode == null){
|
|
|
|
this.$message.warning("录入码重复!");
|
|
|
|
if (data.packLayer == 1) {
|
|
|
|
} else {
|
|
|
|
this.$message.warning("该层级为最小包装层级无需进行码关联操作!");
|
|
|
|
if( this.bhxjsl !=0 && this.syxjsl != 0 && this.bhxjsl === this.syxjsl){
|
|
|
|
|
|
|
|
//满了自动保存
|
|
|
|
|
|
|
|
this.$message.warning("包含下级码已录满!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.detailList.push(data);
|
|
|
|
this.relFormData.cpmctymc = data.cpmctymc;
|
|
|
|
//存在一个父级关联需-1
|
|
|
|
this.relFormData.productCode = data.productCode;
|
|
|
|
this.syxjsl = this.detailList.length - 1;
|
|
|
|
this.relFormData.subTypeNo = data.subTypeNo;
|
|
|
|
}
|
|
|
|
this.relFormData.cascadeRatio = data.cascadeRatio;
|
|
|
|
//判断是否是下级
|
|
|
|
this.relFormData.bhxjsl = data.bhxjsl;
|
|
|
|
if(data.packLayer > 1){
|
|
|
|
this.relFormData.packageSpec = data.packageSpec;
|
|
|
|
this.relFormData = data;
|
|
|
|
this.relFormData.packLayer = data.packLayer;
|
|
|
|
|
|
|
|
this.relFormData.packUnit = data.packUnit;
|
|
|
|
|
|
|
|
this.relFormData.workShop = data.workShop;
|
|
|
|
|
|
|
|
this.relFormData.lineName = data.lineName;
|
|
|
|
|
|
|
|
this.relFormData.lineManager = data.lineManager;
|
|
|
|
|
|
|
|
|
|
|
|
this.parentCode = data.curCode;
|
|
|
|
this.parentCode = data.curCode;
|
|
|
|
this.bhxjsl = data.bhxjsl;
|
|
|
|
this.bhxjsl = data.bhxjsl;
|
|
|
|
//弹框
|
|
|
|
this.detailList = [];
|
|
|
|
this.popDialogVisible = true;
|
|
|
|
}else {
|
|
|
|
this.popRelFormData = data;
|
|
|
|
if(this.detailList.some(item => item.curCode === data.curCode)) {
|
|
|
|
this.title = "手工关联:" + data.curCode;
|
|
|
|
//码重复提示
|
|
|
|
this.popParentCode = data.curCode;
|
|
|
|
this.$message.warning("录入码重复!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if(this.bhxjsl === this.syxjsl){
|
|
|
|
|
|
|
|
//满了自动保存
|
|
|
|
|
|
|
|
this.$message.warning("包含下级码已录满!");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否是下级
|
|
|
|
|
|
|
|
if(data.packLayer == this.relFormData.packLayer) {
|
|
|
|
|
|
|
|
//非当前编码的子层级码 是否进行替换操作
|
|
|
|
|
|
|
|
this.$confirm("非当前编码的子层级码,是否进行替换操作?", "提示", {
|
|
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
this.relFormData.cpmctymc = data.cpmctymc;
|
|
|
|
|
|
|
|
this.relFormData.productCode = data.productCode;
|
|
|
|
|
|
|
|
this.relFormData.subTypeNo = data.subTypeNo;
|
|
|
|
|
|
|
|
this.relFormData.cascadeRatio = data.cascadeRatio;
|
|
|
|
|
|
|
|
this.relFormData.bhxjsl = data.bhxjsl;
|
|
|
|
|
|
|
|
this.relFormData.packageSpec = data.packageSpec;
|
|
|
|
|
|
|
|
this.relFormData.packLayer = data.packLayer;
|
|
|
|
|
|
|
|
this.relFormData.packUnit = data.packUnit;
|
|
|
|
|
|
|
|
this.relFormData.workShop = data.workShop;
|
|
|
|
|
|
|
|
this.relFormData.lineName = data.lineName;
|
|
|
|
|
|
|
|
this.relFormData.lineManager = data.lineManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.parentCode = data.curCode;
|
|
|
|
|
|
|
|
this.bhxjsl = data.bhxjsl;
|
|
|
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}else if(data.packLayer == (this.relFormData.packLayer-1) ) {
|
|
|
|
|
|
|
|
//下级码
|
|
|
|
|
|
|
|
this.detailList.push(data);
|
|
|
|
|
|
|
|
this.syxjsl = this.detailList.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否还有下级码 如果有进行弹窗 关联
|
|
|
|
|
|
|
|
if (data.packLayer > 1 && data.bhxjsl > 0){
|
|
|
|
|
|
|
|
this.popRelFormData.cpmctymc = data.cpmctymc;
|
|
|
|
|
|
|
|
this.popRelFormData.productCode = data.productCode;
|
|
|
|
|
|
|
|
this.popRelFormData.subTypeNo = data.subTypeNo;
|
|
|
|
|
|
|
|
this.popRelFormData.cascadeRatio = data.cascadeRatio;
|
|
|
|
|
|
|
|
this.popRelFormData.bhxjsl = data.bhxjsl;
|
|
|
|
|
|
|
|
this.popRelFormData.packageSpec = data.packageSpec;
|
|
|
|
|
|
|
|
this.popRelFormData.packLayer = data.packLayer;
|
|
|
|
|
|
|
|
this.popRelFormData.packUnit = data.packUnit;
|
|
|
|
|
|
|
|
this.popRelFormData.workShop = data.workShop;
|
|
|
|
|
|
|
|
this.popRelFormData.lineName = data.lineName;
|
|
|
|
|
|
|
|
this.popRelFormData.lineManager = data.lineManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.popRelFormData.comment = this.relFormData.comment;
|
|
|
|
|
|
|
|
this.popRelFormData.batchNo = this.relFormData.batchNo;
|
|
|
|
|
|
|
|
this.popRelFormData.madeDate = this.relFormData.madeDate;
|
|
|
|
|
|
|
|
this.popRelFormData.validateDate = this.relFormData.validateDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.popDialogVisible = true;
|
|
|
|
|
|
|
|
this.title = "手工关联:" + data.curCode;
|
|
|
|
|
|
|
|
this.popParentCode = data.curCode;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( this.bhxjsl === this.syxjsl){
|
|
|
|
|
|
|
|
this.$confirm("该层级已录入完成, 是否关闭?", "提示", {
|
|
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
this.relFormData.detailList = this.detailList
|
|
|
|
|
|
|
|
this.submit()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.$message.error(response.message);
|
|
|
|
this.$message.error(response.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -433,7 +528,29 @@
|
|
|
|
this.warnVisible = false;
|
|
|
|
this.warnVisible = false;
|
|
|
|
this.errVisible = false;
|
|
|
|
this.errVisible = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
giveUp() {
|
|
|
|
|
|
|
|
this.relFormData = {
|
|
|
|
|
|
|
|
productCode: null,
|
|
|
|
|
|
|
|
subTypeNo: null,
|
|
|
|
|
|
|
|
cascadeRatio: null,
|
|
|
|
|
|
|
|
packageSpec: null,
|
|
|
|
|
|
|
|
comment: null,
|
|
|
|
|
|
|
|
batchNo: null,
|
|
|
|
|
|
|
|
madeDate: null,
|
|
|
|
|
|
|
|
validateDate: null,
|
|
|
|
|
|
|
|
workShop: null,
|
|
|
|
|
|
|
|
lineName: null,
|
|
|
|
|
|
|
|
lineManager: null,
|
|
|
|
|
|
|
|
packUnit: null,
|
|
|
|
|
|
|
|
bhxjsl: null,
|
|
|
|
|
|
|
|
detailList: []
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.detailList = []
|
|
|
|
|
|
|
|
this.parentCode = null
|
|
|
|
|
|
|
|
this.bhxjsl = 0
|
|
|
|
|
|
|
|
this.syxjsl = 0
|
|
|
|
|
|
|
|
this.packLayer = null
|
|
|
|
|
|
|
|
},
|
|
|
|
submit(val) {
|
|
|
|
submit(val) {
|
|
|
|
if(this.detailList == null || this.detailList.length == 0){
|
|
|
|
if(this.detailList == null || this.detailList.length == 0){
|
|
|
|
this.$message.warning("请先录入关联码!");
|
|
|
|
this.$message.warning("请先录入关联码!");
|
|
|
@ -452,7 +569,11 @@
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
this.relFormData.detailList = this.detailList;
|
|
|
|
|
|
|
|
|
|
|
|
this.$set(this.relFormData, 'detailList', []);
|
|
|
|
|
|
|
|
this.detailList.forEach( item =>{
|
|
|
|
|
|
|
|
this.relFormData.detailList.push(item)
|
|
|
|
|
|
|
|
});
|
|
|
|
addRelCode(this.relFormData).then((response) => {
|
|
|
|
addRelCode(this.relFormData).then((response) => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
if (response.code === 20000) {
|
|
|
|
if (response.code === 20000) {
|
|
|
@ -466,7 +587,7 @@
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
this.clearRel();
|
|
|
|
this.clearRel();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 刷新表单
|
|
|
|
// 刷新表单
|
|
|
|
resetForm() {
|
|
|
|
resetForm() {
|
|
|
@ -483,7 +604,7 @@
|
|
|
|
this.result = "";
|
|
|
|
this.result = "";
|
|
|
|
this.warnVisible = false;
|
|
|
|
this.warnVisible = false;
|
|
|
|
this.errVisible = false;
|
|
|
|
this.errVisible = false;
|
|
|
|
|
|
|
|
|
|
|
|
this.checkSuccess = true;
|
|
|
|
this.checkSuccess = true;
|
|
|
|
this.codeFormData.code = this.scanCode.trim();
|
|
|
|
this.codeFormData.code = this.scanCode.trim();
|
|
|
|
let tQuery = {
|
|
|
|
let tQuery = {
|
|
|
@ -546,11 +667,11 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
printCodeResult(data, isSuccess) {
|
|
|
|
printCodeResult(data, isSuccess) {
|
|
|
|
const resultParts = ["扫码解析结果:" + data.code];
|
|
|
|
const resultParts = ["扫码解析结果:" + data.code];
|
|
|
|
|
|
|
|
|
|
|
|
if (data.udi) {
|
|
|
|
if (data.udi) {
|
|
|
|
resultParts.push("层级标识: " + data.udi);
|
|
|
|
resultParts.push("层级标识: " + data.udi);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -571,8 +692,8 @@
|
|
|
|
getInputFocus(event) {
|
|
|
|
getInputFocus(event) {
|
|
|
|
event.currentTarget.select();
|
|
|
|
event.currentTarget.select();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
clearRel() {
|
|
|
|
clearRel() {
|
|
|
|
this.relFormData = {
|
|
|
|
this.relFormData = {
|
|
|
|
productCode: null,
|
|
|
|
productCode: null,
|
|
|
|
subTypeNo: null,
|
|
|
|
subTypeNo: null,
|
|
|
@ -597,16 +718,11 @@
|
|
|
|
this.refreshCodesPanel()
|
|
|
|
this.refreshCodesPanel()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
init(){
|
|
|
|
init(){
|
|
|
|
if(this.opeParentCode !== ""){
|
|
|
|
if(this.orderQuery != null){
|
|
|
|
this.parentCode = this.opeParentCode;
|
|
|
|
this.relFormData = this.orderQuery;
|
|
|
|
}
|
|
|
|
this.bhxjsl = this.orderQuery.bhxjsl;
|
|
|
|
if(JSON.stringify(this.opeRelFormData) !=="{}"){
|
|
|
|
|
|
|
|
this.relFormData = this.opeRelFormData;
|
|
|
|
|
|
|
|
this.detailList.push(this.relFormData);
|
|
|
|
|
|
|
|
this.bhxjsl = this.relFormData.bhxjsl;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
filters: {},
|
|
|
|
filters: {},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
@ -637,15 +753,15 @@
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
beforeDestroy() {
|
|
|
|
beforeDestroy() {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.init();
|
|
|
|
this.init();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
<style scoped>
|
|
|
|
.scroll-alert {
|
|
|
|
.scroll-alert {
|
|
|
|
width: 100%; /* 或者你需要的宽度 */
|
|
|
|
width: 100%; /* 或者你需要的宽度 */
|
|
|
@ -657,13 +773,13 @@
|
|
|
|
padding: 10px;
|
|
|
|
padding: 10px;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.scroll-text {
|
|
|
|
.scroll-text {
|
|
|
|
display: inline-block;
|
|
|
|
display: inline-block;
|
|
|
|
padding-left: 100%; /* 初始位置在容器右侧 */
|
|
|
|
padding-left: 100%; /* 初始位置在容器右侧 */
|
|
|
|
animation: scroll 10s linear infinite; /* 滚动动画 */
|
|
|
|
animation: scroll 10s linear infinite; /* 滚动动画 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes scroll {
|
|
|
|
@keyframes scroll {
|
|
|
|
from {
|
|
|
|
from {
|
|
|
|
transform: translateX(0);
|
|
|
|
transform: translateX(0);
|
|
|
@ -672,12 +788,12 @@
|
|
|
|
transform: translateX(-100%);
|
|
|
|
transform: translateX(-100%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.query-form-item {
|
|
|
|
.query-form-item {
|
|
|
|
margin-right: 5px;
|
|
|
|
margin-right: 5px;
|
|
|
|
margin-bottom: 6px;
|
|
|
|
margin-bottom: 6px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#inputer {
|
|
|
|
#inputer {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
min-height: 30px;
|
|
|
|
min-height: 30px;
|
|
|
@ -687,7 +803,7 @@
|
|
|
|
border-width: 0.1px;
|
|
|
|
border-width: 0.1px;
|
|
|
|
color: #4a4a4a;
|
|
|
|
color: #4a4a4a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#inputer:focus {
|
|
|
|
#inputer:focus {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
min-height: 30px;
|
|
|
|
min-height: 30px;
|
|
|
@ -697,11 +813,11 @@
|
|
|
|
border-width: 0.1px;
|
|
|
|
border-width: 0.1px;
|
|
|
|
color: #4a4a4a;
|
|
|
|
color: #4a4a4a;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ime-disabled {
|
|
|
|
.ime-disabled {
|
|
|
|
ime-mode: disabled;
|
|
|
|
ime-mode: disabled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-display {
|
|
|
|
.result-display {
|
|
|
|
border: 2px solid #ccc; /* 默认外框颜色 */
|
|
|
|
border: 2px solid #ccc; /* 默认外框颜色 */
|
|
|
|
border-radius: 10px;
|
|
|
|
border-radius: 10px;
|
|
|
@ -711,33 +827,32 @@
|
|
|
|
padding-left: 25px;
|
|
|
|
padding-left: 25px;
|
|
|
|
/* 不设置背景颜色 */
|
|
|
|
/* 不设置背景颜色 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-success {
|
|
|
|
.result-success {
|
|
|
|
border-color: #4CAF50; /* 成功时外框颜色 */
|
|
|
|
border-color: #4CAF50; /* 成功时外框颜色 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-failure {
|
|
|
|
.result-failure {
|
|
|
|
border-color: #0080ff; /* 失败时外框颜色 */
|
|
|
|
border-color: #0080ff; /* 失败时外框颜色 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-text {
|
|
|
|
.result-text {
|
|
|
|
height: 18px;
|
|
|
|
height: 18px;
|
|
|
|
/* 你可以在这里设置默认的文本颜色或其他样式 */
|
|
|
|
/* 你可以在这里设置默认的文本颜色或其他样式 */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-text-success {
|
|
|
|
.result-text-success {
|
|
|
|
color: #4CAF50; /* 成功时文本颜色 */
|
|
|
|
color: #4CAF50; /* 成功时文本颜色 */
|
|
|
|
font-size: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-text-failure {
|
|
|
|
.result-text-failure {
|
|
|
|
color: #0080ff; /* 失败时文本颜色 */
|
|
|
|
color: #0080ff; /* 失败时文本颜色 */
|
|
|
|
font-size: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mar-left {
|
|
|
|
.mar-left {
|
|
|
|
margin-left: 20px;
|
|
|
|
margin-left: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|