This commit is contained in:
gyq 2024-09-27 15:51:37 +08:00
parent 89da9cc1fc
commit 41fa886d23
2 changed files with 26 additions and 5 deletions

View File

@ -332,7 +332,7 @@
</div> -->
</el-form-item>
<template v-if="form.typeEnum != 'group'">
<el-form-item label="上架区域">
<!-- <el-form-item label="上架区域">
<div class="shop_type_box">
<div class="item" :class="{ active: form.isShowCash }" @click="areaChange('isShowCash')">
<div class="s_title">收银台</div>
@ -347,11 +347,17 @@
</div>
</div>
</div>
</el-form-item> -->
<el-form-item label="上架">
<el-switch v-model="form.isGrounding" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<el-form-item label="库存开关">
<el-switch v-model="form.isStock" :active-value="1" :inactive-value="0"></el-switch>
<div class="tips">关闭则不计算出入库数据</div>
</el-form-item>
<el-form-item label="设为推荐">
<el-switch v-model="form.isHot" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<el-form-item label="库存数量" v-if="form.isStock">
<el-input-number @change="priceFormat(form, 'stockNumber')" @blur="priceFormat(form, 'stockNumber')"
v-model="form.stockNumber" controls-position="right"></el-input-number>
@ -511,7 +517,9 @@ export default {
refundPolicy: "",
usageRules: "",
},
stockNumber: 0
stockNumber: 0,
isHot: 1,
isGrounding: 1
},
imgList: [],
rules: {

View File

@ -91,7 +91,7 @@
</div>
</div>
<div class="head-container" id="table_drag">
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id"
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="key"
:tree-props="{ children: 'skuList', hasChildren: 'hasChildren' }">
<el-table-column width="50px"></el-table-column>
<el-table-column label="商品信息">
@ -134,7 +134,8 @@
<template v-slot="scope">
<div class="cons_wrap" v-if="scope.row.typeEnum">
<div v-if="scope.row.conInfos && scope.row.conInfos.length">
<span v-for="item in scope.row.conInfos" :key="item.id">{{ item.conName }}</span>
<el-button type="text" v-for="item in scope.row.conInfos" :key="item.id"
@click="showBindCons(scope.row)">{{ item.conName }}</el-button>
</div>
<el-button type="text" @click="showBindCons(scope.row)">
绑定
@ -206,7 +207,7 @@
<el-dialog :title="editorEumn[editorForm.key]" :visible.sync="editorVisable" :show-close="false" width="300px">
<el-form :model="editorForm">
<el-form-item>
<el-input-number v-model="editorForm.value" />
<el-input-number v-model="editorForm.value" :min="0" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -311,6 +312,8 @@ export default {
this.editorConfirmChange()
}
this.getTableData()
},
changeGrounding(event, row, key) {
this.editorForm.key = key
@ -436,6 +439,16 @@ export default {
shopId: localStorage.getItem('shopId'),
sort: this.tableData.sort
})
res.content.map(item => {
item.key = item.id
item.skuList.map(val => {
val.key = `${item.id}-${val.id}`
})
})
console.log(res);
this.tableData.loading = false
this.tableData.data = res.content
this.tableData.total = res.totalElements