修改商品绑定耗材选

择商品和耗材的弹窗设置最大高度
This commit is contained in:
2024-08-27 16:22:56 +08:00
parent 1516b84c42
commit 83d0c54717
3 changed files with 114 additions and 105 deletions

View File

@@ -1,5 +1,5 @@
<template>
<el-dialog title="选择商品" :visible.sync="dialogVisible" @open="resetHandle()" @close="reset">
<el-dialog title="选择商品" :visible.sync="dialogVisible" @open="resetHandle()" @close="reset" top="5vh">
<el-form :model="searhForm" inline>
<el-form-item>
<el-input v-model="searhForm.name" placeholder="商品名称" @input="onInput"></el-input>
@@ -213,6 +213,10 @@ export default {
</script>
<style scoped lang="scss">
.head-container{
max-height: 60vh;
overflow-y: scroll;
}
.shop_info {
display: flex;
align-items: center;

View File

@@ -1,6 +1,6 @@
<template>
<div>
<el-dialog width="60%" :visible.sync="dialogVisible" :title="query.conName">
<el-dialog width="60%" :visible.sync="dialogVisible" :title="query.conName" top="5vh">
<div class="app-container">
<!-- <div class="head-container">
<el-form :model="query" inline>
@@ -93,6 +93,10 @@
};
</script>
<style scoped>
.head-container{
max-height: 60vh;
overflow-y: scroll;
}
.cursor-pointer{
cursor: pointer;
color: #1890ff;

View File

@@ -144,6 +144,7 @@
:title="dialogtitle"
:visible.sync="dialogshow"
width="1000px"
top="5vh"
@close="resetCommodityArr"
>
<el-form ref="addSelect" :inline="true">
@@ -153,6 +154,7 @@
</template>
</el-form-item> -->
<template>
<div class="scroll-box">
<el-table :span-method="objectSpanMethod" :data="commodityArr">
<el-table-column prop="name" label="商品名称"> </el-table-column>
<el-table-column label="规格">
@@ -192,8 +194,6 @@
placeholder="请选择耗材信息"
></el-input>
</template>
</div>
</div>
</template>
@@ -253,7 +253,7 @@
</template>
</el-table-column> -->
</el-table>
</div>
<!-- <div v-for="(ele, index) in commodityArr" :key="ele.id">
<template>
<div>
@@ -312,16 +312,13 @@
</div> -->
</template>
<el-form-item
style="display: flex; margin-top: 20px; justify-content: flex-end"
>
</el-form>
<div slot="footer" style="display: flex; justify-content: flex-end">
<el-button @click="dialogshow = false">取 消</el-button>
<el-button type="primary" @click="submitForm('addSelect')"
>确 定</el-button
>
</el-form-item>
</el-form>
</div>
</el-dialog>
<el-dialog
@@ -658,7 +655,7 @@ export default {
let index = -1;
for (let key in haocaiSelectedMap) {
const item = haocaiSelectedMap[key];
console.log(item)
console.log(item);
index++;
this.$set(ele.haocais, index, {
consInfoId: item.consId,
@@ -786,8 +783,8 @@ export default {
},
// 选择耗材
selecthaocai(item) {
console.log(item)
console.log(haocaiSelectedMap)
console.log(item);
console.log(haocaiSelectedMap);
this.ALLisDistribute = item;
this.commodityArr.forEach((ele) => {
if (ele.id == this.ALLisDistribute.id && ele.skuId == item.skuId) {
@@ -964,7 +961,7 @@ export default {
async submitForm(formName) {
if (this.dialogtitle == "编辑") {
await puttbProskuCon({
...this.surplusStocks
...this.surplusStocks,
});
this.$message({
message: "修改成功",
@@ -990,7 +987,7 @@ export default {
let newArr = [];
for (let i of this.commodityArr) {
//共享库存
console.log(i.haocais)
console.log(i.haocais);
if (i.isDistribute) {
for (let k of i.haocais) {
newArr.push({
@@ -1006,7 +1003,7 @@ export default {
consInfoId: k.conInfoId,
productId: i.id,
skuInfos: {
...k
...k,
},
});
}
@@ -1091,4 +1088,8 @@ export default {
.head-container .filter-item {
margin: 0 10px 0 0;
}
.scroll-box {
max-height: 70vh;
overflow-y: scroll;
}
</style>