xuhaifeng 11 miesięcy temu
rodzic
commit
c42820d0e8

+ 8 - 14
src/views/coupon/item/index.vue

@@ -3,11 +3,6 @@
         <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
             <el-form-item label-width="120px" prop="orgIndex" v-if="userInfoVO.userType == '00'">
                 <el-select v-model="queryParams.orgIndex" placeholder="请选择门店" clearable>
-                    <el-option-group label="工厂">
-                        <template>
-                            <el-option v-for="factory in factoryList" :key="factory.id + factory.sourceType" :label="factory.name" :value="factory.id + ',' + factory.sourceType"> </el-option>
-                        </template>
-                    </el-option-group>
                     <el-option-group label="门店">
                         <template>
                             <el-option v-for="store in storeList" :key="store.id + store.sourceType" :label="store.name" :value="store.id + ',' + store.sourceType"> </el-option>
@@ -48,9 +43,7 @@
         </el-row>
 
         <Page uri="/mapi/app/couponItem/list" :request-params="queryParams" ref="pagination">
-            <!--      <el-table-column type="selection" width="55" align="center" fixed="left"/>-->
             <el-table-column label="编号" align="center" prop="id" fixed="left" />
-            <!--      <el-table-column label="订单编码" align="center" prop="orderNo" />-->
             <el-table-column label="优惠券名称" align="center" prop="couponTypeTitle" width="120" :show-overflow-tooltip="true" />
             <el-table-column label="优惠券类型" align="center" prop="discountWay" width="120" :show-overflow-tooltip="true">
                 <template slot-scope="scope">
@@ -59,18 +52,19 @@
             </el-table-column>
             <el-table-column label="活动名称" align="center" prop="activityTitle" width="120" :show-overflow-tooltip="true" />
             <!--      <el-table-column label="活动ID" align="center" prop="activityInfoId" />-->
-            <el-table-column label="发放门店/工厂" align="center" prop="orgName" width="120" :show-overflow-tooltip="true" />
-            <el-table-column label="客户姓名" align="center" prop="appUserName" width="100" />
-            <el-table-column label="客户手机号" align="center" prop="appUserPhone" width="120" />
+            <el-table-column label="发放门店" align="center" prop="orgName" width="120" :show-overflow-tooltip="true" />
+            <el-table-column label="客户姓名" align="center" prop="appUserName" width="150">
+                <template slot-scope="scope"> {{ scope.row.appUserName }}/{{ scope.row.appUserPhone }} </template>
+            </el-table-column>
             <el-table-column label="是否核销" align="center" prop="isUsed" width="80">
                 <template slot-scope="scope">
                     <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUsed" />
                 </template>
             </el-table-column>
-            <el-table-column label="核销门店/工厂" align="center" prop="usedOrgName" width="120" :show-overflow-tooltip="true" />
-            <el-table-column label="核销时间" align="center" prop="usedTime" width="180"> </el-table-column>
-            <el-table-column label="有效期开始时间" align="center" prop="startDate" width="180"> </el-table-column>
-            <el-table-column label="有效期结束时间" align="center" prop="endDate" width="180"> </el-table-column>
+            <el-table-column label="核销门店" align="center" prop="usedOrgName" width="120" :show-overflow-tooltip="true" />
+            <el-table-column label="核销时间" align="center" prop="usedTime" width="140"> </el-table-column>
+            <el-table-column label="有效期开始时间" align="center" prop="startDate" width="140"> </el-table-column>
+            <el-table-column label="有效期结束时间" align="center" prop="endDate" width="140"> </el-table-column>
             <el-table-column label="是否单件抵扣券" align="center" prop="isUnique" width="180">
                 <template slot-scope="scope">
                     <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUnique" />

+ 31 - 20
src/views/coupon/type/index.vue

@@ -32,8 +32,8 @@
 
         <Page uri="/mapi/coupon/type/list" :request-params="queryParams" ref="pagination">
             <el-table-column label="编号" align="center" prop="id" width="80" />
-            <el-table-column label="名称" align="center" prop="title" width="120" />
-            <el-table-column label="图片" align="center" prop="imgUrl" width="100">
+            <el-table-column label="名称" align="center" prop="title" />
+            <el-table-column label="图片" align="center" prop="imgUrl" width="80">
                 <template slot-scope="scope">
                     <image-preview :src="scope.row.imgUrl" :width="60" :height="60" />
                 </template>
@@ -43,17 +43,17 @@
                     <dict-tag :options="dict.type.coupon_type" :value="scope.row.discountWay" />
                 </template>
             </el-table-column>
-            <el-table-column label="面额(元)" align="center" prop="deductAmount" width="150" />
-            <el-table-column label="有效期" align="center" prop="startDate" width="210">
-                <template slot-scope="scope"> {{ scope.row.startDate }} ~ {{ scope.row.endDate }} </template>
-            </el-table-column>
-            <el-table-column label="三方品牌" align="center" prop="couponTypeThirdPartyId" width="140">
+            <el-table-column label="券值" align="center" prop="deductAmount" width="150">
                 <template slot-scope="scope">
-                    <div v-for="third in thirdPartyList" :key="third.id">
-                        <span v-if="scope.row.couponTypeThirdPartyId == third.id">{{ third.name }}</span>
-                    </div>
+                    <span v-if="scope.row.discountWay == 0">满{{ scope.row.minAmount }}元减{{ scope.row.deductAmount }}元</span>
+                    <span v-if="scope.row.discountWay == 1">满{{ scope.row.minAmount }}件减{{ scope.row.deductAmount }}件</span>
+                    <span v-if="scope.row.discountWay == 2">{{ scope.row.discountRate }}折</span>
                 </template>
             </el-table-column>
+            <el-table-column label="有效期" align="center" prop="startDate" width="210">
+                <template slot-scope="scope"> {{ scope.row.startDate }} ~ {{ scope.row.endDate }} </template>
+            </el-table-column>
+
             <!-- <el-table-column label="是否单件抵扣券" align="center" prop="isUnique" width="150">
                 <template slot-scope="scope">
                     <div v-if="scope.row.discountWay != '2'">
@@ -67,15 +67,28 @@
                     <dict-tag :options="dict.type.coupon_send_way" :value="scope.row.sendWay" />
                 </template>
             </el-table-column>
-            <el-table-column label="状态" align="center" prop="status">
+            <el-table-column label="适用范围" align="center" prop="useScope" width="180">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.useScope == 1">全部衣服</span>
+                    <span v-if="scope.row.useScope == 2">指定衣服</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="三方品牌" align="center" prop="couponTypeThirdPartyId" width="120">
+                <template slot-scope="scope">
+                    <div v-for="third in thirdPartyList" :key="third.id">
+                        <span v-if="scope.row.couponTypeThirdPartyId == third.id">{{ third.name }}</span>
+                    </div>
+                </template>
+            </el-table-column>
+            <el-table-column label="状态" align="center" prop="status" width="120">
                 <template slot-scope="scope">
                     <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
                 </template>
             </el-table-column>
-            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
                 <template slot-scope="scope">
                     <el-button type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['coupon:type:edit']">修改</el-button>
-                    <el-button type="text" icon="el-icon-s-shop" @click="handleSetClothItems(scope.row)" v-hasPermi="['coupon:type:list']">可使用衣物</el-button>
+                    <el-button type="text" icon="el-icon-s-shop" @click="handleSetClothItems(scope.row)" v-if="scope.row.useScope == 2" v-hasPermi="['coupon:type:list']">指定衣物</el-button>
                     <el-button type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['coupon:type:remove']">删除</el-button>
                 </template>
             </el-table-column>
@@ -128,7 +141,7 @@
                                 <el-input-number v-model="form.minAmount" placeholder="请输入最小件数" :min="form.deductAmount" :max="999999" />
                             </el-form-item>
                             <el-form-item label="可减件数" prop="deductAmount" label-width="100px">
-                                <el-input-number v-model="form.deductAmount" placeholder="请输入抵用金额" :min="0" :max="form.minAmount" />
+                                <el-input-number v-model="form.deductAmount" placeholder="请输入可减件数" :min="0" :max="form.minAmount" />
                             </el-form-item>
                         </template>
                         <template v-if="form.discountWay == 2">
@@ -141,8 +154,6 @@
                         </template>
                     </el-col>
 
-
-
                     <!--                    <el-col :span="24">-->
                     <!--                        <el-col :span="12">-->
                     <!--                            <el-form-item label="是否可抵用充值" label-width="150px" prop="canDeductRecharge">-->
@@ -170,7 +181,7 @@
                         </el-form-item>
                     </el-col>
                     <el-col :span="24">
-                     <el-form-item label="发放方式" prop="sendWay">
+                        <el-form-item label="发放方式" prop="sendWay">
                             <el-radio-group v-model="form.sendWay">
                                 <el-radio v-for="dict in dict.type.coupon_send_way" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
                             </el-radio-group>
@@ -179,10 +190,10 @@
                     <el-col :span="24">
                         <el-form-item label="适用衣服范围" prop="useScope">
                             <el-radio-group v-model="form.useScope">
-                                <el-radio  key="1" label="1">全部衣服</el-radio>
-                                <el-radio  key="2" label="2">指定衣服</el-radio>
+                                <el-radio key="1" label="1">全部衣服</el-radio>
+                                <el-radio key="2" label="2">指定衣服</el-radio>
                             </el-radio-group>
-                            <span style="color: #aaa; display: block;">若指定衣服,请在操作里面添加衣服</span>
+                            <span style="color: #aaa; display: block">若指定衣服,请在操作里面添加衣服</span>
                         </el-form-item>
                     </el-col>
                     <!--                    <el-col :span="24">-->

+ 2 - 2
src/views/coupon/typeApplyCloth/index.vue

@@ -54,9 +54,9 @@
                 </el-form>
             </el-row>
             <el-row :gutter="15">
-                <el-form ref="form" :model="form" :rules="rules" label-width="100px" style="margin-top: 20px">
+                <el-form ref="form" :model="form" :rules="rules">
                     <el-col :span="24">
-                        <el-form-item label="衣服" required>
+                        <el-form-item required>
                             <el-select v-model="clothItemIdList" multiple placeholder="请选择衣服" clearable>
                                 <el-option v-for="item in clothList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
                             </el-select>