提交 3bba680a authored 作者: huaxinzhu's avatar huaxinzhu

商品模块,bug修复02

上级 99c7beac
...@@ -80,12 +80,16 @@ ...@@ -80,12 +80,16 @@
mounted() { mounted() {
this.getFreightData(); this.getFreightData();
//debugger //debugger
console.log('售后数据:',this.goodsaftersale); //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;
} }
}, },
methods: { methods: {
/** 售后服务数据 初始化 */
initInfo() {
this.$refs.goodsAfterSaleForm.resetFields();
},
// 运费模板 // 运费模板
getFreightData() { getFreightData() {
// let query = { page: 1, limit: 50 }; // let query = { page: 1, limit: 50 };
......
...@@ -77,11 +77,15 @@ ...@@ -77,11 +77,15 @@
components: {}, components: {},
mounted() { mounted() {
this.goodsDeForm = this.imgdata; this.goodsDeForm = this.imgdata;
//console.log("详情:",this.imgdata);
console.log("详情:",this.imgdata);
}, },
watch: {}, watch: {},
methods: { methods: {
/** 初始化 商品详情 */
initInfo() {
this.goodsDeForm.description = '';
this.goodsDetailsImgFileList = [];
},
// 通过原生 input上传 图片 // 通过原生 input上传 图片
fileChange() { fileChange() {
const list = this.$refs.file.files; const list = this.$refs.file.files;
......
...@@ -207,34 +207,8 @@ ...@@ -207,34 +207,8 @@
} // return end } // return end
}, },
components: {}, components: {},
watch: { watch: {},
// 'goodsImgFileList': { created() {},
// handler(val, oldVal) {
// if(val.length > 0) {
// this.goodsInfoForm.imgs = '';
// let imgArr = [];
// val.forEach(item => {
// imgArr.push(item.url);
// })
// this.goodsInfoForm.imgs = imgArr.toString();
// }else if(val.length === 0){
// this.goodsInfoForm.imgs = '';
// }
// //console.log(123,this.goodsInfoForm.imgs);
// },
// deep: true
// }
// serviceagsTags: {
// handler(val, oldVal) {
// this.$set(this.goodsInfoForm, 'serviceagsTags', val)
// },
// deep: true
// },
},
created() {
},
mounted() { mounted() {
//debugger //debugger
//深拷贝一份最开始的数据,为初始化准备 //深拷贝一份最开始的数据,为初始化准备
...@@ -259,6 +233,11 @@ ...@@ -259,6 +233,11 @@
this.getBrands(); this.getBrands();
}, },
methods: { methods: {
// 数据初始化
initInfo() {
this.$refs.goodsInfoForm.resetFields();
this.goodsImgFileList = [];
},
// 获取 省 // 获取 省
getArea() { getArea() {
let limboNode = { let limboNode = {
......
...@@ -213,7 +213,7 @@ export default { ...@@ -213,7 +213,7 @@ export default {
}, },
watch:{ watch:{
'parameterdata': function(val) { 'parameterdata': function(val) {
//debugger debugger
this.orgGoodsPam = val; this.orgGoodsPam = val;
//console.log("监听",this.orgGoodsPam); //console.log("监听",this.orgGoodsPam);
}, },
...@@ -222,14 +222,21 @@ export default { ...@@ -222,14 +222,21 @@ export default {
//this.orgGoodsPam = this.parameterdata; //this.orgGoodsPam = this.parameterdata;
}, },
mounted() { mounted() {
//console.log("加载后,",this.parameterdata); console.log("加载后,",this.parameterdata);
if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) { if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) {
this.orgGoodsPam = this.parameterdata; this.orgGoodsPam = this.parameterdata;
}else { }else {
this.singleSpecTable = this.parameterdata.singleSpecTable if( this.parameterdata.singleSpecTable.length === 1 ) {
this.singleSpecTable = this.parameterdata.singleSpecTable
}
} }
}, },
methods: { methods: {
/** 初始化 商品售价 数据 */
initInfo() {
this.orgGoodsPam = {};
//this.singleSpecTable =
},
// 查看各类价格说明 // 查看各类价格说明
viewPriceExp() { viewPriceExp() {
this.isViewPriceExp = true; this.isViewPriceExp = true;
......
...@@ -127,14 +127,14 @@ export default { ...@@ -127,14 +127,14 @@ export default {
this.$forceUpdate() this.$forceUpdate()
} }
}, },
watch:{ watch:{},
// "speData.specsGroup": {
// handle: function(val) {
// console.log(22222,val);
// }
// }
},
methods: { methods: {
/** 初始化 商品规格数据 */
initInfo() {
this.$set(this.specsGroup.spec_value,this.specsGroup.spec_value.length,this.speParamName);
this.speData = [];
this.$set(this.speData,this.speData.length,this.specsGroup);
},
/** 添加规格*/ /** 添加规格*/
addSpe() { addSpe() {
let specsGroup = { let specsGroup = {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<GoodsParameter ref="goodsparameter" :parameterdata="parameterdata" /> <GoodsParameter ref="goodsparameter" :parameterdata="parameterdata" />
</div> </div>
</div> </div>
<!-- 商品详情 -->
<div class="floor-item"> <div class="floor-item">
<div class="floor-item-box"> <div class="floor-item-box">
<p class="card-header-title floor-item-box-title"><span class="blue-block-goods blue-block-goods-title"></span>商品详情</p> <p class="card-header-title floor-item-box-title"><span class="blue-block-goods blue-block-goods-title"></span>商品详情</p>
...@@ -201,7 +201,6 @@ ...@@ -201,7 +201,6 @@
this.parameterdata.pamTableList = []; this.parameterdata.pamTableList = [];
this.parameterdata.pamDataList = []; this.parameterdata.pamDataList = [];
res.data.specs_group.forEach((item)=> { res.data.specs_group.forEach((item)=> {
//
item.js_price = item.js_price / 100; item.js_price = item.js_price / 100;
item.sl_price = item.js_price / 100; item.sl_price = item.js_price / 100;
item.price = item.price / 100; item.price = item.price / 100;
...@@ -212,7 +211,6 @@ ...@@ -212,7 +211,6 @@
prePriceArr.push(item); prePriceArr.push(item);
this.parameterdata.pamTableList.push( prePriceArr ); this.parameterdata.pamTableList.push( prePriceArr );
this.parameterdata.pamDataList.push(item.spec_values); this.parameterdata.pamDataList.push(item.spec_values);
}) })
this.parameterdata.pamNameList = res.data.specs; this.parameterdata.pamNameList = res.data.specs;
}else { }else {
...@@ -237,9 +235,6 @@ ...@@ -237,9 +235,6 @@
// 商品详情 // 商品详情
this.imgdata.description = res.data.description; this.imgdata.description = res.data.description;
//this.goodsinfodata = res.data;
//this.imgdata = res.data.description;
//this.goodsaftersale = res.data;
// 售后服务 // 售后服务
this.goodsaftersale.freight_id = res.data.freight_id; this.goodsaftersale.freight_id = res.data.freight_id;
...@@ -261,9 +256,7 @@ ...@@ -261,9 +256,7 @@
}else { }else {
this.goodsaftersale.stags = []; this.goodsaftersale.stags = [];
} }
} }
}); });
} }
}, },
...@@ -335,10 +328,6 @@ ...@@ -335,10 +328,6 @@
} }
if (level === 1) { if (level === 1) {
//result = res.data
// res.data.forEach((item,index)=> {
// result = (item.id === limboNode.id) ? item.children : [];
// });
for(let i = 0; i < res.data.length; i++) { for(let i = 0; i < res.data.length; i++) {
if( limboNode.id === res.data[i].id ) { if( limboNode.id === res.data[i].id ) {
result = res.data[i].children; result = res.data[i].children;
...@@ -355,7 +344,6 @@ ...@@ -355,7 +344,6 @@
} }
if (level === 2) { if (level === 2) {
for(let i = 0; i < res.data.length; i++) { for(let i = 0; i < res.data.length; i++) {
if( res.data[i].children.length > 0) { if( res.data[i].children.length > 0) {
for(let j = 0; j < res.data[i].children.length; j++) { for(let j = 0; j < res.data[i].children.length; j++) {
...@@ -374,7 +362,6 @@ ...@@ -374,7 +362,6 @@
}) })
} }
// result = []
resolve(result) resolve(result)
this.loading = false; this.loading = false;
}); });
...@@ -389,17 +376,10 @@ ...@@ -389,17 +376,10 @@
// console.log(232,this.goodsinfodata.categoryStr,this.goodsinfodata.categoryList); // console.log(232,this.goodsinfodata.categoryStr,this.goodsinfodata.categoryList);
}, },
// 保存/提交
save() { save() {
// let spxxDataId = this.$refs.goodsInfo.goodsInfoForm.goods_id;
//
// if(!spxxDataId) {
//
// }
debugger
// 此处变量 有顺序 校验时,电梯至某处 // 此处变量 有顺序 校验时,电梯至某处
// 商品信息 是否填写完整 // 商品信息 是否填写完整
let isGoodsInfoMsg = this.$refs['goodsInfo'].validateGoodsInfoForm(); let isGoodsInfoMsg = this.$refs['goodsInfo'].validateGoodsInfoForm();
...@@ -410,7 +390,6 @@ ...@@ -410,7 +390,6 @@
let spsjData1 = this.$refs.goodsparameter.singleSpecTable; let spsjData1 = this.$refs.goodsparameter.singleSpecTable;
let spsjData2 = this.$refs.goodsparameter.orgGoodsPam; let spsjData2 = this.$refs.goodsparameter.orgGoodsPam;
//debugger
// 如果有,则说明有规格组合数据 // 如果有,则说明有规格组合数据
if ( spsjData2.pamTableList && spsjData2.pamTableList.length > 0 ) { if ( spsjData2.pamTableList && spsjData2.pamTableList.length > 0 ) {
for(let i = 0; i < spsjData2.pamTableList.length; i++) { for(let i = 0; i < spsjData2.pamTableList.length; i++) {
...@@ -428,7 +407,6 @@ ...@@ -428,7 +407,6 @@
} }
isGoodsPrice = true; isGoodsPrice = true;
} }
// --------------- // ---------------
} }
if (!isGoodsPrice) { if (!isGoodsPrice) {
...@@ -458,9 +436,6 @@ ...@@ -458,9 +436,6 @@
// 售后服务 是否填写完整 // 售后服务 是否填写完整
let isGoodsAfterSaleMsg = this.$refs['goodsaftersale'].validateGoodsAfterSaleForm(); let isGoodsAfterSaleMsg = this.$refs['goodsaftersale'].validateGoodsAfterSaleForm();
// 商品售价,由商品规格决定,
// 如果 没有填写商品规格,那么商品售价应该获取
if(!isGoodsInfoMsg) { if(!isGoodsInfoMsg) {
this.$message({type:'error',message:'商品信息未填写完整'}); this.$message({type:'error',message:'商品信息未填写完整'});
this.setFloorNavMountClick(0); this.setFloorNavMountClick(0);
...@@ -491,10 +466,9 @@ ...@@ -491,10 +466,9 @@
// 商品规格 // 商品规格
let spggData = this.$refs.goodsspecifications.speData; let spggData = this.$refs.goodsspecifications.speData;
// this.goodsAllData.specs = spggData;
// 商品售价,上面已经获取, // 商品售价,上面已经获取,
let spsjData = {}; // specs_group let spsjData = {};
if( spsjData2.pamTableList && spsjData2.pamTableList.length > 0 ) { if( spsjData2.pamTableList && spsjData2.pamTableList.length > 0 ) {
this.goodsAllData['specs_group'] = []; this.goodsAllData['specs_group'] = [];
this.goodsAllData['specs'] = spggData; this.goodsAllData['specs'] = spggData;
...@@ -511,37 +485,72 @@ ...@@ -511,37 +485,72 @@
// 售后服务 数据 // 售后服务 数据
let ssffData = this.$refs.goodsaftersale.goodsAfterSaleForm; let ssffData = this.$refs.goodsaftersale.goodsAfterSaleForm;
console.log("商品信息:",spxxData);
console.log("商品规格:",spggData);
console.log("商品售价:",spsjData);
console.log("商品详情:",spxqData);
console.log("商品售后:",ssffData);
Object.assign( this.goodsAllData, spxxData, spsjData, spxqData, ssffData); Object.assign( this.goodsAllData, spxxData, spsjData, spxqData, ssffData);
// spxxData.categoryList = []
// 经营类目,服务标签,需要单独处理数据格式 // 经营类目,服务标签,需要单独处理数据格式
this.goodsAllData.category_id = spxxData.categoryList.slice(-1)[0] ? spxxData.categoryList.slice(-1)[0] : ''; this.goodsAllData.category_id = spxxData.categoryList.slice(-1)[0] ? spxxData.categoryList.slice(-1)[0] : '';
if(this.goodsAllData.stags) { if(this.goodsAllData.stags) {
this.goodsAllData.stags = this.goodsAllData.stags.toString(); this.goodsAllData.stags = this.goodsAllData.stags.toString();
} }
console.log('最终数据:',this.goodsAllData); // let msg = res.data.Apply.content;
// this.$router.push({
// name: 'reviewFail',
// params: { msg: msg }
// });
if(this.goodsAllData.goods_id) { // if(this.$route.params.msg) {
// this.msg = this.$route.params.msg;
// }
// freight
let routerParam = { fuck: "hxz" };
// 商品id 不为 0 是修改
if( this.goodsAllData.goods_id ) {
updateGoodsNew(this.goodsAllData).then(res=> { updateGoodsNew(this.goodsAllData).then(res=> {
console.log("修改结果:",res); if( res.code === 1 ) {
this.$message({type: 'success', message:'编辑成功'});
this.initAllGoodsInfo();
this.$emit("closeEditDialog");
}
if(res.code === 0) {
let msg = res.message ? res.message : '编辑失败'
this.$message({type: 'error', message: msg});
}
}); });
}else { }else {
// 商品id 为 0 是新增
addGoods( this.goodsAllData ).then( res=> { addGoods( this.goodsAllData ).then( res=> {
console.log("返回结果",res); if( res.code === 1 ) {
this.$message({type: 'success', message:'新增成功'});
this.initAllGoodsInfo();
//this.$router.push({ name: 'system/goodsimport/goodsgement',params: routerParam }); //management
//this.$router.push({ path: '/system/goodsimport/management' });
this.$router.push({ path: '/system/goods/management' });
}
if(res.code === 0) {
let msg = res.message ? res.message : '新增失败'
this.$message({type: 'error', message: msg});
}
}); });
} }
}, },
/*-----------------------*/ /*-----------------------*/
// 初始化 商品所有数据
initAllGoodsInfo() {
// 初始化 商品信息 数据
this.$refs.goodsInfo.initInfo();
// 初始化 商品规格 数据
this.$refs.goodsspecifications.initInfo();
// 初始化 商品售价 数据
this.$refs.goodsparameter.initInfo();
// 初始化 商品详情 数据
this.$refs.goodsdetailsimg.initInfo();
// 初始化 商品售后 数据
this.$refs.goodsaftersale.initInfo();
},
/* 添加商品详细 */ /* 添加商品详细 */
/* 设置楼层导航事件驱动方法* @params Number index 楼层下标 */ /* 设置楼层导航事件驱动方法* @params Number index 楼层下标 */
......
<template> <template>
<div id="box" class="box" style="height: 100%; overflow-y: scroll; "> <div id="box" class="box" style="height: 100%; overflow-y: scroll; ">
<el-breadcrumb style='margin-left:50px; font-size:16px;font-weight:900;'> <el-breadcrumb style='margin-left:50px; font-size:16px;font-weight:900;'>
<el-breadcrumb-item >{{goodsinfor.category_first_name}}</el-breadcrumb-item> <el-breadcrumb-item>{{goodsinfor.category_first_name}}</el-breadcrumb-item>
<el-breadcrumb-item v-if='goodsinfor.category_second_name'>{{goodsinfor.category_second_name}}</el-breadcrumb-item> <el-breadcrumb-item v-if='goodsinfor.category_second_name'>{{goodsinfor.category_second_name}}
</el-breadcrumb-item>
<el-breadcrumb-item v-if='goodsinfor.category_three_name'>{{goodsinfor.category_three_name}}</el-breadcrumb-item> <el-breadcrumb-item v-if='goodsinfor.category_three_name'>{{goodsinfor.category_three_name}}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<div style="width: 1220px;margin-right: auto;margin-left: auto;"> <div style="width: 1220px;margin-right: auto;margin-left: auto;">
<div class="shoop_details"> <div class="shoop_details">
<!-- 放大镜 --> <!-- 放大镜 -->
<div class="shoop_details_Magnifying" style="width: 420px"> <div class="shoop_details_Magnifying" style="width: 420px">
<Magnifying :imageurl="picture" :imguser="'i'" /> <Magnifying :imageurl="picture" :imguser="'i'"/>
<div class="details_Magnifying_content"> <div class="details_Magnifying_content">
<div class="details_Magnifying_icon"> <div class="details_Magnifying_icon">
<i class="el-icon-arrow-left Magnifying_icon" /> <i class="el-icon-arrow-left Magnifying_icon"/>
</div> </div>
<swiper ref="mySwiper" :options="swiperOptions"> <swiper ref="mySwiper" :options="swiperOptions">
<swiper-slide <swiper-slide
...@@ -37,9 +38,9 @@ ...@@ -37,9 +38,9 @@
</swiper-slide> </swiper-slide>
</swiper> </swiper>
<div class="details_Magnifying_icon2"> <div class="details_Magnifying_icon2">
<i class="el-icon-arrow-right Magnifying_icon" /> <i class="el-icon-arrow-right Magnifying_icon"/>
</div> </div>
</div> </div>
<!-- </swiper-slide> <!-- </swiper-slide>
...@@ -60,12 +61,12 @@ ...@@ -60,12 +61,12 @@
<div <div
class="shoop_brand" class="shoop_brand"
> >
<div class="shoop_brand_tutorial" >{{goodsinfor.goods_name}}</div> <div class="shoop_brand_tutorial">{{goodsinfor.goods_name}}</div>
<!-- 价格start --> <!-- 价格start -->
<div class="test"> <div class="test">
<div class="shoop_brand_price"> <div class="shoop_brand_price">
<div> <div>
<span class="shoop_brand_price_text" >商城价</span> <span class="shoop_brand_price_text">商城价</span>
<span style="font-size: 24px"></span> <span style="font-size: 24px"></span>
<span class="shoop_brand_price_money">{{ goodsprice/100 }}</span> <span class="shoop_brand_price_money">{{ goodsprice/100 }}</span>
</div> </div>
...@@ -86,7 +87,7 @@ ...@@ -86,7 +87,7 @@
</div> </div>
<div class="shoop_brand_evaluation_text"> <div class="shoop_brand_evaluation_text">
<span class="evaluation_line textColor">评价</span><span class="evaluation_text blueColor"> <span class="evaluation_line textColor">评价</span><span class="evaluation_text blueColor">
<el-rate disabled text-color="red" style="line-height: 10px; <el-rate disabled text-color="red" style="line-height: 10px;
display: inline-block;" v-model="value1"></el-rate> display: inline-block;" v-model="value1"></el-rate>
</span> </span>
</div> </div>
...@@ -95,27 +96,27 @@ ...@@ -95,27 +96,27 @@
<span class="cumulative_text blueColor">9999+</span> <span class="cumulative_text blueColor">9999+</span>
<span class="blueColor">+</span> <span class="blueColor">+</span>
</div> </div>
<div style="flex: 25%" /> <div style="flex: 25%"/>
</div> </div>
</div> </div>
<!-- 价格end --> <!-- 价格end -->
<div class="shoop_distributions textFont"> <div class="shoop_distributions textFont">
<!-- 配送start --> <!-- 配送start -->
<el-row class="shoop_distributions_delivery"> <el-row class="shoop_distributions_delivery">
<!-- <el-col :span="2" style="text-align: right;">配送至:</el-col> --> <!-- <el-col :span="2" style="text-align: right;">配送至:</el-col> -->
<el-col :span="10"> <el-col :span="10">
<!-- <el-cascader v-model="el_value" v-if="el_valuestatus" @change="elvalueclick" :props="props" placeholder="请选择" style="width:150px;margin-left:12px;"> --> <!-- <el-cascader v-model="el_value" v-if="el_valuestatus" @change="elvalueclick" :props="props" placeholder="请选择" style="width:150px;margin-left:12px;"> -->
</el-cascader> </el-cascader>
</el-col> </el-col>
<el-col :span="12" class="distributions_have_goods"> <el-col :span="12" class="distributions_have_goods">
<!-- 有接口后做判断 --> <!-- 有接口后做判断 -->
<!-- <span class="distributions_goods textColor">{{centext}}</span> <!-- <span class="distributions_goods textColor">{{centext}}</span>
<span <span
class="distributions_address textColor" class="distributions_address textColor"
>{{ sourcename }} / {{ freename }}</span> --> >{{ sourcename }} / {{ freename }}</span> -->
</el-col> </el-col>
</el-row> </el-row>
<!-- 配送end --> <!-- 配送end -->
<!-- 规格start --> <!-- 规格start -->
<div class="distributions_specifications" v-if='adsp'> <div class="distributions_specifications" v-if='adsp'>
...@@ -124,24 +125,24 @@ ...@@ -124,24 +125,24 @@
:key="index" :key="index"
class="distributions_specifications_box" class="distributions_specifications_box"
> >
<el-col :span="2" style="text-align: right;"> <el-col :span="2" style="text-align: right;">
<span class="specifications_text">{{ item.spec_name }}</span> <span class="specifications_text">{{ item.spec_name }}</span>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<div <div
v-for="(iten,indexchild) in item.spec_value" v-for="(iten,indexchild) in item.spec_value"
:class="{'aactivs':iten.classstatus}" :class="{'aactivs':iten.classstatus}"
:key="indexchild" :key="indexchild"
:skuid="item.id" :skuid="item.id"
:id="iten.id" :id="iten.id"
class="specifications_box_size" class="specifications_box_size"
@click="sku_p(index,indexchild,item.id,iten.value)" @click="sku_p(index,indexchild,item.id,iten.value)"
> >
{{ iten.value}} {{ iten.value}}
<!-- <img v-show='iten.classstatus' src="@/assets/images/choose.png" alt="image" style='position:absolute;bottom:0px;right:0;'> --> <!-- <img v-show='iten.classstatus' src="@/assets/images/choose.png" alt="image" style='position:absolute;bottom:0px;right:0;'> -->
</div> </div>
</el-col> </el-col>
<!-- <i class="el-icon-check"/> v-show="showImage" :class="item.defaultColor.specifications ? 'none' : ''"--> <!-- <i class="el-icon-check"/> v-show="showImage" :class="item.defaultColor.specifications ? 'none' : ''"-->
</el-row> </el-row>
...@@ -149,14 +150,15 @@ ...@@ -149,14 +150,15 @@
<!-- 规格end --> <!-- 规格end -->
<el-row class="shoop_number"> <el-row class="shoop_number">
<el-col :span='2' style="text-align: right;">数量:</el-col> <el-col :span='2' style="text-align: right;">数量:</el-col>
<el-col :span='22' > <el-col :span='22'>
<el-input-number size="mini" v-model="good_numble" @change="goodsstock()" :min="1" :max="stock" label="描述文字" style="margin-left:12px;"></el-input-number> <el-input-number size="mini" v-model="good_numble" @change="goodsstock()" :min="1" :max="stock"
label="描述文字" style="margin-left:12px;"></el-input-number>
</el-col> </el-col>
</el-row> </el-row>
<div> <div>
<!-- <el-button class="shoop_button" v-if="(jdstatusd==18||jdstatus==0)&&sourcecrous==2">该商品已下架,欢迎挑选其他商品!</el-button> <!-- <el-button class="shoop_button" v-if="(jdstatusd==18||jdstatus==0)&&sourcecrous==2">该商品已下架,欢迎挑选其他商品!</el-button>
<el-button class="shoop_button" @click="addcart_submit($event)" v-if="jdstatusd!=18">加入采购单</el-button> <el-button class="shoop_button" @click="addcart_submit($event)" v-if="jdstatusd!=18">加入采购单</el-button>
<el-button class="shoop_button" @click="addcart_submits($event)" v-if="jdstatus!=0&&sourcecrous==2&&(source==2||source==7)" >查看第三方详情</el-button> --> <el-button class="shoop_button" @click="addcart_submits($event)" v-if="jdstatus!=0&&sourcecrous==2&&(source==2||source==7)" >查看第三方详情</el-button> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -171,7 +173,7 @@ ...@@ -171,7 +173,7 @@
<div style="display: block"> <div style="display: block">
<div style="display: flex"> <div style="display: flex">
<div class="shoop_text">商品详情</div> <div class="shoop_text">商品详情</div>
<div class="shoop_details_box" /> <div class="shoop_details_box"/>
</div> </div>
<div class="textFont shoop_goods"> <div class="textFont shoop_goods">
<div class="shoop_goods_number"> <div class="shoop_goods_number">
...@@ -199,836 +201,883 @@ ...@@ -199,836 +201,883 @@
</template> </template>
<script> <script>
import { getgoodsdetail } from '@/api/module/goodsgement' import {getgoodsdetail} from '@/api/module/goodsgement'
import Magnifying from '@/components/Magnifying' import Magnifying from '@/components/Magnifying'
export default {
components: { export default {
Magnifying, components: {
}, Magnifying,
props: { },
goodsId: { props: {
type: Object, goodsId: {
required: true type: Object,
} required: true
}
}, },
data() { data() {
return { return {
el_valuestatus:true, el_valuestatus: true,
el_value: [],//地址 el_value: [],//地址
props: { props: {
checkStrictly: false , checkStrictly: false,
expandTrigger: 'click', expandTrigger: 'click',
emitPath: true, emitPath: true,
lazy: true, lazy: true,
lazyLoad:this.lazyLoad, lazyLoad: this.lazyLoad,
value: "id", value: "id",
label: "name", label: "name",
leaf: "leaf" leaf: "leaf"
},
aitivindex:0,
spceindex:'',
showImage: false,
productActive: false,
default1: '',
default2: '',
picture: '',
goods: '有货',
price: '', // 选中规格的价钱
shopItemInfo: {}, // 存放要和选中的值进行匹配的数据
selectArr: [], // 存放被选中的值
subIndex: [], // 是否选中 因为不确定是多规格还是单规格,所以这里定义数组来判断
swiperOptions: {
// 分页器配置
pagination: {
el: '.swiper-pagination'
}, },
// 设定初始化时slide的索引 aitivindex: 0,
initialSlide: 0, spceindex: '',
// Slides的滑动方向,可设置水平(horizontal)或垂直(vertical) showImage: false,
direction: 'horizontal', productActive: false,
// 箭头配置 default1: '',
navigation: { default2: '',
nextEl: '.el-icon-arrow-right', picture: '',
prevEl: '.el-icon-arrow-left' goods: '有货',
price: '', // 选中规格的价钱
shopItemInfo: {}, // 存放要和选中的值进行匹配的数据
selectArr: [], // 存放被选中的值
subIndex: [], // 是否选中 因为不确定是多规格还是单规格,所以这里定义数组来判断
swiperOptions: {
// 分页器配置
pagination: {
el: '.swiper-pagination'
},
// 设定初始化时slide的索引
initialSlide: 0,
// Slides的滑动方向,可设置水平(horizontal)或垂直(vertical)
direction: 'horizontal',
// 箭头配置
navigation: {
nextEl: '.el-icon-arrow-right',
prevEl: '.el-icon-arrow-left'
},
// 一个屏幕展示的数量
slidesPerView: 5,
// 间距
spaceBetween: 10
}, },
// 一个屏幕展示的数量 value1: 5,
slidesPerView: 5, old_goods_title: '',
// 间距 sourcename: '',
spaceBetween: 10 freename: '',
}, centext: '有货',
value1:5, iss: 0,
old_goods_title:'', arrs: [],
sourcename:'', addresslable: '',
freename:'', propsaddress: {
centext:'有货', label: 'name',
iss :0, value: 'id',
arrs :[], children: 'children',
addresslable:'', // checkStrictly:true
propsaddress:{ },
label: 'name', valueoptionaddress: [],
value: 'id', optionsChangedaddress: false,
children: 'children', optionsdetiladdress: [],
// checkStrictly:true skuids: '',
}, jdactivity_price: 0,
valueoptionaddress:[], jdstatus: 1,
optionsChangedaddress:false, jdstatusd: 1,
optionsdetiladdress:[], jdthird_id: '',
skuids:'', tmthird_id: '',
jdactivity_price:0, sourcecrous: '2',
jdstatus:1, source: 2,
jdstatusd:1, shopcartlist: {},
jdthird_id:'', optionlist: {},
tmthird_id:'', arr: true,
sourcecrous:'2', tip: true,
source:2, arr2: true,
shopcartlist:{}, cart_num: 0,
optionlist:{}, optionsmg: [],
arr:true, hovers: false,
tip:true, hovers1: false,
arr2:true, hovers2: false,
cart_num:0, hovers3: false,
optionsmg:[], cart_num: '0',
hovers:false, user: '测试',
hovers1:false, adsp: false,
hovers2:false, stock: 1,
hovers3:false, good_numble: 1,
cart_num:'0', recommendss: [],
user:'测试', hotshow: true,
adsp: false, hot_goods: [], //店铺热销
stock: 1, goshopping: false,
good_numble: 1, lunimg: [], //商品小图图
recommendss: [], bigimg: '', //大图
hotshow: true, loading: true,
hot_goods: [], //店铺热销 // logo_src: require('@/assets/images/logo.png'),
goshopping: false, click_show: false,
lunimg: [], //商品小图图 specstrue: false,
bigimg: '', //大图 specs: '',
loading: true, specsitem: {},
// logo_src: require('@/assets/images/logo.png'), html: '',
click_show: false, shopinfor: '', //店铺信息
specstrue: false, goodsinforlist: '', //全部信息列表
specs: '', commentLists: [], //评论列表
specsitem:{}, goodsprice: '', //商品价格
html: '', scprice: '', //市场价格
shopinfor: '', //店铺信息 goodsinfor: '', //商品基础信息
goodsinforlist: '', //全部信息列表 checked: true,
commentLists: [], //评论列表 valueStarNums: 5, // 显示点亮星星的数量
goodsprice: '', //商品价格 price: 200 * 100,
scprice: '', //市场价格 dataList: "1",
goodsinfor: '', //商品基础信息 show: false, // 抵扣和赠送的弹出层
checked: true, tulesTitle: '', // 抵扣和赠送的弹出层的标题
valueStarNums: 5, // 显示点亮星星的数量 show7day: false, //7天包退弹出层
price: 200 * 100, images: [],
dataList: "1", isOpacity: false, //顶部返回和购物车导航是否透明
show: false, // 抵扣和赠送的弹出层 cart_num: 0, //购物车数量
tulesTitle: '', // 抵扣和赠送的弹出层的标题 current: 0,
show7day: false, //7天包退弹出层 isSelected: false, //是否收藏
images: [], screenWidth: document.body.clientWidth, // 屏幕尺寸
isOpacity: false, //顶部返回和购物车导航是否透明 // goods:{},
cart_num: 0, //购物车数量 showBase: false,
current: 0, sku: {
isSelected: false, //是否收藏 tree: [],
screenWidth: document.body.clientWidth, // 屏幕尺寸 list: [],
// goods:{}, price: '1.00', // 默认价格(单位元)
showBase: false, stock_num: 10000000, // 商品总库存
sku: { collection_id: 2261, // 无规格商品 skuId 取 collection_id,否则取所选 sku 组合对应的 id
tree: [], none_sku: false, // 是否无规格商品
list: [], hide_stock: false, // 是否隐藏剩余库存
price: '1.00', // 默认价格(单位元)
stock_num: 10000000, // 商品总库存
collection_id: 2261, // 无规格商品 skuId 取 collection_id,否则取所选 sku 组合对应的 id
none_sku: false, // 是否无规格商品
hide_stock: false, // 是否隐藏剩余库存
},
goods_id: '',
goods: {
title: '测试商品',
picture: '',
price: 1,
origin: '',
},
specs_goods: {},
iscollection: ''
}
},
created() {
this.getdetail()
// this.el_value = [1,72]
// this.goodsonly()
},
mounted() {
},
methods: {
elvalueclick(){
// this.goodsonly()
},
lazyLoad(node, resolve) {
this.getData(node, resolve)
},
getData(node, resolve) {
const level = node.level
var date
if (level === 0) {
date = {
pid: 0
}
}
if (level === 1) {
date = {
pid: node.value
}
}
goodsjdAddress(date).then(res => {
var result
if (level === 0) {
result = res.data
result.forEach(item => {
item.value = item.id;
item.label = item.name
item.leaf = level
item.children=[]
})
}
if (level === 1) {
result = res.data
result.forEach(item => {
item.value = item.id;
item.label = item.name
//这句代码表示当点击最后一级的时候 label后面不会转圈圈 并把相关值赋值到选择器上
item.leaf = level >= 1
})
}
resolve(result)
})
},
sale_goods(infor){
return infor.sale
// if(infor.source==2){
// var strung = infor.third_id.toString()
// console.log(strung.substr(strung.length-4) ,'sdfghjk')
// var num_sale = Number(strung.substr(strung.length-4))
// return num_sale+infor.real_sale
// }else{
// return infor.sale
// }
},
//是否有货
goodsonly(){
let optionlist = JSON.parse(localStorage.getItem('optionlist'))
if(optionlist){
}else{
this.centext = '无货'
return false
}
let date = {
sku_id:optionlist.id,
goods_id:Number(this.$route.query.id),
address_id:this.el_value[1]?this.el_value[1]:72
}
debugger
addressCheckAvailable(date).then(res=>{
if(res.code==1){
//console.log(data.data,'----')
// if(res.data.data===0){
this.centext = '有货'
// }
// if(res.data.data === 1){
// that.centext = '无货'
// }
if(res.data.freight!==0){
this.freename = '邮费'+res.data.freight/100+'元'
}
if(res.data.freight===0){
this.freename = '包邮'
}
}else{
this.centext = '无货'
} },
}) goods_id: '',
}, goods: {
titlename(oldgoodsid){ title: '测试商品',
picture: '',
price: 1,
origin: '',
},
specs_goods: {},
iscollection: ''
}
let date = { },
goods_id:oldgoodsid created() {
} this.getdetail()
// this.el_value = [1,72]
// this.goodsonly()
},
mounted() {
chooseGoodsOldTitle(date).then(res=>{ },
if(res.code==1){ methods: {
this.old_goods_title = res.data elvalueclick() {
} // this.goodsonly()
}) },
lazyLoad(node, resolve) {
this.getData(node, resolve)
},
getData(node, resolve) {
const level = node.level
var date
if (level === 0) {
date = {
pid: 0
}
}
if (level === 1) {
date = {
pid: node.value
}
}
goodsjdAddress(date).then(res => {
var result
if (level === 0) {
result = res.data
result.forEach(item => {
item.value = item.id;
item.label = item.name
item.leaf = level
item.children = []
})
}
if (level === 1) {
result = res.data
result.forEach(item => {
item.value = item.id;
item.label = item.name
//这句代码表示当点击最后一级的时候 label后面不会转圈圈 并把相关值赋值到选择器上
item.leaf = level >= 1
})
}
resolve(result)
})
},
sale_goods(infor) {
return infor.sale
// if(infor.source==2){
// var strung = infor.third_id.toString()
// console.log(strung.substr(strung.length-4) ,'sdfghjk')
// var num_sale = Number(strung.substr(strung.length-4))
// return num_sale+infor.real_sale
// }else{
// return infor.sale
// }
},
//是否有货
goodsonly() {
let optionlist = JSON.parse(localStorage.getItem('optionlist'))
if (optionlist) {
} else {
this.centext = '无货'
return false
}
let date = {
sku_id: optionlist.id,
goods_id: Number(this.$route.query.id),
address_id: this.el_value[1] ? this.el_value[1] : 72
}
//debugger
addressCheckAvailable(date).then(res => {
if (res.code == 1) {
//console.log(data.data,'----')
// if(res.data.data===0){
this.centext = '有货'
// }
// if(res.data.data === 1){
// that.centext = '无货'
// }
if (res.data.freight !== 0) {
this.freename = '邮费' + res.data.freight / 100 + '元'
}
if (res.data.freight === 0) {
this.freename = '包邮'
}
} else {
this.centext = '无货'
}
})
},
titlename(oldgoodsid) {
let date = {
goods_id: oldgoodsid
}
chooseGoodsOldTitle(date).then(res => {
if (res.code == 1) {
this.old_goods_title = res.data
}
})
},
addcart_submits(e) { //查看第三方详情
// debugger
if (this.goshopping) {
if(this.source ==2){
var url = 'https://item.jd.com/'+this.jdthird_id+'.html'
window.open(url)
}else if(this.source==7){
var url='https://detail.tmall.com/item.htm?id='+this.tmthird_id
window.open(url)
}else if(this.source==8){
// var url='https://product.suning.com/0000000000/'+this.tmthird_id+'.html'
// window.open(url)
}
} else { },
this.$message({ addcart_submits(e) { //查看第三方详情
message: '请选择商品规格', // debugger
type: 'warning' if (this.goshopping) {
}); if (this.source == 2) {
} var url = 'https://item.jd.com/' + this.jdthird_id + '.html'
window.open(url)
} else if (this.source == 7) {
var url = 'https://detail.tmall.com/item.htm?id=' + this.tmthird_id
window.open(url)
} else if (this.source == 8) {
// var url='https://product.suning.com/0000000000/'+this.tmthird_id+'.html'
// window.open(url)
}
} else {
this.$message({
message: '请选择商品规格',
type: 'warning'
});
}
}, },
goodsstock(){ goodsstock() {
// if (this.good_numble < this.stock) { // if (this.good_numble < this.stock) {
// this.good_numble = val // this.good_numble = val
// } // }
}, },
allguige(id){ allguige(id) {
if(id){ if (id) {
let date = { let date = {
old_goods_id:id old_goods_id: id
}
getGoodsDesc(date).then(res => {
if (res.code == 1) {
this.goodsinfor.description = res.data.description
}
})
}
},
getdetail() {
const date = {
goodsId: this.goodsId.goods_id
}
console.log(date)
getgoodsdetail(date).then(response => {
console.log(response)
if (response.code === 1) {
// this.detailData = res.data
//debugger
this.goodsinfor = response.data
this.goodsprice = response.data.price
this.jdactivity_price = response.data.js_price
this.scprice = response.data.sc_price
this.stock = Number(response.data.stock)
this.lunimg = response.data.imgs
this.source = 1
this.specs = response.data.specs //规格
this.optionsmg = response.data.specs_group
this.specsitem = response.data.specs
this.tmthird_id = response.data.goods_id
this.picture = response.data.imgs
// // 判断是否有规格
if (response.data.specs.length > 0) {
// debugger
this.adsp = true
this.goshopping = true
this.specs_goods = {}
var assasa = []
response.data.specs.forEach((item, index) => {
assasa.push(item.spec_value[0].value.toString())
this.specs_goods[item.id] = item.spec_value[0].value.toString()
item.spec_value.forEach((itemchild, index) => {
if (index == 0) {
itemchild['classstatus'] = true
} else {
itemchild['classstatus'] = false
}
})
})
// console.log(this.specs_goods,'rrrr')
this.sku_lists(assasa)
} else {
this.goshopping = true
}
var is_des = 0;
var ajax_count = 0;
var timer_count = 0;
var _timer
if (this.goodsinfor.description) {
var str = this.goodsinfor.description
// $(".infor-div-detail").html(str);
} }
getGoodsDesc(date).then(res=>{
if(res.code==1){
this.goodsinfor.description = res.data.description
}
})
}
},
getdetail() {
const date = {
goodsId: this.goodsId.goods_id
}
console.log(date)
getgoodsdetail(date).then(response => {
console.log(response)
if (response.code === 1) {
// this.detailData = res.data
debugger
this.goodsinfor = response.data
this.goodsprice = response.data.price
this.jdactivity_price = response.data.js_price
this.scprice = response.data.sc_price
this.stock =Number(response.data.stock)
this.lunimg = response.data.imgs
this.source =1
this.specs = response.data.specs //规格
this.optionsmg = response.data.specs_group
this.specsitem = response.data.specs
this.tmthird_id = response.data.goods_id
this.picture = response.data.imgs
// // 判断是否有规格
if (response.data.specs.length > 0) {
debugger
this.adsp = true
this.goshopping = true
this.specs_goods = {}
var assasa = []
response.data.specs.forEach((item,index)=>{
assasa.push(item.spec_value[0].value.toString())
this.specs_goods[item.id] = item.spec_value[0].value.toString()
item.spec_value.forEach((itemchild,index)=>{
if(index==0){
itemchild['classstatus']=true
}else{
itemchild['classstatus']=false
}
})
})
// console.log(this.specs_goods,'rrrr')
this.sku_lists(assasa)
} else {
this.goshopping = true
}
var is_des = 0;
var ajax_count = 0;
var timer_count = 0;
var _timer
if (this.goodsinfor.description) {
var str = this.goodsinfor.description
// $(".infor-div-detail").html(str);
}
}
}
)
},
// 组合规格,点击切换
sku_p(indexs, indexchild, skuid, id) {
//debugger
localStorage.removeItem('optionlist')
this.specs[indexs].spec_value.forEach((item, index) => {
if (indexchild == index) {
this.$set(this.specs[indexs].spec_value[index], 'classstatus', true)
} else {
this.$set(this.specs[indexs].spec_value[index], 'classstatus', false)
}
// 切换时,将规格数量,初始化为 1
this.good_numble = 1
this.$forceUpdate()
})
this.specs_goods[skuid] = id
// this.specs_goods['goods_id'] = that.getParam('id')
console.log(this.specs_goods)
let speclenth = this.specs.length
let specgoslenth = Object.keys(this.specs_goods).length
if (speclenth == specgoslenth) {
this.goshopping = true
var assasa = []
for (let key in this.specs_goods) {
console.log(key + '---' + this.specs_goods[key])
assasa.push(this.specs_goods[key].toString())
}
this.sku_lists(assasa)
this.goshopping = true
} else {
this.goshopping = false
} }
}
)
},
sku_p(indexs,indexchild,skuid,id) {
localStorage.removeItem('optionlist')
this.specs[indexs].spec_value.forEach((item,index)=>{
if(indexchild==index){
this.$set(this.specs[indexs].spec_value[index],'classstatus',true)
}else{
this.$set(this.specs[indexs].spec_value[index],'classstatus',false)
}
this.$forceUpdate()
})
this.specs_goods[skuid] = id
// this.specs_goods['goods_id'] = that.getParam('id')
console.log(this.specs_goods)
let speclenth = this.specs.length
let specgoslenth = Object.keys(this.specs_goods).length
if (speclenth == specgoslenth) {
this.goshopping = true
var assasa=[]
for(let key in this.specs_goods){
console.log(key + '---' + this.specs_goods[key])
assasa.push(this.specs_goods[key].toString())
}
this.sku_lists(assasa)
this.goshopping = true
} else {
this.goshopping = false
}
},
sku_lists(a) {
// debugger
// console.log(JSON.stringify(localStorage).length)
this.loading = true
var arrsow = []
for(var i=0;i<this.optionsmg.length;i++){
var sa = this.optionsmg[i].spec_values
if(this.optionsmg[i].specs){
delete this.optionsmg[i].specs
}
if(this.isContained(a,sa)){
debugger
this.skupindex = i
this.optionsmg[i]['index']=i
arrsow.push(this.optionsmg[i])
break
}else{
this.loadingbtn = false
}
}
console.log(arrsow,'jump')
if(arrsow.length>0){
debugger
for(var i=0;i<arrsow.length;i++){
this.goodsprice = this.optionsmg[arrsow[i].index].price
this.jdactivity_price = this.optionsmg[arrsow[i].index].js_price
this.scprice = this.optionsmg[arrsow[i].index].sc_price
this.stock = this.optionsmg[arrsow[i].index].stock
this.optionsmg[arrsow[i].index]['title'] =this.goodsinfor.goods_name
this.optionsmg[arrsow[i].index]['img'] =this.goodsinfor.cover
// this.optionsmg[i].specs = JSON.stringify(this.specsitem)
localStorage.removeItem('optionlist')
// console.log(JSON.stringify(localStorage).length,'1')
// console.log(JSON.stringify(this.optionsmg[i]).length,'11')
debugger
localStorage.setItem('optionlist',JSON.stringify(this.optionsmg[arrsow[i].index]))
// console.log(JSON.stringify(localStorage).length,'2')
this.optionsmg[arrsow[i].index]['good_numble'] = this.good_numble
this.shopcartlist = this.optionsmg[arrsow[i].index]
console.log(this.optionsmg[arrsow[i].index])
this.jdthird_id = this.optionsmg[arrsow[i].index].third_id
this.skuids = this.optionsmg[arrsow[i].index].id
console.log(this.optionsmg[i],'最后')
this.jdstatusd = 1
// break
}
}else{
this.skuids = ''
this.jdstatusd = 18
}
var that = this
setTimeout(function (){
that.loading = false
}, 200)
},
isContained(a1,a2){
if ((!a1 && a2) || (a1 && ! a2)) return false;
if (a1.length !== a2.length) return false;
a1 = [].concat(a1);
a2 = [].concat(a2);
a1 = a1.sort();
a2 = a2.sort();
for (var i = 0, n = a1.length; i < n; i++) {
if (a1[i] !== a2[i]) return false;
}
return true;
},
// 赋值对应图片
photo(index) {
this.picture = this.lunimg[index]
},
//规格 },
sku_lists(a) {
// debugger
// console.log(JSON.stringify(localStorage).length)
this.loading = true
var arrsow = []
for (var i = 0; i < this.optionsmg.length; i++) {
var sa = this.optionsmg[i].spec_values
if (this.optionsmg[i].specs) {
delete this.optionsmg[i].specs
}
if (this.isContained(a, sa)) {
//debugger
this.skupindex = i
this.optionsmg[i]['index'] = i
arrsow.push(this.optionsmg[i])
break
} else {
this.loadingbtn = false
}
}
console.log(arrsow, 'jump')
if (arrsow.length > 0) {
//debugger
for (var i = 0; i < arrsow.length; i++) {
this.goodsprice = this.optionsmg[arrsow[i].index].price
this.jdactivity_price = this.optionsmg[arrsow[i].index].js_price
this.scprice = this.optionsmg[arrsow[i].index].sc_price
this.stock = this.optionsmg[arrsow[i].index].stock
this.optionsmg[arrsow[i].index]['title'] = this.goodsinfor.goods_name
this.optionsmg[arrsow[i].index]['img'] = this.goodsinfor.cover
// this.optionsmg[i].specs = JSON.stringify(this.specsitem)
localStorage.removeItem('optionlist')
// console.log(JSON.stringify(localStorage).length,'1')
// console.log(JSON.stringify(this.optionsmg[i]).length,'11')
//debugger
localStorage.setItem('optionlist', JSON.stringify(this.optionsmg[arrsow[i].index]))
// console.log(JSON.stringify(localStorage).length,'2')
this.optionsmg[arrsow[i].index]['good_numble'] = this.good_numble
this.shopcartlist = this.optionsmg[arrsow[i].index]
console.log(this.optionsmg[arrsow[i].index])
this.jdthird_id = this.optionsmg[arrsow[i].index].third_id
this.skuids = this.optionsmg[arrsow[i].index].id
console.log(this.optionsmg[i], '最后')
this.jdstatusd = 1
// break
}
} else {
this.skuids = ''
this.jdstatusd = 18
}
var that = this
setTimeout(function () {
that.loading = false
}, 200)
},
isContained(a1, a2) {
if ((!a1 && a2) || (a1 && !a2)) return false;
if (a1.length !== a2.length) return false;
a1 = [].concat(a1);
a2 = [].concat(a2);
a1 = a1.sort();
a2 = a2.sort();
for (var i = 0, n = a1.length; i < n; i++) {
if (a1[i] !== a2[i]) return false;
}
return true;
},
// 赋值对应图片
photo(index) {
this.picture = this.lunimg[index]
},
//规格
}
} }
}
</script> </script>
<style scoped> <style scoped>
/* // CSS样式为倒叙 */ /* // CSS样式为倒叙 */
.none { .none {
display: none; display: none;
} }
.Magnifying_icon {
color: #fff; .Magnifying_icon {
line-height: 65px; color: #fff;
width: 28px; line-height: 65px;
text-align: center; width: 28px;
} text-align: center;
.details_Magnifying_icon { }
height: 65px;
width: 25px; .details_Magnifying_icon {
background:rgba(127,127,127,0.9); height: 65px;
position: absolute; width: 25px;
opacity: 0.3; background: rgba(127, 127, 127, 0.9);
top: 10px; position: absolute;
left: 0; opacity: 0.3;
z-index: 999; top: 10px;
} left: 0;
.details_Magnifying_icon:hover{ z-index: 999;
opacity: 0.9; }
}
.details_Magnifying_icon2 { .details_Magnifying_icon:hover {
height: 65px; opacity: 0.9;
width: 25px; }
background:rgba(127,127,127,0.9);
opacity: 0.3; .details_Magnifying_icon2 {
position: absolute; height: 65px;
top: 10px; width: 25px;
right: 0; background: rgba(127, 127, 127, 0.9);
z-index: 999; opacity: 0.3;
} position: absolute;
.details_Magnifying_icon2:hover{ top: 10px;
opacity: 0.9; right: 0;
} z-index: 999;
.drawer_list_margin_have { }
padding-right: 10px;
} .details_Magnifying_icon2:hover {
.drawer_list_margin { opacity: 0.9;
padding-right: 0; }
}
.details_Magnifying_img_active { .drawer_list_margin_have {
border: 1px solid #e23f24; padding-right: 10px;
} }
.details_Magnifying_img:hover {
border: 1px solid #e23f24; .drawer_list_margin {
cursor: pointer; padding-right: 0;
} }
.details_Magnifying_img {
height: 65px; .details_Magnifying_img_active {
width: 100%; border: 1px solid #e23f24;
border: 1px solid #fff; }
}
.details_Magnifying { .details_Magnifying_img:hover {
margin: 10px 0px; border: 1px solid #e23f24;
width: 100%; cursor: pointer;
} }
.details_Magnifying_content { .details_Magnifying_img {
/* display: flex; */ height: 65px;
position: relative; width: 100%;
border: 1px solid #fff;
} }
.scroll_text { .details_Magnifying {
color: #fff; margin: 10px 0px;
text-align: center; width: 100%;
font-size: 12px; }
}
.top:hover { .details_Magnifying_content {
background-color: #647dff; /* display: flex; */
cursor: pointer; position: relative;
}
.top { }
border-radius: 4px 4px;
background-color: #383838; .scroll_text {
width: 40px; color: #fff;
height: 64px; text-align: center;
font-size: 12px;
text-align: center; }
}
.top:hover {
.shoop_image { background-color: #647dff;
width: 100%; cursor: pointer;
} }
.shoop_goods_number { .top {
flex: 33.33%; border-radius: 4px 4px;
color: #666666; background-color: #383838;
} width: 40px;
.shoop_goods { height: 64px;
display: flex;
padding: 20px 20px; text-align: center;
} }
.shoop_text { .shoop_image {
flex: 10%; width: 100%;
background-color: #e23f24; }
color: #fff;
text-align: center; .shoop_goods_number {
line-height: 36px; flex: 33.33%;
} color: #666666;
.shoop_details_box { }
height: 36px;
width: 100%; .shoop_goods {
border-bottom: solid 1px #e23f24; display: flex;
/* background-color: #f2f2f2; */ padding: 20px 20px;
} }
.sku_text { .shoop_text {
text-align: center; flex: 10%;
flex: 50%; background-color: #e23f24;
font-size: 14px; color: #fff;
color: #666666; text-align: center;
} line-height: 36px;
.shoop_sku_text { }
flex: 35%;
font-size: 14px; .shoop_details_box {
color: #666666; height: 36px;
border-right: 1px solid #999; width: 100%;
} border-bottom: solid 1px #e23f24;
.shoop_sku { /* background-color: #f2f2f2; */
display: flex; }
position: relative;
} .sku_text {
text-align: center;
::v-deep .el-input-number--medium .el-input-number__increase { flex: 50%;
width: 27px; font-size: 14px;
height: 26px; color: #666666;
font-size: 14px; }
}
::v-deep .el-input-number--medium { .shoop_sku_text {
width: 120px; flex: 35%;
line-height: 28px; font-size: 14px;
overflow: hidden; color: #666666;
} border-right: 1px solid #999;
::v-deep .el-input-number--medium .el-input-number__decrease { }
width: 27px;
height: 26px; .shoop_sku {
font-size: 14px; display: flex;
} position: relative;
.shoop_number { }
line-height: 36px;
margin-bottom: 10px; ::v-deep .el-input-number--medium .el-input-number__increase {
} width: 27px;
height: 26px;
::v-deep .el-button { font-size: 14px;
/* //此处为el-input的样式修改 */ }
height: 40px !important;
} ::v-deep .el-input-number--medium {
.shoop_button { width: 120px;
height: 42px; line-height: 28px;
font-size: 16px; overflow: hidden;
color: #ffffff; }
background: #e23f24;
border-radius: 4px; ::v-deep .el-input-number--medium .el-input-number__decrease {
} width: 27px;
height: 26px;
.specifications_icon { font-size: 14px;
position: absolute; }
overflow: hidden;
} .shoop_number {
.specifications_icon_box { line-height: 36px;
position: relative; margin-bottom: 10px;
margin-left: -16px; }
top: 21px;
left: -17px; ::v-deep .el-button {
} /* //此处为el-input的样式修改 */
.specifications_text { height: 40px !important;
line-height: 36px; }
} .shoop_button {
.test{ height: 42px;
background:url(../../../../assets/image/price.png) no-repeat; font-size: 16px;
} color: #ffffff;
.specifications_box_size:hover { background: #e23f24;
border: 1px solid #e23f24; border-radius: 4px;
cursor: pointer; }
}
.specifications_box_size { .specifications_icon {
padding: 5px 10px; position: absolute;
display: inline-block; overflow: hidden;
margin: 0 12px 10px; }
border: 1px solid #eeeeee;
position: relative; .specifications_icon_box {
} position: relative;
.aactive{ margin-left: -16px;
border: 1px solid #e23f24; top: 21px;
} left: -17px;
.aactivs{ }
border: 1px solid #e23f24;
} .specifications_text {
.distributions_specifications_box { line-height: 36px;
/* // display: flex;/ */
margin: 10px 0; }
/* // flex-wrap: wrap; */
/* // justify-content: space-between; */ .test {
} background: url(../../../../assets/image/price.png) no-repeat;
.distributions_specifications { }
margin: 10px 0;
} .specifications_box_size:hover {
border: 1px solid #e23f24;
.distributions_goods { cursor: pointer;
/* // font-weight: 700; */ }
margin-right: 16px;
} .specifications_box_size {
.distributions_have_goods { padding: 5px 10px;
display: inline-block;
} margin: 0 12px 10px;
.distributions_delivery_box { border: 1px solid #eeeeee;
position: relative;
} }
.shoop_distributions_delivery {
line-height: 36px; .aactive {
} border: 1px solid #e23f24;
.distributions_address { }
/* // font-weight: 700; */
} .aactivs {
.shoop_distributions { border: 1px solid #e23f24;
padding: 10px 20px; }
}
.distributions_specifications_box {
.cumulative_text { /* // display: flex;/ */
margin-left: 5px; margin: 10px 0;
} /* // flex-wrap: wrap; */
.shoop_brand_evaluation_cumulative { /* // justify-content: space-between; */
flex: 25%; }
font-size: 14px;
} .distributions_specifications {
.evaluation_text { margin: 10px 0;
margin-left: 5px; }
}
.evaluation_line { .distributions_goods {
border-left: #dbdcdd 1px solid; /* // font-weight: 700; */
padding-left: 20px; margin-right: 16px;
} }
.shoop_brand_evaluation_text {
flex: 25%; .distributions_have_goods {
font-size: 14px;
} }
.sell_text {
font-size: 14px; .distributions_delivery_box {
color: #e23f24;
margin-left: 5px; }
}
.shoop_brand_evaluation_sell { .shoop_distributions_delivery {
color: #333333; line-height: 36px;
font-size: 14px; }
flex: 25%;
} .distributions_address {
.shoop_brand_evaluation { /* // font-weight: 700; */
display: flex; }
height: 53px;
padding: 0 20px; .shoop_distributions {
line-height: 53px; padding: 10px 20px;
/* background-color: #f7f9fa; */ }
}
.cumulative_text {
.shoop_brand_marketing_text { margin-left: 5px;
font-size: 14px; }
}
.shoop_brand_price_marketing { .shoop_brand_evaluation_cumulative {
font-size: 14px; flex: 25%;
margin-right: 10px; font-size: 14px;
} }
.shoop_brand_price_oldMoney {
font-size: 14px; .evaluation_text {
text-decoration: line-through; margin-left: 5px;
margin-right: 40px; }
}
.shoop_brand_price_money { .evaluation_line {
font-weight: 700; border-left: #dbdcdd 1px solid;
font-size: 24px; padding-left: 20px;
margin-right: 10px; }
}
.shoop_brand_price_text { .shoop_brand_evaluation_text {
font-size: 14px; flex: 25%;
margin-right: 25px; font-size: 14px;
} }
.shoop_brand_tutorial {
margin-bottom: 20px; .sell_text {
color: #333333; font-size: 14px;
font-size: 16px; color: #e23f24;
font-weight: 700; margin-left: 5px;
} }
.test{
.shoop_brand_evaluation_sell {
} color: #333333;
.shoop_brand_price { font-size: 14px;
display: flex; flex: 25%;
height: 54px; }
padding: 0 20px;
line-height: 54px; .shoop_brand_evaluation {
color: #fff; display: flex;
height: 53px;
} padding: 0 20px;
.shoop_brand { line-height: 53px;
margin: 20px 20px 20px 0; /* background-color: #f7f9fa; */
width: 100%; }
}
.shoop_details_Magnifying { .shoop_brand_marketing_text {
padding: 20px 20px; font-size: 14px;
flex: 40%; }
}
.shoop_details { .shoop_brand_price_marketing {
display: flex; font-size: 14px;
margin-top: 10px; margin-right: 10px;
color: #666666; }
/* background-color: #fff; */
} .shoop_brand_price_oldMoney {
/deep/ .maxImgBox{ font-size: 14px;
width:455px !important; text-decoration: line-through;
height:455px !important; margin-right: 40px;
} }
/deep/ .el-input-group__append{
color: #fff; .shoop_brand_price_money {
background-color: #647dff; font-weight: 700;
border-color: #647dff; font-size: 24px;
margin-right: 10px;
} }
.shoop_brand_price_text {
font-size: 14px;
margin-right: 25px;
}
.shoop_brand_tutorial {
margin-bottom: 20px;
color: #333333;
font-size: 16px;
font-weight: 700;
}
.test {
}
.shoop_brand_price {
display: flex;
height: 54px;
padding: 0 20px;
line-height: 54px;
color: #fff;
}
.shoop_brand {
margin: 20px 20px 20px 0;
width: 100%;
}
.shoop_details_Magnifying {
padding: 20px 20px;
flex: 40%;
}
.shoop_details {
display: flex;
margin-top: 10px;
color: #666666;
/* background-color: #fff; */
}
/deep/ .maxImgBox {
width: 455px !important;
height: 455px !important;
}
/deep/ .el-input-group__append {
color: #fff;
background-color: #647dff;
border-color: #647dff;
}
</style> </style>
...@@ -217,11 +217,11 @@ ...@@ -217,11 +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" @closeEditDialog="closeEditGoods"></editGood>
</el-dialog> </el-dialog>
<el-dialog title="商品详情" :visible.sync="isOpen" center v-if="isOpen" width="70%" class="freightTemplate-add" <el-dialog title="商品详情" :visible.sync="isOpen" center v-if="isOpen" width="70%" class="freightTemplate-add"
:close-on-click-modal="false"> :close-on-click-modal="false">
<goodDetail :goods-id="goodDetails" @closeIndexbtn="closeDialog"></goodDetail> <goodDetail :goods-id="goodDetails"></goodDetail>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
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,
...@@ -310,6 +310,8 @@ ...@@ -310,6 +310,8 @@
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight - headerHeight this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight - headerHeight
}) })
console.log("come on");
}, },
watch: { watch: {
fullHeight(val) { fullHeight(val) {
...@@ -436,7 +438,7 @@ ...@@ -436,7 +438,7 @@
}); });
}, },
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]
...@@ -516,8 +518,8 @@ ...@@ -516,8 +518,8 @@
} }
this.getList() this.getList()
}, },
closeDialog(val) { closeEditGoods(val) {
this.isOpen = val; this.editisOpen = false;
this.getList(); this.getList();
}, },
//格式化状态 //格式化状态
...@@ -542,6 +544,7 @@ ...@@ -542,6 +544,7 @@
}, },
/** 查询freight列表 */ /** 查询freight列表 */
getList() { getList() {
//debugger
let data = { let data = {
page: this.formInline.page, page: this.formInline.page,
limit: this.formInline.limit, limit: this.formInline.limit,
...@@ -579,6 +582,9 @@ ...@@ -579,6 +582,9 @@
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
} }
//console.log("查询list的参数:", data);
getlistGoods(data).then(res => { getlistGoods(data).then(res => {
if (res.data) { if (res.data) {
this.freightList = res.data.list; this.freightList = res.data.list;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论