Browse Source

新增卡券页面

couponManage-zq-1209
zq 5 days ago
parent
commit
cc6aa647b0
  1. 6
      src/components/GroupFormBtns.vue
  2. 19
      src/router/index.js
  3. 103
      src/views/agent/checkCardList.vue
  4. 188
      src/views/agent/orderSetting.vue

6
src/components/GroupFormBtns.vue

@ -2,8 +2,8 @@
<template>
<div class="btns-wrap flex">
<GuipButton type="ignore" @click="cancelClick">取消</GuipButton>
<GuipButton type="primary" @click="confirmClick">保存</GuipButton>
<GuipButton type="ignore" @click="cancelClick">{{cancelText || '取消'}}</GuipButton>
<GuipButton type="primary" @click="confirmClick">{{confirmText ||'保存'}}</GuipButton>
</div>
</template>
<script>
@ -11,7 +11,7 @@ import GuipButton from '@/components/GuipButton.vue';
export default {
name: '',
props: [''],
props: ['cancelText','confirmText'],
components: {
GuipButton
},

19
src/router/index.js

@ -10,7 +10,7 @@ const whiteSecondSider = [
const blackSliderList = [
'/franchise', '/agreement', '/customizeDoc', '/agent/siteAdd', '/agent/siteServiceList', '/agent/siteTemplate','/agent/siteAddFinally','/agent/siteServiceAdd', '/agent/supplyList',
'/agent/domainList','/agent/siteAddChooseService'
, '/agent/noticeList' , '/agent/expenseDetails', '/agent/siteRank', '/agent/serviceRank', '/agent/payoffDetails'
, '/agent/noticeList' , '/agent/expenseDetails', '/agent/siteRank', '/agent/serviceRank', '/agent/payoffDetails','/agent/orderSetting','/agent/addCustomCoupon'
];
// 一级路由
let first_child_router = []
@ -393,6 +393,22 @@ const routes = [{
hideBreadcrumb: true // 一级页面不显示面包屑
}
},
{
path: '/agent/orderSetting',
name: '卡/淘宝订单设置',
component: () => import( /* webpackChunkName: "orderSetting" */ '../views/agent/orderSetting.vue'),
meta: {
breadcrumbParent: '卡券管理' // 一级页面不显示面包屑
}
},
{
path: '/agent/addCustomCoupon',
name: '新增自定义卡券',
component: () => import( /* webpackChunkName: "addCustomCoupon" */ '../views/agent/addCustomCoupon.vue'),
meta: {
breadcrumbParent: '卡券管理' // 一级页面不显示面包屑
}
},
// 运营工具 end
// -----------------分隔符-----------
@ -582,6 +598,7 @@ const routes = [{
}
},
// 管理员end
// 排版 start
{
path: '/super/paiban/tpl',

103
src/views/agent/checkCardList.vue

@ -91,26 +91,44 @@
<el-tab-pane label="单张发售卡" name="only"></el-tab-pane>
<el-tab-pane label="批量发售卡" name="more"></el-tab-pane>
</el-tabs>
<div class="flex numsList gap12">
<div class="numItem gap8 flex" :class="curCardType == item.type ? 'numItemActive' : ''" v-for="item in numsList" :key="item.name">
<div class="flex numsList gap12 mb24">
<div class="numItem gap8 flex" :class="curCardType == item.type ? 'numItemActive' : ''" v-for="item in numsList" :key="item.name" @click="changeCardType(item.type)">
{{ item.name }} <span class="unit">{{ item.num }}</span>
</div>
</div>
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<GuipTable v-if="curType == 'only'" :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<template>
<el-table-column fixed="left" prop="card" label="检测卡号" min-width="200"></el-table-column>
<el-table-column prop="type" label="发行方式" width="120"></el-table-column>
<el-table-column prop="rule" label="使用规则" min-width="200"></el-table-column>
<el-table-column prop="review_status_desc" label="余额/面额" min-width="120"></el-table-column>
<el-table-column prop="pay" label="支付金额" min-width="120"></el-table-column>
<el-table-column fixed="left" prop="card" label="检测卡号" min-width="200">
<template slot-scope="scope">
<div class="flex">
{{ scope.row.card }}
<img src="@/assets/form_copy.svg" v-clipboard="(scope.row.card)"/>
</div>
</template>
</el-table-column>
<el-table-column prop="type" label="发行方式" v-if="curCardType != 1" width="120"></el-table-column>
<el-table-column prop="rule" label="使用规则" v-if="[1,2,3].includes(curCardType)" min-width="200"></el-table-column>
<el-table-column prop="review_status_desc" label="余额/面额" min-width="120">
<template slot-scope="scope">
10/20{{ scope.row.review_status_desc }}
</template>
</el-table-column>
<el-table-column prop="pay" label="支付金额" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测系统" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测服务" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测价格" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测价格" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="有效期" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="剩余 / 总检测次数" v-if="curCardType == 5" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="每天限制检测篇数" v-if="curCardType == 4" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡生成时间" v-if="[4,5].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡生效时间" v-if="curCardType == 4" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡过期时间" v-if="curCardType == 4" min-width="120"></el-table-column>
<el-table-column prop="status" label="状态" min-width="120">
<template slot-scope="scope">
<span :class="['status','status'+[scope.row.status]]">{{ scope.row.status_desc }}</span>
</template>
</el-table-column>
<el-table-column prop="create" label="创建人" min-width="120"></el-table-column>
<el-table-column fixed="right" prop="tid" label="操作" min-width="100">
<template slot-scope="scope">
<GuipButton type="text" @click="handleRefuse(scope.row)">关闭</GuipButton>
@ -118,6 +136,49 @@
</el-table-column>
</template>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="serviceList.length">
</el-pagination>
<GuipTable v-if="curType == 'more'" :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<template>
<el-table-column fixed="left" prop="id" label="ID" min-width="100"></el-table-column>
<el-table-column prop="review_status_desc" label="检测系统" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测服务" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="可检测次数" v-if="curCardType == 5" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡类型" v-if="curCardType == 4" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="面额/折扣" min-width="120">
<template slot-scope="scope">
{{ scope.row.review_status_desc }}/1
</template>
</el-table-column>
<el-table-column prop="review_status_desc" label="检测价格" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="有效期" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡数量(余/总)" min-width="200"></el-table-column>
<el-table-column prop="review_status_desc" label="每天限制检测篇数" v-if="curCardType == 4" min-width="200"></el-table-column>
<el-table-column prop="review_status_desc" label="用户支付金额(元)" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="规则名称" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="规则发售起止时间" v-if="curCardType == 4" min-width="120"></el-table-column>
<!-- <el-table-column prop="review_status_desc" label="检测卡生成时间" v-if="[4,5].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡生效时间" v-if="curCardType == 4" min-width="120"></el-table-column>
<el-table-column prop="review_status_desc" label="检测卡过期时间" v-if="curCardType == 4" min-width="120"></el-table-column> -->
<el-table-column prop="status" label="状态" min-width="120">
<template slot-scope="scope">
<span :class="['status','status'+[scope.row.status]]">{{ scope.row.status_desc }}</span>
</template>
</el-table-column>
<el-table-column prop="review_status_desc" label="H5购买检测卡链接" v-if="[1,2,3].includes(curCardType)" min-width="120"></el-table-column>
<el-table-column prop="create" label="创建人" min-width="120"></el-table-column>
<el-table-column fixed="right" prop="tid" label="操作" min-width="100">
<template slot-scope="scope">
<GuipButton type="text" @click="handleRefuse(scope.row)">关闭</GuipButton>
<GuipButton type="text" v-if="false" @click="handleRefuse(scope.row)">修改</GuipButton>
<GuipButton type="text" v-if="false" @click="handleRefuse(scope.row)">下载</GuipButton>
</template>
</el-table-column>
</template>
</GuipTable>
</div>
</div>
</template>
@ -201,7 +262,15 @@ export default {
num:6,
type:5
}
]
],
tableKey: Date.now(),
tableLoading: false,
currentPage: 1,
pageSize: 10,
serviceList:[{
id:'123456789',
name:'检测卡服务名称'
}]
}
},
mounted() {
@ -215,11 +284,24 @@ export default {
handleClick(tab, event) {
console.log(tab, event);
},
changeCardType(type) {
console.log(type,'type===');
this.curCardType = type;
},
walletClick(type) {
this.walletType = type;
},
handleRefuse() {
},
handlePageChange(page) {
this.orderListCurrentPage = page;
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
}
},
}
@ -359,6 +441,7 @@ export default {
box-sizing: border-box;
border: 1px solid #DFE2E6;
color: #626573;
cursor: pointer;
}
.unit{
width: 24px;

188
src/views/agent/orderSetting.vue

@ -0,0 +1,188 @@
<template>
<div class="main-content12 ">
<div class="flex-common">
<el-form>
<div class="flex gap12 mb24">
<span class="littleTitle">检测卡开关</span>
<GuipSwitch :value="hasProjectFee" ref="hasProjectFeeRef" activeText="开启" inactiveText="关闭" :active-value="1" :inactive-value="0" @change="onProjectFeeChange"></GuipSwitch>
</div>
<GuipFormItem column="column" class="mb24" label="用户可见信息" :required="true">
<!-- <el-checkbox-group slot="formDom" v-model="departType" @change="validateSelection"
class="checkboxGroup"> -->
<div class="flex gap12" slot="formDom">
<el-checkbox :label="1">向用户展示总面额</el-checkbox>
<el-checkbox :label="2">向用户展示余额</el-checkbox>
</div>
<!-- </el-checkbox-group> -->
</GuipFormItem>
<GroupFormBtns @cancel="cancelClick" cancelText="重置" @confirm="submitForm('siteForm')" />
</el-form>
</div>
<div class="flex-common mt12">
<el-form>
<p class="littleTitle mb12">淘宝订单设置</p>
<PromptText text='说明:用户一订单拍多件时,未使用部分会自动生成淘宝检测卡,方便用户使用剩余件数' :type="1" />
<el-form ref="domainFormRef" :rules="domainRules" :model="domainData">
<div class="mt24 flex-wrap">
<div class="flex-left">
<p class="flex-left-desc">域名来源</p>
<div class="flex mt12 gap20">
<div class="radioItem gap8">
<el-radio v-model="radio1" :label="1">允许</el-radio>
<p class="desc">用户一订单多拍未使用部分下次可用</p>
</div>
<div class="radioItem gap8">
<el-radio v-model="radio1" :label="1">允许</el-radio>
<p class="desc">用户一订单多拍只能使用1次</p>
</div>
</div>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipRadio v-model="domainType" column="column" :options="domainTypes" prop="type" label="下次使用过期时间" @change="domainTypeChange" />
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" cancelText="重置" @confirm="submitForm('siteForm')" />
</el-form>
</div>
<div class="flex-common mt12">
<el-form>
<GuipTable :tableData="orderList" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<el-table-column prop="sitename" label="站点简称" fixed="left" min-width="212px">
<template slot-scope="scope">
<div class="flex">
{{ scope.row.sitename }}
<img src="@/assets/form_copy.svg" v-clipboard="(scope.row.sitename)"/>
</div>
</template>
</el-table-column>
<el-table-column prop="link" label="购买检测卡的淘宝宝贝链接(站点中,用户若选择购买检测卡支付,可直接跳转淘宝商品)" min-width="610px">
<template slot-scope="scope">
<div class="flex gap8">
<GuipInput v-model="scope.row.link" style="flex:1" placeholder="请输入淘宝宝贝链接"></GuipInput>
<GuipButton type="system">保存</GuipButton>
</div>
</template>
</el-table-column>
</GuipTable>
</el-form>
</div>
</div>
</template>
<script>
import GuipSwitch from '@/components/GuipSwitch';
import GuipFormItem from '@/components/GuipFormItem';
import GroupFormBtns from '@/components/GroupFormBtns';
import PromptText from '@/components/PromptText';
import GuipRadio from '@/components/GuipRadio';
import GuipTable from '@/components/GuipTable';
import GuipInput from '@/components/GuipInput.vue';
import GuipButton from '@/components/GuipButton.vue';
export default {
props: {
hasProjectFee: Number,
},
components: {
GuipSwitch,
GuipFormItem,
PromptText,
GroupFormBtns,
GuipInput,
GuipButton,
GuipRadio,
GuipTable,
},
data() {
return {
domainType:1,
domainTypes: [
{
value: 1,
label: '永久有限',
},
{
value: 2,
label: '7天',
},
{
value: 3,
label: '15天',
},
{
value: 4,
label: '30天',
},
{
value: 5,
label: '60天',
},
],
domainData: {
type: 1,
},
domainRules: {
type: [
{ required: true, message: '请选择域名来源', trigger: 'change' },
],
},
radio1: 1,
orderList:[
{
sitename:'轻歌曼舞82(充值)',
link:''
},
{
sitename:'copycheck旗舰店',
link:'https://www.taobao.com/item.htm?id=1234567890'
}
]
}
},
methods: {
handleClickCopy(){
this.$copy(this.form.input1, {
successMsg: '内容已复制到剪贴板',
errorMsg: '复制失败,请按Ctrl+C手动复制',
vm: this
});
},
validateSelection() {
this.departType = this.departType.filter(item => item !== 0);
},
cancelClick() {
this.$emit('update:hasProjectFee', !this.hasProjectFee)
this.$refs.hasProjectFeeRef.toggle();
},
submitForm() {
if (this.departType.length === 0) return this.$message.error('请选择至少一项');
// let params = {
// has_project_fee: this.hasProjectFee,
// }
},
onProjectFeeChange(val) {
this.$emit('update:hasProjectFee', val);
}
}
}
</script>
<style scoped lang="scss">
.el-form-item{
margin-bottom: 0;
}
.radioItem{
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
.desc{
margin-left: 24px;
}
}
</style>
Loading…
Cancel
Save