Commit 4fbb39a2 authored by 黄奎's avatar 黄奎

页面修改

parent f1b67458
...@@ -15,16 +15,13 @@ ...@@ -15,16 +15,13 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="商品分类"> <el-form-item label="商品分类">
<template v-if=" <template v-if="addMsg.CategoryList && addMsg.CategoryList.length > 0">
addMsg.CategoryList && addMsg.CategoryList.length > 0
">
<el-tag type="warning" style="margin-right:10px;" @close="exitCheck(item, index)" <el-tag type="warning" style="margin-right:10px;" @close="exitCheck(item, index)"
v-for="(item, index) in addMsg.CategoryList" :key="index+'1'" closable>{{ item.CategoryName }} v-for="(item, index) in addMsg.CategoryList" :key="index+'1'" closable>{{ item.CategoryName }}
</el-tag> </el-tag>
</template> </template>
<el-button type="primary" @click=" <el-button type="primary" @click="(flDig = true), (keepCategoryList = addMsg.CategoryList)"
(flDig = true), (keepCategoryList = addMsg.CategoryList) style="margin:0 10px;" size="small">选择分类</el-button>
" style="margin:0 10px;" size="small">选择分类</el-button>
<span @click="CommonJump('addGoodsClass')" class="blue point">添加分类</span> <span @click="CommonJump('addGoodsClass')" class="blue point">添加分类</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -72,22 +69,17 @@ ...@@ -72,22 +69,17 @@
<draggable v-model="addMsg.CarouselImageList"> <draggable v-model="addMsg.CarouselImageList">
<div v-for="(item, index) in addMsg.CarouselImageList" :key="index+'2'" <div v-for="(item, index) in addMsg.CarouselImageList" :key="index+'2'"
style="margin-right: 20px; position: relative; "> style="margin-right: 20px; position: relative; ">
<div class="colapp-image" :style="{ <div class="colapp-image" :style="{backgroundImage: 'url(' + item.Path + ')'}"></div>
backgroundImage: 'url(' + item.Path + ')'
}"></div>
<el-button @click="ClearCarouse(index)" class="delBtn" type="danger" icon="el-icon-close" <el-button @click="ClearCarouse(index)" class="delBtn" type="danger" icon="el-icon-close"
circle></el-button> circle></el-button>
</div> </div>
</draggable> </draggable>
</div> </div>
<div @click="openChangeDig(1)" v-if="addMsg.CarouselImageList.length<9" <div @click="openChangeDig(1)" v-if="addMsg.CarouselImageList.length<9"
class="add-image-btn 2222"> class="add-image-btn 2222">
+ 添加图片 + 添加图片
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="商品视频"> <el-form-item label="商品视频">
<el-input v-model="addMsg.VideoAddress" size="small" placeholder="请输入内容"> <el-input v-model="addMsg.VideoAddress" size="small" placeholder="请输入内容">
...@@ -128,10 +120,9 @@ ...@@ -128,10 +120,9 @@
!addMsg.CustomShareImage || !addMsg.CustomShareImage ||
addMsg.CustomShareImage == '' addMsg.CustomShareImage == ''
" src="../../assets/img/default.png" style="width:80px;height:80px" alt="" /> " src="../../assets/img/default.png" style="width:80px;height:80px" alt="" />
<el-button @click="clearCustom" style="position: absolute;right: 6px;top: -10px;" v-if=" <el-button @click="clearCustom" style="position: absolute;right: 6px;top: -10px;"
addMsg.CustomShareImage && v-if="addMsg.CustomShareImage&&addMsg.CustomShareImage!= ''" size="mini" type="danger"
addMsg.CustomShareImage != '' icon="el-icon-close" circle></el-button>
" size="mini" type="danger" icon="el-icon-close" circle></el-button>
<img style="width:80px;height:80px" :src="addMsg.CustomShareImage" alt="" /> <img style="width:80px;height:80px" :src="addMsg.CustomShareImage" alt="" />
</div> </div>
<p style="margin-top:-15px" class="blue f12"> <p style="margin-top:-15px" class="blue f12">
...@@ -282,7 +273,6 @@ ...@@ -282,7 +273,6 @@
<div v-show="SpecificationPriceList.length > 0" style="width: 130%; margin-top: 24px;"> <div v-show="SpecificationPriceList.length > 0" style="width: 130%; margin-top: 24px;">
<div class="app-attr"> <div class="app-attr">
<div class="box"> <div class="box">
<!-- <el-checkbox v-model="val2">全选</el-checkbox> -->
<el-form-item label-width="90px" style="display:inline-block" label="批量设置"> <el-form-item label-width="90px" style="display:inline-block" label="批量设置">
<el-input style="width:100%" size="small" v-model="valpl" placeholder="请输入内容" <el-input style="width:100%" size="small" v-model="valpl" placeholder="请输入内容"
class="input-with-select"> class="input-with-select">
...@@ -399,7 +389,6 @@ ...@@ -399,7 +389,6 @@
" v-if="addMsg.IsDefaultService == 2" size="mini">新增服务</el-button> " v-if="addMsg.IsDefaultService == 2" size="mini">新增服务</el-button>
<el-checkbox v-model="addMsg.IsDefaultService" :true-label="1" :false-label="2">默认服务</el-checkbox> <el-checkbox v-model="addMsg.IsDefaultService" :true-label="1" :false-label="2">默认服务</el-checkbox>
</el-form-item> </el-form-item>
<!-- FreightId -->
<el-form-item label="运费设置"> <el-form-item label="运费设置">
<el-tooltip class="item" effect="dark" content="选择第一项(默认运费)将会根据运费管理的(默认运费)变化而变化" <el-tooltip class="item" effect="dark" content="选择第一项(默认运费)将会根据运费管理的(默认运费)变化而变化"
placement="top-start" style="position: absolute;left: -22px;top:12px"> placement="top-start" style="position: absolute;left: -22px;top:12px">
...@@ -746,10 +735,7 @@ ...@@ -746,10 +735,7 @@
<el-table-column :key="index3" :label="item.Name"> <el-table-column :key="index3" :label="item.Name">
<el-table-column width="100" v-if="butorInt > 0" label="一级分销"> <el-table-column width="100" v-if="butorInt > 0" label="一级分销">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model=" <el-input v-model="scope.row.GradeCommissionList[index3].OneCommission" size="small">
scope.row.GradeCommissionList[index3]
.OneCommission
" size="small">
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
...@@ -829,10 +815,7 @@ ...@@ -829,10 +815,7 @@
</div> </div>
<el-tag type="danger">如需设置多规格会员价,请先添加商品规格</el-tag> <el-tag type="danger">如需设置多规格会员价,请先添加商品规格</el-tag>
</el-form-item> </el-form-item>
<el-form-item v-if=" <el-form-item v-if="addMsg.SeparateSetMember==1&&SpecificationPriceList.length > 0" label="会员价设置">
addMsg.SeparateSetMember == 1 &&
SpecificationPriceList.length > 0
" label="会员价设置">
<div class="app-attr"> <div class="app-attr">
<div class="box"> <div class="box">
<el-form-item style="display:inline-block"> <el-form-item style="display:inline-block">
...@@ -875,7 +858,6 @@ ...@@ -875,7 +858,6 @@
</el-form> </el-form>
<div class="bottom-div" style="margin-top:20px"> <div class="bottom-div" style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button> <el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
<!-- <el-button size="small">预览</el-button> -->
</div> </div>
</div> </div>
<!-- 选择分类 --> <!-- 选择分类 -->
...@@ -904,10 +886,10 @@ ...@@ -904,10 +886,10 @@
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange"> <el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
<div v-for="(item, index) in childList2" :key="index+'20'" flex="dir:left box:first" class="cat-item"> <div v-for="(item, index) in childList2" :key="index+'20'" flex="dir:left box:first" class="cat-item">
<el-checkbox :label="item.Id"> <el-checkbox :label="item.Id">
<span style="display: none;">{{ item.Name }}</span> <span style="display: none;">{{item.Name}}</span>
</el-checkbox> </el-checkbox>
<div flex="box:last cross:center"> <div flex="box:last cross:center">
<span>{{ item.Name }}</span> <span>{{item.Name}}</span>
<i v-if="item.ChildList.length > 0" @click="getChild3(item.ChildList)" <i v-if="item.ChildList.length > 0" @click="getChild3(item.ChildList)"
class="el-icon-arrow-right"></i> class="el-icon-arrow-right"></i>
</div> </div>
...@@ -937,11 +919,8 @@ ...@@ -937,11 +919,8 @@
closable style="margin-right:5px">{{ item.Name }}</el-tag> closable style="margin-right:5px">{{ item.Name }}</el-tag>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click=" <el-button size="small" @click="(flDig = false), (addMsg.CategoryList = keepCategoryList),ExitCateList()">取 消
(flDig = false), </el-button>
(addMsg.CategoryList = keepCategoryList),
ExitCateList()
">取 消</el-button>
<el-button @click="(flDig = false), getSuggestPrice()" size="small" type="primary">确 定</el-button> <el-button @click="(flDig = false), getSuggestPrice()" size="small" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -979,7 +958,7 @@ ...@@ -979,7 +958,7 @@
<!-- 选择运费 --> <!-- 选择运费 -->
<el-dialog title="选择运费" top="2%" :visible.sync="chooseyfDig" width="30%"> <el-dialog title="选择运费" top="2%" :visible.sync="chooseyfDig" width="30%">
<div> <div>
<el-radio-group v-model="val"> <el-radio-group v-model="chooseFreight">
<el-radio @change="YfSelect" style="padding-bottom:10px" class="yfradio" <el-radio @change="YfSelect" style="padding-bottom:10px" class="yfradio"
:label="{ RulesName: '默认运费', ID: 0 }">默认运费 :label="{ RulesName: '默认运费', ID: 0 }">默认运费
</el-radio> </el-radio>
...@@ -995,7 +974,7 @@ ...@@ -995,7 +974,7 @@
<!-- 选择表单 --> <!-- 选择表单 -->
<el-dialog title="选择表单" top="2%" :visible.sync="choosebdDig" width="30%"> <el-dialog title="选择表单" top="2%" :visible.sync="choosebdDig" width="30%">
<div> <div>
<el-radio-group v-model="val1"> <el-radio-group v-model="chooseForm">
<el-radio @change="YfSelect1" style="padding-bottom:10px" class="yfradio" :label="{ Name: '默认运费', Id: 0 }"> <el-radio @change="YfSelect1" style="padding-bottom:10px" class="yfradio" :label="{ Name: '默认运费', Id: 0 }">
默认表单 默认表单
</el-radio> </el-radio>
...@@ -1010,7 +989,7 @@ ...@@ -1010,7 +989,7 @@
<el-dialog custom-class="regionDig" title="区域" :visible.sync="dialogFormVisible"> <el-dialog custom-class="regionDig" title="区域" :visible.sync="dialogFormVisible">
<region_Choice @event1="change($event)" :List="AreaList" ref="child"></region_Choice> <region_Choice @event1="change($event)" :List="AreaList" ref="child"></region_Choice>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="Addto">确 定</el-button> <el-button type="primary" size="small" @click="AddArea">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 选择规格模板 --> <!-- 选择规格模板 -->
...@@ -1068,8 +1047,7 @@ ...@@ -1068,8 +1047,7 @@
SpecificationValueList: [], SpecificationValueList: [],
speciDig: false, speciDig: false,
speciList: [], speciList: [],
val2: "", defaultMsg: "", //富文本编辑器(商品详情)
defaultMsg: "",
config: { config: {
initialFrameWidth: null, initialFrameWidth: null,
initialFrameHeight: 350 initialFrameHeight: 350
...@@ -1153,6 +1131,7 @@ ...@@ -1153,6 +1131,7 @@
StoresIds: '', //门店编号 StoresIds: '', //门店编号
IsChooseServicePerson: 0 //是否选择服务人员 0-不选 1选择 IsChooseServicePerson: 0 //是否选择服务人员 0-不选 1选择
}, },
//标签背景颜色
predefineColors: [ predefineColors: [
'#000000', '#000000',
'#FFFFFF', '#FFFFFF',
...@@ -1160,7 +1139,6 @@ ...@@ -1160,7 +1139,6 @@
'#FF4544', '#FF4544',
], ],
fenleiData: [], fenleiData: [],
checkList: [],
childList2: [], childList2: [],
childList3: [], childList3: [],
keepCategoryList: [], keepCategoryList: [],
...@@ -1205,11 +1183,11 @@ ...@@ -1205,11 +1183,11 @@
serviceList: [], serviceList: [],
checkService: [], checkService: [],
keepServiceList: [], keepServiceList: [],
keepFreightId: -1, ruleList: [], //运费规则列表
ruleList: [], chooseFreight: {}, //选择运费
val: {}, keepFreightId: -1, //运费默认值
val1: {}, chooseForm: {}, //表单选择
keepFormsId: -1, keepFormsId: -1, //表单默认值
AreaList: [], AreaList: [],
skuList: [], skuList: [],
GoodsId: "", GoodsId: "",
...@@ -1229,7 +1207,6 @@ ...@@ -1229,7 +1207,6 @@
pusetVal: "", pusetVal: "",
pusetList: [], pusetList: [],
ptinput: "", ptinput: "",
fxVal: "", fxVal: "",
gradeVal: "", gradeVal: "",
xxVal: "", xxVal: "",
...@@ -1265,7 +1242,6 @@ ...@@ -1265,7 +1242,6 @@
if (this.$route.query.FxState) { if (this.$route.query.FxState) {
this.FxState = this.$route.query.FxState; this.FxState = this.$route.query.FxState;
} }
this.getService(); this.getService();
this.getRule(); this.getRule();
this.getSpeciList(); this.getSpeciList();
...@@ -1525,19 +1501,18 @@ ...@@ -1525,19 +1501,18 @@
}; };
this.SpecificationList.push(obj); this.SpecificationList.push(obj);
}, },
// 添加规格值 //添加规格值
addGgz(item, index) { addGgz(item, index) {
let obj = { let obj = {
Id: 0, Id: 0,
Image: "", Image: "",
Name: "", Name: "",
// Sort: item.SpecificationValueList.length + 1
Sort: item.SpecificationValueList.length > 0 ? item.SpecificationValueList[item.SpecificationValueList Sort: item.SpecificationValueList.length > 0 ? item.SpecificationValueList[item.SpecificationValueList
.length - 1].Sort + 1 : item.SpecificationValueList.length + 1 .length - 1].Sort + 1 : item.SpecificationValueList.length + 1
}; };
this.SpecificationList[index].SpecificationValueList.push(obj); this.SpecificationList[index].SpecificationValueList.push(obj);
}, },
// 修改规格值 //修改规格值
ggzChange() { ggzChange() {
this.$forceUpdate(); this.$forceUpdate();
this.ComTreeList = []; this.ComTreeList = [];
...@@ -1545,12 +1520,6 @@ ...@@ -1545,12 +1520,6 @@
this.skuList = []; this.skuList = [];
this.getSkuData([], 0, this.SpecificationList); this.getSkuData([], 0, this.SpecificationList);
}, },
// 值
ggzChange2() {
// this.$forceUpdate();
// this.skuList = [];
// this.getSkuData([], 0, this.SpecificationValueList.);
},
chooseSpecificationValueList() { chooseSpecificationValueList() {
if (!this.SpecificationList) { if (!this.SpecificationList) {
this.SpecificationList = []; this.SpecificationList = [];
...@@ -1678,10 +1647,8 @@ ...@@ -1678,10 +1647,8 @@
calcdis(dislist) { calcdis(dislist) {
let memberListarray = JSON.parse(JSON.stringify(dislist)); let memberListarray = JSON.parse(JSON.stringify(dislist));
let ComTreeList = JSON.parse(JSON.stringify(this.ComTreeList)); let ComTreeList = JSON.parse(JSON.stringify(this.ComTreeList));
// this.ComTreeList=[];//无法添加 报错 暂时注释掉
for (let i = 0; i < dislist.length; i++) { for (let i = 0; i < dislist.length; i++) {
if (this.addMsg.SeparateDistributionType == 2 && this.ComTreeList.length > if (this.addMsg.SeparateDistributionType == 2 && this.ComTreeList.length > 0) {
0) { //this.ComTreeList.length为0 的时候 全部为空
if (i < ComTreeList.length) { if (i < ComTreeList.length) {
ComTreeList.forEach((val, z) => { ComTreeList.forEach((val, z) => {
if (val.SpecificationSort == dislist[i].SpecificationSort) { if (val.SpecificationSort == dislist[i].SpecificationSort) {
...@@ -1887,7 +1854,8 @@ ...@@ -1887,7 +1854,8 @@
this.$refs.child.Receive(this.AreaList); this.$refs.child.Receive(this.AreaList);
}, 1000); }, 1000);
}, },
Addto() { //添加区域
AddArea() {
this.addMsg.AreaList = []; this.addMsg.AreaList = [];
this.AreaList.forEach(item => { this.AreaList.forEach(item => {
let obj = { let obj = {
...@@ -2060,6 +2028,7 @@ ...@@ -2060,6 +2028,7 @@
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log("res.data.data", JSON.parse(JSON.stringify(res.data.data)));
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (!this.$route.query.GoodsId) { if (!this.$route.query.GoodsId) {
this.addMsg.Id = 0 this.addMsg.Id = 0
...@@ -2071,10 +2040,10 @@ ...@@ -2071,10 +2040,10 @@
this.BuyOrderNumState = false this.BuyOrderNumState = false
} }
this.initShareSettings(); this.initShareSettings();
if(this.addMsg.SpecificationPriceList){ if (this.addMsg.SpecificationPriceList) {
this.SpecificationPriceList = this.addMsg.SpecificationPriceList; this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
} }
if(this.addMsg.DistributionCommissionTreeList){ if (this.addMsg.DistributionCommissionTreeList) {
this.ComTreeList = this.addMsg.DistributionCommissionTreeList; this.ComTreeList = this.addMsg.DistributionCommissionTreeList;
} }
if (this.addMsg.SpecificationList) { if (this.addMsg.SpecificationList) {
...@@ -2094,7 +2063,7 @@ ...@@ -2094,7 +2063,7 @@
this.Stores = JSON.parse(this.addMsg.StoresIds); this.Stores = JSON.parse(this.addMsg.StoresIds);
} }
this.memberList2 = this.addMsg.MemberPriceTreeList; //this.memberList1 = this.addMsg.MemberPriceTreeList[0].GradePriceList;
this.thisType = 1; this.thisType = 1;
this.disList1 = []; this.disList1 = [];
let objNew = { let objNew = {
...@@ -2103,7 +2072,6 @@ ...@@ -2103,7 +2072,6 @@
}; };
this.disList1.push(objNew); this.disList1.push(objNew);
if (this.addMsg.GoodsDetails && this.addMsg.GoodsDetails != "") { if (this.addMsg.GoodsDetails && this.addMsg.GoodsDetails != "") {
// this.$refs.ue.SetVal(this.addMsg.GoodsDetails);
this.defaultMsg = this.addMsg.GoodsDetails; this.defaultMsg = this.addMsg.GoodsDetails;
} }
this.NewCategoryList = []; this.NewCategoryList = [];
...@@ -2113,21 +2081,17 @@ ...@@ -2113,21 +2081,17 @@
this.NewCategoryList.push(item.CategoryId); this.NewCategoryList.push(item.CategoryId);
}); });
} }
if (this.hpState == 1) { if (this.hpState == 1) {
this.addMsg.SeparateDistribution = 0; this.addMsg.SeparateDistribution = 0;
} }
if (this.addMsg.PresentFXGrade == 0) { if (this.addMsg.PresentFXGrade == 0) {
this.addMsg.PresentFXGrade = '' this.addMsg.PresentFXGrade = ''
} }
if (this.addMsg.MarketingLogo) { if (this.addMsg.MarketingLogo) {
try { try {
let MarketingLogo = JSON.parse(this.addMsg.MarketingLogo) let MarketingLogo = JSON.parse(this.addMsg.MarketingLogo)
let obj = MarketingLogo let obj = MarketingLogo
this.addMsg.MarketingLogo = obj this.addMsg.MarketingLogo = obj
} catch (err) { } catch (err) {
this.addMsg.MarketingLogo = { this.addMsg.MarketingLogo = {
iswords: 0, iswords: 0,
...@@ -2172,6 +2136,7 @@ ...@@ -2172,6 +2136,7 @@
}); });
} }
}, },
//获取运费规则列表
getRule() { getRule() {
let msg1 = { let msg1 = {
pageIndex: 1, pageIndex: 1,
...@@ -2301,8 +2266,8 @@ ...@@ -2301,8 +2266,8 @@
let List = []; let List = [];
data.forEach(x => { data.forEach(x => {
let obj = {}; let obj = {};
// if(x.IsGuest !=1){ //只显示vip
if (x.IsGuest == 3) { //只显示vip if (x.IsGuest == 3) {
let obj = x let obj = x
List.push(obj) List.push(obj)
} }
...@@ -2317,7 +2282,6 @@ ...@@ -2317,7 +2282,6 @@
GradeName: '' GradeName: ''
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if (res.data.data != null) { if (res.data.data != null) {
res.data.data.forEach(x => { res.data.data.forEach(x => {
if (x.Id == this.addMsg.PresentFXGrade) { if (x.Id == this.addMsg.PresentFXGrade) {
...@@ -2332,7 +2296,6 @@ ...@@ -2332,7 +2296,6 @@
} }
} }
}); });
}, },
changeVIP() { changeVIP() {
if (this.addMsg.PresentFXGrade == '' || this.addMsg.PresentFXGrade == 0) { if (this.addMsg.PresentFXGrade == '' || this.addMsg.PresentFXGrade == 0) {
...@@ -2349,7 +2312,7 @@ ...@@ -2349,7 +2312,7 @@
} }
this.getTree() this.getTree()
}, },
//获取门店编号 //获取门店列表
getStoreList() { getStoreList() {
this.apipost("/api/MContent/GetStoresList", {}, res => { this.apipost("/api/MContent/GetStoresList", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
......
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