提交 215210cd authored 作者: huaxinzhu's avatar huaxinzhu

云仓bug修改01

上级 33c53405
...@@ -79,7 +79,8 @@ ...@@ -79,7 +79,8 @@
}, },
mounted() { mounted() {
this.getFreightData(); this.getFreightData();
//console.log('售后数据:',this.goodsaftersale); //debugger
console.log('售后数据:',this.goodsaftersale);
if(this.goodsaftersale && this.goodsaftersale.stags.length > 0) { if(this.goodsaftersale && this.goodsaftersale.stags.length > 0) {
this.goodsAfterSaleForm = this.goodsaftersale; this.goodsAfterSaleForm = this.goodsaftersale;
} }
......
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
for (let i = 0; i < this.goodsImgFileList.length; i++) { for (let i = 0; i < this.goodsImgFileList.length; i++) {
if (file.uid === this.goodsImgFileList[i].uid) { if (file.uid === this.goodsImgFileList[i].uid) {
this.goodsImgFileList.splice(i, 1) this.goodsImgFileList.splice(i, 1)
this.goodsImgFileList.imgs.splice(i, 1); this.goodsInfoForm.imgs.splice(i, 1);
} }
} }
if(this.goodsImgFileList.length === 0) { if(this.goodsImgFileList.length === 0) {
......
<template> <template>
<div class="goods-parameter"> <div class="goods-parameter">
<p class="tip-p"> <p class="tip-p">
<el-link class="edit-type-span el-icon-search" type="primary" :underline="false">查看各类价格说明</el-link> <el-link class="edit-type-span el-icon-search" type="primary" :underline="false" @click="viewPriceExp">查看各类价格说明
</el-link>
<span class="tip-span">所有商品价格均为含税价,必须开具发票</span> <span class="tip-span">所有商品价格均为含税价,必须开具发票</span>
</p> </p>
...@@ -19,8 +20,9 @@ ...@@ -19,8 +20,9 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="sl_price" label="结算价"> <el-table-column align="center" prop="sl_price" label="结算价">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.sl_price" :disabled="true" placeholder="根据结算价自动计算"></el-input>--> <!-- <el-input size="mini" style="width:90%" v-model="scope.row.sl_price" :disabled="true" placeholder="根据结算价自动计算"></el-input>-->
<span class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span> <span
class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="price" label="指导价"> <el-table-column align="center" prop="price" label="指导价">
...@@ -45,26 +47,27 @@ ...@@ -45,26 +47,27 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" prop="imgs9" label="图片">--> <!-- <el-table-column align="center" prop="imgs9" label="图片">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&ndash;&gt;--> <!-- &lt;!&ndash;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&ndash;&gt;-->
<!-- <el-upload--> <!-- <el-upload-->
<!-- action="/"--> <!-- action="/"-->
<!-- class="uploadData50"--> <!-- class="uploadData50"-->
<!-- list-type="picture-card"--> <!-- list-type="picture-card"-->
<!-- :limit="5"--> <!-- :limit="5"-->
<!-- :on-exceed="limit5"--> <!-- :on-exceed="limit5"-->
<!-- :file-list="singleSpecImgList"--> <!-- :file-list="singleSpecImgList"-->
<!-- :http-request="(file)=> { return upLoadSingleSpecImg(file,scope.row) }"--> <!-- :http-request="(file)=> { return upLoadSingleSpecImg(file,scope.row) }"-->
<!-- :on-remove=" (file) => { return removeSingleSpeImg(file,scope.row)}"--> <!-- :on-remove=" (file) => { return removeSingleSpeImg(file,scope.row)}"-->
<!-- ></el-upload>--> <!-- ></el-upload>-->
<!-- &lt;!&ndash;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&ndash;&gt;--> <!-- &lt;!&ndash;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&ndash;&gt;-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
<div v-show="orgGoodsPam.pamTableList.length > 0" v-for="(item,index) in orgGoodsPam.pamTableList" :key="index" class="single-spe-con"> <div v-show="orgGoodsPam.pamTableList.length > 0" v-for="(item,index) in orgGoodsPam.pamTableList" :key="index"
class="single-spe-con">
<p style="margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;"> <p style="margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;">
<span v-show="orgGoodsPam.pamNameList.length === 1"> <span v-show="orgGoodsPam.pamNameList.length === 1">
{{ orgGoodsPam.pamNameList[0].spec_name }} <span></span>{{ orgGoodsPam.pamDataList[index]}} {{ orgGoodsPam.pamNameList[0].spec_name }} <span></span>{{ orgGoodsPam.pamDataList[index]}}
...@@ -88,8 +91,9 @@ ...@@ -88,8 +91,9 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="sl_price" label="结算价"> <el-table-column align="center" prop="sl_price" label="结算价">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh2" :disabled="true" placeholder="根据结算价自动计算"></el-input>--> <!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh2" :disabled="true" placeholder="根据结算价自动计算"></el-input>-->
<span class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span> <span
class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="price" label="指导价"> <el-table-column align="center" prop="price" label="指导价">
...@@ -126,15 +130,54 @@ ...@@ -126,15 +130,54 @@
alt="" alt=""
@click="changeSpeImg(index,scope.row)" @click="changeSpeImg(index,scope.row)"
/> />
<span class="span-img-del el-icon-delete del-span-block" @click="hxz"></span> <span class="span-img-del el-icon-delete del-span-block" @click="delSingleSpecImg(index,scope.row)"></span>
</span> </span>
<input type="file" style="display: none;" :ref=" 'hxz' + index " accept="image/*" @change="changeIMG(index,scope.row)"> <input type="file" style="display: none;" :ref=" 'hxz' + index " accept="image/*"
@change="changeIMG(index,scope.row)">
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 查看各类价格说明 -->
<el-dialog
v-loading="loading"
title="各类价格说明"
:visible.sync="isViewPriceExp"
width="40%"
center
append-to-body
>
<el-form ref="workOrderForm" size="small" label-width="150px">
<el-form-item label="协议价:">
<span>指您供货给下游的价格</span>
</el-form-item>
<el-form-item label="结算价:">
<span>与云仓平台结算的价格,根据协议价自动计算</span>
</el-form-item>
<el-form-item label="指导售价:">
<span>指导下游商户制定销售的价格</span>
</el-form-item>
<el-form-item label="市场价:">
<span>市场售价,参考京东、天猫等平台的售价</span>
</el-form-item>
<el-form-item>
<span class="pre-price-tip">商品价格均为含税价,必须开具发票。请准确填写并更新商品实际库存,超卖导致的虚假及延迟发货会引起用户投诉与平台判罚。</span>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isViewPriceExp = false" size="mini">取 消</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -165,25 +208,32 @@ export default { ...@@ -165,25 +208,32 @@ export default {
} }
], ],
singleSpecImgList: [], singleSpecImgList: [],
isViewPriceExp: false
} // return end } // return end
}, },
watch:{ watch:{
'parameterdata': function(val) { 'parameterdata': function(val) {
//debugger //debugger
this.orgGoodsPam = val; this.orgGoodsPam = val;
console.log("监听",this.orgGoodsPam); //console.log("监听",this.orgGoodsPam);
}, },
}, },
created() { created() {
//this.orgGoodsPam = this.parameterdata; //this.orgGoodsPam = this.parameterdata;
}, },
mounted() { mounted() {
console.log("加载后,",this.parameterdata); //console.log("加载后,",this.parameterdata);
if(this.parameterdata.singleSpecTable && this.parameterdata.singleSpecTable.length > 0) { if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) {
this.singleSpecTable = this.parameterdata.singleSpecTable; this.orgGoodsPam = this.parameterdata;
}else {
this.singleSpecTable = this.parameterdata.singleSpecTable
} }
}, },
methods: { methods: {
// 查看各类价格说明
viewPriceExp() {
this.isViewPriceExp = true;
},
// ------ 无规格,上传图片相关 ------ // ------ 无规格,上传图片相关 ------
limit5() { limit5() {
this.$message({type: 'warning',message: '只能上传5张图片'}); this.$message({type: 'warning',message: '只能上传5张图片'});
...@@ -270,8 +320,12 @@ export default { ...@@ -270,8 +320,12 @@ export default {
//console.log(3333,file); //console.log(3333,file);
}, },
hxz() { // 删除 单个规格的图片
delSingleSpecImg(index,row) {
if( row.thumb ) {
row.thumb = '';
this.$message({type: 'success',message: '删除成功'});
}
}, },
speImgHover(index,row) { speImgHover(index,row) {
this.isHoverSpeImg = true; this.isHoverSpeImg = true;
...@@ -406,6 +460,11 @@ p { ...@@ -406,6 +460,11 @@ p {
font-size: 12px; font-size: 12px;
} }
.pre-price-tip {
color: #F56C6C;
font-size: 12px;
}
// 上传图片样式 // 上传图片样式
.uploadData50 { .uploadData50 {
display: inline-block; display: inline-block;
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
:before-close="cancelSpec" :before-close="cancelSpec"
width="500px" width="500px"
center center
append-to-body
> >
<div> <div>
<p class="add-spec-dialog-con"> <p class="add-spec-dialog-con">
......
...@@ -173,8 +173,8 @@ ...@@ -173,8 +173,8 @@
goods_des: res.data.goods_des, // 关键词 goods_des: res.data.goods_des, // 关键词
goods_name: res.data.goods_name, // 商品标题 goods_name: res.data.goods_name, // 商品标题
category_id: res.data.category_id, category_id: res.data.category_id,
producing_area: res.data.producing_area, // 产地 producing_area: Number(res.data.producing_area), // 产地
deliver_area: res.data.deliver_area, // 发货地 deliver_area: Number(res.data.deliver_area), // 发货地
unit: res.data.unit, // 单位 unit: res.data.unit, // 单位
goods_brand: res.data.goods_brand, // 品牌 goods_brand: res.data.goods_brand, // 品牌
web_url: res.data.web_url, // 外部链接 web_url: res.data.web_url, // 外部链接
...@@ -194,18 +194,29 @@ ...@@ -194,18 +194,29 @@
} }
// 商品售价 // 商品售价
// debugger
if(res.data.specs_group && res.data.specs_group.length > 0) { if(res.data.specs_group && res.data.specs_group.length > 0) {
//this.parameterdata //this.parameterdata
let prePriceArr = []; let prePriceArr = [];
this.parameterdata.pamTableList = []; this.parameterdata.pamTableList = [];
res.data.specs_group.forEach((item,index)=> { this.parameterdata.pamDataList = [];
res.data.specs_group.forEach((item)=> {
//
item.js_price = item.js_price / 100;
item.sl_price = item.js_price / 100;
item.price = item.price / 100;
item.sc_price = item.sc_price / 100;
// item.stock = item.stock;
// item.weight = item.weight;
prePriceArr = []; prePriceArr = [];
prePriceArr.push(item); prePriceArr.push(item);
this.parameterdata.pamTableList[index] = prePriceArr.push(item); this.parameterdata.pamTableList.push( prePriceArr );
this.parameterdata.pamDataList.push(item.spec_values);
}) })
this.parameterdata.pamNameList = res.data.specs;
}else { }else {
this.parameterdata.pamTableList = []; this.parameterdata.pamTableList = [];
let singleSpecObj = { let singleSpecObj = {
js_price:'', js_price:'',
sl_price:'', sl_price:'',
...@@ -215,17 +226,15 @@ ...@@ -215,17 +226,15 @@
weight:'', weight:'',
} }
this.parameterdata.singleSpecTable = []; this.parameterdata.singleSpecTable = [];
singleSpecObj.js_price = res.data.js_price * 100; singleSpecObj.js_price = res.data.js_price / 100;
singleSpecObj.sl_price = res.data.js_price * 100; singleSpecObj.sl_price = res.data.js_price / 100;
singleSpecObj.price = res.data.price * 100; singleSpecObj.price = res.data.price / 100;
singleSpecObj.sc_price = res.data.sc_price * 100; singleSpecObj.sc_price = res.data.sc_price / 100;
singleSpecObj.stock = res.data.stock; singleSpecObj.stock = res.data.stock;
singleSpecObj.weight = res.data.weight; singleSpecObj.weight = res.data.weight;
this.parameterdata.singleSpecTable.push(singleSpecObj); this.parameterdata.singleSpecTable.push(singleSpecObj);
} }
// 商品详情 // 商品详情
this.imgdata.description = res.data.description; this.imgdata.description = res.data.description;
//this.goodsinfodata = res.data; //this.goodsinfodata = res.data;
...@@ -233,10 +242,6 @@ ...@@ -233,10 +242,6 @@
//this.goodsaftersale = res.data; //this.goodsaftersale = res.data;
// 售后服务 // 售后服务
// stags: [],
// freight_id: 310,
// delay_compensate: 24,
// aftersale_time: 7
this.goodsaftersale.freight_id = res.data.freight_id; this.goodsaftersale.freight_id = res.data.freight_id;
this.goodsaftersale.delay_compensate = res.data.delay_compensate; this.goodsaftersale.delay_compensate = res.data.delay_compensate;
this.goodsaftersale.aftersale_time = res.data.aftersale_time; this.goodsaftersale.aftersale_time = res.data.aftersale_time;
...@@ -251,9 +256,8 @@ ...@@ -251,9 +256,8 @@
} }
}) })
}else { }else {
stagArr.push( Number(res.data.stags) ) this.goodsaftersale.stags.push( Number(res.data.stags) )
} }
}else { }else {
this.goodsaftersale.stags = []; this.goodsaftersale.stags = [];
} }
...@@ -383,14 +387,8 @@ ...@@ -383,14 +387,8 @@
this.goodsinfodata.categoryStr = ssqLabelList[0] + '/' + ssqLabelList[1] + '/' + ssqLabelList[2]; this.goodsinfodata.categoryStr = ssqLabelList[0] + '/' + ssqLabelList[1] + '/' + ssqLabelList[2];
this.isShowGoodsDetails = true; this.isShowGoodsDetails = true;
// console.log(232,this.goodsinfodata.categoryStr,this.goodsinfodata.categoryList); // console.log(232,this.goodsinfodata.categoryStr,this.goodsinfodata.categoryList);
}, },
//
// getGoodsAfterSaleData(data) {
// console.log("售后子组件给的:",data);
// },
//
save() { save() {
// let spxxDataId = this.$refs.goodsInfo.goodsInfoForm.goods_id; // let spxxDataId = this.$refs.goodsInfo.goodsInfoForm.goods_id;
...@@ -399,6 +397,7 @@ ...@@ -399,6 +397,7 @@
// //
// } // }
debugger
// 此处变量 有顺序 校验时,电梯至某处 // 此处变量 有顺序 校验时,电梯至某处
// 商品信息 是否填写完整 // 商品信息 是否填写完整
...@@ -414,19 +413,23 @@ ...@@ -414,19 +413,23 @@
//debugger //debugger
// 如果有,则说明有规格组合数据 // 如果有,则说明有规格组合数据
if ( spsjData2.pamTableList && spsjData2.pamTableList.length > 0 ) { if ( spsjData2.pamTableList && spsjData2.pamTableList.length > 0 ) {
//console.log(25522,spsjData2);
for(let i = 0; i < spsjData2.pamTableList.length; i++) { for(let i = 0; i < spsjData2.pamTableList.length; i++) {
//console.log("外",spsjData2.pamTableList[i]);
let itemObj = spsjData2.pamTableList[i][0]; let itemObj = spsjData2.pamTableList[i][0];
for (let itemKey in itemObj) { for (let itemKey in itemObj) {
// 长度判断,可以校验规格是否上传了图片 //----------------
// if ( !itemObj[itemKey] || itemObj[itemKey].length === 0) { // 有多余字段,可能为空,需要对有效字段单独判断
if ( !itemObj[itemKey] && itemKey !== 'thumb') { if ( !itemObj['js_price'] || !itemObj['sl_price'] || !itemObj['price'] || !itemObj['sc_price'] || !itemObj['stock'] || !itemObj['weight']) {
isGoodsPrice = false; isGoodsPrice = false;
break break
} else { } else {
// 所有校验通过,对价格进行处理,*100
if ( itemKey === 'js_price' || itemKey === 'sl_price' || itemKey === 'price' || itemKey === 'sc_price') {
itemObj[itemKey] = itemObj[itemKey] * 100;
}
isGoodsPrice = true; isGoodsPrice = true;
} }
// ---------------
} }
if (!isGoodsPrice) { if (!isGoodsPrice) {
break break
...@@ -436,12 +439,14 @@ ...@@ -436,12 +439,14 @@
// 无规格组合数据 // 无规格组合数据
let slingleSpeObj = spsjData1[0]; let slingleSpeObj = spsjData1[0];
for (let key in slingleSpeObj) { for (let key in slingleSpeObj) {
// 长度判断,可以校验规格是否上传了图片 if ( !slingleSpeObj[key] ) {
// if ( !slingleSpeObj[key] || (slingleSpeObj[key].length === 0) ) {
if ( !slingleSpeObj[key] && ( key !== 'imgs') ) {
isGoodsPrice = false; isGoodsPrice = false;
break break
} else { } else {
// 所有校验通过,对价格进行处理,*100
if ( key === 'js_price' || key === 'sl_price' || key === 'price' || key === 'sc_price') {
slingleSpeObj[key] = slingleSpeObj[key] * 100;
}
isGoodsPrice = true; isGoodsPrice = true;
} }
} }
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-radio-group v-model="radiomodel" class="radiomodels" @change="radiomodelbtn"> <el-radio-group v-model="radiomodel" class="radiomodels" @change="radiomodelbtn">
<el-radio-button label="1">上架销售中({{onsale_count}}</el-radio-button> <el-radio-button :label="1">上架销售中({{onsale_count}}</el-radio-button>
<el-radio-button label="2">仓库中的商品({{downsale_count}}</el-radio-button> <el-radio-button :label="2">仓库中的商品({{downsale_count}}</el-radio-button>
<el-radio-button label="3">审核记录</el-radio-button> <el-radio-button :label="3">审核记录</el-radio-button>
<el-radio-button label="4">最近删除({{del_count}}</el-radio-button> <el-radio-button :label="4">最近删除({{del_count}}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<el-form :inline="true" class="queryFormInline" :model="formInline" > <el-form :inline="true" class="queryFormInline" :model="formInline">
<el-row :span="24" type="flex" align="middle" justify="space-between"> <el-row :span="24" type="flex" align="middle" justify="space-between">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="商品编号"> <el-form-item label="商品编号">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
- -
<el-input v-model="formInline.price_max" size="mini" placeholder="最大价格" style="width:100px;"></el-input> <el-input v-model="formInline.price_max" size="mini" placeholder="最大价格" style="width:100px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</el-table-column> </el-table-column>
<el-table-column label="发布时间" align="center" :formatter="formatTime" prop="add_time"/> <el-table-column label="发布时间" align="center" :formatter="formatTime" prop="add_time"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" > <template slot-scope="scope">
<div v-if='radiomodel==3&&scope.row.up_onsale===1'> <div v-if='radiomodel==3&&scope.row.up_onsale===1'>
<!-- <el-button <!-- <el-button
size="mini" size="mini"
...@@ -175,13 +175,13 @@ ...@@ -175,13 +175,13 @@
</el-button> </el-button>
<el-divider direction="vertical" v-if="radiomodel!=3"></el-divider> <el-divider direction="vertical" v-if="radiomodel!=3"></el-divider>
<el-button <el-button
v-if="radiomodel!=4" v-if="radiomodel!=4 && radiomodel!=1"
size="mini" size="mini"
type="text" type="text"
@click="editgoods(scope.row)" @click="editgoods(scope.row)"
>编辑 >编辑
</el-button> </el-button>
<el-divider direction="vertical" v-if="radiomodel!=4"></el-divider> <el-divider direction="vertical" v-if="radiomodel!=4 && radiomodel!=1"></el-divider>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -217,10 +217,11 @@ ...@@ -217,10 +217,11 @@
/> />
<!-- 商品编辑--> <!-- 商品编辑-->
<el-dialog title="编辑商品" :visible.sync="editisOpen" v-if="editisOpen" width="70%" class="freightTemplate-add"> <el-dialog title="编辑商品" :visible.sync="editisOpen" v-if="editisOpen" width="70%" class="freightTemplate-add">
<editGood :option="goodsid" @closeIndexbtn="closeDialog" ></editGood> <editGood :option="goodsid" @closeIndexbtn="closeDialog"></editGood>
</el-dialog> </el-dialog>
<el-dialog title="商品详情" :visible.sync="isOpen" center v-if="isOpen" width="70%" class="freightTemplate-add" :close-on-click-modal="false"> <el-dialog title="商品详情" :visible.sync="isOpen" center v-if="isOpen" width="70%" class="freightTemplate-add"
<goodDetail :goods-id="goodDetails" @closeIndexbtn="closeDialog" ></goodDetail> :close-on-click-modal="false">
<goodDetail :goods-id="goodDetails" @closeIndexbtn="closeDialog"></goodDetail>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
...@@ -235,23 +236,23 @@ ...@@ -235,23 +236,23 @@
name: "freight", name: "freight",
data() { data() {
return { return {
goodDetails:{ goodDetails: {
goods_id:'' goods_id: ''
}, },
editisOpen: false,//编辑 editisOpen: false,//编辑
downsale_count:'',//仓库数量 downsale_count: '',//仓库数量
onsale_count:'',//上架数量 onsale_count: '',//上架数量
del_count:'',//删除数量 del_count: '',//删除数量
radiomodel:'1', radiomodel: '1',
formInline: { formInline: {
page: 1, page: 1,
limit: 20, limit: 20,
goods_name: '', goods_name: '',
goods_id: '', goods_id: '',
status:'5', status: '5',
uptime:'', uptime: '',
price_min:'', price_min: '',
price_max:'' price_max: ''
}, },
fullHeight: 0, fullHeight: 0,
tableHeight: 0, tableHeight: 0,
...@@ -318,38 +319,38 @@ ...@@ -318,38 +319,38 @@
} }
}, },
methods: { methods: {
handledelgrain(row,isall){ //彻底删除 handledelgrain(row, isall) { //彻底删除
let good_id,is_on,title,message let good_id, is_on, title, message
if(isall=='one'){ if (isall == 'one') {
good_id = [row.goods_id] good_id = [row.goods_id]
is_on = 2 is_on = 2
title ="彻底删除" title = "彻底删除"
message = "此操作将彻底删除该商品,是否继续?" message = "此操作将彻底删除该商品,是否继续?"
}else if(isall=='all'){ } else if (isall == 'all') {
good_id = this.ids good_id = this.ids
is_on = 2 is_on = 2
title ="彻底删除" title = "彻底删除"
message = "此操作将彻底删除选中的商品,是否继续?" message = "此操作将彻底删除选中的商品,是否继续?"
} }
let data={ let data = {
'goods_id':good_id, 'goods_id': good_id,
'is_on':is_on 'is_on': is_on
} }
this.$msgbox({ this.$msgbox({
title: title, title: title,
message: message, message: message,
center:true, center: true,
showCancelButton: true, showCancelButton: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
beforeClose: (action, instance, done) => { beforeClose: (action, instance, done) => {
if (action === 'confirm') { if (action === 'confirm') {
delgoodsStatus(data).then(res=>{ delgoodsStatus(data).then(res => {
if(res.code==1){ if (res.code == 1) {
done() done()
this.getList() this.getList()
} }
...@@ -365,48 +366,48 @@ ...@@ -365,48 +366,48 @@
}); });
}); });
}, },
handledelsale(row,status,isall){//删除还原 handledelsale(row, status, isall) {//删除还原
let good_id,is_on,title,message let good_id, is_on, title, message
if(isall=='one'){ if (isall == 'one') {
good_id = [row.goods_id] good_id = [row.goods_id]
if(status=='del'){ // 0 删除 1还原 if (status == 'del') { // 0 删除 1还原
is_on = 0 is_on = 0
title ="删除" title = "删除"
message = "是否删除该商品!" message = "是否删除该商品!"
} }
if(status=='return'){ if (status == 'return') {
is_on = 1 is_on = 1
title ="还原" title = "还原"
message = "是否还原该商品!" message = "是否还原该商品!"
} }
}else if(isall=='all'){ } else if (isall == 'all') {
good_id = this.ids good_id = this.ids
if(status=='del'){ if (status == 'del') {
is_on = 0 is_on = 0
title ="批量删除" title = "批量删除"
message = "是否删除选中的商品!" message = "是否删除选中的商品!"
} }
if(status=='return'){ if (status == 'return') {
is_on = 1 is_on = 1
title ="批量还原" title = "批量还原"
message = "是否还原选中的商品!" message = "是否还原选中的商品!"
} }
} }
let data={ let data = {
'goods_id':good_id, 'goods_id': good_id,
'is_on':is_on 'is_on': is_on
} }
this.$msgbox({ this.$msgbox({
title: title, title: title,
message: message, message: message,
center:true, center: true,
showCancelButton: true, showCancelButton: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
beforeClose: (action, instance, done) => { beforeClose: (action, instance, done) => {
if (action === 'confirm') { if (action === 'confirm') {
delgoodsStatus(data).then(res=>{ delgoodsStatus(data).then(res => {
if(res.code==1){ if (res.code == 1) {
done() done()
this.$message({ this.$message({
...@@ -414,7 +415,7 @@ ...@@ -414,7 +415,7 @@
message: '操作成功!' message: '操作成功!'
}); });
this.getList() this.getList()
}else{ } else {
done() done()
this.$message({ this.$message({
type: 'warning', type: 'warning',
...@@ -434,49 +435,49 @@ ...@@ -434,49 +435,49 @@
// }); // });
}); });
}, },
handleUpsale(row,status,isall){ //上下架 handleUpsale(row, status, isall) { //上下架
debugger debugger
let good_id,is_onsale,title,message let good_id, is_onsale, title, message
if(isall=='one'){ if (isall == 'one') {
good_id = [row.goods_id] good_id = [row.goods_id]
if(status=='up'){ // 0 下架 1上架 if (status == 'up') { // 0 下架 1上架
is_onsale = 1 is_onsale = 1
title ="商品上架" title = "商品上架"
message = "是否上架该商品" message = "是否上架该商品"
} }
if(status=='down'){ if (status == 'down') {
is_onsale = 0 is_onsale = 0
title ="商品下架" title = "商品下架"
message = "是否下架该商品!" message = "是否下架该商品!"
} }
}else if(isall=='all'){ } else if (isall == 'all') {
good_id = this.ids good_id = this.ids
if(status=='up'){ if (status == 'up') {
is_onsale = 1 is_onsale = 1
title ="商品批量上架" title = "商品批量上架"
message = "是否上架选中的商品!" message = "是否上架选中的商品!"
} }
if(status=='down'){ if (status == 'down') {
is_onsale = 0 is_onsale = 0
title ="商品批量下架" title = "商品批量下架"
message = "是否下架选中的商品!" message = "是否下架选中的商品!"
} }
} }
let data={ let data = {
'goods_id':good_id, 'goods_id': good_id,
'is_onsale':is_onsale 'is_onsale': is_onsale
} }
this.$msgbox({ this.$msgbox({
title: title, title: title,
message: message, message: message,
center:true, center: true,
showCancelButton: true, showCancelButton: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
beforeClose: (action, instance, done) => { beforeClose: (action, instance, done) => {
if (action === 'confirm') { if (action === 'confirm') {
shelvesStatus(data).then(res=>{ shelvesStatus(data).then(res => {
if(res.code==1){ if (res.code == 1) {
done() done()
this.getList() this.getList()
} }
...@@ -493,25 +494,25 @@ ...@@ -493,25 +494,25 @@
}); });
}, },
editgoods(row){//商品编辑 editgoods(row) {//商品编辑
this.editisOpen = true this.editisOpen = true
this.goodsid = Number(row.goods_id); this.goodsid = Number(row.goods_id);
}, },
lookdetail(row){//预览商品详情 lookdetail(row) {//预览商品详情
this.isOpen = true this.isOpen = true
this.goodDetails.goods_id = row.goods_id this.goodDetails.goods_id = row.goods_id
}, },
radiomodelbtn(val){ //头部切换 radiomodelbtn(val) { //头部切换
console.log(val) //console.log(505,val)
this.formInline= { this.formInline = {
page: 1, page: 1,
limit: 20, limit: 20,
goods_name: '', goods_name: '',
goods_id: '', goods_id: '',
status:'5', status: '5',
uptime:'', uptime: '',
price_min:'', price_min: '',
price_max:'' price_max: ''
} }
this.getList() this.getList()
}, },
...@@ -541,55 +542,45 @@ ...@@ -541,55 +542,45 @@
}, },
/** 查询freight列表 */ /** 查询freight列表 */
getList() { getList() {
// formInline: {
// page: 1,
// limit: 20,
// goods_name: '',
// goods_id: '',
// status:'',
// uptime:''
// price_min:'',
// price_max:''
// },
let data = { let data = {
page: this.formInline.page, page: this.formInline.page,
limit: this.formInline.limit, limit: this.formInline.limit,
} }
if(this.radiomodel==='1'){ if (this.radiomodel === 1) {
data['is_onsale'] = 1 data['is_onsale'] = 1
data['is_on'] = 1 data['is_on'] = 1
data['up_onsale'] = 0 data['up_onsale'] = 0
} }
if(this.radiomodel==2){ if (this.radiomodel === 2) {
data['is_onsale'] = 0 data['is_onsale'] = 0
data['is_on'] = 1 data['is_on'] = 1
data['up_onsale'] = 0 data['up_onsale'] = 0
} }
if(this.radiomodel==3){ if (this.radiomodel === 3) {
data['up_onsale'] = Number(this.formInline.status) data['up_onsale'] = Number(this.formInline.status)
data['is_onsale'] = 0 data['is_onsale'] = 0
data['is_on'] = 1 data['is_on'] = 1
} }
if(this.radiomodel==4){ if (this.radiomodel === 4) {
data['is_on'] = 0 data['is_on'] = 0
} }
if(this.formInline.goods_name){ if (this.formInline.goods_name) {
data['goods_name'] = this.formInline.goods_name data['goods_name'] = this.formInline.goods_name
} }
if(this.formInline.goods_id){ if (this.formInline.goods_id) {
data['goods_id'] = this.formInline.goods_id data['goods_id'] = this.formInline.goods_id
} }
if(this.formInline.uptime&&this.formInline.uptime.length==2){ if (this.formInline.uptime && this.formInline.uptime.length == 2) {
data['start_time'] = this.formInline.uptime[0]/1000 data['start_time'] = this.formInline.uptime[0] / 1000
data['end_time'] = this.formInline.uptime[1]/1000 data['end_time'] = this.formInline.uptime[1] / 1000
} }
if(this.formInline.price_min &&this.formInline.price_max){ if (this.formInline.price_min && this.formInline.price_max) {
data['price_min'] = this.formInline.price_min data['price_min'] = this.formInline.price_min
data['price_max'] = this.formInline.price_max data['price_max'] = this.formInline.price_max
} }
getlistGoods(data).then(res => { getlistGoods(data).then(res => {
if(res.data) { if (res.data) {
this.freightList = res.data.list; this.freightList = res.data.list;
this.total = res.data.count; this.total = res.data.count;
this.downsale_count = res.data.downsale_count//仓库数量 this.downsale_count = res.data.downsale_count//仓库数量
...@@ -621,34 +612,37 @@ ...@@ -621,34 +612,37 @@
}, },
} //methods结束 } //methods结束
}; };
</script> </script>
<style scoped lang="scss" type="text/stylus"> <style scoped lang="scss" type="text/stylus">
.freightTemplate-add { .freightTemplate-add {
/deep/.el-dialog { /deep/ .el-dialog {
height: 80%; height: 80%;
overflow : hidden; overflow: hidden;
} }
/deep/.el-dialog__body{
/deep/ .el-dialog__body {
height: calc(100% - 60px); height: calc(100% - 60px);
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
} }
} }
.radiomodels .el-radio-button{
margin:0 10px; .radiomodels .el-radio-button {
margin: 0 10px;
} }
/deep/ .radiomodels .el-radio-button .el-radio-button__inner{
/deep/ .radiomodels .el-radio-button .el-radio-button__inner {
border: 1px solid #DCDFE6 !important; border: 1px solid #DCDFE6 !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
/deep/ .radiomodels .el-radio-button .el-radio-button__orig-radio:checked+.el-radio-button__inner{
/deep/ .radiomodels .el-radio-button .el-radio-button__orig-radio:checked + .el-radio-button__inner {
box-shadow: none; box-shadow: none;
} }
.queryFormInline{
padding-bottom:20px; .queryFormInline {
padding-bottom: 20px;
} }
</style> </style>
...@@ -98,9 +98,9 @@ export default { ...@@ -98,9 +98,9 @@ export default {
let urlarr let urlarr
if (this.form.desc) { if (this.form.desc) {
urlarr = this.form.desc.split(',') urlarr = this.form.desc.split(',')
//debugger debugger
if (urlarr.length > 0 && urlarr.length <= 10) { if (urlarr.length > 0 && urlarr.length <= 10) {
if( Number(urlarr) > Number(this.collect_num)) { if( Number(urlarr.length) > Number(this.collect_num)) {
this.$message({type: 'warning',message:'您好,准备导入的商品条数过多,当前剩余次数不足,请重新输入'}); this.$message({type: 'warning',message:'您好,准备导入的商品条数过多,当前剩余次数不足,请重新输入'});
return; return;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论