Commit 16293336 authored by 吴春's avatar 吴春

1

parent 01deef3f
......@@ -101,7 +101,7 @@
<input type="button" class="hollowFixedBtn" :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(),getCouponPlatformEnum()"
class="normalBtn" :value="$t('pub.addBtn')">
</li>
</ul>
......@@ -183,7 +183,7 @@
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top">
<el-button v-if="item.couponEffectStatus === 2 && item.couponStatus === 1" type="primary"
icon="el-icon-edit" circle
@click="outerVisible=true,dialogTitle=$t('pub.updateMsg'),updateData(item),getCompany()"></el-button>
@click="outerVisible=true,dialogTitle=$t('pub.updateMsg'),updateData(item),getCompany(),getCouponPlatformEnum()"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('active.cl_jyCoupon')" placement="top">
<el-button v-if="item.couponStatus !== 2" type="danger" icon="iconfont icon-jinyong" circle
......@@ -202,7 +202,7 @@
<el-button type="primary" icon="el-icon-edit" circle style="padding:6px;" @click="updateKucundialog=true">
</el-button>
</el-tooltip>
{{EditBtn}}
<el-tooltip class="item" effect="dark" content="修改" placement="top">
<el-button v-if="EditBtn" type="danger" icon="iconfont icon-xiugai" circle style="padding:4px;"
@click="outerVisible=true,EditItem(item)"></el-button>
......@@ -346,6 +346,26 @@
<el-input v-model="addMsg.remark" class="w217" :placeholder="$t('pub.pleaseImport')" />
</el-form-item>
</td>
<td>
<el-form-item label="使用平台" prop="OpenPlatformList">
<el-select filterable class="w217" :multiple="true" v-model="addMsg.openPlatformList" :placeholder="$t('system.ph_choice')">
<el-option :label="$t('system.ph_buxian')" :value="0" :key="0"></el-option>
<el-option v-for="item in CouponPlatformEnumList" :label="item.Name" :value="item.ID" :key="item.ID">
</el-option>
</el-select>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="是否自动发放" prop="OpenPlatformList">
<el-select filterable class="w217" v-model="addMsg.autoGrant" :placeholder="$t('system.ph_choice')">
<el-option label="不自动发放" :value="0" :key="0"></el-option>
<el-option label="完款后自动发放" :value="1" :key="1"></el-option>
</el-select>
</el-form-item>
</td>
</tr>
</table>
</el-form>
......@@ -457,6 +477,8 @@
couponStatus: 1,
redemptionPrice: '',
remark: "",
autoGrant:"",
openPlatformList:[],
},
pwdMsg: {
Id: "",
......@@ -471,6 +493,7 @@
DataList: [],
groupList: [],
layerCompanyList: [],
CouponPlatformEnumList: [],
companyList: [],
layerDepartMentList: [],
departMentList: [],
......@@ -492,6 +515,7 @@
this.GetAuth();
this.getList();
this.getCompany();
this.getCouponPlatformEnum();
this.getLineList();
},
filters: {},
......@@ -506,11 +530,12 @@
});
},
EditItem(item) {
console.log("item222",item);
this.addMsg = Object.assign({}, item);
},
//点击确定修改库存
sureUpdatekucun() {
this.apiJavaPost("/api/appActivity/updateCouponStock", this.upDateKcMsg, res => {
this.apipost("coupon_post_UpdateCouponCount", this.upDateKcMsg, res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.updateKucundialog = false;
......@@ -532,11 +557,23 @@
},
err => {}
);
},
getCouponPlatformEnum() {
this.apipost(
"coupon_post_GetCouponPlatformEnum",
this.getCompanyMsg,
res => {
if (res.data.resultCode == 1) {
this.CouponPlatformEnumList = res.data.data;
} else {}
},
err => {}
);
},
getList() {
//获取数据
this.loading = true
this.apiJavaPost("/api/sell/coupon/getCouponsList", this.msg, res => {
this.apipost("coupon_post_GetPageList", this.msg, res => {
if (res.data.resultCode === 1) {
this.total = res.data.data.count
this.DataList = res.data.data.pageData;
......@@ -570,7 +607,7 @@
return this.$message.error(this.$t('rule.yxjzrbxdyksshijian'))
}
this.isleaveBtn = false;
this.apiJavaPost("/api/sell/coupon/setCoupon", this.addMsg, res => {
this.apipost("coupon_post_SetCouponModel", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success(res.data.message);
this.outerVisible = false;
......@@ -609,6 +646,7 @@
},
// 修改
updateData(item) {
console.log("item",item)
this.getLineTeamList(item.lineId)
this.addMsg.couponsName = item.couponsName
this.addMsg.effectDate = item.effectDate
......@@ -627,7 +665,8 @@
this.addMsg.couponStatus = item.couponStatus
this.addMsg.redemptionPrice = item.redemptionPrice
this.addMsg.remark = item.remark
this.addMsg.autoGrant= item.autoGrant
this.addMsg.openPlatformList= item.openPlatformList
this.isleaveBtn = true;
},
// 删除
......@@ -646,7 +685,7 @@
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/sell/coupon/updateCouponStatus", {
this.apipost("coupon_post_Forbidden", {
couponId: item.id,
status: status,
}, res => {
......
......@@ -102,6 +102,14 @@
</el-date-picker>
</span>
</li>
<li>
<span>
<em>订单类型</em>
<el-select v-model="msg.OrderType" class="w200 HworkInput">
<el-option v-for="item in OrderTypeList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
</el-select>
</span>
</li>
<li >
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')"
@click="msg.pageIndex=1,currentPage=1,GetList();showWarningSearch=false" />
......@@ -264,6 +272,20 @@
}
});
},
GetOrderTypeEnumList() {
this.apipost("CarSingle_post_GetOrderTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.OrderTypeList = res.data.data;
let data = {
Name: "不限",
Id: "0",
};
this.OrderTypeList.unshift(data);
} else {
this.$message.error(res.data.message);
}
});
},
getEmployee() { //员工
this.apipost('admin_get_EmployeeGetList', this.employeeMsg, res => {
if(res.data.resultCode == 1) {
......@@ -404,7 +426,7 @@
if(this.Title!='销售'){
this.getEmployee()
}
this.GetOrderTypeEnumList()
this.Datelist = this.getyMDOne()
this.userInfo = this.getLocalStorage();
this.GetList();
......
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