wuguojie 1 år sedan
förälder
incheckning
34ab4aab51

+ 17 - 0
src/http/moudules/task.js

@@ -2108,3 +2108,20 @@ export const findOrderPartnerCompanyList = () => {
     method: "get",
   })
 }
+
+// 客户权益明细
+export const findListByPhoneAndLicenseNo = (data) => {
+  return axios({
+    url: '/equity/findListByPhoneAndLicenseNo',
+    method: 'post',
+    data
+  })
+}
+// 客户权益兑换
+export const orderveRificationRightInfo = (data) => {
+  return axios({
+    url: '/equity/orderveRificationRightInfo',
+    method: 'post',
+    data
+  })
+}

+ 212 - 0
src/views/CustomerEquity/equity.vue

@@ -0,0 +1,212 @@
+<template>
+    <div>
+        <el-main ref="elMain" style="padding: 0px">
+            <el-form ref="queryFormRef" :model="queryForm" label-width="120px" class="queryform">
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="姓名">
+                            <el-input :size="overSize" clearable v-model.trim="queryForm.name" placeholder="请输入姓名"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="手机号" prop="areaCode">
+                            <el-input :size="overSize" clearable v-model.trim="queryForm.phone" placeholder="请输入手机号"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="有效期">
+                            <el-date-picker value-format="yyyy-MM-dd" v-model="queryForm.periodValidityData" style="width: 100%" :size="overSize" type="daterange" align="left"  range-separator="至"
+                                            start-placeholder="开始日期" end-placeholder="结束日期">
+                            </el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="权益状态">
+                            <el-select :size="overSize" v-model="queryForm.status" placeholder="请选择" clearable style="width: 100%">
+                                <el-option label="未使用" :value="0"></el-option>
+                                <el-option label="已使用" :value="1"></el-option>
+                                <el-option label="待领取" :value="3"></el-option>
+                                <el-option label="已失效" :value="4"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="兑换状态">
+                            <el-select :size="overSize" v-model="queryForm.exchangeStatus" placeholder="请选择" clearable style="width: 100%;">
+                                <el-option label="未兑换" :value="0"></el-option>
+                                <el-option label="已兑换" :value="1"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="8">
+                        <el-form-item label="操作时间">
+                            <el-date-picker value-format="yyyy-MM-dd" v-model="queryForm.oprationData" style="width: 100%" :size="overSize" type="daterange" align="left"  range-separator="至"
+                                            start-placeholder="开始日期" end-placeholder="结束日期">
+                            </el-date-picker>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="操作人">
+                            <el-input :size="overSize" clearable v-model.trim="queryForm.oprationName" placeholder="请输入"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="16" style="display: flex; align-items: center; justify-content: flex-end">
+                        <kt-button label="查询" :size="overSize" type="primary" perms="agreement:input:query" @click="initList" />
+                    </el-col>
+                </el-row>
+            </el-form>
+            <el-table
+                style="margin-top: 14px"
+                :data="equityList"
+                height="580"
+                highlight-current-row stripe :header-cell-style="{
+                    background: '#F2F7FC',
+                    fontWeight: '700',
+                    color: '#606266',
+                }"
+            >
+                <el-table-column prop="exchangeName" label="姓名"></el-table-column>
+                <el-table-column prop="exchangePhone" label="手机号"></el-table-column>
+                <el-table-column prop="classifyName" label="客户权益"></el-table-column>
+                <el-table-column prop="exchangeTime" label="申请兑换"></el-table-column>
+                <el-table-column prop="exchangeStatus" label="兑换状态">
+                    <template slot-scope="scope">
+                        {{ scope.row.exchangeStatus == 0 ? '未兑换': scope.row.exchangeStatus == 1 ? '已兑换' : '' }}
+                    </template>
+                </el-table-column>
+                <el-table-column prop="oprationDate" label="兑换时间"></el-table-column>
+                <el-table-column prop="exchangeSubOrderNo" label="兑换订单"></el-table-column>
+                <el-table-column label="操作">
+                    <template slot-scope="scope">
+                        <kt-button label="兑现" :size="overSize" type="text" perms="agreement:input:update" @click="handleRedemption(scope.$index, scope.row)" style="color: #2D4D89 !important " />
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="paginationCustom">
+                <!--                <span class="selected">已选{{ selectedLength }}条 /</span>-->
+                <el-pagination @size-change="handleSizeChange" background @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[20, 50, 100, 200]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalSize" style="float: right;margin-top: 5px; ">
+                </el-pagination>
+            </div>
+        </el-main>
+        <el-dialog
+            title="提示"
+            :visible.sync="dialogVisible"
+            width="30%">
+            <div style="display: flex; align-items: center; justify-content: flex-start;">
+                <span style="color: red;">*</span>
+                <span>订单号</span>
+                <el-input v-model="exchangeOrderNo" size="small" style="width: 450px; margin-left: 20px"></el-input>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+                <el-button size="small" type="danger" @click="handleSubmit">确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import KtButton from "@/views/Core/KtButton";
+export default {
+    components: {
+        KtButton
+    },
+    data() {
+        return {
+            overSize: "small",
+            queryForm: {
+                name: '',
+                phone: '',
+                periodValidityData: '',
+                status: '',
+                exchangeStatus: '',
+                oprationData: '',
+                oprationName: ''
+            },
+            equityList: [],
+            selectedLength: 0,
+            pageNum: 1,
+            pageSize: 20,
+            totalSize: 0,
+            dialogVisible: false,
+            exchangeOrderNo: '',
+            orderveRificationRightInfo: ''
+        }
+    },
+    methods: {
+        initList() {
+            this.$api.task.findListByPhoneAndLicenseNo({
+                name: this.queryForm.name,
+                phone: this.queryForm.phone,
+                status: this.queryForm.status,
+                exchangeStatus: this.queryForm.exchangeStatus,
+                oprationName: this.queryForm.oprationName,
+                periodValidityBeginDate: this.queryForm.periodValidityData[0],
+                periodValidityEndDate: this.queryForm.periodValidityData[1],
+                oprationBeginDate: this.queryForm.oprationData[0],
+                oprationEndDate: this.queryForm.oprationData[1],
+                pageNo: this.pageNum,
+                pageSize: this.pageSize
+            }).then(res => {
+                if(res.code == 200) {
+                    this.equityList = res.data.records
+                    this.totalSize = res.data.total
+                } else {
+                    this.$message.warning(res.msg)
+                }
+            })
+        },
+        handleRedemption(index, row) {
+            this.dialogVisible = true
+            this.exchangeOrderNo = ''
+            this.orderveRificationRightInfo = row.localRightsUserInfoId
+        },
+        handleSizeChange(size) {
+            this.pageSize = size
+            this.initList()
+        },
+        handleCurrentChange(page) {
+            this.pageNum = page
+            this.initList()
+        },
+        handleSubmit() {
+            if(!this.exchangeOrderNo) {
+                this.$message.warning('请填写订单号!')
+                return
+            }
+            this.$api.task.orderveRificationRightInfo({
+                subOrderNo: this.exchangeOrderNo,
+                localRightsUserInfoId: this.orderveRificationRightInfo
+            }).then(res => {
+                if(res.code == 200) {
+                    this.$message.success(res.data.message)
+                } else {
+                    this.$message.warning(res.msg)
+                }
+                this.initList()
+                this.dialogVisible = false
+            })
+        }
+    },
+    mounted() {
+        this.initList()
+    }
+}
+</script>
+
+<style scoped lang="scss">
+.paginationCustom {
+    display: flex;
+    justify-content: flex-end;
+    align-items: center;
+    .selected {
+        font-size: 13px;
+        margin-top: 5px;
+        color: #606266;
+    }
+}
+</style>

+ 1 - 1
src/views/Task/daikeComponents/KtLetter1.vue

@@ -1222,7 +1222,7 @@ agreementitem, agreementindex
                 <el-button   size="mini" type="text" class="blue_color" v-if="reslistitem.result.orderstatus=='10'"
                 @click="supplementOrder(reslistitem.result.companyId)">补录订单</el-button>
                 <div class="btn" @click="handleListJisuan(reslistitem, reslistindex)">计算保费</div>
-                <div v-show="reslistitem.quoteCode == '200' && !('editStatus' in reslistitem.result) && isEnabledShow" class="btn" @click="handleInterest(reslistitem, reslistindex)">客户权益</div>
+                <div v-show="reslistitem.quoteCode == '200' && isEnabledShow" class="btn" @click="handleInterest(reslistitem, reslistindex)">客户权益</div>
 <!--                <div class="btn" @click="handleInterest(reslistitem, reslistindex)">客户权益</div>-->
               </div>
             </el-row>