提交 a75507b0 authored 作者: huaxinzhu's avatar huaxinzhu

1、商品,bug修复、优化;

上级 db571502
...@@ -93,7 +93,6 @@ export default { ...@@ -93,7 +93,6 @@ export default {
<style scoped> <style scoped>
.pagination-container { .pagination-container {
background: #fff; background: #fff;
padding: 32px 16px;
} }
.pagination-container.hidden { .pagination-container.hidden {
display: none; display: none;
......
...@@ -40,6 +40,11 @@ export const constantRoutes = [ ...@@ -40,6 +40,11 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '/setpsd',
component: (resolve) => require(['@/views/system/settings/setpsd'], resolve),
hidden: true
},
{ {
path: '/platformlogin', path: '/platformlogin',
component: (resolve) => require(['@/views/platformlogin'], resolve), component: (resolve) => require(['@/views/platformlogin'], resolve),
...@@ -183,32 +188,32 @@ export const constantRoutes = [ ...@@ -183,32 +188,32 @@ export const constantRoutes = [
] ]
}, },
/* 正式上线需要 注释 */ /* 正式上线需要 注释 */
{ // {
path: '/brand', // path: '/brand',
component: Layout, // component: Layout,
hidden: true, // hidden: true,
children: [ // children: [
{ // {
path: 'fields', // path: 'fields',
component: (resolve) => require(['@/views/system/shop/brand'], resolve), // component: (resolve) => require(['@/views/system/shop/brand'], resolve),
name: 'modelFields', // name: 'modelFields',
meta: { title: '品牌管理' } // meta: { title: '品牌管理' }
} // }
] // ]
}, // },
{ // {
path: '/address', // path: '/address',
component: Layout, // component: Layout,
hidden: true, // hidden: true,
children: [ // children: [
{ // {
path: 'fields', // path: 'fields',
component: (resolve) => require(['@/views/system/retreat/address'], resolve), // component: (resolve) => require(['@/views/system/retreat/address'], resolve),
name: 'modelFields', // name: 'modelFields',
meta: { title: '售后地址' } // meta: { title: '售后地址' }
} // }
] // ]
}, // },
/**/ /**/
] ]
......
...@@ -127,11 +127,11 @@ ...@@ -127,11 +127,11 @@
<el-checkbox v-for="item in tags" :label="item.id" true-label :key="item.id" :disabled="item.isdc" @change="serviceSingleChange(item.id)">{{item.tag}}</el-checkbox> <el-checkbox v-for="item in tags" :label="item.id" true-label :key="item.id" :disabled="item.isdc" @change="serviceSingleChange(item.id)">{{item.tag}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="详情描述" style="height:600px; margin-bottom: 0;" prop="description"> <el-form-item label="详情描述" style="height:580px; margin-bottom: 0;" prop="description">
<quill-editor ref="myTextEditor" v-model="content" :options="editorOption" @change="onEditorChange" style="height:500px;"></quill-editor> <quill-editor ref="myTextEditor" v-model="content" :options="editorOption" @change="onEditorChange" style="height:500px;"></quill-editor>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item style="margin-bottom: 0;">
<el-button @click="resetGoodsInfForm('ruleForm')">重置</el-button> <el-button @click="resetGoodsInfForm('ruleForm')"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -392,19 +392,12 @@ ...@@ -392,19 +392,12 @@
} }
</script> </script>
<style scoped> <style scoped>
ul, ul, li {
li {
list-style: none; list-style: none;
/*margin: 0;*/ /*margin: 0;*/
/*padding: 0;*/ /*padding: 0;*/
} }
/*.ullist {*/
/* border: 1px solid #e7eaec;*/
/* padding: 10px;*/
/* margin-bottom: 10px;*/
/*}*/
.el-input-group { .el-input-group {
width: calc(100% - 60px); width: calc(100% - 60px);
} }
......
...@@ -176,9 +176,9 @@ ...@@ -176,9 +176,9 @@
<el-input placeholder="" v-model="scope.row.scPrice"></el-input> <el-input placeholder="" v-model="scope.row.scPrice"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="moany" label="销售价" align="center"> <el-table-column prop="moany" label="指导价" align="center">
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<p class="table_p">销售</p> <p class="table_p">指导</p>
<el-input placeholder="" v-model="price" <el-input placeholder="" v-model="price"
><el-button ><el-button
slot="append" slot="append"
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button ></el-button> <el-button style="margin-top: 20px;"></el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -272,10 +272,10 @@ export default { ...@@ -272,10 +272,10 @@ export default {
shopTypes: [], shopTypes: [],
newList: [], newList: [],
newData: [], newData: [],
tableData7: [], tableData7: [], // 规格列表表格
goodsNowStock: "", goodsNowStock: "",
jsPrice: "", //协议价 jsPrice: "", //协议价
price: "", //销售 price: "", //指导
scPrice: "", //市场价 scPrice: "", //市场价
weight: "", weight: "",
spanArr: [], spanArr: [],
...@@ -309,8 +309,8 @@ export default { ...@@ -309,8 +309,8 @@ export default {
watch:{ watch:{
tableData7:{ tableData7:{
handler(val, oldVal){ handler(val, oldVal){
let arrlist = JSON.stringify(val); //可以将json对象转换成json对符串 let arrlist = JSON.stringify(val);
let listarr = JSON.parse(arrlist); //可以将json字符串转换成json对象 let listarr = JSON.parse(arrlist);
this.processguidelist(listarr); this.processguidelist(listarr);
this.$emit('guideclicks',this.arrtdall,this.shopType) this.$emit('guideclicks',this.arrtdall,this.shopType)
...@@ -318,18 +318,20 @@ export default { ...@@ -318,18 +318,20 @@ export default {
}, },
deep:true deep:true
}, },
// 父组件传给 子组件的 值
guidedata(curVal,oldVal){ guidedata(curVal,oldVal){
if(curVal){ if(curVal){
if(curVal.goodsSpec){ if(curVal.goodsSpec){
this.checked = true this.checked = true;
}else {
this.checked = false;
} }
// 规格
this.shopType = curVal.specName;
if(this.shopType) { if(curVal.specName && curVal.specName.length > 0) {
this.shopType = curVal.specName;
this.shopType.forEach((item, index) => { this.shopType.forEach((item, index) => {
this.shopType[index]['specValue'] = [] this.shopType[index]['specValue'] = []
if(curVal.specValue) { if(curVal.specValue) {
curVal.specValue.forEach((itemName, nindex) => { curVal.specValue.forEach((itemName, nindex) => {
if(itemName.specNameId == item.id){ if(itemName.specNameId == item.id){
...@@ -337,14 +339,23 @@ export default { ...@@ -337,14 +339,23 @@ export default {
} }
}) })
} }
}) })
}
this.clgoodspace(curVal); this.clgoodspace(curVal);
//笛卡尔积值 //笛卡尔积值
this.tableData7 = curVal.specOption; this.tableData7 = curVal.specOption;
} }
}
}, },
}, },
methods: { methods: {
...@@ -392,6 +403,7 @@ export default { ...@@ -392,6 +403,7 @@ export default {
processguidelist(obj) { processguidelist(obj) {
let arrtdall = [] let arrtdall = []
if(obj) {
obj.forEach((item, index) => { obj.forEach((item, index) => {
let objtd = {} let objtd = {}
let arrtd = [] let arrtd = []
...@@ -406,6 +418,8 @@ export default { ...@@ -406,6 +418,8 @@ export default {
arrtdall.push(objtd) arrtdall.push(objtd)
}); });
}
this.arrtdall = arrtdall this.arrtdall = arrtdall
}, },
deletearrinput(index) { deletearrinput(index) {
...@@ -453,6 +467,7 @@ export default { ...@@ -453,6 +467,7 @@ export default {
this.$set(this.shopType[index].specValue,this.shopType[index].specValue.length,childlist); this.$set(this.shopType[index].specValue,this.shopType[index].specValue.length,childlist);
this.$forceUpdate() this.$forceUpdate()
}, },
// 添加新规格
addguild() { addguild() {
let arrchild = { let arrchild = {
specName: "", specName: "",
...@@ -493,14 +508,9 @@ export default { ...@@ -493,14 +508,9 @@ export default {
// let date={ // let date={
// imgData:this.getBase64Img(image) // imgData:this.getBase64Img(image)
// } // }
// onlodaimg(date).then(res=>{ // onlodaimg(date).then(res=>{
// }) // })
// }; // };
this.getBase64(file).then((res) => { this.getBase64(file).then((res) => {
var result = res.split(","); var result = res.split(",");
let Base64img = result[1]; let Base64img = result[1];
...@@ -568,6 +578,8 @@ export default { ...@@ -568,6 +578,8 @@ export default {
this.newData = []; this.newData = [];
this.tablearr = []; this.tablearr = [];
this.shopTypes = JSON.parse(JSON.stringify(this.shopType)); this.shopTypes = JSON.parse(JSON.stringify(this.shopType));
if(this.shopTypes && this.shopTypes.length > 0) {
for (let i = 0; i < this.shopTypes.length; i++) { for (let i = 0; i < this.shopTypes.length; i++) {
var newlist = []; var newlist = [];
for ( for (
...@@ -579,6 +591,7 @@ export default { ...@@ -579,6 +591,7 @@ export default {
} }
this.newData.push(newlist); this.newData.push(newlist);
} }
}
this.getList(); this.getList();
}, },
//转换数据 //转换数据
...@@ -586,17 +599,13 @@ export default { ...@@ -586,17 +599,13 @@ export default {
this.tableData7 = []; this.tableData7 = [];
this.newList = this.descartes(this.newData); this.newList = this.descartes(this.newData);
if(this.shopTypes && this.shopTypes.length > 0) {
for (let i = 0; i < this.shopTypes.length; i++) { for (let i = 0; i < this.shopTypes.length; i++) {
this.tablearr.push(this.shopTypes[i].specName); this.tablearr.push(this.shopTypes[i].specName);
} }
}
for (let index = 0; index < this.newList.length; index++) { for (let index = 0; index < this.newList.length; index++) {
// this.tableData7.push({
// color: this.newList[index][0],
// cailiao: this.newList[index][1],
// chima: this.newList[index][2],
// kucun: "",
// moany: ""
// });
var listobj = {}; var listobj = {};
for (let i = 0; i < this.shopTypes.length; i++) { for (let i = 0; i < this.shopTypes.length; i++) {
if(this.shopTypes.length>1){ if(this.shopTypes.length>1){
...@@ -609,8 +618,6 @@ export default { ...@@ -609,8 +618,6 @@ export default {
listobj["jsPrice"] = ""; listobj["jsPrice"] = "";
listobj["price"] = ""; listobj["price"] = "";
listobj["scPrice"] = ""; listobj["scPrice"] = "";
// listobj["wlPrice"] = "";
// listobj["pywlPrice"] = "";
listobj["weight"] = ""; listobj["weight"] = "";
} }
this.tableData7.push(listobj); this.tableData7.push(listobj);
...@@ -627,6 +634,8 @@ export default { ...@@ -627,6 +634,8 @@ export default {
this.pos = ""; this.pos = "";
this.spanArr1 = []; this.spanArr1 = [];
this.pos1 = ""; this.pos1 = "";
if(this.shopTypes && this.shopTypes.length > 0) {
for (let s = 0; s < this.shopTypes.length; s++) { for (let s = 0; s < this.shopTypes.length; s++) {
this.spanArrS["spanArr" + s] = []; this.spanArrS["spanArr" + s] = [];
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
...@@ -648,6 +657,7 @@ export default { ...@@ -648,6 +657,7 @@ export default {
} }
} }
} }
}
// for (var i = 0; i < data.length; i++) { // for (var i = 0; i < data.length; i++) {
// if (i === 0) { // if (i === 0) {
...@@ -667,6 +677,7 @@ export default { ...@@ -667,6 +677,7 @@ export default {
}, },
// 合并行数 // 合并行数
objectSpanMethod1({ row, column, rowIndex, columnIndex }) { objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
if(this.shopTypes && this.shopTypes.length > 0) {
for (let s = 0; s < this.shopTypes.length; s++) { for (let s = 0; s < this.shopTypes.length; s++) {
if (columnIndex == s) { if (columnIndex == s) {
const _row = this.spanArrS["spanArr" + s][rowIndex]; const _row = this.spanArrS["spanArr" + s][rowIndex];
...@@ -678,6 +689,9 @@ export default { ...@@ -678,6 +689,9 @@ export default {
// columnIndex === 1 找到第二列,合并他的列数 // columnIndex === 1 找到第二列,合并他的列数
} }
} }
}
// columnIndex === 0 找到第一列,实现合并随机出现的行数 // columnIndex === 0 找到第一列,实现合并随机出现的行数
// if (columnIndex === 0) { // if (columnIndex === 0) {
// const _row = this.spanArr[rowIndex]; // const _row = this.spanArr[rowIndex];
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<div class="app-container goods" v-loading="loading"> <div class="app-container goods" v-loading="loading">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{title}}</span> <span style="font-size: 18px; float:left;margin-top: 4px;">{{title}}</span>
<el-button style="float: right; margin:0 20px;" size="mini" type="info" plain @click="submitForm(0)">保 存 草 稿 <el-button style="float: right; margin: 0 10px 0 20px;" size="mini" type="info" plain @click="submitForm(0)">保 存 草 稿
</el-button> </el-button>
<el-button style="float: right; " size="mini" type="primary" @click="submitForm(1)">提 交 上 架 <el-button style="float: right;" size="mini" type="primary" @click="submitForm(1)">提 交 上 架
</el-button> </el-button>
</div> </div>
<el-tabs type="border-card"> <el-tabs type="border-card">
...@@ -181,13 +181,13 @@ ...@@ -181,13 +181,13 @@
if(this.params.specs && this.params.specs.length > 0) { if(this.params.specs && this.params.specs.length > 0) {
for(let i = 0; i < this.params.specs.length; i++) { for(let i = 0; i < this.params.specs.length; i++) {
if(this.params.specs[i].jsPrice ) { if(this.params.specs[i].jsPrice ) {
this.params.specs[i].jsPrice = this.params.specs[i].jsPrice * 100; this.params.specs[i].jsPrice = parseInt(this.params.specs[i].jsPrice * 100);
} }
if(this.params.specs[i].price ) { if(this.params.specs[i].price ) {
this.params.specs[i].price = this.params.specs[i].price * 100; this.params.specs[i].price = parseInt(this.params.specs[i].price * 100);
} }
if(this.params.specs[i].scPrice ) { if(this.params.specs[i].scPrice ) {
this.params.specs[i].scPrice = this.params.specs[i].scPrice * 100; this.params.specs[i].scPrice = parseInt(this.params.specs[i].scPrice * 100);
} }
} }
} }
...@@ -340,11 +340,7 @@ ...@@ -340,11 +340,7 @@
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss" type="text/stylus">
.el-tabs {
height: calc(100% - 60px);
}
ul, li { ul, li {
list-style: none; list-style: none;
margin: 0; margin: 0;
...@@ -365,30 +361,21 @@ ...@@ -365,30 +361,21 @@
background-color: #5bc0de !important; background-color: #5bc0de !important;
color: #fff !important; color: #fff !important;
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
} }
.app-container { /deep/.el-card__body {
height: 100%; height: calc(100% - 50px);
overflow: hidden;
} }
.box-card { .el-tabs {
height: 100%; height: 100%;
} overflow: hidden;
.box-card /deep/ .el-card__body { /deep/.el-tabs__content {
height: 100%; height: calc(100% - 50px);
overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
} }
.el-tabs {
height: calc(100% - 35px);
}
.el-tabs /deep/ .el-tabs__content {
height: calc(100% - 39px);
overflow-y: scroll;
} }
.eldelbtn { .eldelbtn {
......
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span></span> <el-form :inline="true" class="queryFormInline">
<el-row :gutter="10" class="mb8"> <el-row :span="24" type="flex" align="middle" justify="space-between">
<el-col :span="1.5"> <el-col :span="18">
<p style="font-size: 18px; float:left;">下架商品列表</p>
</el-col>
<el-col :span="6">
<el-form-item style="float: right">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
...@@ -12,18 +16,13 @@ ...@@ -12,18 +16,13 @@
@click="handleAdd" @click="handleAdd"
>新增 >新增
</el-button> </el-button>
</el-col>
<el-col :span="1.5">
<el-button <el-button
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
@click="handleOnsale" @click="handleOnsale"
>申请上架 >申请上架
</el-button> </el-button>
</el-col>
<el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
...@@ -32,8 +31,10 @@ ...@@ -32,8 +31,10 @@
@click="handleDelete" @click="handleDelete"
>删除 >删除
</el-button> </el-button>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</div> </div>
<!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="商品ID" prop="goods_id"> <el-form-item label="商品ID" prop="goods_id">
...@@ -45,16 +46,14 @@ ...@@ -45,16 +46,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<el-table v-loading="loading" :data="goodsList" :height="tableHeight" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="goodsList" :height="tableHeight" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="" align="center" width="100" prop="defaultImage"> <el-table-column label="商品主图" align="center" width="100" prop="defaultImage">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
style="width: 60px; height: 50px" style="width: 60px; height: 50px"
...@@ -67,8 +66,6 @@ ...@@ -67,8 +66,6 @@
<el-table-column label="协议价" align="center" :formatter="formatePrice" prop="jsPrice"/> <el-table-column label="协议价" align="center" :formatter="formatePrice" prop="jsPrice"/>
<el-table-column label="物流运费" align="center" :formatter="formatePrice" prop="wlPrice"/> <el-table-column label="物流运费" align="center" :formatter="formatePrice" prop="wlPrice"/>
<el-table-column label="市场售价" align="center" :formatter="formatePrice" prop="scPrice"/> <el-table-column label="市场售价" align="center" :formatter="formatePrice" prop="scPrice"/>
<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">
<el-button <el-button
...@@ -110,9 +107,8 @@ ...@@ -110,9 +107,8 @@
name: "goods", name: "goods",
data() { data() {
return { return {
fullHeight: '', fullHeight: 0,
// 遮罩层 tableHeight: 0,
tableHeight: 500,
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
...@@ -155,9 +151,9 @@ ...@@ -155,9 +151,9 @@
}, },
watch: { watch: {
fullHeight(val, oldval) { fullHeight(val) {
// console.log(val) let formHeight = document.getElementsByClassName('clearfix')[0].clientHeight
this.tableHeight = val - 150 this.tableHeight = val - formHeight - 100;
} }
}, },
methods: { methods: {
...@@ -221,9 +217,9 @@ ...@@ -221,9 +217,9 @@
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.$router.push({
this.open = true; path: '/system/goods/add'
this.title = "添加goods"; });
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<div class="app-container"> <div class="app-container">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-row :gutter="10"> <el-form :model="queryParams" ref="queryForm" :inline="true" class="queryFormInline">
<el-form :model="queryParams" ref="queryForm" :inline="true"> <el-row :span="24" type="flex" align="middle" justify="space-between">
<el-col :span="4"> <el-col :span="20">
<el-form-item label="商品Id" prop="goodsId"> <el-form-item label="商品Id" prop="goodsId">
<el-input <el-input
size="small" size="small"
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
v-model="queryParams.goodsId" v-model="queryParams.goodsId"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="商品名称" prop="goodsName"> <el-form-item label="商品名称" prop="goodsName">
<el-input <el-input
size="small" size="small"
...@@ -21,28 +19,22 @@ ...@@ -21,28 +19,22 @@
v-model="queryParams.goodsName" v-model="queryParams.goodsName"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> <el-form-item>
<el-col :span="1.5">
<el-button <el-button
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
class="button-mgtop3"
@click="handleQuery" @click="handleQuery"
>搜索</el-button> >搜索</el-button>
</el-col>
<el-col :span="1.5">
<el-button <el-button
size="mini" size="mini"
icon="el-icon-refresh" icon="el-icon-refresh"
class="button-mgtop3"
@click="resetQuery('queryForm')" @click="resetQuery('queryForm')"
>重置</el-button> >重置</el-button>
</el-form-item>
</el-col> </el-col>
</el-form> <el-col :span="4">
</el-row> <el-form-item style="float: right">
<el-row :gutter="10">
<el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
...@@ -50,16 +42,6 @@ ...@@ -50,16 +42,6 @@
@click="handleAdd" @click="handleAdd"
>新增 >新增
</el-button> </el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
@click="handleOnsale"
>修改</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button <el-button
type="success" type="success"
icon="" icon=""
...@@ -67,13 +49,15 @@ ...@@ -67,13 +49,15 @@
@click="handleOffGoods" @click="handleOffGoods"
>商品下架 >商品下架
</el-button> </el-button>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</div> </div>
<el-table v-loading="loading" :data="goodsList" :height="tableHeight" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="goodsList" :height="tableHeight" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="" align="center" width="100" prop="defaultImage"> <el-table-column label="商品主图" align="center" width="100" prop="defaultImage">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
style="width: 60px; height: 50px" style="width: 60px; height: 50px"
...@@ -127,8 +111,8 @@ ...@@ -127,8 +111,8 @@
name: "goods", name: "goods",
data() { data() {
return { return {
fullHeight: '', fullHeight: 0,
tableHeight: null, tableHeight: 0,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
...@@ -171,11 +155,11 @@ ...@@ -171,11 +155,11 @@
this.$nextTick(() => { this.$nextTick(() => {
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
}) })
}, },
watch: { watch: {
fullHeight(val, oldval) { fullHeight(val) {
this.tableHeight = val - 150 let formHeight = document.getElementsByClassName('clearfix')[0].clientHeight
this.tableHeight = val - formHeight - 100;
} }
}, },
methods: { methods: {
...@@ -196,7 +180,9 @@ ...@@ -196,7 +180,9 @@
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.msgSuccess("下架成功"); this.msgSuccess("下架成功");
}) }).catch(() => {
});
}, },
//格式化价格 //格式化价格
formatePrice(row, s, value, i) { formatePrice(row, s, value, i) {
...@@ -323,7 +309,4 @@ ...@@ -323,7 +309,4 @@
.el-table { .el-table {
height: calc(100% - 120px); height: calc(100% - 120px);
} }
/deep/.button-mgtop3 {
margin-top: 3px;
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论