Browse Source

调整秒杀拼团页面

master
xuwenbo 4 years ago
parent
commit
908143320e
  1. 109
      src/views/activity/combination/form.vue
  2. 190
      src/views/activity/seckill/form.vue
  3. 97
      src/views/shop/goods/form.vue

109
src/views/activity/combination/form.vue

@ -86,23 +86,23 @@
<!-- 多规格表格--> <!-- 多规格表格-->
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品属性:" class="labeltop"> <el-form-item label="商品属性:" class="labeltop">
<el-table :data="manyFormValidate" border> <el-table :data="manyFormValidate" size="small" style="width: 90%;">
<el-table-column type="myindex" v-for="(item,index) in formValidate.header" :key="index" :label="item.title" :property="item.slot" align="center"> <el-table-column type="myindex" v-for="(item,index) in formValidate.header" :key="index" :label="item.title" :property="item.slot" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.column.property == 'pic'"> <div v-if="scope.column.property == 'pic'">
<single-pic v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" /> <single-pic v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" align="center"/>
</div> </div>
<div v-else-if="scope.column.property.indexOf('value') != -1" > <div v-else-if="scope.column.property.indexOf('value') != -1" >
{{ scope.row[scope.column.property] }} {{ scope.row[scope.column.property] }}
</div> </div>
<div v-else-if="scope.column.property == 'pink_price'||scope.column.property == 'pink_stock'" > <div v-else-if="scope.column.property == 'pink_price'||scope.column.property == 'pink_stock'" >
<el-input v-model="scope.row[scope.column.property]"/> <el-input v-model="scope.row[scope.column.property]" align="center"/>
</div> </div>
<div v-else-if="scope.column.property == 'action'" > <div v-else-if="scope.column.property == 'action'" align="center" >
<a :disabled="true">不可删除</a> <a :disabled="true" align="center">不可删除</a>
</div> </div>
<div v-else> <div v-else>
<el-input v-model="scope.row[scope.column.property]" :disabled="true"/> <el-input v-model="scope.row[scope.column.property]" :disabled="true" align="center"/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -113,7 +113,7 @@
<!-- 单规格表格--> <!-- 单规格表格-->
<el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="formValidate.spec_type === 0"> <el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="formValidate.spec_type === 0">
<el-form-item > <el-form-item >
<el-table :data="oneFormValidate" border> <el-table :data="oneFormValidate" size="small" style="width: 90%;">
<el-table-column prop="pic" label="图片" align="center"> <el-table-column prop="pic" label="图片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<single-pic v-model="scope.row.pic" type="image" :num="1" :width="60" :height="60" /> <single-pic v-model="scope.row.pic" type="image" :num="1" :width="60" :height="60" />
@ -211,20 +211,6 @@ export default {
data() { data() {
return { return {
spinShow: false, spinShow: false,
grid2: {
xl: 10,
lg: 12,
md: 12,
sm: 24,
xs: 24
},
grid3: {
xl: 18,
lg: 18,
md: 20,
sm: 24,
xs: 24
},
// data // data
oneFormBatch: [ oneFormBatch: [
{ {
@ -254,79 +240,6 @@ export default {
UEDITOR_HOME_URL: '/UEditor/', UEDITOR_HOME_URL: '/UEditor/',
serverUrl: '' serverUrl: ''
}, },
columns2: [
{
title: '图片',
slot: 'pic',
align: 'center',
minWidth: 80
},
{
title: '售价',
slot: 'price',
align: 'center',
minWidth: 95,
disabled: true
},
{
title: '成本价',
slot: 'cost',
align: 'center',
minWidth: 95
},
{
title: '原价',
slot: 'ot_price',
align: 'center',
minWidth: 95
},
{
title: '库存',
slot: 'stock',
align: 'center',
minWidth: 95
},
{
title: '商品编号',
slot: 'bar_code',
align: 'center',
minWidth: 120
},
{
title: '重量(KG)',
slot: 'weight',
align: 'center',
minWidth: 95
},
{
title: '体积(m³)',
slot: 'volume',
align: 'center',
minWidth: 95
},
{
title: '操作',
slot: 'action',
fixed: 'right',
align: 'center',
minWidth: 140
}
],
columns: [],
gridPic: {
xl: 6,
lg: 8,
md: 12,
sm: 12,
xs: 12
},
gridBtn: {
xl: 4,
lg: 8,
md: 8,
sm: 8,
xs: 8
},
form1: { form1: {
good:{ good:{
@ -414,13 +327,6 @@ export default {
} }
], ],
images: [], images: [],
grid: {
xl: 8,
lg: 8,
md: 12,
sm: 24,
xs: 24
},
loading: false, loading: false,
treeSelect: [], treeSelect: [],
tableIndex: 0, tableIndex: 0,
@ -604,6 +510,7 @@ export default {
that.attrs = data.items || []; that.attrs = data.items || [];
that.formValidate = data; that.formValidate = data;
that.id = that.combinationId that.id = that.combinationId
that.formValidate.id = 0;
that.formValidate.productId = data.id that.formValidate.productId = data.id
that.formValidate.cate_id = cate_id; that.formValidate.cate_id = cate_id;
that.formValidate.title = data.store_name that.formValidate.title = data.store_name

190
src/views/activity/seckill/form.vue

@ -92,23 +92,23 @@
<!-- 多规格表格--> <!-- 多规格表格-->
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品属性:" class="labeltop"> <el-form-item label="商品属性:" class="labeltop">
<el-table :data="manyFormValidate" border> <el-table :data="manyFormValidate" size="small" style="width: 90%;">
<el-table-column type="myindex" v-for="(item,index) in formValidate.header" :key="index" :label="item.title" :property="item.slot" align="center"> <el-table-column type="myindex" v-for="(item,index) in formValidate.header" :key="index" :label="item.title" :property="item.slot" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.column.property == 'pic'"> <div v-if="scope.column.property == 'pic'">
<single-pic v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" /> <single-pic v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" align="center"/>
</div> </div>
<div v-else-if="scope.column.property.indexOf('value') != -1" > <div v-else-if="scope.column.property.indexOf('value') != -1" align="center">
{{ scope.row[scope.column.property] }} {{ scope.row[scope.column.property] }}
</div> </div>
<div v-else-if="scope.column.property == 'seckill_price'||scope.column.property == 'seckill_stock'" > <div v-else-if="scope.column.property == 'seckill_price'||scope.column.property == 'seckill_stock'" align="center" >
<el-input v-model="scope.row[scope.column.property]"/> <el-input v-model="scope.row[scope.column.property]"/>
</div> </div>
<div v-else-if="scope.column.property == 'action'" > <div v-else-if="scope.column.property == 'action'" align="center" >
<a :disabled="true">不可删除</a> <a :disabled="true">不可删除</a>
</div> </div>
<div v-else> <div v-else>
<el-input v-model="scope.row[scope.column.property]" :disabled="true"/> <el-input v-model="scope.row[scope.column.property]" :disabled="true" align="center"/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -119,7 +119,7 @@
<!-- 单规格表格--> <!-- 单规格表格-->
<el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="formValidate.spec_type === 0"> <el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="formValidate.spec_type === 0">
<el-form-item > <el-form-item >
<el-table :data="oneFormValidate" border> <el-table :data="oneFormValidate" size="small" style="width: 90%;">
<el-table-column prop="pic" label="图片" align="center"> <el-table-column prop="pic" label="图片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<single-pic v-model="scope.row.pic" type="image" :num="1" :width="60" :height="60" /> <single-pic v-model="scope.row.pic" type="image" :num="1" :width="60" :height="60" />
@ -192,93 +192,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<!-- <el-col v-bind="grid">-->
<!-- <el-form-item label="虚拟:">-->
<!-- <el-input-number :min="0" v-model="formValidate.sales" placeholder="请输入销量" :disabled="true"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col v-bind="grid">-->
<!-- <el-form-item label="排序:">-->
<!-- <el-input-number :min="0" v-model="formValidate.sort" placeholder="请输入排序" :disabled="true"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="佣金设置:">-->
<!-- <el-radio-group v-model="formValidate.is_sub" :disabled="true" >-->
<!-- <el-radio :label="1" class="radio">单独设置</el-radio>-->
<!-- <el-radio :label="0">默认设置</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="24" v-if="formValidate.is_sub === 1">-->
<!-- &lt;!&ndash;单规格返佣&ndash;&gt;-->
<!-- <el-form-item label="" v-if="formValidate.spec_type === 0">-->
<!-- <el-table :data="oneFormValidate" border>-->
<!-- <el-table-column prop="imageArr" label="图片" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-image :src="scope.row.pic" fit="contain">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"></i>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="price" label="售价" align="center" />-->
<!-- <el-table-column prop="cost" label="成本价" align="center" />-->
<!-- <el-table-column prop="ot_price" label="原价" align="center" />-->
<!-- <el-table-column prop="stock" label="库存" align="center" />-->
<!-- <el-table-column prop="pink_price" label="秒杀价" align="center" />-->
<!-- <el-table-column prop="pink_stock" label="秒杀库存" align="center" />-->
<!-- <el-table-column prop="bar_code" label="商品编号" align="center" />-->
<!-- <el-table-column prop="weight" label="重量(KG)" align="center" />-->
<!-- <el-table-column prop="volume" label="体积(m³" align="center" />-->
<!-- <el-table-column prop="volume" label="一级返佣" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input type="text" v-model="scope.row.brokerage" :disabled="true"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="volume" label="二级返佣" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input type="text" v-model="scope.row.brokerage_two" :disabled="true"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="" v-if="formValidate.spec_type === 1 && manyFormValidate.length">-->
<!-- <el-table :data="manyFormValidate" border>-->
<!-- <el-table-column prop="imageArr" label="图片" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-image :src="scope.row.pic" fit="contain">-->
<!-- <div slot="error" class="image-slot">-->
<!-- <i class="el-icon-picture-outline"></i>-->
<!-- </div>-->
<!-- </el-image>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="price" label="售价" align="center" />-->
<!-- <el-table-column prop="cost" label="成本价" align="center" />-->
<!-- <el-table-column prop="ot_price" label="原价" align="center" />-->
<!-- <el-table-column prop="stock" label="库存" align="center" />-->
<!-- <el-table-column prop="seckill_price" label="秒杀价" align="center" />-->
<!-- <el-table-column prop="seckill_stock" label="秒杀库存" align="center" />-->
<!-- <el-table-column prop="bar_code" label="商品编号" align="center" />-->
<!-- <el-table-column prop="weight" label="重量(KG)" align="center" />-->
<!-- <el-table-column prop="volume" label="体积(m³" align="center" />-->
<!-- <el-table-column prop="volume" label="一级返佣" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input type="text" v-model="scope.row.brokerage":disabled="true"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="volume" label="二级返佣" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input type="text" v-model="scope.row.brokerage_two":disabled="true"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-form-item> <el-form-item>
<el-button type="primary" class="submission" @click="handleSubmit('formValidate')">保存</el-button> <el-button type="primary" class="submission" @click="handleSubmit('formValidate')">保存</el-button>
</el-form-item> </el-form-item>
@ -305,20 +218,6 @@ export default {
data() { data() {
return { return {
spinShow: false,myTimes: [], spinShow: false,myTimes: [],
grid2: {
xl: 10,
lg: 12,
md: 12,
sm: 24,
xs: 24
},
grid3: {
xl: 18,
lg: 18,
md: 20,
sm: 24,
xs: 24
},
// data // data
oneFormBatch: [ oneFormBatch: [
{ {
@ -339,7 +238,6 @@ export default {
attrsName: '', attrsName: '',
attrsVal: '' attrsVal: ''
}, },
formDynamicNameData: [],
isBtn: false, isBtn: false,
myConfig: { myConfig: {
autoHeightEnabled: false, // autoHeightEnabled: false, //
@ -348,79 +246,6 @@ export default {
UEDITOR_HOME_URL: '/UEditor/', UEDITOR_HOME_URL: '/UEditor/',
serverUrl: '' serverUrl: ''
}, },
columns2: [
{
title: '图片',
slot: 'pic',
align: 'center',
minWidth: 80
},
{
title: '售价',
slot: 'price',
align: 'center',
minWidth: 95,
disabled: true
},
{
title: '成本价',
slot: 'cost',
align: 'center',
minWidth: 95
},
{
title: '原价',
slot: 'ot_price',
align: 'center',
minWidth: 95
},
{
title: '库存',
slot: 'stock',
align: 'center',
minWidth: 95
},
{
title: '商品编号',
slot: 'bar_code',
align: 'center',
minWidth: 120
},
{
title: '重量(KG)',
slot: 'weight',
align: 'center',
minWidth: 95
},
{
title: '体积(m³)',
slot: 'volume',
align: 'center',
minWidth: 95
},
{
title: '操作',
slot: 'action',
fixed: 'right',
align: 'center',
minWidth: 140
}
],
columns: [],
gridPic: {
xl: 6,
lg: 8,
md: 12,
sm: 12,
xs: 12
},
gridBtn: {
xl: 4,
lg: 8,
md: 8,
sm: 8,
xs: 8
},
form1: { form1: {
good:{ good:{
@ -689,6 +514,7 @@ export default {
let cate_id = parseInt(data.cate_id) || 0; let cate_id = parseInt(data.cate_id) || 0;
that.attrs = data.items || []; that.attrs = data.items || [];
that.formValidate = data; that.formValidate = data;
that.formValidate.id = 0;
that.formValidate.productId = data.id that.formValidate.productId = data.id
that.formValidate.cate_id = cate_id; that.formValidate.cate_id = cate_id;
that.oneFormValidate = [data.attr]; that.oneFormValidate = [data.attr];

97
src/views/shop/goods/form.vue

@ -107,22 +107,20 @@
<!-- 多规格表格--> <!-- 多规格表格-->
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品属性:" class="labeltop"> <el-form-item label="商品属性:" class="labeltop">
<el-table :data="manyFormValidate" size="small" style="width: 90%;">
<el-table :data="manyFormValidate" border>
<el-table-column type="myindex" v-for="(item,index) in formValidate.header" :key="index" :label="item.title" :property="item.slot" align="center"> <el-table-column type="myindex" v-for="(item,index) in formValidate.header" :key="index" :label="item.title" :property="item.slot" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.column.property == 'pic'"> <div v-if="scope.column.property == 'pic'" align="center">
<single-pic v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" /> <single-pic v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" />
</div> </div>
<div v-else-if="scope.column.property.indexOf('value') != -1"> <div v-else-if="scope.column.property.indexOf('value') != -1" align="center">
{{ scope.row[scope.column.property] }} {{ scope.row[scope.column.property] }}
</div> </div>
<div v-else-if="scope.column.property == 'action'" > <div v-else-if="scope.column.property == 'action'" align="center" >
<a @click="delAttrTable(scope.$index)">删除</a> <a @click="delAttrTable(scope.$index)" align="center">删除</a>
</div> </div>
<div v-else> <div v-else align="center">
<el-input v-model="scope.row[scope.column.property]" /> <el-input v-model="scope.row[scope.column.property]" align="center" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -135,7 +133,7 @@
<!-- 单规格表格--> <!-- 单规格表格-->
<el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="formValidate.spec_type === 0"> <el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="formValidate.spec_type === 0">
<el-form-item > <el-form-item >
<el-table :data="oneFormValidate" border> <el-table :data="oneFormValidate" size="small" style="width: 90%;">
<el-table-column prop="pic" label="图片" align="center"> <el-table-column prop="pic" label="图片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<single-pic v-model="scope.row.pic" type="image" :num="1" :width="60" :height="60" /> <single-pic v-model="scope.row.pic" type="image" :num="1" :width="60" :height="60" />
@ -224,10 +222,10 @@
<el-col :span="24" v-if="formValidate.is_sub === 1"> <el-col :span="24" v-if="formValidate.is_sub === 1">
<!--单规格返佣--> <!--单规格返佣-->
<el-form-item label="商品属性:" v-if="formValidate.spec_type === 0"> <el-form-item label="商品属性:" v-if="formValidate.spec_type === 0">
<el-table :data="oneFormValidate" border> <el-table :data="oneFormValidate" size="small" style="width: 90%;">
<el-table-column prop="imageArr" label="图片" align="center"> <el-table-column prop="imageArr" label="图片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image :src="scope.row.pic" fit="contain"> <el-image :src="scope.row.pic" class="el-avatar">
<div slot="error" class="image-slot"> <div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i> <i class="el-icon-picture-outline"></i>
</div> </div>
@ -254,10 +252,10 @@
</el-table> </el-table>
</el-form-item> </el-form-item>
<el-form-item label="商品属性:" v-if="formValidate.spec_type === 1 && manyFormValidate.length"> <el-form-item label="商品属性:" v-if="formValidate.spec_type === 1 && manyFormValidate.length">
<el-table :data="manyFormValidate" border> <el-table :data="manyFormValidate" size="small" style="width: 90%;">
<el-table-column prop="imageArr" label="图片" align="center"> <el-table-column prop="imageArr" label="图片" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image :src="scope.row.pic" fit="contain"> <el-image :src="scope.row.pic" :width="60" :height="60" >
<div slot="error" class="image-slot"> <div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i> <i class="el-icon-picture-outline"></i>
</div> </div>
@ -394,78 +392,7 @@ export default {
UEDITOR_HOME_URL: '/UEditor/', UEDITOR_HOME_URL: '/UEditor/',
serverUrl: '' serverUrl: ''
}, },
columns2: [
{
title: '图片',
slot: 'pic',
align: 'center',
minWidth: 80
},
{
title: '售价',
slot: 'price',
align: 'center',
minWidth: 95
},
{
title: '成本价',
slot: 'cost',
align: 'center',
minWidth: 95
},
{
title: '原价',
slot: 'ot_price',
align: 'center',
minWidth: 95
},
{
title: '库存',
slot: 'stock',
align: 'center',
minWidth: 95
},
{
title: '商品编号',
slot: 'bar_code',
align: 'center',
minWidth: 120
},
{
title: '重量(KG)',
slot: 'weight',
align: 'center',
minWidth: 95
},
{
title: '体积(m³)',
slot: 'volume',
align: 'center',
minWidth: 95
},
{
title: '操作',
slot: 'action',
fixed: 'right',
align: 'center',
minWidth: 140
}
],
columns: [], columns: [],
gridPic: {
xl: 6,
lg: 8,
md: 12,
sm: 12,
xs: 12
},
gridBtn: {
xl: 4,
lg: 8,
md: 8,
sm: 8,
xs: 8
},
formValidate: { formValidate: {
imageArr:[], imageArr:[],
sliderImageArr: [], sliderImageArr: [],

Loading…
Cancel
Save