11/21 槽位管理绑定产品1.0

20240912_adapter
wangwei 5 months ago
parent 651daad7db
commit 64b0a3a7b2

@ -102,7 +102,7 @@
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addBind"
<el-button type="primary" icon="el-icon-plus" @click="addBind(1,null)"
>维护绑定关系
</el-button>
<el-button
@ -127,7 +127,7 @@
<!--<el-table-column label="产品ID" prop="relId" show-overflow-tooltip width="160"></el-table-column>-->
<el-table-column label="产品标识" prop="nameCode" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="产品通用名" prop="cpmctymc" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="规格" prop="ggxh" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="所属取货架编号" prop="freightCode" show-overflow-tooltip width="160"></el-table-column>
<el-table-column label="所属摆货层编号" prop="layerCode" show-overflow-tooltip width="160"></el-table-column>
<!--<el-table-column label="格数" prop="grid" show-overflow-tooltip width="160"></el-table-column>-->
@ -148,7 +148,7 @@
<el-button
type="text"
size="small"
@click.native.stop="removeRelId(scope.row)"
@click.native.stop="addBind(2,scope.row)"
:disabled="scope.row.nameCode"
>绑定产品
</el-button>
@ -168,7 +168,7 @@
<el-dialog
title="维护绑定关系"
:title="titleMap[titleName]"
:visible.sync="addBindVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
@ -227,14 +227,17 @@
<el-descriptions class="margin-top" title="" :column="3" border style="width: 80%">
<el-descriptions-item label="产品标识">{{product.nameCode}}</el-descriptions-item>
<el-descriptions-item label="产品通用名">{{product.cpmctymc}}</el-descriptions-item>
<el-descriptions-item label="规格型号">{{product.ggxh}}</el-descriptions-item>
<el-descriptions-item v-if="product.productsType === 2" label="包装规格">{{ product.bzgg }}</el-descriptions-item>
<el-descriptions-item v-else label="规格型号">{{ product.ggxh }}</el-descriptions-item>
</el-descriptions>
</el-form-item>
</el-col>
</el-row>
<div style="text-align: right; margin-bottom: 10px;margin-top: 18px ;margin-right: 18px ;">
<el-button type="primary" @click="submitAddBindData"></el-button>
<div class="center-button">
<!--<div style="text-align: right; margin-bottom: 10px;margin-top: 18px ;margin-right: 18px ;">-->
<el-button @click="closeAddBindData"></el-button>
<el-button type="primary" @click="submitAddBindData" >提交</el-button>
<!--</div>-->
</div>
@ -266,16 +269,7 @@ export default {
name: "workplaceQueue",
data() {
return {
//
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
tableObj: [],
queryList: [],
tableHeader: [],
@ -317,6 +311,11 @@ export default {
dialogTableVisible: false,
radio: 1,
addBindVisible: false,
titleName: "1",
titleMap:{
"1" : '维护绑定关系',
"2" : '绑定产品'
},
formLoading: false,
dialogVisible: false,
formData: formJson,
@ -383,11 +382,22 @@ export default {
1: "在库",
2: "已使用",
3: "已退回",
}
},
bindType : 2,//2
};
},
components: {},
methods: {
//
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
},
onReset() {
this.$router.push({
path: "",
@ -493,6 +503,13 @@ export default {
});
},
submitAddBindData(){
if (this.addBindData.id == null || this.addBindData.code == null){
return this.$message.error("请添加槽位")
}
if (this.addBindData.udiCode == null ){
return this.$message.error("请添加产品!")
}
this.addBindData.relId = this.product.relId
bind(this.addBindData).then(
(response) => {
if (response.code === 20000) {
@ -503,14 +520,24 @@ export default {
udiCode: null,
udiCodeFlag: false
}
this.sysWorkplaceQueue = {},
this.product = {},
this.$nextTick(() => {
this.$refs.inputRef1.focus(); //
});
this.sysWorkplaceQueue = {}
this.product = {}
if (this.bindType == 2){
this.closeAddBindData()
}else {
this.$nextTick(() => {
this.$refs.inputRef1.focus(); //
});
}
} else {
this.$message.error(response.message)
this.$refs.inputRef1.select();
if (this.bindType == 2){
this.closeAddBindData()
}else {
this.$nextTick(() => {
this.$refs.inputRef1.focus(); //
});
}
}
}).catch((error) => {
this.$message.error(error.message)
@ -518,6 +545,10 @@ export default {
});
},
closeAddBindData(){
this.addBindVisible = false
this.getCodeDetailList();
},
enterKey() {
this.getOrderDetails()
},
@ -633,17 +664,41 @@ export default {
this.codeQuery.page = 1;
this.getCodeDetailList();
},
addBind() {
this.addBindData = {
code: null,
addBind(val,row) {
if (val == 1){
this.addBindData = {
code: null,
codeFlag: false,
udiCode: null,
udiCodeFlag: false
}
this.bindType = 1
this.sysWorkplaceQueue = {}
this.product = {}
this.addBindVisible = true
this.$nextTick(() => {
this.$refs.inputRef1.focus(); //
});
}else {
this.addBindData = {
code: null,
codeFlag: true,
udiCode: null,
udiCodeFlag: true
}
this.bindType = 2
this.titleName = "2"
this.sysWorkplaceQueue.code = row.code
this.sysWorkplaceQueue.remark = row.remark
this.addBindData.code = row.code
this.addBindData.id = row.id
this.product = {}
this.addBindVisible = true
this.$nextTick(() => {
this.$refs.inputRef2.focus();
});
}
this.addBindVisible = true
this.$nextTick(() => {
this.$refs.inputRef1.focus(); //
});
},
getCodeDetailList() {
this.codeDetailLoading = true;
@ -742,5 +797,12 @@ export default {
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none !important;
}
.center-button {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
margin-bottom: 10px;
margin-top: 18px;
}
</style>

Loading…
Cancel
Save