This commit is contained in:
DESKTOP-369JRHT\12997 2024-10-29 17:21:46 +08:00
parent 1c908a1d1d
commit e76741bb13
6 changed files with 128 additions and 156 deletions

View File

@ -497,7 +497,7 @@ export default {
<template>
<div class="container1">
<div class="card-change" style="margin-top: 10px;">
<div class="card-change" >
<div style="display: flex; justify-content: space-between">
@ -840,7 +840,7 @@ export default {
.container1 {
background: #F4F5F9;
box-sizing: border-box;
padding: 20px;
padding: 10px;
}
.app-container {
@ -848,7 +848,9 @@ export default {
height: 100%;
background: #f6f8f9;
}
.card-change{
height: 91vh;
}
.d-dialog > > > .el-upload--picture-card {
width: 100px;
height: 100px;

View File

@ -34,114 +34,112 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
</el-col>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>
<el-table ref="tables"
v-loading="loading"
:data="dataList"
:default-sort="defaultSort">
<el-table-column label="分类" align="center" prop="categoryName" width="90px">
<template slot-scope="scope">
{{ scope.row.categoryName==null? '不分类': scope.row.categoryName}}
</template>
</el-table-column>
<el-table-column label="礼品信息" align="center">
<el-table-column label="名称" align="center" prop="giftName" width="80px"/>
<el-table-column label="封面图" align="center" prop="coverImage" width="80px">
<div class="table_box">
<el-table ref="tables"
v-loading="loading"
:data="dataList"
:default-sort="defaultSort">
<el-table-column label="分类" align="center" prop="categoryName" width="90px">
<template slot-scope="scope">
<el-image
style="width: 50px; height: 50px"
:src="imagePath+scope.row.coverImage"
:preview-src-list="[imagePath + scope.row.coverImage]"
fit="cover">
</el-image>
{{ scope.row.categoryName==null? '不分类': scope.row.categoryName}}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="兑换信息" align="center">
<el-table-column label="兑换方式" align="center" prop="exchangeMethod">
<el-table-column label="礼品信息" align="center">
<el-table-column label="名称" align="center" prop="giftName" width="80px"/>
<el-table-column label="封面图" align="center" prop="coverImage" width="80px">
<template slot-scope="scope">
<el-image
style="width: 50px; height: 50px"
:src="imagePath+scope.row.coverImage"
:preview-src-list="[imagePath + scope.row.coverImage]"
fit="cover">
</el-image>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="兑换信息" align="center">
<el-table-column label="兑换方式" align="center" prop="exchangeMethod">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag v-if ="scope.row.exchangeMethod == '积分'" effect="plain" size="medium">积分</el-tag>
<el-tag v-if ="scope.row.exchangeMethod == '金额'" effect="plain" type="success" size="medium">金额</el-tag>
<el-tag v-if ="scope.row.exchangeMethod == '积分+金额'" effect="plain" type="danger" size="medium">积分+金额</el-tag>
<el-tag v-if ="scope.row.exchangeMethod == '积分+加钱购'" effect="plain" type="warning" size="medium">积分+加钱购</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="兑换价格" align="center" prop="">
<template slot-scope="scope">
<span v-if ="scope.row.exchangeMethod == '积分'" effect="plain" size="medium">{{scope.row.exchangePoints}}积分</span>
<span v-if ="scope.row.exchangeMethod == '金额'" effect="plain" type="success" size="medium">{{scope.row.exchangeAmount}}</span>
<span v-if ="scope.row.exchangeMethod == '积分+金额'" effect="plain" type="danger" size="medium">{{scope.row.exchangePoints}}积分+{{scope.row.exchangeAmount}}</span>
<span v-if ="scope.row.exchangeMethod == '积分+加钱购'" effect="plain" type="warning" size="medium">{{scope.row.exchangePoints}}积分+加钱购比例{{ scope.row.moneyRatio }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="配送类型" align="center" >
<el-table-column label="配送方式" align="center" prop="deliveryMethod" width="80px">
<template slot-scope="scope">
<!-- <span v-for="(row, index) in JSON.parse(scope.row.deliveryMethod)" :key="index">-->
<span v-for="(row, index) in scope.row.deliveryMethod" :key="index">
{{row}}<br>
</span>
</template>
</el-table-column>
<el-table-column label="快递费用" align="center" prop="shippingFeeAmount">
<template slot-scope="scope">
<span v-if ="scope.row.expressShippingFee!= '统一运费' && scope.row.deliveryMethod && !scope.row.deliveryMethod.includes('物流配送')">--</span>
<span v-else-if="scope.row.expressShippingFee === '包邮' && scope.row.deliveryMethod && scope.row.deliveryMethod.includes('物流配送')" effect="plain" type="warning" size="medium">包邮</span>
<span v-else effect="plain" type="warning" size="medium">{{scope.row.shippingFeeAmount}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="礼品类型" align="center" prop="giftType" width="80px"/>
<el-table-column label="礼品库存信息" align="center">
<el-table-column label="总库存" align="center" prop="totalInventory" width="80px">
<template slot-scope="scope">
<el-button v-if="scope.row.totalInventory" type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
<el-button v-else type="text" @click="clickInventory(scope.row)">--</el-button>
</template>
</el-table-column>
<el-table-column label="已用" align="center" prop="usedInventory" width="80px">
</el-table-column>
<el-table-column label="可用" align="center" prop="remainingInventory" width="80px">
<template slot-scope="scope">
<span>{{ scope.row.totalInventory===-1?'无限制': scope.row.remainingInventory}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="排序" align="center" prop="sort" width="50px"/>
<el-table-column label="状态" align="center" prop="status" width="80px">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag v-if ="scope.row.exchangeMethod == '积分'" effect="plain" size="medium">积分</el-tag>
<el-tag v-if ="scope.row.exchangeMethod == '金额'" effect="plain" type="success" size="medium">金额</el-tag>
<el-tag v-if ="scope.row.exchangeMethod == '积分+金额'" effect="plain" type="danger" size="medium">积分+金额</el-tag>
<el-tag v-if ="scope.row.exchangeMethod == '积分+加钱购'" effect="plain" type="warning" size="medium">积分+加钱购</el-tag>
<el-tag v-if ="scope.row.status == '启用'" size="medium">启用</el-tag>
<el-tag v-if ="scope.row.status == '禁用'" type="danger" size="medium">禁用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="兑换价格" align="center" prop="">
<template slot-scope="scope">
<span v-if ="scope.row.exchangeMethod == '积分'" effect="plain" size="medium">{{scope.row.exchangePoints}}积分</span>
<span v-if ="scope.row.exchangeMethod == '金额'" effect="plain" type="success" size="medium">{{scope.row.exchangeAmount}}</span>
<span v-if ="scope.row.exchangeMethod == '积分+金额'" effect="plain" type="danger" size="medium">{{scope.row.exchangePoints}}积分+{{scope.row.exchangeAmount}}</span>
<span v-if ="scope.row.exchangeMethod == '积分+加钱购'" effect="plain" type="warning" size="medium">{{scope.row.exchangePoints}}积分+加钱购比例{{ scope.row.moneyRatio }}</span>
</template>
<el-table-column label="创建时间" align="center" prop="createTime">
</el-table-column>
</el-table-column>
<el-table-column label="配送类型" align="center" >
<el-table-column label="配送方式" align="center" prop="deliveryMethod" width="80px">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width = 70px>
<template slot-scope="scope">
<!-- <span v-for="(row, index) in JSON.parse(scope.row.deliveryMethod)" :key="index">-->
<span v-for="(row, index) in scope.row.deliveryMethod" :key="index">
{{row}}<br>
</span>
</template>
</el-table-column>
<el-table-column label="快递费用" align="center" prop="shippingFeeAmount">
<template slot-scope="scope">
<span v-if ="scope.row.expressShippingFee!= '统一运费' && scope.row.deliveryMethod && !scope.row.deliveryMethod.includes('物流配送')">--</span>
<span v-else-if="scope.row.expressShippingFee === '包邮' && scope.row.deliveryMethod && scope.row.deliveryMethod.includes('物流配送')" effect="plain" type="warning" size="medium">包邮</span>
<span v-else effect="plain" type="warning" size="medium">{{scope.row.shippingFeeAmount}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="礼品类型" align="center" prop="giftType" width="80px"/>
<el-table-column label="礼品库存信息" align="center">
<el-table-column label="总库存" align="center" prop="totalInventory" width="80px">
<template slot-scope="scope">
<el-button v-if="scope.row.totalInventory" type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
<el-button v-else type="text" @click="clickInventory(scope.row)">--</el-button>
</template>
</el-table-column>
<el-table-column label="已用" align="center" prop="usedInventory" width="80px">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row),getStock(scope.row)"
v-hasPermi="['integral:gift:index:update']"
</el-table-column>
<el-table-column label="可用" align="center" prop="remainingInventory" width="80px">
<template slot-scope="scope">
<span>{{ scope.row.totalInventory===-1?'无限制': scope.row.remainingInventory}}</span>
>修改</el-button>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="排序" align="center" prop="sort" width="50px"/>
<el-table-column label="状态" align="center" prop="status" width="80px">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag v-if ="scope.row.status == '启用'" size="medium">启用</el-tag>
<el-tag v-if ="scope.row.status == '禁用'" type="danger" size="medium">禁用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime">
</el-table>
</div>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width = 70px>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row),getStock(scope.row)"
v-hasPermi="['integral:gift:index:update']"
>修改</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination
v-show="total>0"
@ -151,7 +149,6 @@
@pagination="getList"
/>
</div>
<el-dialog :title="title" class="d-dialog" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="dataForm" :rules="rules" label-width="80px">
<el-row :gutter="24">
@ -213,22 +210,6 @@
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<!-- <el-upload
:action="uploadAction"
list-type="picture-card"
:class="{hide:hideUpload}"
:file-list="uploadFiles"
:auto-upload="true"
:show-file-list="false"
:headers="uploadHeader"
:on-success="handleUploadSuccessGift">
<img
v-if="this.dataForm.giftImages"
:src="imagePath + this.dataForm.giftImages"
class="list-img"
/>
<i v-if="!this.dataForm.giftImages" class="el-icon-plus"></i>
</el-upload> -->
</el-form-item>
</el-col>
</el-row>
@ -429,7 +410,6 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 打开商品界面 -->
<el-dialog title="选择商品" :visible.sync="openCommodity" width="1000px" append-to-body :close-on-click-modal="false">
<el-container>
@ -506,18 +486,9 @@
<el-button @click="cancel"> </el-button>
</div> -->
</el-dialog>
<el-dialog title="库存变更" :visible.sync="openInventory" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="inventoryForm" :rules="rulesInventory" label-width="100px">
<!-- <el-form-item label="当前总库存" prop="totalInventory" >-->
<!-- <el-input disabled v-model="inventoryForm.totalInventory" placeholder="" maxlength="30" style="width: 270px;">-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="已用库存" prop="usedInventory" >-->
<!-- <el-input disabled v-model="inventoryForm.usedInventory" placeholder="" maxlength="30" style="width: 270px;">-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<el-form-item label="可用库存" prop="remainingInventory" >
<el-input disabled v-model="inventoryForm.remainingInventory" placeholder="" maxlength="30" style="width: 270px;">
@ -546,7 +517,6 @@
<el-button @click="cancelInventory"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
@ -1283,4 +1253,12 @@ export default {
width: 98px;
height: 98px;
}
.card-change{
height: 87vh;
}
.table_box{
height: 70vh;
overflow: auto;
scrollbar-width: none;
}
</style>

View File

@ -89,7 +89,7 @@ export default {
margin-right: 50px;
display: flex;
align-items: center;
cursor: pointer;
}
.active {

View File

@ -86,40 +86,28 @@
/>
</div>
-
<!-- 新增/修改-->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="dataForm" :rules="rules" label-width="120px">
<el-row :gutter="24">
<el-col :span="20">
<el-dialog :title="title" :visible.sync="open" width="25%" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="dataForm" :rules="rules" label-width="80px">
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="dataForm.categoryName" placeholder="分类名称" maxlength="30"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="10">
<el-form-item label="排序" prop="contactPerson">
<el-input-number v-model="dataForm.sort" :min="1" :max="10" label=""></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-col :span="20">
<el-form-item label="状态" prop="status">
<el-radio-group v-model="dataForm.status">
<el-radio
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
@change="handleIsopenSelect"
:value="dict.value"/>
</el-radio-group>
<el-radio
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
@change="handleIsopenSelect"
:value="dict.value"/>
</el-radio-group>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-form-item label="备注" prop="categoryName">
<el-input type="textarea" :rows="6" v-model="dataForm.remark" placeholder="分类名称" maxlength="30"/>
</el-form-item>
</el-form>
@ -251,5 +239,7 @@ export default {
</script>
<style scoped lang="scss">
.card-change{
height: 84vh;
}
</style>

View File

@ -68,8 +68,8 @@
</div>
<div class="bai-box" v-else>
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true" label-width="100px">
<el-form-item label="积分说明" prop="desc">
<el-input type="textarea" v-model="dataForm.pointsRules" style="width: 1600px"></el-input>
<el-form-item label="积分说明" prop="desc" style="width: 100%;margin-right: 0px ">
<el-input type="textarea" :rows="8" v-model="dataForm.pointsRules" style="width: 1550px"></el-input>
</el-form-item>
</el-form>
@ -477,6 +477,7 @@ valiNumberPass(rule, value, callback, fieldName)
margin-right: 50px;
display: flex;
align-items: center;
cursor: pointer;
}

View File

@ -774,8 +774,9 @@
}
.table-box{
width: 100%;
height: 70vh;
height: 69vh;
overflow: auto;
scrollbar-width: none;
}
.pagination-box{
width: 100%;