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

页面修改

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