Commit 3aed8cd8 authored by zhengke's avatar zhengke

修改

parent ab8989f2
......@@ -50,7 +50,7 @@
<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="商品副标题">
<el-input v-model="addMsg.SubName" size="small" placeholder="请输入内容" maxlength="100" show-word-limit>
</el-input>
</el-form-item>
......@@ -99,7 +99,8 @@
</div>
<div @click="openChangeDig(1)" v-if="addMsg.CarouselImageList.length<9" class="add-image-btn 2222">
<div @click="openChangeDig(1)" v-if="addMsg.CarouselImageList.length<9"
class="add-image-btn 2222">
+ 添加图片
</div>
</div>
......@@ -154,6 +155,16 @@
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="自动上架时间" style="display:none;">
<el-date-picker size="small" v-model="addMsg.ShelvesDate" default-time="12:00:00" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="自动下架时间" style="display:none;">
<el-date-picker size="small" v-model="addMsg.DownDate" default-time="12:00:00" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-card>
......@@ -204,7 +215,8 @@
</el-form-item>
<!-- 判断是开启了粉象返佣 -->
<el-form-item label="返佣总金额" prop="Commission" v-if="FxState==1">
<el-input v-model="addMsg.Commission" @keyup.native="checkPrice(addMsg,'Commission')" size="small" placeholder="请输入内容" class="input-with-select">
<el-input v-model="addMsg.Commission" @keyup.native="checkPrice(addMsg,'Commission')" size="small"
placeholder="请输入内容" class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
......@@ -335,27 +347,32 @@
</template>
<el-table-column :render-header="renderHeader" label="价格">
<template slot-scope="scope">
<el-input v-model="scope.row.SellingPrice" @keyup.native="checkPrice(scope.row,'SellingPrice')" size="small"></el-input>
<el-input v-model="scope.row.SellingPrice"
@keyup.native="checkPrice(scope.row,'SellingPrice')" size="small"></el-input>
</template>
</el-table-column>
<el-table-column :render-header="renderHeader" label="库存">
<template slot-scope="scope">
<el-input v-model="scope.row.InventoryNum" @keyup.native="checkPrice(scope.row,'InventoryNum')" size="small"></el-input>
<el-input v-model="scope.row.InventoryNum"
@keyup.native="checkPrice(scope.row,'InventoryNum')" size="small"></el-input>
</template>
</el-table-column>
<el-table-column :render-header="renderHeader" label="成本价" width="90">
<template slot-scope="scope">
<el-input v-model="scope.row.CostMoney" @keyup.native="checkPrice(scope.row,'CostMoney')" size="small"></el-input>
<el-input v-model="scope.row.CostMoney" @keyup.native="checkPrice(scope.row,'CostMoney')"
size="small"></el-input>
</template>
</el-table-column>
<el-table-column :render-header="renderHeader" v-if="FxState==1" width="120" label="返佣总金额">
<template slot-scope="scope">
<el-input v-model="scope.row.Commission" @keyup.native="checkPrice(scope.row,'Commission')" size="small"></el-input>
<el-input v-model="scope.row.Commission"
@keyup.native="checkPrice(scope.row,'Commission')" size="small"></el-input>
</template>
</el-table-column>
<el-table-column label="重量(克)" width="90">
<template slot-scope="scope">
<el-input v-model="scope.row.GoodsWeight" @keyup.native="checkPrice(scope.row,'GoodsWeight')" size="small"></el-input>
<el-input v-model="scope.row.GoodsWeight"
@keyup.native="checkPrice(scope.row,'GoodsWeight')" size="small"></el-input>
</template>
</el-table-column>
<el-table-column prop="address" label="货号">
......@@ -514,8 +531,8 @@
</div>
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="addMsg.IntegralPresent" style="width:100%;margin-left:15px" type="number"
min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-input v-model="addMsg.IntegralPresent" style="width:100%;margin-left:15px" type="number" min="1"
size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">
<el-radio v-model="addMsg.IntegralPresentType" :label="2">固定值</el-radio>
......@@ -528,8 +545,8 @@
placement="top" style="position: absolute;left: -10px;top:12px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="addMsg.PointsDeduction" style="width:100%;margin-left:15px" type="number"
min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-input v-model="addMsg.PointsDeduction" style="width:100%;margin-left:15px" type="number" min="1"
size="small" placeholder="请输入内容" class="input-with-select">
<template slot="prepend">最多抵扣</template>
<el-button slot="append">
......@@ -543,15 +560,15 @@
</el-checkbox>
</el-form-item>
<el-form-item label="商品赠送VIP" v-if="FxState==1">
<el-select class="w150" style="margin-left:15px" v-model="addMsg.PresentFXGrade" size="small" clearable
placeholder="请选择" @change='changeVIP'>
<el-select class="w150" style="margin-left:15px" v-model="addMsg.PresentFXGrade" size="small"
clearable placeholder="请选择" @change='changeVIP'>
<el-option v-for="item in FXlevelList" :key="item.Id" :label="item.GradeName" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="赠送日期" v-if="FxState==1 && giveDate==true">
<el-input v-model="addMsg.PresentFXMonth" style="width:100%;margin-left:15px" type="number"
min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-input v-model="addMsg.PresentFXMonth" style="width:100%;margin-left:15px" type="number" min="1"
size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">
......@@ -568,24 +585,18 @@
<el-radio v-model="addMsg.MarketingLogo.iswords" :label="2">图片模式</el-radio>
<el-radio v-model="addMsg.MarketingLogo.iswords" :label="0">无模式</el-radio>
</el-form-item>
<el-form-item label="标签文字" v-if="addMsg.MarketingLogo.iswords==1" >
<el-input v-model="addMsg.MarketingLogo.words" style="width:100%;margin-left:15px"
size="small" placeholder="请输入内容" class="input-with-select" maxlength='10' show-word-limit></el-input>
<el-form-item label="标签文字" v-if="addMsg.MarketingLogo.iswords==1">
<el-input v-model="addMsg.MarketingLogo.words" style="width:100%;margin-left:15px" size="small"
placeholder="请输入内容" class="input-with-select" maxlength='10' show-word-limit></el-input>
</el-form-item>
<el-form-item label="标签字体颜色" v-if="addMsg.MarketingLogo.iswords==1">
<el-color-picker
style="width:100%;margin-left:15px"
v-model="addMsg.MarketingLogo.wordsColor"
show-alpha
:predefine="predefineColors">
<el-color-picker style="width:100%;margin-left:15px" v-model="addMsg.MarketingLogo.wordsColor"
show-alpha :predefine="predefineColors">
</el-color-picker>
</el-form-item>
<el-form-item label="标签背景颜色" v-if="addMsg.MarketingLogo.iswords==1">
<el-color-picker
style="width:100%;margin-left:15px"
v-model="addMsg.MarketingLogo.wordsBack"
show-alpha
:predefine="predefineColors">
<el-color-picker style="width:100%;margin-left:15px" v-model="addMsg.MarketingLogo.wordsBack"
show-alpha :predefine="predefineColors">
</el-color-picker>
</el-form-item>
<el-form-item class="commonLabel discount" label="标签图片" v-if="addMsg.MarketingLogo.iswords==2">
......@@ -597,7 +608,8 @@
!addMsg.MarketingLogo.ico ||
addMsg.MarketingLogo.ico == ''
" src="../../assets/img/default.png" style="width:80px;height:80px" alt="" />
<el-button @click="addMsg.MarketingLogo.ico = ''" style="position: absolute;right: 6px;top: -10px;" v-if="
<el-button @click="addMsg.MarketingLogo.ico = ''"
style="position: absolute;right: 6px;top: -10px;" v-if="
addMsg.MarketingLogo.ico &&
addMsg.MarketingLogo.ico != ''
" size="mini" type="danger" icon="el-icon-close" circle></el-button>
......@@ -1090,7 +1102,7 @@
CustomShareTitles: "",
CustomShareImage: "",
CustomShareImagePath: "",
IsLiveGoods:2, //直播商品
IsLiveGoods: 2, //直播商品
GoodsStatus: 0,
InventoryNum: 0,
DefaultSpecificationName: "",
......@@ -1131,12 +1143,20 @@
FullMoneyPinkage: 0,
SupplierId: '',
Sort: 0,
Commission:0,
PresentFXGrade:'',
PresentFXMonth:0,
Advertising:'',
SubName:'',
MarketingLogo:{iswords:0,words:"",wordsColor:"",wordsBack:"",ico:""}
Commission: 0,
PresentFXGrade: '',
PresentFXMonth: 0,
Advertising: '',
SubName: '',
MarketingLogo: {
iswords: 0,
words: "",
wordsColor: "",
wordsBack: "",
ico: ""
},
ShelvesDate: '', //自动上架时间
DownDate: '', //自动下架时间
},
predefineColors: [
'#000000',
......@@ -1234,13 +1254,13 @@
imgListIndex2: 0,
NewCategoryList: [],
hpState: 0,
FxState:0,
FxState: 0,
SuggestPriceInfo: {},
shareSettings: [],
companyCommission: 0,
options: [],
FXlevelList:[],
giveDate:false,
FXlevelList: [],
giveDate: false,
};
},
created() {
......@@ -1314,10 +1334,10 @@
}
},
HpChange() {
if(this.FxState==1){
if (this.FxState == 1) {
this.Error("已开启粉象分销,请在粉象分销里面配置!");
this.addMsg.SeparateDistribution = 0;
} else if(this.hpState == 1){
} else if (this.hpState == 1) {
this.Error("已开启和平分销,请在和平分销里面配置!");
this.addMsg.SeparateDistribution = 0;
}
......@@ -1433,10 +1453,10 @@
if (this.ggpl == 4) {
item.GoodsNumbers = this.valpl;
}
if(this.ggpl == 5){
if (this.ggpl == 5) {
item.CostMoney = this.valpl;
}
if(this.ggpl == 6){
if (this.ggpl == 6) {
item.Commission = this.valpl;
}
}
......@@ -1762,7 +1782,7 @@
if (valid) {
let content = this.$refs.ue.getUEContent();
this.addMsg.GoodsDetails = content;
if(this.addMsg.CategoryList.length==0){
if (this.addMsg.CategoryList.length == 0) {
this.Error('请选择商品分类');
return false
}
......@@ -1772,7 +1792,7 @@
if (this.SpecificationList.length == 0) {
this.addMsg.IsCustomSpecification = 2;
}
if(this.addMsg.IsCustomSpecification != 1 && this.SpecificationList.length==0){
if (this.addMsg.IsCustomSpecification != 1 && this.SpecificationList.length == 0) {
this.Error("请选择规格项目!");
return
}
......@@ -1794,48 +1814,54 @@
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 (mall_userInfo.TenantId == 1 && mall_userInfo.MallBaseId == 1 && this.SupplierId == '') {
this.Error("请选择供应商!");
return
}else{
} else {
this.addMsg.SupplierId = this.SupplierId != '' ? this.SupplierId : 0;
}
this.addMsg.SpecificationPriceList = this.SpecificationPriceList;
this.addMsg.SpecificationList = this.SpecificationList;
for(var i=0;i<this.addMsg.SpecificationPriceList.length;i++){
if(this.addMsg.SpecificationPriceList[i].SellingPrice===''){
this.Error('请输入商品规格第'+(i+1)+'行价格');
for (var i = 0; i < this.addMsg.SpecificationPriceList.length; i++) {
if (this.addMsg.SpecificationPriceList[i].SellingPrice === '') {
this.Error('请输入商品规格第' + (i + 1) + '行价格');
return
}
if(this.addMsg.SpecificationPriceList[i].InventoryNum===''){
this.Error('请输入商品规格第'+(i+1)+'行库存');
if (this.addMsg.SpecificationPriceList[i].InventoryNum === '') {
this.Error('请输入商品规格第' + (i + 1) + '行库存');
return
}
if(this.addMsg.SpecificationPriceList[i].CostMoney===''){
this.Error('请输入商品规格第'+(i+1)+'行成本价');
if (this.addMsg.SpecificationPriceList[i].CostMoney === '') {
this.Error('请输入商品规格第' + (i + 1) + '行成本价');
return
}
if(this.FxState==1){
if(this.addMsg.SpecificationPriceList[i].Commission===''){
this.Error('请输入商品规格第'+(i+1)+'行返佣总金额');
if (this.FxState == 1) {
if (this.addMsg.SpecificationPriceList[i].Commission === '') {
this.Error('请输入商品规格第' + (i + 1) + '行返佣总金额');
return
}
}
}
if(this.addMsg.PresentFXGrade==''){//没选择的时候默认为0
this.addMsg.PresentFXGrade=0
if (this.addMsg.PresentFXGrade == '') { //没选择的时候默认为0
this.addMsg.PresentFXGrade = 0
}
//标签的判断和处理
if(this.addMsg.MarketingLogo.iswords==0){
this.addMsg.MarketingLogo = {iswords:0,words:"",wordsColor:"",wordsBack:"",ico:""}
}else if(this.addMsg.MarketingLogo.iswords==1){
this.addMsg.MarketingLogo.ico= ''
}else if(this.addMsg.MarketingLogo.iswords==2){
this.addMsg.MarketingLogo.words= '';
this.addMsg.MarketingLogo.wordsColor= '';
this.addMsg.MarketingLogo.wordsBack= '';
}
this.addMsg.MarketingLogo = JSON.stringify( this.addMsg.MarketingLogo)
if (this.addMsg.MarketingLogo.iswords == 0) {
this.addMsg.MarketingLogo = {
iswords: 0,
words: "",
wordsColor: "",
wordsBack: "",
ico: ""
}
} else if (this.addMsg.MarketingLogo.iswords == 1) {
this.addMsg.MarketingLogo.ico = ''
} else if (this.addMsg.MarketingLogo.iswords == 2) {
this.addMsg.MarketingLogo.words = '';
this.addMsg.MarketingLogo.wordsColor = '';
this.addMsg.MarketingLogo.wordsBack = '';
}
this.addMsg.MarketingLogo = JSON.stringify(this.addMsg.MarketingLogo)
this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
......@@ -1966,7 +1992,7 @@
imgListIndex2
].Image = that.getIconLink(msg[0].url);
}
if(this.imgType == 4){
if (this.imgType == 4) {
that.addMsg.MarketingLogo.ico = that.getIconLink(msg[0].url)
}
}
......@@ -2042,7 +2068,7 @@
}
});
},
getcode(){//编码获取详情
getcode() { //编码获取详情
this.GoodsId = this.addMsg.Id;
this.getData()
......@@ -2053,14 +2079,14 @@
GoodsId: this.GoodsId
},
res => {
if(res.data.resultCode == 1){
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
if (this.addMsg.SupplierId != 0) {
this.SupplierId = this.addMsg.SupplierId;
}
if (!this.$route.query.GoodsId) {
this.addMsg.Id=0
this.addMsg.Id = 0
}
if (this.addMsg.LimitBuyGoodsNum != -1) {
this.BuyGoodsNumState = false
......@@ -2072,7 +2098,7 @@
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
this.ComTreeList = this.addMsg.DistributionCommissionTreeList;
this.SpecificationList = this.addMsg.SpecificationList;
if(this.SpecificationList.length>0){ //根据编码来的详情 重新调用这个方法 否则分销详情设置没有数据
if (this.SpecificationList.length > 0) { //根据编码来的详情 重新调用这个方法 否则分销详情设置没有数据
this.getDistributor()
}
if (this.addMsg.SeparateDistributionType == 1) {
......@@ -2091,7 +2117,7 @@
this.disList1.push(objNew);
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.addMsg.CategoryList.forEach(item => {
......@@ -2101,12 +2127,18 @@
if (this.hpState == 1) {
this.addMsg.SeparateDistribution = 0;
}
if(this.addMsg.PresentFXGrade==0){
this.addMsg.PresentFXGrade=''
if (this.addMsg.PresentFXGrade == 0) {
this.addMsg.PresentFXGrade = ''
}
if( this.addMsg.MarketingLogo==null){
this.addMsg.MarketingLogo ={iswords:0,words:"",wordsColor:"",wordsBack:"",ico:""}
}else{
if (this.addMsg.MarketingLogo == null) {
this.addMsg.MarketingLogo = {
iswords: 0,
words: "",
wordsColor: "",
wordsBack: "",
ico: ""
}
} else {
this.addMsg.MarketingLogo = JSON.parse(this.addMsg.MarketingLogo)
}
this.getSuggestPrice();
......@@ -2264,17 +2296,19 @@
}
});
},
getFXDGradeList(){
this.apipost("/api/user/GetFXDistributorGradeList", {GradeName:''}, res => {
getFXDGradeList() {
this.apipost("/api/user/GetFXDistributorGradeList", {
GradeName: ''
}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
if(res.data.data!=null){
if (res.data.data != null) {
let data = res.data.data;
let List =[];
data.forEach(x=>{
let obj={};
let List = [];
data.forEach(x => {
let obj = {};
// if(x.IsGuest !=1){
if(x.IsGuest ==3){//只显示vip
if (x.IsGuest == 3) { //只显示vip
let obj = x
List.push(obj)
}
......@@ -2284,19 +2318,21 @@
}
});
},
getFXDGradeList2(){
getFXDGradeList2() {
this.apipost("/api/user/GetFXDistributorGradeList", {GradeName:''}, res => {
this.apipost("/api/user/GetFXDistributorGradeList", {
GradeName: ''
}, res => {
if (res.data.resultCode == 1) {
if(res.data.data!=null){
res.data.data.forEach(x=>{
if(x.Id== this.addMsg.PresentFXGrade){
if(x.IsGuest==3){
this.giveDate=true;
}else{
this.giveDate=false;
this.addMsg.PresentFXMonth=0;
if (res.data.data != null) {
res.data.data.forEach(x => {
if (x.Id == this.addMsg.PresentFXGrade) {
if (x.IsGuest == 3) {
this.giveDate = true;
} else {
this.giveDate = false;
this.addMsg.PresentFXMonth = 0;
}
}
})
......@@ -2305,12 +2341,12 @@
});
},
changeVIP(){
if(this.addMsg.PresentFXGrade=='' || this.addMsg.PresentFXGrade==0){
this.giveDate=false;
this.addMsg.PresentFXMonth=0
}else{
this.giveDate=true;
changeVIP() {
if (this.addMsg.PresentFXGrade == '' || this.addMsg.PresentFXGrade == 0) {
this.giveDate = false;
this.addMsg.PresentFXMonth = 0
} else {
this.giveDate = true;
}
// this.FXlevelList.forEach(x=>{
// if(x.Id== this.addMsg.PresentFXGrade){
......@@ -2326,6 +2362,7 @@
}
}
};
</script>
<style>
.app-attr-group .close {
......@@ -2564,24 +2601,29 @@
margin: 20px 0;
font-size: 12px;
}
@media (max-width:1920px) and (min-width:1300px) {
.goodsListEdit .el-col-12 {
width: 50%;
}
}
@media (max-width:1910px) and (min-width:1200px) {
.goodsListEdit .el-col-12 {
width: 66.66667%;
}
}
@media (max-width:1199px) and (min-width:200px) {
.goodsListEdit .el-col-12 {
width: 80%;
}
}
.edui1_imagescale img{
.edui1_imagescale img {
max-width: 100%;
}
.goodsListEdit .nav_Main {
display: flex;
flex-wrap: wrap;
......@@ -2593,7 +2635,9 @@
flex-wrap: wrap;
justify-content: flex-start;
}
.goodsListEdit .nav_IconContent div>div{
.goodsListEdit .nav_IconContent div>div {
display: inline-block;
}
</style>
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