Commit 5ae6432b authored by 吴春's avatar 吴春

1

parent 97e6b252
......@@ -30,6 +30,40 @@
text-align: left;
padding: 0 10px;
}
._TravelPricePopover .ScenicDiv {
width: 100%;
max-height: 300px;
overflow: auto;
}
._TravelPricePopover table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
margin: 0 20px 5px 0;
width: 94%;
}
._TravelPricePopover table ._color_666 {
background-color: #ededed;
color: #666666;
padding: 5px;
}
._TravelPricePopover table td {
background-color: #ffffff;
padding: 9px 0;
color: #333333;
text-align: center;
border: 1px solid #d2d2d2;
}
._TravelPricePopover table td._d_name {
background-color: #ededed;
}
</style>
<template>
......@@ -207,6 +241,11 @@
<el-button v-if="EditBtn" type="danger" icon="iconfont icon-xiugai" circle style="padding:4px;"
@click="outerVisible=true,EditItem(item)"></el-button>
</el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="发放优惠券" placement="top">
<el-button v-if="EditBtn" type="danger" icon="iconfont icon-caidan-fill" circle style="padding:4px;"
@click="autoCouponDialog=true,AutoGrantCounItem(item)"></el-button>
</el-tooltip> -->
</td>
</tr>
</tbody>
......@@ -427,6 +466,69 @@
<el-button size="small" type="danger" @click="sureUpdatekucun()">确 定</el-button>
</span>
</el-dialog>
<el-dialog custom-class='w500' title="发放优惠券" :visible.sync="autoCouponDialog" center >
<el-form :model="grantCouponMsg" :rules="rules" ref="grantCouponMsg" label-width="100px" class="addBox">
<el-form-item label="优惠券名称">
<p>{{grantCouponMsg.couponsName}}</p>
</el-form-item>
<el-form-item label="优惠券类型">
<p>{{grantCouponMsg.couponsType==1?"抵用券":(grantCouponMsg.couponsType==2?"折扣卷":"")}}</p>
</el-form-item>
<el-form-item label="使用条件">
<p>{{grantCouponMsg.useCondition}}</p>
</el-form-item>
<el-form-item label="优惠券面额">
<p>{{grantCouponMsg.denomination}}</p>
</el-form-item>
<!-- <el-form-item label="选择人员" prop="grantCouponMsg.customerIds">
<el-input class="w180" v-model="grantCouponMsg.customerInfo" @keyup.enter.native="getCustomerBrandByKeyWord">
</el-input>
</el-form-item> -->
<el-form-item label="选择人员" prop="customerIds">
<div>
<el-popover trigger="click" placement="bottom-start">
            <div class="_TravelPricePopover" style="height: 300px;overflow: auto;width: 350px;" v-="xuanzeCustomer">
              <div class="ScenicDiv" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td class="_color_666">选择</td>
<td class="_color_666">客户名称</td>
<td class="_color_666">联系电话</td>
</tr>
<tr v-for="fitem in customerList">
<td>
<el-checkbox @change="getSelect(fitem)"></el-checkbox>
</td>
<td>
{{fitem.customerName}}
</td>
<td>
{{fitem.contact}}
</td>
</tr>
</table>
              </div>
            </div>
            <div slot="reference" style="padding: 0 4px;">
<el-input class="w180" v-model="grantCouponMsg.customerInfo" >
</el-input>
<el-button size="small" type="danger" @click="getCustomerBrandByKeyWord()">查询</el-button>
            </div>
          </el-popover>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="autoCouponDialog = false">取 消</el-button>
<el-button size="small" type="danger" @click="sureUpdatekucun()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -473,6 +575,8 @@
outerVisible: false,
innerVisible: false,
updateKucundialog: false,
autoCouponDialog:false,
xuanzeCustomer:false,
isRight: true,
dialogTitle: "",
insideDialogTxt: "",
......@@ -591,6 +695,8 @@
layerCompanyList: [],
CouponPlatformEnumList: [],
companyList: [],
customerList: [],
layerCustomerList:[],
layerDepartMentList: [],
departMentList: [],
PostList: [],
......@@ -600,6 +706,25 @@
upDateKcMsg: {
number: ''
},
grantCouponMsg: {
couponsName: "",
effectDate: "",
expirationDate: "",
activityStartDate: "",
activityEndDate: "",
couponsType: 1,
useCondition: 0,
id: 0,
couponsUseScope: 1,
couponStatus: 1,
redemptionPrice: '',
denomination:0,
isExpansion: 0,
customerIds:'',
customerIdList:[],
customerType:0,
customerInfo:""
},
EditBtn: false,
};
},
......@@ -675,6 +800,12 @@
this.getTravelPrciePageList()
}
},
//发放优惠券
AutoGrantCounItem(item) {
this.grantCouponMsg = Object.assign({}, item);
console.log("grantCouponMsg", this.grantCouponMsg);
},
//点击确定修改库存
sureUpdatekucun() {
this.apipost("coupon_post_UpdateCouponCount", this.upDateKcMsg, res => {
......@@ -700,6 +831,21 @@
}
);
},
getCustomerBrandByKeyWord() {
this.apipost(
"app_post_GetCustomerBrandByKeyWord",
this.grantCouponMsg,
res => {
if (res.data.resultCode == 1) {
this.layerCustomerList = res.data.data;
this.customerList = res.data.data;
this.xuanzeCustomer=true;
console.log("customerList",this.xuanzeCustomer);
}
}
);
},
getCouponPlatformEnum() {
this.apipost(
"coupon_post_GetCouponPlatformEnum",
......
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