Commit 45302d65 authored by 黄奎's avatar 黄奎

新增权限验证方法

parent 8929ed0a
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
*/ */
var AuthCode = { var AuthCode = {
EidtCoupon:"IsEidtCoupon",//优惠券修改权限
}; };
export default AuthCode; export default AuthCode;
\ No newline at end of file
...@@ -33,6 +33,15 @@ ...@@ -33,6 +33,15 @@
</el-select> </el-select>
</span> </span>
</li> </li>
<li>
<span>
<em>团状态</em>
<el-select v-model="msg.IsSetOut">
<el-option label="正常发团" :value="0"></el-option>
<el-option label="取消发团" :value="1"></el-option>
</el-select>
</span>
</li>
<li> <li>
<input type="button" class="hollowFixedBtn" value="查询" @click="getSearch()"> &nbsp; <input type="button" class="hollowFixedBtn" value="查询" @click="getSearch()"> &nbsp;
<input type="button" class="normalBtn" value="下载" @click="DownLoadFile()"> <input type="button" class="normalBtn" value="下载" @click="DownLoadFile()">
...@@ -111,6 +120,7 @@ ...@@ -111,6 +120,7 @@
Supplier: 0, Supplier: 0,
PageIndex: 1, PageIndex: 1,
PageSize: 15, PageSize: 15,
IsSetOut:0,//0-正常发团,1-取消发团
}, },
loading: false, loading: false,
currentPage: 1, currentPage: 1,
...@@ -165,6 +175,7 @@ ...@@ -165,6 +175,7 @@
TCID: item.TCIDS, TCID: item.TCIDS,
Supplier: that.msg.Supplier, Supplier: that.msg.Supplier,
QMonthStr: that.msg.QMonthStr, QMonthStr: that.msg.QMonthStr,
IsSetOut:that.msg.IsSetOut,
}, },
res => { res => {
that.loading = false; that.loading = false;
......
<style> <style>
.user_time_picker .el-date-editor--date > .el-input__inner { .user_time_picker .el-date-editor--date>.el-input__inner {
padding: 0 10px; padding: 0 10px;
font-size: 13px; font-size: 13px;
} }
.user_time_picker .el-date-editor--date > span.el-input__prefix {
.user_time_picker .el-date-editor--date>span.el-input__prefix {
display: none; display: none;
} }
.user_time_picker .el-date-editor--date > span.el-input__suffix {
.user_time_picker .el-date-editor--date>span.el-input__suffix {
top: -4px; top: -4px;
right: 2px; right: 2px;
} }
.zidingyiFz i {
.zidingyiFz i {
font-size: 14px !important; font-size: 14px !important;
} }
._couponReceiveCount{
._couponReceiveCount {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
/* .page_CouponList .el-button.is-circle{
/* .page_CouponList .el-button.is-circle{
border-radius: 4px border-radius: 4px
} */ } */
.text_al_left{ .text_al_left {
text-align: left; text-align: left;
padding: 0 10px; padding: 0 10px;
} }
</style> </style>
<template> <template>
<div class="flexOne page_CouponList"> <div class="flexOne page_CouponList">
...@@ -32,18 +38,9 @@ ...@@ -32,18 +38,9 @@
<li> <li>
<span> <span>
<em>{{$t('system.table_company')}}</em> <em>{{$t('system.table_company')}}</em>
<el-select <el-select filterable :disabled="msg.IsParentCompany==2" v-model="msg.branchId">
filterable
:disabled="msg.IsParentCompany==2"
v-model="msg.branchId"
>
<el-option :label="$t('system.ph_buxian')" value="-1"></el-option> <el-option :label="$t('system.ph_buxian')" value="-1"></el-option>
<el-option <el-option v-for="item in companyList" :label="item.BName" :value="item.Id" :key="item.Id"></el-option>
v-for="item in companyList"
:label="item.BName"
:value="item.Id"
:key="item.Id"
></el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
...@@ -52,7 +49,8 @@ ...@@ -52,7 +49,8 @@
<em>{{$t('system.table_ssLine')}}</em> <em>{{$t('system.table_ssLine')}}</em>
<el-select filterable v-model="msg.lineId" @change="getLineTeamList(msg.lineId, 2)"> <el-select filterable v-model="msg.lineId" @change="getLineTeamList(msg.lineId, 2)">
<el-option :label="$t('system.ph_buxian')" :value="0"></el-option> <el-option :label="$t('system.ph_buxian')" :value="0"></el-option>
<el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID"></el-option> <el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID">
</el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
...@@ -61,7 +59,8 @@ ...@@ -61,7 +59,8 @@
<em>{{$t('active.ad_ssxl')}}</em> <em>{{$t('active.ad_ssxl')}}</em>
<el-select filterable v-model="msg.lineteamId"> <el-select filterable v-model="msg.lineteamId">
<el-option :label="$t('system.ph_buxian')" :value="0"></el-option> <el-option :label="$t('system.ph_buxian')" :value="0"></el-option>
<el-option v-for="item in QLineTeamList" :label="item.LtName" :value="item.LtID" :key="item.LtID"></el-option> <el-option v-for="item in QLineTeamList" :label="item.LtName" :value="item.LtID" :key="item.LtID">
</el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
...@@ -99,18 +98,11 @@ ...@@ -99,18 +98,11 @@
</li> </li>
<li> <li>
<input <input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')" @click="resetPageIndex(),getList()">
type="button" &nbsp;
class="hollowFixedBtn" <input type="button"
:value="$t('pub.searchBtn')"
@click="resetPageIndex(),getList()"
> &nbsp;
<input
type="button"
@click="outerVisible = true,isleaveBtn=false,dialogTitle=$t('active.cl_addCoupon'),getCompany()" @click="outerVisible = true,isleaveBtn=false,dialogTitle=$t('active.cl_addCoupon'),getCompany()"
class="normalBtn" class="normalBtn" :value="$t('pub.addBtn')">
:value="$t('pub.addBtn')"
>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -143,9 +135,11 @@ ...@@ -143,9 +135,11 @@
<td>{{item.couponsName}}</td> <td>{{item.couponsName}}</td>
<td>{{item.couponCount}}</td> <td>{{item.couponCount}}</td>
<td> <td>
<span class="_couponReceiveCount" @click="item.couponReceiveCount === 0 ? '' : goDetail('CouponDetail', item)">{{item.couponReceiveCount}}</span> <span class="_couponReceiveCount"
@click="item.couponReceiveCount === 0 ? '' : goDetail('CouponDetail', item)">{{item.couponReceiveCount}}</span>
</td>
<td>{{(item.couponCount - item.couponReceiveCount) > 0 ? (item.couponCount - item.couponReceiveCount) : 0 }}
</td> </td>
<td>{{(item.couponCount - item.couponReceiveCount) > 0 ? (item.couponCount - item.couponReceiveCount) : 0 }}</td>
<td>{{item.branchName}}</td> <td>{{item.branchName}}</td>
<td>{{item.lineId <= 0 ? $t('pub.unlimitedSel') : item.lineName}}</td> <td>{{item.lineId <= 0 ? $t('pub.unlimitedSel') : item.lineName}}</td>
<td>{{item.lineteamId <= 0 ? $t('pub.unlimitedSel') : item.lineTeamName}}</td> <td>{{item.lineteamId <= 0 ? $t('pub.unlimitedSel') : item.lineTeamName}}</td>
...@@ -186,57 +180,33 @@ ...@@ -186,57 +180,33 @@
</td> </td>
<td>{{item.remark}}</td> <td>{{item.remark}}</td>
<td class="text_al_left"> <td class="text_al_left">
<!-- <el-button-group> -->
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top">
<el-button <el-button v-if="item.couponEffectStatus === 2 && item.couponStatus === 1" type="primary"
v-if="item.couponEffectStatus === 2 && item.couponStatus === 1" icon="el-icon-edit" circle
type="primary" @click="outerVisible=true,dialogTitle=$t('pub.updateMsg'),updateData(item),getCompany()"></el-button>
icon="el-icon-edit"
circle
@click="outerVisible=true,dialogTitle=$t('pub.updateMsg'),updateData(item),getCompany()"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('active.cl_jyCoupon')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('active.cl_jyCoupon')" placement="top">
<el-button <el-button v-if="item.couponStatus !== 2" type="danger" icon="iconfont icon-jinyong" circle
v-if="item.couponStatus !== 2" @click="deleteItem(item, 2)"></el-button>
type="danger"
icon="iconfont icon-jinyong"
circle
@click="deleteItem(item, 2)"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('active.cl_hfCoupon')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('active.cl_hfCoupon')" placement="top">
<el-button <el-button v-if="item.couponStatus === 2" type="success" icon="iconfont icon-huifu" circle
v-if="item.couponStatus === 2" @click="deleteItem(item, 3)"></el-button>
type="success"
icon="iconfont icon-huifu"
circle
@click="deleteItem(item, 3)"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('active.cl_deleteCoupon')" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('active.cl_deleteCoupon')" placement="top">
<el-button <el-button v-if="item.couponStatus === 2" type="danger" icon="iconfont icon-img_delete_small" circle
v-if="item.couponStatus === 2" @click="deleteItem(item)"></el-button>
type="danger"
icon="iconfont icon-img_delete_small"
circle
@click="deleteItem(item)"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="修改当日活动库存" placement="top"> <el-tooltip class="item" effect="dark" content="修改当日活动库存" placement="top">
<el-button type="primary" icon="el-icon-edit" circle style="padding:6px;" <el-button type="primary" icon="el-icon-edit" circle style="padding:6px;" @click="updateKucundialog=true">
@click="updateKucundialog=true" </el-button>
></el-button>
</el-tooltip> </el-tooltip>
{{EditBtn}}
<el-tooltip class="item" effect="dark" content="修改" placement="top"> <el-tooltip class="item" effect="dark" content="修改" placement="top">
<el-button v-if="EditBtn" type="danger" icon="iconfont icon-xiugai" circle style="padding:4px;" <el-button v-if="EditBtn" type="danger" icon="iconfont icon-xiugai" circle style="padding:4px;"
@click="outerVisible=true,EditItem(item)" @click="outerVisible=true,EditItem(item)"></el-button>
></el-button>
</el-tooltip> </el-tooltip>
<!-- </el-button-group> -->
</td> </td>
</tr> </tr>
</table> </table>
...@@ -244,60 +214,37 @@ ...@@ -244,60 +214,37 @@
<i class="iconfont icon-kong"></i> <i class="iconfont icon-kong"></i>
<p>{{$t('active.ld_noData')}}</p> <p>{{$t('active.ld_noData')}}</p>
</div> </div>
<el-pagination <el-pagination background @current-change="handleCurrentChange" v-if="DataList.length>0"
background :current-page.sync="currentPage" layout="total,prev, pager, next, jumper" :page-size="msg.pageSize"
@current-change="handleCurrentChange" :total="total"></el-pagination>
v-if="DataList.length>0" <el-dialog custom-class="w800" :title="dialogTitle" :visible.sync="outerVisible" center
:current-page.sync="currentPage" :before-close="closeChangeMachie">
layout="total,prev, pager, next, jumper"
:page-size="msg.pageSize"
:total="total"
></el-pagination>
<el-dialog
custom-class="w800"
:title="dialogTitle"
:visible.sync="outerVisible"
center
:before-close="closeChangeMachie"
>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<table class="layerTable layerNoIcon"> <table class="layerTable layerNoIcon">
<tr> <tr>
<td> <td>
<el-form-item :label="$t('system.table_company')" prop="branchId"> <el-form-item :label="$t('system.table_company')" prop="branchId">
<el-select <el-select filterable class="w217" v-model="addMsg.branchId" :placeholder="$t('system.ph_choice')">
filterable
class="w217"
v-model="addMsg.branchId"
:placeholder="$t('system.ph_choice')"
>
<el-option :label="$t('system.ph_buxian')" :value="-1" :key="-1"></el-option> <el-option :label="$t('system.ph_buxian')" :value="-1" :key="-1"></el-option>
<el-option <el-option v-for="item in layerCompanyList" :label="item.BName" :value="item.Id" :key="item.Id">
v-for="item in layerCompanyList" </el-option>
:label="item.BName"
:value="item.Id"
:key="item.Id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</td> </td>
<td> <td>
<el-form-item :label="$t('active.cl_couponName')" prop="couponsName"> <el-form-item :label="$t('active.cl_couponName')" prop="couponsName">
<el-input <el-input maxlength="20" class="w217" type="text" v-model="addMsg.couponsName"
maxlength="20" :placeholder="$t('pub.pleaseImport')"></el-input>
class="w217"
type="text"
v-model="addMsg.couponsName"
:placeholder="$t('pub.pleaseImport')"
></el-input>
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr>
<td> <td>
<el-form-item :label="$t('advmanager.v_line')" prop="lineId"> <el-form-item :label="$t('advmanager.v_line')" prop="lineId">
<el-select filterable v-model="addMsg.lineId" @change="getLineTeamList(addMsg.lineId)"> <el-select filterable v-model="addMsg.lineId" @change="getLineTeamList(addMsg.lineId)">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID"></el-option> <el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</td> </td>
...@@ -305,14 +252,15 @@ ...@@ -305,14 +252,15 @@
<el-form-item :label="$t('advmanager.v_xilie')" prop="lineteamId"> <el-form-item :label="$t('advmanager.v_xilie')" prop="lineteamId">
<el-select filterable v-model="addMsg.lineteamId"> <el-select filterable v-model="addMsg.lineteamId">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option> <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in LineTeamList" :label="item.LtName" :value="item.LtID" :key="item.LtID"></el-option> <el-option v-for="item in LineTeamList" :label="item.LtName" :value="item.LtID" :key="item.LtID">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<el-form-item :label="$t('active.cl_couponType')" prop="couponsType" > <el-form-item :label="$t('active.cl_couponType')" prop="couponsType">
<el-select filterable v-model="addMsg.couponsType" @change="addMsg.denomination = ''"> <el-select filterable v-model="addMsg.couponsType" @change="addMsg.denomination = ''">
<el-option :label="$t('active.cl_dyquan')" :value="1"></el-option> <el-option :label="$t('active.cl_dyquan')" :value="1"></el-option>
<el-option :label="$t('active.cl_zkquan')" :value="2"></el-option> <el-option :label="$t('active.cl_zkquan')" :value="2"></el-option>
...@@ -321,48 +269,34 @@ ...@@ -321,48 +269,34 @@
</td> </td>
<td> <td>
<el-form-item :label="$t('active.cl_yhqmiane')" prop="denomination"> <el-form-item :label="$t('active.cl_yhqmiane')" prop="denomination">
<el-input <el-input @input="maxValue" maxlength="20" class="w217" type="number" v-model="addMsg.denomination"
@input="maxValue" :placeholder="$t('active.cl_dkjezk')"></el-input>
maxlength="20"
class="w217"
type="number"
v-model="addMsg.denomination"
:placeholder="$t('active.cl_dkjezk')"
></el-input>
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<el-form-item :label="$t('active.cl_couponNum')" prop="couponCount"> <el-form-item :label="$t('active.cl_couponNum')" prop="couponCount">
<el-input v-model="addMsg.couponCount" class="w217" type="number"/> <el-input v-model="addMsg.couponCount" class="w217" type="number" />
</el-form-item> </el-form-item>
</td> </td>
<td> <td>
<el-form-item :label="$t('active.cl_sytiaojian')" prop="useCondition"> <el-form-item :label="$t('active.cl_sytiaojian')" prop="useCondition">
<el-input v-model="addMsg.useCondition" class="w217" :placeholder="$t('active.cl_mdskeyong')"/> <el-input v-model="addMsg.useCondition" class="w217" :placeholder="$t('active.cl_mdskeyong')" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<el-form-item :label="$t('active.cl_sxriqi')" prop="effectDate"> <el-form-item :label="$t('active.cl_sxriqi')" prop="effectDate">
<el-date-picker <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" class="w217" v-model="addMsg.effectDate"
value-format="yyyy-MM-dd HH:mm:ss" type="datetime"></el-date-picker>
class="w217"
v-model="addMsg.effectDate"
type="datetime"
></el-date-picker>
</el-form-item> </el-form-item>
</td> </td>
<td> <td>
<el-form-item :label="$t('active.cl_yxjzhiri')" prop="expirationDate"> <el-form-item :label="$t('active.cl_yxjzhiri')" prop="expirationDate">
<el-date-picker <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" class="w217" v-model="addMsg.expirationDate"
value-format="yyyy-MM-dd HH:mm:ss" type="datetime"></el-date-picker>
class="w217"
v-model="addMsg.expirationDate"
type="datetime"
></el-date-picker>
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
...@@ -402,21 +336,22 @@ ...@@ -402,21 +336,22 @@
</td> </td>
<td> <td>
<el-form-item :label="$t('MarketingActi.huangoujia')"> <el-form-item :label="$t('MarketingActi.huangoujia')">
<el-input v-model="addMsg.redemptionPrice" class="w217" :placeholder="$t('pub.pleaseImport')"/> <el-input v-model="addMsg.redemptionPrice" class="w217" :placeholder="$t('pub.pleaseImport')" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<el-form-item :label="$t('hotel.hotel_remark')"> <el-form-item :label="$t('hotel.hotel_remark')">
<el-input v-model="addMsg.remark" class="w217" :placeholder="$t('pub.pleaseImport')"/> <el-input v-model="addMsg.remark" class="w217" :placeholder="$t('pub.pleaseImport')" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
</table> </table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> &nbsp; <button class="hollowFixedBtn"
@click="outerVisible = false,resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> <button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -424,7 +359,8 @@ ...@@ -424,7 +359,8 @@
<el-dialog custom-class='w400' title="修改当日活动库存" :visible.sync="updateKucundialog" center> <el-dialog custom-class='w400' title="修改当日活动库存" :visible.sync="updateKucundialog" center>
<el-form label-width="150px"> <el-form label-width="150px">
<el-form-item label="修改当日活动库存"> <el-form-item label="修改当日活动库存">
<el-input class="w180" v-model="upDateKcMsg.number" @keyup.native="checkInteger(upDateKcMsg,'number',true)"></el-input> <el-input class="w180" v-model="upDateKcMsg.number" @keyup.native="checkInteger(upDateKcMsg,'number',true)">
</el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -436,7 +372,7 @@ ...@@ -436,7 +372,7 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
leaveBtn: "", leaveBtn: "",
...@@ -448,7 +384,7 @@ export default { ...@@ -448,7 +384,7 @@ export default {
currentPage: 1, currentPage: 1,
outerVisible: false, outerVisible: false,
innerVisible: false, innerVisible: false,
updateKucundialog:false, updateKucundialog: false,
isRight: true, isRight: true,
dialogTitle: "", dialogTitle: "",
insideDialogTxt: "", insideDialogTxt: "",
...@@ -464,16 +400,44 @@ export default { ...@@ -464,16 +400,44 @@ export default {
couponStatus: -1, couponStatus: -1,
groupId: '', groupId: '',
branchId: '', branchId: '',
couponsUseScope:"", couponsUseScope: "",
}, },
rules: { rules: {
branchId: [{ required: true, message: this.$t('rule.company'), trigger: "change" }], branchId: [{
lineId: [{ required: true, message: this.$t('rule.qxzxuanlu'), trigger: "change" }], required: true,
couponsName: [{ required: true, message: this.$t('rule.qsryhqmingcheng'), trigger: "blur" }], message: this.$t('rule.company'),
useCondition: [{ required: true, message: this.$t('rule.qsrsytiaojian'), trigger: "blur" }], trigger: "change"
effectDate: [{ required: true, message: this.$t('rule.qxzsxriqi'), trigger: "change" }], }],
expirationDate: [{ required: true, message: this.$t('rule.qxzjzriqi'), trigger: "change" }], lineId: [{
couponCount: [{ required: true, message: this.$t('rule.qsryhqshuliang'), trigger: "blur" }], required: true,
message: this.$t('rule.qxzxuanlu'),
trigger: "change"
}],
couponsName: [{
required: true,
message: this.$t('rule.qsryhqmingcheng'),
trigger: "blur"
}],
useCondition: [{
required: true,
message: this.$t('rule.qsrsytiaojian'),
trigger: "blur"
}],
effectDate: [{
required: true,
message: this.$t('rule.qxzsxriqi'),
trigger: "change"
}],
expirationDate: [{
required: true,
message: this.$t('rule.qxzjzriqi'),
trigger: "change"
}],
couponCount: [{
required: true,
message: this.$t('rule.qsryhqshuliang'),
trigger: "blur"
}],
}, },
addMsg: { addMsg: {
couponsName: "", couponsName: "",
...@@ -491,8 +455,8 @@ export default { ...@@ -491,8 +455,8 @@ export default {
lineteamId: 0, lineteamId: 0,
couponsUseScope: 1, couponsUseScope: 1,
couponStatus: 1, couponStatus: 1,
redemptionPrice:'', redemptionPrice: '',
remark:"", remark: "",
}, },
pwdMsg: { pwdMsg: {
Id: "", Id: "",
...@@ -514,38 +478,44 @@ export default { ...@@ -514,38 +478,44 @@ export default {
groupId: '', groupId: '',
LineTeamList: [], LineTeamList: [],
QLineTeamList: [], QLineTeamList: [],
upDateKcMsg:{ upDateKcMsg: {
number:'' number: ''
}, },
EditBtn:false, EditBtn: false,
}; };
}, },
mounted() { mounted() {
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.groupId = this.msg.groupId = this.getCompanyMsg.RB_Group_Id = this.addMsg.groupId = userInfo.RB_Group_id; //集团 this.groupId = this.msg.groupId = this.getCompanyMsg.RB_Group_Id = this.addMsg.groupId = userInfo
.RB_Group_id; //集团
this.msg.branchId = userInfo.RB_Branch_id; //公司 this.msg.branchId = userInfo.RB_Branch_id; //公司
if(userInfo.EmployeeId==615){ this.GetAuth();
this.EditBtn=true;
}
this.getList(); this.getList();
this.getCompany(); this.getCompany();
this.getLineList(); this.getLineList();
}, },
filters: { filters: {},
},
methods: { methods: {
EditItem(item){ GetAuth() {
this.addMsg=Object.assign({},item); var actionCode = this.$AuthCode.EidtCoupon;
this.CheckUserAuth(actionCode, res => {
if (res.data.resultCode == 1 && res.data.data == 1) {
this.EditBtn = true;
}
});
},
EditItem(item) {
this.addMsg = Object.assign({}, item);
}, },
//点击确定修改库存 //点击确定修改库存
sureUpdatekucun(){ sureUpdatekucun() {
this.apiJavaPost("/api/appActivity/updateCouponStock", this.upDateKcMsg, res => { this.apiJavaPost("/api/appActivity/updateCouponStock", this.upDateKcMsg, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.updateKucundialog=false; this.updateKucundialog = false;
this.getList(); this.getList();
this.upDateKcMsg.number=''; this.upDateKcMsg.number = '';
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
...@@ -558,8 +528,7 @@ export default { ...@@ -558,8 +528,7 @@ export default {
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.layerCompanyList = res.data.data; this.layerCompanyList = res.data.data;
} else { } else {}
}
}, },
err => {} err => {}
); );
...@@ -626,7 +595,7 @@ export default { ...@@ -626,7 +595,7 @@ export default {
}) })
}, },
//获取系列列表 //获取系列列表
getLineTeamList (LineID, type) { getLineTeamList(LineID, type) {
let msg = { let msg = {
lineID: LineID, lineID: LineID,
isTOOP: 1 isTOOP: 1
...@@ -644,17 +613,17 @@ export default { ...@@ -644,17 +613,17 @@ export default {
// 修改 // 修改
updateData(item) { updateData(item) {
this.getLineTeamList(item.lineId) this.getLineTeamList(item.lineId)
this.addMsg.couponsName= item.couponsName this.addMsg.couponsName = item.couponsName
this.addMsg.effectDate= item.effectDate this.addMsg.effectDate = item.effectDate
this.addMsg.expirationDate= item.expirationDate this.addMsg.expirationDate = item.expirationDate
this.addMsg.couponsType= item.couponsType this.addMsg.couponsType = item.couponsType
this.addMsg.groupId= item.groupId this.addMsg.groupId = item.groupId
this.addMsg.branchId= item.branchId this.addMsg.branchId = item.branchId
this.addMsg.lineId= item.lineId this.addMsg.lineId = item.lineId
this.addMsg.denomination= item.denomination this.addMsg.denomination = item.denomination
this.addMsg.overlapUse= item.overlapUse this.addMsg.overlapUse = item.overlapUse
this.addMsg.useCondition= item.useCondition this.addMsg.useCondition = item.useCondition
this.addMsg.id= item.id this.addMsg.id = item.id
this.addMsg.couponCount = item.couponCount this.addMsg.couponCount = item.couponCount
this.addMsg.lineteamId = item.lineteamId this.addMsg.lineteamId = item.lineteamId
this.addMsg.couponsUseScope = item.couponsUseScope this.addMsg.couponsUseScope = item.couponsUseScope
...@@ -675,12 +644,15 @@ export default { ...@@ -675,12 +644,15 @@ export default {
text = this.$t('tips.qrhuifu'); text = this.$t('tips.qrhuifu');
status = 1 status = 1
} }
this.$confirm(text+'“'+ item.couponsName +'”'+this.$t('active.ad_yhq'), this.$t('tips.tips'), { this.$confirm(text + '“' + item.couponsName + '”' + this.$t('active.ad_yhq'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'), confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'), cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.apiJavaPost("/api/sell/coupon/updateCouponStatus", {couponId: item.id, status: status,}, res => { this.apiJavaPost("/api/sell/coupon/updateCouponStatus", {
couponId: item.id,
status: status,
}, res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList(); this.getList();
...@@ -716,7 +688,12 @@ export default { ...@@ -716,7 +688,12 @@ export default {
goUrl(name, id) { goUrl(name, id) {
this.$router.push({ this.$router.push({
name: name, name: name,
query: { id: id, type: 9, blank: "y", tab: "绑定账户信息" } query: {
id: id,
type: 9,
blank: "y",
tab: "绑定账户信息"
}
}); });
}, },
closeChangeMachie(done) { closeChangeMachie(done) {
...@@ -743,9 +720,10 @@ export default { ...@@ -743,9 +720,10 @@ export default {
lineteamId: 0, lineteamId: 0,
couponsUseScope: 1, couponsUseScope: 1,
couponStatus: 1, couponStatus: 1,
redemptionPrice:'', redemptionPrice: '',
} }
} }
} }
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment