Commit 44a72cd2 authored by 黄奎's avatar 黄奎

新增字段

parent ffb61fa4
......@@ -46,7 +46,7 @@
<el-button @click="tableSet(4)" style="margin-left:10px;" size="mini">上架</el-button>
<el-button @click="tableSet(5)" style="margin-left:10px;" size="mini">下架</el-button>
<el-button @click="tableSet(6)" style="margin-left:10px;" size="mini">删除</el-button>
<el-button @click="plsetBtn" style="margin-left:10px;" size="mini">批量设置</el-button>
<el-button @click="plsetBtn" style="margin-left:10px;" size="mini" v-if="currentUserInfo.IsKorea==0">批量设置</el-button>
</div>
<el-table :data="tableData" v-loading="loading" border sortable='custom' @sort-change='getSort'
@selection-change="tableSelect" style="width: 100%;margin:20px 0">
......@@ -112,22 +112,23 @@
<div flex="dir:left" style="margin-top:5px;color:#F56C6C;font-size:12px;" v-if="scope.row.Remark">
<div style="width:38px;">备注:</div>
<el-tooltip class="item" effect="dark" :content="scope.row.Remark" placement="top">
<div class="vue-line-clamp" style="word-break: break-all; -webkit-line-clamp: 2;width:90%;margin-left:0;">
<div class="vue-line-clamp"
style="word-break: break-all; -webkit-line-clamp: 2;width:90%;margin-left:0;">
<span>{{scope.row.Remark}}</span>
</div>
</el-tooltip>
</div>
</template>
</el-table-column>
<el-table-column prop="SellingPrice" width="100" sortable label="售价">
<el-table-column prop="SellingPrice" width="100" sortable label="售价" v-if="currentUserInfo.IsKorea==0">
</el-table-column>
<el-table-column prop="InventoryNum" width="100" sortable label="库存">
<el-table-column prop="InventoryNum" width="100" sortable label="库存" v-if="currentUserInfo.IsKorea==0">
<template slot-scope="scope">
<span v-if="scope.row.InventoryNum==0" style="color:red">售罄</span>
<span v-else>{{scope.row.InventoryNum}}</span>
</template>
</el-table-column>
<el-table-column width="120">
<el-table-column width="120" v-if="currentUserInfo.IsKorea==0">
<template slot="header">
已出售量
<el-tooltip effect="dark" content="已出售量=实际销量+虚拟销量,按实际销量排序" placement="top">
......@@ -138,7 +139,7 @@
<span>{{scope.row.GoodsBuyNum}}+{{scope.row.SalesNum}}</span>
</template>
</el-table-column>
<el-table-column prop="UpdateDate" width="110" label="是否加入快速购买">
<el-table-column prop="UpdateDate" width="110" label="是否加入快速购买" v-if="currentUserInfo.IsKorea==0">
<template slot-scope="scope">
<el-switch @change="Edit(scope.row,10)" v-model="scope.row.IsQuickBuy" active-color="#409EFF"
:active-value="1" :inactive-value="0">
......@@ -425,10 +426,12 @@
BuyGoodsNumState: true,
BuyOrderNumState: true,
hpState: 0,
FxState: 0
FxState: 0,
currentUserInfo: {}, //当前用户
}
},
created() {
this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
this.getList();
this.getTree();
this.getRule();
......@@ -577,8 +580,7 @@
type: 'warning'
}).then(() => {
this.commonSet(msg);
}).catch(() => {
});
}).catch(() => {});
},
Edit(row, num) {
let addMsg = {
......@@ -676,8 +678,7 @@
},
null
);
}).catch(() => {
});
}).catch(() => {});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
......@@ -799,6 +800,7 @@
}
},
};
</script>
<style>
.plxg .spmy .el-form-item__label {
......
......@@ -16,7 +16,8 @@
<el-col :span="12">
<el-form-item label="上架版面">
<el-radio-group v-model="addMsg.GoodsPageType" @change="getGoodType(addMsg.GoodsPageType)">
<el-radio v-for="(item,index) in My_cateList" :key="index" :label="item.Id">{{item.Name}}</el-radio>
<el-radio v-for="(item,index) in My_cateList" :key="index" :label="item.Id">{{item.Name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
......@@ -24,9 +25,7 @@
<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>
......@@ -59,23 +58,22 @@
<el-input v-model="addMsg.Name" size="small" placeholder="请输入内容" maxlength="100" show-word-limit>
</el-input>
</el-form-item>
<el-form-item label="商品副标题">
<el-form-item :label="currentUserInfo.IsKorea==1?'卖点':'商品副标题'">
<el-input v-model="addMsg.SubName" size="small" placeholder="请输入内容" maxlength="100" show-word-limit>
</el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="addMsg.Remark" type="textarea" placeholder="请输入内容" maxlength="500" show-word-limit :rows="4">
<el-form-item label="备注" v-if="currentUserInfo.IsKorea==0">
<el-input v-model="addMsg.Remark" type="textarea" placeholder="请输入内容" maxlength="500"
show-word-limit :rows="4">
</el-input>
</el-form-item>
<el-form-item label="供应商" prop="SupplierId">
<el-form-item label="供应商" prop="SupplierId" v-if="currentUserInfo.IsKorea==0">
<el-select class="w150" style="margin-right: 10px;" v-model="SupplierId" size="small"
placeholder="请选择" @change='changeSupplier'>
<el-option v-for="item in options" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品轮播图(多张)">
<el-tooltip class="item" effect="dark" content="第一张图片为封面图" placement="top"
style="position: absolute;left: -22px;top:12px">
......@@ -84,20 +82,6 @@
<p style="color:#c9c9c9;margin-bottom: 12px;">
第一张图片为缩略图,其它图片为轮播图,建议像素750*750,最多支持上传9张
</p>
<!-- <div flex="dir:left">
<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>
<el-button @click="ClearCarouse(index)" class="delBtn" type="danger" icon="el-icon-close"
circle></el-button>
</div>
<div @click="openChangeDig(1)" class="add-image-btn 2222">
+ 添加图片
</div>
</div> -->
<div class="nav_Main">
<div class="nav_IconContent">
<draggable v-model="addMsg.CarouselImageList">
......@@ -110,24 +94,21 @@
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-form-item label="商品视频" v-if="currentUserInfo.IsKorea==0">
<el-input v-model="addMsg.VideoAddress" size="small" placeholder="请输入内容">
<el-button @click="changeState1 = true" slot="append">添加视频</el-button>
</el-input>
<a v-if="addMsg.VideoAddress != ''" class="blue noline" :href="addMsg.VideoAddress"
target="_blank">视频链接</a>
</el-form-item>
<el-form-item label="视频填充方式">
<el-form-item label="视频填充方式" v-if="currentUserInfo.IsKorea==0">
<el-tooltip class="item" effect="dark" content="建议横屏使用默认,竖屏使用填充" placement="top"
style="position: absolute;left: -22px;top:12px">
<i class="el-tooltip el-icon-info"></i>
......@@ -169,7 +150,7 @@
<span class="point" @click="imgDig = true">查看图例</span>
</p>
</el-form-item>
<el-form-item label="直播商品">
<el-form-item label="直播商品" v-if="currentUserInfo.IsKorea==0">
<el-switch v-model="addMsg.IsLiveGoods" active-color="#409EFF" :active-value="1"
:inactive-value="2">
</el-switch>
......@@ -179,9 +160,8 @@
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="是否可开发票" v-if="isShowTax">
<el-switch v-model="addMsg.IsNoTax" active-color="#409EFF" :active-value="0"
:inactive-value="1">
<el-form-item label="是否可开发票" v-if="isShowTax" >
<el-switch v-model="addMsg.IsNoTax" active-color="#409EFF" :active-value="0" :inactive-value="1">
</el-switch>
</el-form-item>
<el-form-item label="自动上架时间">
......@@ -197,7 +177,7 @@
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never">
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea==0">
<div slot="header" class="clearfix">
<span>价格库存</span>
</div>
......@@ -418,15 +398,15 @@
</el-input>
</el-form-item>
<el-form-item label="商品重量">
<el-input v-model="addMsg.GoodsWeight" @keyup.native="checkInteger(addMsg,'GoodsWeight')" min="1" size="small" placeholder="请输入内容"
class="input-with-select">
<el-input v-model="addMsg.GoodsWeight" @keyup.native="checkInteger(addMsg,'GoodsWeight')" min="1"
size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never">
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea==0">
<div slot="header" class="clearfix">
<span>商品服务</span>
</div>
......@@ -447,7 +427,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">
......@@ -544,7 +523,7 @@
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never">
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea==0">
<div slot="header" class="clearfix">
<span>营销设置</span>
</div>
......@@ -916,7 +895,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>
<!-- 选择分类 -->
......@@ -1195,9 +1173,13 @@
DownDate: '', //自动下架时间
SendArea: '', //发货仓库
VideoType: 1, //视频填充方式(0默认,1-填充)
GoodsPageType:0, //分类 0全部 1商城 2校园
Remark:'', //备注
IsNoTax:0 //是否可开发票 0是 1否
GoodsPageType: 0, //分类 0全部 1商城 2校园
Remark: '', //备注
IsNoTax: 0, //是否可开发票 0是 1否
GoodsCountry: "", //商品国家
FatCode: "", //海关代码/关税率
GoodsUrl: "", //商品官网
IsKorea:0,//是否为韩国馆
},
predefineColors: [
'#000000',
......@@ -1302,9 +1284,10 @@
options: [],
FXlevelList: [],
giveDate: false,
My_cateList:[], //分类类型
isShowPlat:true, //是否显示上架版面和分类
isShowTax:false //赞羊显示是否可开发票
My_cateList: [], //分类类型
isShowPlat: true, //是否显示上架版面和分类
isShowTax: false, //赞羊显示是否可开发票
currentUserInfo: {},//当前登录用户
};
},
created() {
......@@ -1314,7 +1297,8 @@
if (this.$route.query.FxState) {
this.FxState = this.$route.query.FxState;
}
this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
this.addMsg.IsKorea=this.currentUserInfo.IsKorea;
this.getService();
this.getRule();
this.getSpeciList();
......@@ -1329,25 +1313,24 @@
if (this.$route.query.GoodsId) {
this.GoodsId = this.$route.query.GoodsId;
this.getData();
}else{
} else {
this.getTree();
}
let mall_userInfo = JSON.parse(localStorage.mall_userInfo);
if(mall_userInfo.IsOpenSchool==0){
this.isShowPlat=false
}else{
this.isShowPlat=true;
if (this.currentUserInfo.IsOpenSchool == 0) {
this.isShowPlat = false
} else {
this.isShowPlat = true;
}
if(mall_userInfo.TenantId==1&&mall_userInfo.MallBaseId==1){
this.isShowTax=true;
}else{
this.isShowTax=false;
if (this.currentUserInfo.TenantId == 1 && this.currentUserInfo.MallBaseId == 1) {
this.isShowTax = true;
} else {
this.isShowTax = false;
}
},
methods: {
initShareSettings() {
let arr = [];
if(this.addMsg.CategoryList){
if (this.addMsg.CategoryList) {
this.addMsg.CategoryList.forEach(item => {
item.Name = item.CategoryName;
arr.push(item.CategoryId);
......@@ -1592,7 +1575,6 @@
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
};
......@@ -1607,11 +1589,7 @@
this.getSkuData([], 0, this.SpecificationList);
},
// 值
ggzChange2() {
// this.$forceUpdate();
// this.skuList = [];
// this.getSkuData([], 0, this.SpecificationValueList.);
},
ggzChange2() {},
chooseSpecificationValueList() {
if (!this.SpecificationList) {
this.SpecificationList = [];
......@@ -1777,29 +1755,6 @@
}
}
}
//以前的逻辑 暂时保留 6.22
// dislist.forEach(item => {
// item.GradeCommissionList = [];
// // for (let i = 0; i < this.DropdownList.length; i++) {
// // let obj = {
// // SpecificationSort:item.SpecificationSort,
// // DistributorGrade: this.DropdownList[i].Id,
// // OneCommission: 0,
// // TwoCommission: 0,
// // ThreeCommission: 0,
// // Name: item.Name
// // };
// // item.GradeCommissionList.push(obj);
// ComTreeList.forEach(val=>{
//
// // if(val.SpecificationSort==item.SpecificationSort){
// // item.GradeCommissionList=[];
// // item.GradeCommissionList=val.GradeCommissionList;
// // }
// })
//
// // }
// });
for (let i = 0; i < memberListarray.length; i++) {
memberListarray[i].GradePriceList = [];
if (this.addMsg.EnjoyMember == 1 && this.memberList2.length > 0) {
......@@ -1863,7 +1818,7 @@
if (this.SpecificationList.length == 0) {
this.addMsg.IsCustomSpecification = 2;
}
if (this.addMsg.IsCustomSpecification != 1 && this.SpecificationList.length == 0) {
if (this.addMsg.IsKorea==0 && this.addMsg.IsCustomSpecification != 1 && this.SpecificationList.length == 0) {
this.Error("请选择规格项目!");
return
}
......@@ -1884,8 +1839,8 @@
this.addMsg.MemberPriceList = this.memberList2;
this.addMsg.MemberPriceTreeList = this.memberList2;
}
let mall_userInfo = JSON.parse(localStorage.mall_userInfo)
if (mall_userInfo.TenantId == 1 && mall_userInfo.MallBaseId == 1 && this.SupplierId == '') {
if (this.addMsg.IsKorea==0 && this.currentUserInfo.TenantId == 1 &&this.currentUserInfo.MallBaseId == 1 && this.SupplierId == '') {
this.Error("请选择供应商!");
return
} else {
......@@ -2003,10 +1958,10 @@
},
YfSelect1(val) {
this.addMsg.FormsId = val;
if(this.addMsg.FormsId ==0){
if (this.addMsg.FormsId == 0) {
this.addMsg.FormsName = '默认商城'
}else if(this.addMsg.FormsId ==1){
this.addMsg.FormsName='教育表单'
} else if (this.addMsg.FormsId == 1) {
this.addMsg.FormsName = '教育表单'
}
this.$forceUpdate()
......@@ -2129,7 +2084,7 @@
ParentId: 0,
Enabled: 1,
IsShow: 1,
CategoryPageType:this.addMsg.GoodsPageType
CategoryPageType: this.addMsg.GoodsPageType
};
this.apipost("/api/product/GetProductCategoryTreeList", msg1, res => {
if (res.data.resultCode == 1) {
......@@ -2187,10 +2142,10 @@
}
}
this.val1 = this.addMsg.FormsId
if(this.addMsg.FormsId == -1 || this.addMsg.FormsId == 0){
this.addMsg.FormsName='默认商城'
}else if(this.addMsg.FormsId == 1){
this.addMsg.FormsName='教育表单'
if (this.addMsg.FormsId == -1 || this.addMsg.FormsId == 0) {
this.addMsg.FormsName = '默认商城'
} else if (this.addMsg.FormsId == 1) {
this.addMsg.FormsName = '教育表单'
}
this.memberList2 = this.addMsg.MemberPriceTreeList;
this.thisType = 1;
......@@ -2459,19 +2414,19 @@
// })
},
//获取上架版面下拉
getCateList(){
getCateList() {
this.apipost("/api/Product/GoodsPageTypeEnumList", {}, res => {
if (res.data.resultCode == 1) {
this.My_cateList=res.data.data;
}else{
this.My_cateList = res.data.data;
} else {
this.Error(res.data.message);
}
});
},
//选择上架版面
getGoodType(num){
if(num!=0){
this.addMsg.CategoryList=[];
getGoodType(num) {
if (num != 0) {
this.addMsg.CategoryList = [];
}
this.getTree()
}
......
......@@ -622,6 +622,7 @@
userInfo.MallBaseId = item.MallBaseId;
userInfo.MallName = item.MallName;
userInfo.IsOpenSchool=item.IsOpenSchool;
userInfo.IsKorea=item.IsKorea;
localStorage.mall_userInfo = JSON.stringify(userInfo);
},
//修改密码
......
......@@ -424,11 +424,6 @@
<el-switch :active-value="1" :inactive-value="0" v-model="msg.ListName">
</el-switch>
</div>
<div class="left_box ">
<span style="margin-right: 10px">商品价格</span>
<el-switch :active-value="1" :inactive-value="0" v-model="msg.IsShowPrice">
</el-switch>
</div>
</div>
<div class="right-setting-menu">
<div class="item-img">
......@@ -900,7 +895,6 @@
ListShopCar: 0,
ListBuyCount: 1,
ListName: 1,
IsShowPrice:1,//是否显示商品价格
DetailsComment: 1,
DetailsLineationPrice: 1,
DetailsMemberPrice: 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