Commit 06e9893f authored by 黄奎's avatar 黄奎

页面修改

parent 06bd1df3
......@@ -243,8 +243,8 @@
<div flex="dir:left">
<span class="box-grow-0" style="color:#606266">商品</span>
<div style="width: 100%;margin:0 10px">
<el-input placeholder="请输入限购数量" @keyup.native="checkInteger(addMsg,'Confine_Count','-')" v-model="addMsg.Confine_Count" size="small"
:disabled="addMsg.Confine_Count <=-1">
<el-input placeholder="请输入限购数量" @keyup.native="checkInteger(addMsg,'Confine_Count','-')"
v-model="addMsg.Confine_Count" size="small" :disabled="addMsg.Confine_Count <=-1">
<template slot="append"></template>
</el-input>
</div>
......@@ -255,7 +255,8 @@
<div flex="dir:left" style="margin-top: 10px;">
<span class="box-grow-0" style="color:#606266">订单</span>
<div style="width: 100%;margin:0 10px">
<el-input placeholder="请输入限购数量" @keyup.native="checkInteger(addMsg,'Confine_Order_Count','-')" v-model="addMsg.Confine_Order_Count" size="small"
<el-input placeholder="请输入限购数量" @keyup.native="checkInteger(addMsg,'Confine_Order_Count','-')"
v-model="addMsg.Confine_Order_Count" size="small"
:disabled="addMsg.Confine_Order_Count<=-1">
<template slot="append"></template>
</el-input>
......@@ -295,20 +296,20 @@
</el-switch>
</el-form-item>
<el-form-item v-if="addMsg.Is_Area_Limit == 1" label="允许购买区域">
<span v-if="addMsg.Area_limit.length == 0" @click="addArea" class="blue point">+添加地区</span>
<div v-if="addMsg.Area_limit.length > 0" style="border: 1px solid #EBEEF5;padding:20px"
<span v-if="addMsg.AreaList.length == 0" @click="addArea" class="blue point">+添加地区</span>
<div v-if="addMsg.AreaList.length > 0" style="border: 1px solid #EBEEF5;padding:20px"
flex="dir:left box:last">
<div>
<div flex="dir:left" style="flex-wrap: wrap; width: 90%;">
<span>区域:</span>
<el-tag v-for="item in addMsg.Area_limit" :key="item.Id" type="info" style="margin:5px">
<el-tag v-for="item in addMsg.AreaList" :key="item.Id" type="info" style="margin:5px">
{{ item.AreaName }}</el-tag>
</div>
</div>
<div>
<img @click="editQy" style="cursor:pointer;" src="../../assets/img/userman/edit.png" alt="" />
<img @click="(addMsg.Area_limit = []), (AreaList = [])" style="margin-left:15px;cursor:pointer;"
src="../../assets/img/userman/del.png" alt="" />
<img @click="(addMsg.AreaList = []), (ChooseAreaList = [])"
style="margin-left:15px;cursor:pointer;" src="../../assets/img/userman/del.png" alt="" />
</div>
</div>
</el-form-item>
......@@ -491,7 +492,7 @@
</el-dialog>
<!--区域-->
<el-dialog custom-class="regionDig" title="区域" :visible.sync="dialogFormVisible">
<regionChoice @event1="change($event)" :List="AreaList" ref="child"></regionChoice>
<regionChoice @event1="change($event)" :List="ChooseAreaList" ref="child"></regionChoice>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="Addto">确 定</el-button>
</div>
......@@ -550,7 +551,7 @@
Pieces: 0, //单品满件包邮
Forehead: 0, //单品满额包邮
Is_Area_Limit: 0, //区域购买
Area_limit: [], //购买区域
AreaList: [], //购买区域
Give_integral: 0, //积分赠送
Give_integral_type: 1, //积分赠送=>1固定值 2百分比
Is_forehead_integral: 0, //积分抵扣
......@@ -583,7 +584,7 @@
formName: '',
imgDialog: false,
//区域
AreaList:[],
ChooseAreaList: [],
dialogFormVisible: false,
rules: {
StartTime: [{
......@@ -646,7 +647,10 @@
this.addMsg.Pieces = Mydata.Pieces;
this.addMsg.Forehead = Mydata.Forehead;
this.addMsg.Is_Area_Limit = Mydata.Is_Area_Limit;
this.addMsg.Area_limit = Mydata.Area_limit;
if (Mydata.AreaList && Mydata.AreaList) {
this.addMsg.AreaList = Mydata.AreaList;
this.ChooseAreaList = Mydata.AreaList;
}
this.addMsg.Give_integral = Mydata.Give_integral;
this.addMsg.Give_integral_type = Mydata.Give_integral_type;
this.addMsg.Is_forehead_integral = Mydata.Is_forehead_integral;
......@@ -821,37 +825,36 @@
this.imgDialog = false;
},
//添加区域
addArea(){
addArea() {
this.dialogFormVisible = true;
this.AreaList = [];
this.addMsg.Area_limit = [];
this.ChooseAreaList = [];
this.addMsg.AreaList = [];
setTimeout(() => {
this.$refs.child.Receive(this.AreaList);
this.$refs.child.Receive(this.ChooseAreaList);
}, 1000);
},
//点击区域弹窗确定
Addto() {
this.addMsg.Area_limit = [];
this.AreaList.forEach(item => {
this.addMsg.AreaList = [];
this.ChooseAreaList.forEach(item => {
let obj = {
Id: item.RegionId,
AreaId: item.RegionId,
AreaName: item.RegionName
};
this.addMsg.Area_limit.push(obj);
this.addMsg.AreaList.push(obj);
});
this.dialogFormVisible = false;
},
change(data) {
this.AreaList = data;
this.ChooseAreaList = data;
},
editQy() {
this.dialogFormVisible = true;
setTimeout(() => {
this.$refs.child.Receive(this.AreaList);
this.$refs.child.Receive(this.ChooseAreaList);
}, 1000);
}
}
};
......
This diff is collapsed.
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