Commit d88209af authored by 罗超's avatar 罗超

2

parent 47d349d5
......@@ -12,7 +12,7 @@
<div slot="header" class="clearfix">
<span>选择分类</span>
</div>
<el-row v-if="isShowPlat">
<!-- <el-row v-if="isShowPlat">
<el-col :span="12">
<el-form-item label="上架版面">
<el-radio-group v-model="addMsg.GoodsPageType" @change="getGoodType(addMsg.GoodsPageType)">
......@@ -21,33 +21,43 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row>
<el-col :span="12" >
<el-col :span="12">
<el-form-item label="上架版面">
<el-radio-group v-model="addMsg.GoodsEduType" :disabled="addMsg.Id>0">
<!-- <el-radio :label="0">正常商品</el-radio> -->
<el-radio :label="1">咖啡劵</el-radio>
<!-- <el-radio :label="3">教室类</el-radio> -->
</el-radio-group>
<div style="display:flex;align-items:center;height:40px">
<el-radio-group v-model="addMsg.GoodsEduType" :disabled="addMsg.Id > 0">
<!-- <el-radio :label="0">正常商品</el-radio> -->
<el-radio :label="1">咖啡劵</el-radio>
<el-radio :label="2">资产类</el-radio>
<!-- <el-radio :label="3">教室类</el-radio> -->
</el-radio-group>
<div v-if="addMsg.GoodsEduType == 2">
<el-button type="primary" @click="isShowZC=true" style="margin:0 10px;" size="mini">选择资产
</el-button>
<span v-if="zcObj.Id">资产:{{zcObj.Id}}</span>
</div>
</div>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<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 }}
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>
<span @click="CommonJump('addGoodsClass')" class="blue point">添加分类</span>
<!-- <span @click="CommonJump('addGoodsClass')" class="blue point">添加分类</span> -->
</el-form-item>
</el-col>
</el-row> -->
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never">
<div slot="header" class="clearfix">
......@@ -69,18 +79,20 @@
<el-input v-model="addMsg.Name" size="small" placeholder="请输入内容" maxlength="100" show-word-limit>
</el-input>
</el-form-item>
<el-form-item :label="currentUserInfo.IsKorea==1?'卖点':'商品副标题'">
<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="备注" v-if="currentUserInfo.IsKorea==0">
<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" v-if="currentUserInfo.IsKorea==0">
<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'>
placeholder="请选择" @change="changeSupplier">
<el-option v-for="item in options" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
......@@ -96,30 +108,30 @@
<div class="nav_Main">
<div class="nav_IconContent">
<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; ">
<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"
circle></el-button>
</div>
</draggable>
</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">
+ 添加图片
</div>
</div>
</el-form-item>
<el-form-item label="商品视频" v-if="currentUserInfo.IsKorea==0">
<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="视频填充方式" v-if="currentUserInfo.IsKorea==0">
<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>
......@@ -161,19 +173,17 @@
<span class="point" @click="imgDig = true">查看图例</span>
</p>
</el-form-item>
<el-form-item label="商品Logo" v-if="currentUserInfo&&currentUserInfo.IsKorea==1">
<el-form-item label="商品Logo" v-if="currentUserInfo && currentUserInfo.IsKorea == 1">
<el-tooltip class="item" effect="dark" content="建议尺寸420*336" placement="top">
<el-button @click="openChangeDig(5)" size="small">选择图片</el-button>
</el-tooltip>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;border:none">
<img v-if="
!addMsg.goodsLogo ||
addMsg.goodsLogo == ''
" src="../../assets/img/default.png" style="width:80px;height:80px" alt="" />
<img v-if="!addMsg.goodsLogo || addMsg.goodsLogo == ''" src="../../assets/img/default.png"
style="width:80px;height:80px" alt="" />
<img v-else style="width:80px;height:80px" :src="addMsg.goodsLogo" alt="" />
</div>
</el-form-item>
<el-form-item label="直播商品" v-if="currentUserInfo.IsKorea==0">
<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>
......@@ -187,17 +197,17 @@
<el-switch v-model="addMsg.IsNoTax" active-color="#409EFF" :active-value="0" :inactive-value="1">
</el-switch>
</el-form-item>
<el-form-item label="产地" v-if="currentUserInfo&&currentUserInfo.IsKorea==1">
<el-form-item label="产地" v-if="currentUserInfo && currentUserInfo.IsKorea == 1">
<el-input v-model="addMsg.GoodsCountry" size="small" placeholder="请输入内容" maxlength="100"
show-word-limit>
</el-input>
</el-form-item>
<el-form-item label="地址" v-if="currentUserInfo&&currentUserInfo.IsKorea==1">
<el-form-item label="地址" v-if="currentUserInfo && currentUserInfo.IsKorea == 1">
<el-input v-model="addMsg.FatCode" size="small" placeholder="地址" maxlength="100" show-word-limit>
</el-input>
</el-form-item>
<el-form-item label="简介" v-if="currentUserInfo&&currentUserInfo.IsKorea==1">
<el-form-item label="简介" v-if="currentUserInfo && currentUserInfo.IsKorea == 1">
<el-input type="textarea" :rows="2" v-model="addMsg.GoodsUrl" size="small" placeholder="简介"
maxlength="200" show-word-limit>
</el-input>
......@@ -215,7 +225,7 @@
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea==0">
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea == 0">
<div slot="header" class="clearfix">
<span>价格库存</span>
</div>
......@@ -261,8 +271,8 @@
</span>
</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"
<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-button slot="append"></el-button>
</el-input>
......@@ -301,7 +311,7 @@
</el-tooltip>
<div style="width:130%">
<div class="app-attr-group">
<div v-for="(item, index) in SpecificationList" :key="index+'3'" style="margin-bottom:16px;">
<div v-for="(item, index) in SpecificationList" :key="index + '3'" style="margin-bottom:16px;">
<div flex="dir:left cross:center" class="bg">
<span>规格名:</span>
<el-input @input="ggzChange" v-model="item.Name" size="mini"
......@@ -318,7 +328,7 @@
<div class="box-grow-0">规格值:</div>
<div flex="dir:left" style="flex-wrap: wrap;">
<div v-for="(item2,
index2) in item.SpecificationValueList" :key="index2+'4'" class="attr-list">
index2) in item.SpecificationValueList" :key="index2 + '4'" class="attr-list">
<el-input @input="ggzChange" size="mini" v-model="item2.Name" width="152px"></el-input>
<i @click="Deleteggz(item, index, index2)" class="el-icon-error close"></i>
<div v-if="index == 0 && item.EnabledImage == 1" flex="cross:center main:center"
......@@ -371,7 +381,7 @@
<el-option label="成本价" :value="5"></el-option>
<el-option label="重量(g)" :value="3"></el-option>
<el-option label="货号" :value="4"></el-option>
<el-option v-if="FxState==1" label="返佣总金额" :value="6"></el-option>
<el-option v-if="FxState == 1" label="返佣总金额" :value="6"></el-option>
</el-select>
<el-button @click="ggPlSet" slot="append">确定</el-button>
</el-input>
......@@ -382,10 +392,10 @@
<el-table-column type="selection" width="55">
</el-table-column>
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index+'5'" :label="item.Name">
<el-table-column :key="index + '5'" :label="item.Name">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList"
:key="index2+'6'">
:key="index2 + '6'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
......@@ -393,32 +403,37 @@
</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="返佣总金额">
<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="checkInteger(scope.row,'GoodsWeight')" size="small"></el-input>
<el-input v-model="scope.row.GoodsWeight" @keyup.native="
checkInteger(scope.row, 'GoodsWeight')
" size="small"></el-input>
</template>
</el-table-column>
<el-table-column prop="address" label="货号">
......@@ -435,7 +450,7 @@
</el-input>
</el-form-item>
<el-form-item label="商品重量">
<el-input v-model="addMsg.GoodsWeight" @keyup.native="checkInteger(addMsg,'GoodsWeight')" min="1"
<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>
......@@ -443,7 +458,7 @@
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea==0">
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea == 0">
<div slot="header" class="clearfix">
<span>商品服务</span>
</div>
......@@ -456,7 +471,7 @@
<el-form-item label="商品服务">
<template v-if="addMsg.ServiceList && addMsg.ServiceList.length > 0">
<el-tag style="margin-right:10px;" @close="ServiceCheck(item, index)"
v-for="(item, index) in addMsg.ServiceList" :key="index+'7'" closable>{{ item.Name }}</el-tag>
v-for="(item, index) in addMsg.ServiceList" :key="index + '7'" closable>{{ item.Name }}</el-tag>
</template>
<el-button @click="
(serviceDig = true),
......@@ -500,8 +515,11 @@
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
<el-checkbox style="margin-left:10px" v-model="BuyGoodsNumState"
@change="BuyGoodsNumState==true? addMsg.LimitBuyGoodsNum=-1:addMsg.LimitBuyGoodsNum=0">不限制
<el-checkbox style="margin-left:10px" v-model="BuyGoodsNumState" @change="
BuyGoodsNumState == true
? (addMsg.LimitBuyGoodsNum = -1)
: (addMsg.LimitBuyGoodsNum = 0)
">不限制
</el-checkbox>
</el-form-item>
<el-form-item label-width="60px" label="订单">
......@@ -510,8 +528,11 @@
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
<el-checkbox style="margin-left:10px" v-model="BuyOrderNumState"
@change="BuyOrderNumState==true? addMsg.LimitBuyOrderNum=-1:addMsg.LimitBuyOrderNum=0">不限制
<el-checkbox style="margin-left:10px" v-model="BuyOrderNumState" @change="
BuyOrderNumState == true
? (addMsg.LimitBuyOrderNum = -1)
: (addMsg.LimitBuyOrderNum = 0)
">不限制
</el-checkbox>
</el-form-item>
</el-form-item>
......@@ -560,7 +581,7 @@
</el-col>
</el-row>
</el-card>
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea==0">
<el-card style="margin-top:20px" shadow="never" v-if="currentUserInfo.IsKorea == 0">
<div slot="header" class="clearfix">
<span>营销设置</span>
</div>
......@@ -608,24 +629,22 @@
<el-checkbox v-model="addMsg.IsMultipleDeduction" :true-label="1" :false-label="2">允许多件抵扣
</el-checkbox>
</el-form-item>
<el-form-item label="商品赠送VIP" v-if="FxState==1">
<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'>
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-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-button slot="append">
</el-button>
</el-input>
</el-form-item>
<el-form-item label="广告词">
<el-input v-model="addMsg.Advertising" style="width:100%;margin-left:15px" type="textarea" :rows="3"
size="small" placeholder="请输入内容" class="input-with-select"></el-input>
</el-form-item>
......@@ -634,21 +653,21 @@
<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-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>
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-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>
</el-form-item>
<el-form-item label="标签背景颜色" v-if="addMsg.MarketingLogo.iswords==1">
<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>
</el-form-item>
<el-form-item class="commonLabel discount" label="标签图片" v-if="addMsg.MarketingLogo.iswords==2">
<el-form-item class="commonLabel discount" label="标签图片" v-if="addMsg.MarketingLogo.iswords == 2">
<el-tooltip class="item" effect="dark" content="建议尺寸" placement="top">
<el-button @click="openChangeDig(4)" size="small">选择图片</el-button>
</el-tooltip>
......@@ -700,7 +719,7 @@
<el-form-item label-width="90px" style="display:inline-block" label="批量设置">
<el-select style="width:130px" v-model="pusetVal" size="small">
<el-option v-for="(item, index) in butorInt" :label="`${index + 1}级分销`" :value="index + 1"
:key="index+'8'"></el-option>
:key="index + '8'"></el-option>
</el-select>
<el-input style="width:150px;position:relative;top:5px" size="small" v-model="ptinput"
placeholder="请输入内容">
......@@ -719,12 +738,12 @@
<el-table-column width="100" label="等级名称">
<template slot-scope="scope">
<template v-for="(item2, index) in DropdownList">
<span :key="index+'9'" v-if="scope.row.DistributorGrade == item2.Id">{{ item2.Name }}</span>
<span :key="index + '9'" v-if="scope.row.DistributorGrade == item2.Id">{{ item2.Name }}</span>
</template>
</template>
</el-table-column>
<template v-for="(item, index) in butorIntList">
<el-table-column :key="index+'10'" :label="item.Name">
<el-table-column :key="index + '10'" :label="item.Name">
<template slot-scope="scope">
<span>
<el-input v-model="scope.row.OneCommission" v-if="index == 0" size="small">
......@@ -770,11 +789,11 @@
<el-form-item label-width="90px" style="display:inline-block" label="批量设置">
<el-select style="width:130px" v-model="gradeVal" size="small">
<el-option v-for="(item, index) in DropdownList" :label="item.Name" :value="item.Grade"
:key="index+'11'"></el-option>
:key="index + '11'"></el-option>
</el-select>
<el-select style="width:130px" v-model="fxVal" size="small">
<el-option v-for="(item, index) in butorInt" :label="`${index + 1}级分销`" :value="index + 1"
:key="index+'12'"></el-option>
:key="index + '12'"></el-option>
</el-select>
<el-input style="width:150px;position:relative;top:5px" size="small" v-model="xxVal"
placeholder="请输入内容">
......@@ -786,12 +805,13 @@
<el-button @click="xxSet" style="position:relative;" size="small" type="primary">设置</el-button>
</el-form-item>
</div>
<el-table ref="table" :data="disList2.length>0?disList2:[]" border style="width: 100%"
<el-table ref="table" :data="disList2.length > 0 ? disList2 : []" border style="width: 100%"
@selection-change="TbaleSelectionChange3">
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index+'13'" :label="item.Name" width="100">
<el-table-column :key="index + '13'" :label="item.Name" width="100">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList" :key="index2+'14'">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList"
:key="index2 + '14'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
......@@ -834,7 +854,7 @@
</div>
</el-form-item>
</template>
<template v-if="hpState==1">
<template v-if="hpState == 1">
<table class="fen-table">
<thead>
<tr>
......@@ -845,16 +865,16 @@
</thead>
<tbody>
<tr v-for="(x, i) in shareSettings" :key="i">
<td>{{x.GradeName}}</td>
<td>{{x.cb}}{{x.CommissionRatio}}%)</td>
<td>{{x.commission}}</td>
<td>{{ x.GradeName }}</td>
<td>{{ x.cb }}{{ x.CommissionRatio }}%)</td>
<td>{{ x.commission }}</td>
</tr>
</tbody>
</table>
<div class="fen-sumg">
<span style="margin-right:30px">直客卖价:{{addMsg.SellingPrice}}</span>
<span style="margin-right:30px">成本:{{addMsg.CostPrice}}</span>
<span style="margin-right:30px;color:red;">预计公司利润:{{companyCommission}}</span>
<span style="margin-right:30px">直客卖价:{{ addMsg.SellingPrice }}</span>
<span style="margin-right:30px">成本:{{ addMsg.CostPrice }}</span>
<span style="margin-right:30px;color:red;">预计公司利润:{{ companyCommission }}</span>
</div>
</template>
</el-tab-pane>
......@@ -875,7 +895,7 @@
addMsg.SeparateSetMember == 1 &&
SpecificationPriceList.length == 0
" label="默认规格会员价设置">
<div v-for="(item, index) in memberList1[0].GradePriceList" :key="index+'15'">
<div v-for="(item, index) in memberList1[0].GradePriceList" :key="index + '15'">
<el-input style="width:700px" placeholder="请输入内容" v-model="item.MemberPrice" size="small"
class="input-with-select">
<el-button slot="prepend">{{ item.Name }}</el-button>
......@@ -907,16 +927,16 @@
<el-table-column type="selection" width="55">
</el-table-column>
<template v-for="(item, index) in SpecificationList">
<el-table-column :key="index+'16'" :label="item.Name" width="100">
<el-table-column :key="index + '16'" :label="item.Name" width="100">
<template slot-scope="scope">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList" :key="index2+'17'">
<span v-if="index == index2" v-for="(item2, index2) in scope.row.AttrList" :key="index2 + '17'">
{{ scope.row.AttrList[index2].SVName }}
</span>
</template>
</el-table-column>
</template>
<template v-for="(item, index) in huiyList">
<el-table-column :key="index+'18'" :label="item.Name">
<el-table-column :key="index + '18'" :label="item.Name">
<template slot-scope="scope">
<el-input v-model="scope.row.GradePriceList[index].MemberPrice" size="small"></el-input>
</template>
......@@ -939,7 +959,7 @@
<h3 style="padding:15px 0">一级分类</h3>
<div class="app-goods-cat-list active">
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
<div v-for="(item, index) in fenleiData" :key="index+'19'" flex="dir:left box:first" class="cat-item">
<div v-for="(item, index) in fenleiData" :key="index + '19'" flex="dir:left box:first" class="cat-item">
<el-checkbox :label="item.Id">
<span style="display: none;">{{ item.Name }}</span>
</el-checkbox>
......@@ -956,7 +976,7 @@
<h3 style="padding:15px 0">二级分类</h3>
<div class="app-goods-cat-list active">
<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">
<span style="display: none;">{{ item.Name }}</span>
</el-checkbox>
......@@ -973,7 +993,7 @@
<h3 style="padding:15px 0">三级分类</h3>
<div class="app-goods-cat-list active">
<el-checkbox-group v-model="NewCategoryList" @change="handleCheckChange">
<div v-for="(item, index) in childList3" :key="index+'21'" flex="dir:left box:first" class="cat-item">
<div v-for="(item, index) in childList3" :key="index + '21'" flex="dir:left box:first" class="cat-item">
<el-checkbox :label="item.Id">
<span style="display: none;">{{ item.Name }}</span>
</el-checkbox>
......@@ -987,7 +1007,7 @@
</el-col>
</el-row>
<div class="tag-box">
<el-tag @close="exitCheck(item)" v-for="(item, index) in addMsg.CategoryList" :key="index+'22'" type="warning"
<el-tag @close="exitCheck(item)" v-for="(item, index) in addMsg.CategoryList" :key="index + '22'" type="warning"
closable style="margin-right:5px">{{ item.Name }}</el-tag>
</div>
<span slot="footer" class="dialog-footer">
......@@ -1025,7 +1045,7 @@
</el-checkbox-group>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="(addMsg.ServiceList = keepServiceList),(serviceDig = false)" size="small">取消</el-button>
<el-button @click="(addMsg.ServiceList = keepServiceList), (serviceDig = false)" size="small">取消</el-button>
<el-button @click="(addMsg.ServiceList = checkService), (serviceDig = false)" size="small" type="primary">确定
</el-button>
</span>
......@@ -1038,7 +1058,7 @@
:label="{ RulesName: '默认运费', ID: 0 }">默认运费
</el-radio>
<el-radio @change="YfSelect" style="padding-bottom:10px" class="yfradio" v-for="(item, index) in ruleList"
:key="index+'23'" :label="item">{{ item.RulesName }}</el-radio>
:key="index + '23'" :label="item">{{ item.RulesName }}</el-radio>
</el-radio-group>
</div>
<span slot="footer" class="dialog-footer">
......@@ -1097,21 +1117,24 @@
<el-button type="primary" size="small" @click="chooseSpecificationValueList">确定选择</el-button>
</div>
</el-dialog>
<ZC v-model="isShowZC" @confirm="confirmZC"></ZC>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
import ChooseImg from "./componemt/ChooseImg.vue";
import Choosevideo from "./componemt/Choosevideo.vue";
import region_Choice from "@/components/setup/view/regionChoice";
import UE from "@/components/global/UE.vue";
import draggable from "vuedraggable"
import draggable from "vuedraggable";
import ZC from './componemt/zc.vue'
export default {
components: {
ChooseImg,
Choosevideo,
region_Choice,
UE,
draggable
draggable,
ZC
},
data() {
return {
......@@ -1190,13 +1213,13 @@
IsQuickBuy: 1,
FullNumPinkage: 0,
FullMoneyPinkage: 0,
SupplierId: '',
SupplierId: "",
Sort: 0,
Commission: 0,
PresentFXGrade: '',
PresentFXGrade: "",
PresentFXMonth: 0,
Advertising: '',
SubName: '',
Advertising: "",
SubName: "",
MarketingLogo: {
iswords: 0,
words: "",
......@@ -1204,27 +1227,23 @@
wordsBack: "",
ico: ""
},
ShelvesDate: '', //自动上架时间
DownDate: '', //自动下架时间
SendArea: '', //发货仓库
ShelvesDate: "", //自动上架时间
DownDate: "", //自动下架时间
SendArea: "", //发货仓库
VideoType: 1, //视频填充方式(0默认,1-填充)
GoodsPageType: 0, //分类 0全部 1商城 2校园
Remark: '', //备注
Remark: "", //备注
IsNoTax: 0, //是否可开发票 0是 1否
GoodsCountry: "", //商品国家
FatCode: "", //地址
GoodsUrl: "", //简介
goodsLogo: "", //商品Logo
IsKorea: 0, //是否为韩国馆
GoodsEduType:1,
GoodsEduType: 1,
MaterialId: 0, //资产id
},
predefineColors: [
'#000000',
'#FFFFFF',
'#888888',
'#FF4544',
],
SupplierId: '',
predefineColors: ["#000000", "#FFFFFF", "#888888", "#FF4544"],
SupplierId: "",
fenleiData: [],
checkList: [],
childList2: [],
......@@ -1324,7 +1343,11 @@
My_cateList: [], //分类类型
isShowPlat: true, //是否显示上架版面和分类
isShowTax: false, //赞羊显示是否可开发票
currentUserInfo: {}, //当前登录用户
currentUserInfo: {
IsKorea: 0,
}, //当前登录用户
isShowZC: false,
zcObj: {}
};
},
created() {
......@@ -1341,7 +1364,7 @@
this.getSpeciList();
this.getDistributor();
this.gethuiyList();
this.getSupplierList()
this.getSupplierList();
this.getFXDGradeList();
this.getCateList();
},
......@@ -1354,11 +1377,14 @@
this.getTree();
}
if (this.currentUserInfo.IsOpenSchool == 0) {
this.isShowPlat = false
this.isShowPlat = false;
} else {
this.isShowPlat = true;
}
if (this.currentUserInfo.TenantId == 1 && this.currentUserInfo.MallBaseId == 1) {
if (
this.currentUserInfo.TenantId == 1 &&
this.currentUserInfo.MallBaseId == 1
) {
this.isShowTax = true;
} else {
this.isShowTax = false;
......@@ -1381,34 +1407,38 @@
},
res => {
if (res.data.resultCode == 1) {
this.shareSettings = res.data.data.RatioList || []
this.calcCommission(0)
this.shareSettings = res.data.data.RatioList || [];
this.calcCommission(0);
}
}
);
},
calcCommission(t) {
if (t == 0) {
let maxratio = 0
let minratio = 100
let maxratio = 0;
let minratio = 100;
if (this.shareSettings.length > 0) {
this.shareSettings.forEach(x => {
if (x.CommissionRatio > maxratio) {
maxratio = x.CommissionRatio
maxratio = x.CommissionRatio;
}
})
});
}
if (this.shareSettings.length > 0) {
this.shareSettings.forEach(x => {
x.cb = parseFloat(this.addMsg.CostPrice) / (1.00 - (parseFloat(x.CommissionRatio) / 100.00))
x.commission = (this.addMsg.SellingPrice - x.cb).toFixed(2)
x.cb = x.cb.toFixed(2)
x.cb =
parseFloat(this.addMsg.CostPrice) /
(1.0 - parseFloat(x.CommissionRatio) / 100.0);
x.commission = (this.addMsg.SellingPrice - x.cb).toFixed(2);
x.cb = x.cb.toFixed(2);
if (x.CommissionRatio < minratio) {
this.companyCommission = (this.addMsg.SellingPrice - (parseFloat(x.commission) + parseFloat(this
.addMsg.CostPrice))).toFixed(2)
minratio = x.CommissionRatio
this.companyCommission = (
this.addMsg.SellingPrice -
(parseFloat(x.commission) + parseFloat(this.addMsg.CostPrice))
).toFixed(2);
minratio = x.CommissionRatio;
}
})
});
}
}
},
......@@ -1597,10 +1627,10 @@
addggxm() {
let that = this;
let obj = {
Name: "",
Name: '',
SpecificationValueList: [],
Sort: that.SpecificationList.length > 0 ? that.SpecificationList[that.SpecificationList.length - 1].Sort +
1 : that.SpecificationList.length + 1,
Sort: that.SpecificationList.length > 0 ?
that.SpecificationList[that.SpecificationList.length - 1].Sort + 1 : that.SpecificationList.length + 1,
Id: 0,
EnabledImage: 2
};
......@@ -1612,8 +1642,10 @@
Id: 0,
Image: "",
Name: "",
Sort: item.SpecificationValueList.length > 0 ? item.SpecificationValueList[item.SpecificationValueList
.length - 1].Sort + 1 : 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);
},
......@@ -1640,11 +1672,11 @@
arr.forEach(x => {
x.Id = 0;
x.NewSpecList.forEach(j => {
j.Id = 0
j.Id = 0;
});
x.SpecificationValueList.forEach(j => {
j.Id = 0
})
j.Id = 0;
});
});
this.SpecificationList = JSON.parse(
JSON.stringify(this.SpecificationList.concat(arr))
......@@ -1658,7 +1690,7 @@
});
});
this.ComTreeList = [];
this.memberList2 = []
this.memberList2 = [];
this.skuList = [];
this.getSkuData([], 0, this.SpecificationList);
this.speciDig = false;
......@@ -1681,12 +1713,12 @@
}
}
}
}
testyunx(skuArr, i, list)
};
testyunx(skuArr, i, list);
this.calcList(this.skuList, this.SpecificationList);
},
calcList(list, calist) {
let oldArr = JSON.parse(JSON.stringify(this.SpecificationPriceList))
let oldArr = JSON.parse(JSON.stringify(this.SpecificationPriceList));
this.SpecificationPriceList = [];
let arrList = [];
list.forEach(item => {
......@@ -1739,7 +1771,7 @@
Commission: val.Commission
};
}
})
});
this.SpecificationPriceList.push(obj);
let obj1 = {
Id: i,
......@@ -1756,15 +1788,18 @@
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
) {
//this.ComTreeList.length为0 的时候 全部为空
if (i < ComTreeList.length) {
ComTreeList.forEach((val, z) => {
if (val.SpecificationSort == dislist[i].SpecificationSort) {
dislist[i].GradeCommissionList = [];
dislist[i].GradeCommissionList = val.GradeCommissionList;
}
})
});
} else {
for (let j = 0; j < this.DropdownList.length; j++) {
let obj = {
......@@ -1795,14 +1830,15 @@
for (let i = 0; i < memberListarray.length; i++) {
memberListarray[i].GradePriceList = [];
if (this.addMsg.EnjoyMember == 1 && this.memberList2.length > 0) {
if (i < this.memberList2.length) {
this.memberList2.forEach(val => {
if (val.SpecificationSort == memberListarray[i].SpecificationSort) {
if (
val.SpecificationSort == memberListarray[i].SpecificationSort
) {
memberListarray[i].GradePriceList = [];
memberListarray[i].GradePriceList = val.GradePriceList;
}
})
});
} else {
for (let j = 0; j < this.huiyList.length; j++) {
let obj = {
......@@ -1841,6 +1877,9 @@
});
},
Save(formName) {
console.log(this.SpecificationPriceList,this.SpecificationList)
return
this.addMsg.IsKorea = 0;
this.$refs[formName].validate(valid => {
if (valid) {
......@@ -1856,60 +1895,75 @@
if (this.SpecificationList.length == 0) {
this.addMsg.IsCustomSpecification = 2;
}
if (this.addMsg.IsKorea == 0 && this.addMsg.IsCustomSpecification != 1 && this.SpecificationList
.length == 0) {
if (
this.addMsg.IsKorea == 0 &&
this.addMsg.IsCustomSpecification != 1 &&
this.SpecificationList.length == 0
) {
this.Error("请选择规格项目!");
return
return;
}
if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = [{
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
}],
this.addMsg.DistributionCommissionList = this.disList1;
(this.disList1 = [{
SpecificationSort: "",
GradeCommissionList: this.GradeCommissionList
}]),
(this.addMsg.DistributionCommissionList = this.disList1);
} else {
this.addMsg.DistributionCommissionList = this.disList2;
}
if (this.addMsg.SeparateSetMember == 1 && this.SpecificationList.length == 0) {
if (
this.addMsg.SeparateSetMember == 1 &&
this.SpecificationList.length == 0
) {
this.addMsg.MemberPriceList = this.memberList1;
this.addMsg.MemberPriceTreeList = this.memberList1;
}
if (this.addMsg.SeparateSetMember == 1 && this.SpecificationList.length > 0) {
if (
this.addMsg.SeparateSetMember == 1 &&
this.SpecificationList.length > 0
) {
this.addMsg.MemberPriceList = this.memberList2;
this.addMsg.MemberPriceTreeList = this.memberList2;
}
if (this.addMsg.IsKorea == 0 && this.currentUserInfo.TenantId == 1 && this.currentUserInfo.MallBaseId ==
1 && this.SupplierId == '') {
if (
this.addMsg.IsKorea == 0 &&
this.currentUserInfo.TenantId == 1 &&
this.currentUserInfo.MallBaseId == 1 &&
this.SupplierId == ""
) {
this.Error("请选择供应商!");
return
return;
} else {
this.addMsg.SupplierId = this.SupplierId != '' ? this.SupplierId : 0;
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) + '行价格');
return
if (this.addMsg.SpecificationPriceList[i].SellingPrice === "") {
this.Error("请输入商品规格第" + (i + 1) + "行价格");
return;
}
if (this.addMsg.SpecificationPriceList[i].InventoryNum === '') {
this.Error('请输入商品规格第' + (i + 1) + '行库存');
return
if (this.addMsg.SpecificationPriceList[i].InventoryNum === "") {
this.Error("请输入商品规格第" + (i + 1) + "行库存");
return;
}
if (this.addMsg.SpecificationPriceList[i].CostMoney === '') {
this.Error('请输入商品规格第' + (i + 1) + '行成本价');
return
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) + '行返佣总金额');
return
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) {
......@@ -1919,20 +1973,20 @@
wordsColor: "",
wordsBack: "",
ico: ""
}
};
} else if (this.addMsg.MarketingLogo.iswords == 1) {
this.addMsg.MarketingLogo.ico = ''
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.words = "";
this.addMsg.MarketingLogo.wordsColor = "";
this.addMsg.MarketingLogo.wordsBack = "";
}
this.addMsg.EmpId = 0
this.addMsg.EmpId = 0;
this.i_post("/api/product/SetProductGoodsInfo", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.back()
this.back();
} else {
this.Error(res.data.message);
}
......@@ -2000,13 +2054,11 @@
YfSelect1(val) {
this.addMsg.FormsId = val;
if (this.addMsg.FormsId == 0) {
this.addMsg.FormsName = '默认商城'
this.addMsg.FormsName = "默认商城";
} else if (this.addMsg.FormsId == 1) {
this.addMsg.FormsName = '教育表单'
this.addMsg.FormsName = "教育表单";
}
this.$forceUpdate()
this.$forceUpdate();
},
YfSelect(val) {
this.addMsg.FreightId = val.ID;
......@@ -2051,10 +2103,10 @@
msg.forEach(item => {
let obj = {
Id: item.selectId,
Path: that.getIconLink(item.url),
Path: that.getIconLink(item.url)
};
this.addMsg.CarouselImageList.push(obj);
})
});
}
if (this.imgType == 2) {
this.addMsg.CustomShareImage = that.getIconLink(msg[0].url);
......@@ -2067,7 +2119,7 @@
].Image = that.getIconLink(msg[0].url);
}
if (this.imgType == 4) {
that.addMsg.MarketingLogo.ico = that.getIconLink(msg[0].url)
that.addMsg.MarketingLogo.ico = that.getIconLink(msg[0].url);
}
//商品logo
if (this.imgType == 5) {
......@@ -2147,10 +2199,10 @@
}
});
},
getcode() { //编码获取详情
getcode() {
//编码获取详情
this.GoodsId = this.addMsg.Id;
this.getData()
this.getData();
},
getData() {
this.i_post(
......@@ -2162,23 +2214,23 @@
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
this.BuyGoodsNumState = false;
}
if (this.addMsg.LimitBuyOrderNum != -1) {
this.BuyOrderNumState = false
this.BuyOrderNumState = false;
}
this.initShareSettings();
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
this.ComTreeList = this.addMsg.DistributionCommissionTreeList;
this.SpecificationList = this.addMsg.SpecificationList;
if (this.SpecificationList.length > 0) { //根据编码来的详情 重新调用这个方法 否则分销详情设置没有数据
this.getDistributor()
if (this.SpecificationList.length > 0) {
//根据编码来的详情 重新调用这个方法 否则分销详情设置没有数据
this.getDistributor();
}
if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = this.addMsg.DistributionCommissionTreeList;
......@@ -2186,11 +2238,11 @@
this.GradeCommissionList = this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList;
}
}
this.val1 = this.addMsg.FormsId
this.val1 = this.addMsg.FormsId;
if (this.addMsg.FormsId == -1 || this.addMsg.FormsId == 0) {
this.addMsg.FormsName = '默认商城'
this.addMsg.FormsName = "默认商城";
} else if (this.addMsg.FormsId == 1) {
this.addMsg.FormsName = '教育表单'
this.addMsg.FormsName = "教育表单";
}
this.memberList2 = this.addMsg.MemberPriceTreeList;
this.thisType = 1;
......@@ -2213,7 +2265,7 @@
this.addMsg.SeparateDistribution = 0;
}
if (this.addMsg.PresentFXGrade == 0) {
this.addMsg.PresentFXGrade = ''
this.addMsg.PresentFXGrade = "";
}
this.getSuggestPrice();
this.getFXDGradeList2();
......@@ -2321,8 +2373,9 @@
this.DropdownList = JSON.parse(JSON.stringify(this.DropdownList));
if (
!this.$route.query.GoodsId ||
(this.addMsg.DistributionCommissionTreeList && this.addMsg.DistributionCommissionTreeList.length ==
0) || this.thisType == 1
(this.addMsg.DistributionCommissionTreeList &&
this.addMsg.DistributionCommissionTreeList.length == 0) ||
this.thisType == 1
) {
this.GradeCommissionList = [];
this.DropdownList.forEach(item => {
......@@ -2369,53 +2422,58 @@
});
},
getFXDGradeList() {
this.i_post("/api/user/GetFXDistributorGradeList", {
GradeName: ''
}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
if (res.data.data != null) {
let data = res.data.data;
let List = [];
data.forEach(x => {
let obj = {};
// if(x.IsGuest !=1){
if (x.IsGuest == 3) { //只显示vip
let obj = x
List.push(obj)
}
})
this.FXlevelList = List;
this.i_post(
"/api/user/GetFXDistributorGradeList", {
GradeName: ""
},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
if (res.data.data != null) {
let data = res.data.data;
let List = [];
data.forEach(x => {
let obj = {};
// if(x.IsGuest !=1){
if (x.IsGuest == 3) {
//只显示vip
let obj = x;
List.push(obj);
}
});
this.FXlevelList = List;
}
}
}
});
);
},
getFXDGradeList2() {
this.i_post("/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;
this.i_post(
"/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;
}
}
}
})
});
}
}
}
});
);
},
changeVIP() {
if (this.addMsg.PresentFXGrade == '' || this.addMsg.PresentFXGrade == 0) {
if (this.addMsg.PresentFXGrade == "" || this.addMsg.PresentFXGrade == 0) {
this.giveDate = false;
this.addMsg.PresentFXMonth = 0
this.addMsg.PresentFXMonth = 0;
} else {
this.giveDate = true;
}
......@@ -2446,11 +2504,58 @@
if (num != 0) {
this.addMsg.CategoryList = [];
}
this.getTree()
this.getTree();
},
back() {
this.$router.go(-1)
}
this.$router.go(-1);
},
confirmZC(val) {
console.log(val)
if (val) {
this.zcObj = val
this.addMsg.Name = val.Name
this.addMsg.MaterialId = val.Id
this.addMsg.CarouselImageList = val.ImageList
this.addMsg.SellingPrice = val.SellPrice
this.addMsg.OriginalPrice = val.Money
this.addMsg.CostPrice = val.Money
this.addMsg.Unit = val.Units||'件'
this.addMsg.InventoryNum = val.InventoryNum
this.defaultMsg=val.Name
this.addggxm2()
this.addGgz2(this.SpecificationList[0],0)
this.ggzChange()
this.SpecificationPriceList[0].SellingPrice=val.SellPrice
this.SpecificationPriceList[0].InventoryNum=val.InventoryNum
this.SpecificationPriceList[0].CostMoney=val.Money
}
},
// 添加规格模板2
addggxm2() {
let that = this;
let obj = {
Name: '标准',
SpecificationValueList: [],
Sort: that.SpecificationList.length > 0 ?
that.SpecificationList[that.SpecificationList.length - 1].Sort + 1 : that.SpecificationList.length + 1,
Id: 0,
EnabledImage: 2
};
this.SpecificationList.push(obj);
},
// 添加规格值2
addGgz2(item, index) {
let obj = {
Id: 0,
Image: "",
Name: "1"+this.addMsg.Unit,
Sort: item.SpecificationValueList.length > 0 ?
item.SpecificationValueList[
item.SpecificationValueList.length - 1
].Sort + 1 : item.SpecificationValueList.length + 1
};
this.SpecificationList[index].SpecificationValueList.push(obj);
},
}
};
......@@ -2693,19 +2798,19 @@
font-size: 12px;
}
@media (max-width:1920px) and (min-width:1300px) {
@media (max-width: 1920px) and (min-width: 1300px) {
.goodsListEdit .el-col-12 {
width: 50%;
}
}
@media (max-width:1910px) and (min-width:1200px) {
@media (max-width: 1910px) and (min-width: 1200px) {
.goodsListEdit .el-col-12 {
width: 66.66667%;
}
}
@media (max-width:1199px) and (min-width:200px) {
@media (max-width: 1199px) and (min-width: 200px) {
.goodsListEdit .el-col-12 {
width: 80%;
}
......
......@@ -159,6 +159,12 @@
</template>
</template>
</el-table-column>
<el-table-column prop="RetailStore" width="100" label="类型">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.GoodsEduType==1">咖啡券</el-tag>
<el-tag type="success" v-if="scope.row.GoodsEduType==2">资产</el-tag>
</template>
</el-table-column>
<el-table-column prop="Remark" label="分类">
<template slot-scope="scope">
<el-tag
......@@ -339,24 +345,6 @@
>
</template>
</el-table-column>
<el-table-column prop="RetailStore" width="100" label="分销商品">
<template slot-scope="scope">
<el-checkbox
v-if="scope.row.SourceGoodsId > 0"
:value="scope.row.SourceGoodsId > 0"
disabled
></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="RetailStore" width="100" label="是否分销">
<template slot-scope="scope">
<el-checkbox
v-if="scope.row.RetailStore == 1"
:value="scope.row.RetailStore == 1"
disabled
></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="address" width="250" label="操作">
<template slot-scope="scope">
<span
......@@ -927,12 +915,11 @@ export default {
BuyOrderNumState: true,
hpState: 0,
FxState: 0,
currentUserInfo: {} //当前用户
currentUserInfo: {
IsKorea:0
} //当前用户
};
},
created() {
// this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
},
methods: {
//获取是否开启和平返佣
getHpState() {
......@@ -1307,18 +1294,30 @@ export default {
}
},
mounted() {
let that=this
window.addEventListener("message", function(messageEvent) {
let data = messageEvent.data;
console.log("收到vue的数据:", JSON.parse(data));
window.localStorage.setItem("iframeData", data);
let that = this;
if (localStorage.getItem("iframeData")) {
that.getList();
that.getTree();
that.getRule();
that.getHpState();
that.getFxState();
that.getSupplierList(); //获取供应商
}
window.addEventListener("message", function(messageEvent) {
let data = messageEvent.data||'';
console.log("收到vue的数据:", data);
if(data.indexOf('token')>-1){
window.localStorage.setItem("iframeData", data);
}
that.getList();
that.getTree();
that.getRule();
that.getHpState();
that.getFxState();
that.getSupplierList(); //获取供应商
});
}
};
</script>
......
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