分销价和铺货价列表

main
fanfan 7 months ago
parent 66451b3182
commit ebf7b3f73b
  1. 8
      src/layouts/BasicLayout.vue
  2. 70
      src/views/dataCenter/goods/Index.vue

@ -100,16 +100,16 @@ export default {
routes.children.map((val, index) => {
if (val.name == 'dataCenter') {
this.menus = routes.children.slice(index, index + 1)
if(this.menus.length<1){
if (this.menus.length < 1) {
return
}
this.menus[0].children.map((child,eq)=> {
if(child.path == '/goods/category/index')
this.menus[0].children.splice(eq,1)
this.menus[0].children.map((child, eq) => {
if (child.path == '/goods/category/index') this.menus[0].children.splice(eq, 1)
})
}
})
}
this.collapsed = !this.sidebarOpened
},
mounted() {

@ -54,13 +54,17 @@
</a-form-item>
<a-form-item label="前台价">
<div style="display: flex" class="goodsType">
<a-input v-decorator="['goods_price_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px;">-</span>
<a-input v-decorator="['goods_price_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px"
>-</span
>
<a-input style="margin-left: 5px" v-decorator="['goods_price_max']" placeholder="请输入" />
</div>
</a-form-item>
<a-form-item label="利润率">
<div style="display: flex" class="goodsType">
<a-input v-decorator="['profit_rate_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px;">-</span>
<a-input v-decorator="['profit_rate_min']" placeholder="请输入" /><span style="padding: 0 3px 0 5px"
>-</span
>
<a-input style="margin-left: 5px" v-decorator="['profit_rate_max']" placeholder="请输入" />
</div>
</a-form-item>
@ -70,7 +74,24 @@
{{ item.name }}
</a-select-option>
</a-select>
<a-form-item label="添加时间" style="margin-left: 20px">
</a-form-item>
<a-form-item label="分销价">
<div style="display: flex" class="goodsType">
<a-input v-decorator="['min_distribute_price']" placeholder="请输入" /><span style="padding: 0 3px 0 5px"
>-</span
>
<a-input style="margin-left: 5px" v-decorator="['max_distribute_price']" placeholder="请输入" />
</div>
</a-form-item>
<a-form-item label="铺货价">
<div style="display: flex" class="goodsType">
<a-input v-decorator="['min_shop_price']" placeholder="请输入" /><span style="padding: 0 3px 0 5px"
>-</span
>
<a-input style="margin-left: 5px" v-decorator="['max_shop_price']" placeholder="请输入" />
</div>
</a-form-item>
<a-form-item label="添加时间">
<div style="display: flex" class="goodsType" id="date">
<el-date-picker
v-model="dateSpan"
@ -88,7 +109,6 @@
</el-date-picker>
</div>
</a-form-item>
</a-form-item>
<a-form-item class="search-btn">
<a-button type="primary" icon="search" html-type="submit">搜索</a-button>
</a-form-item>
@ -221,8 +241,8 @@
</span>
<!-- 商品名称 -->
<span slot="goods_name" slot-scope="text, item">
<a v-if="item.link" :href="item.link" style="white-space:pre-wrap;" target="_blank">{{ text }}</a>
<p v-else style="white-space:pre-wrap" >{{ text }}</p>
<a v-if="item.link" :href="item.link" style="white-space: pre-wrap" target="_blank">{{ text }}</a>
<p v-else style="white-space: pre-wrap">{{ text }}</p>
</span>
<span slot="profit_rate" slot-scope="text, item">
<p>{{ text > 0 ? Number(text) + '%' : 0 }}</p>
@ -238,11 +258,7 @@
</p>
</span>
<span slot="cate_status" slot-scope="text">
<p
class="twoline-hide"
style="width: 40px"
:style="{ color: text == 0 ? 'red' : 'green'}"
>
<p class="twoline-hide" style="width: 40px" :style="{ color: text == 0 ? 'red' : 'green' }">
{{ text == 0 ? '待处理' : '已归类' }}
</p>
</span>
@ -272,7 +288,7 @@ import * as Api from '@/api/store'
import 'element-ui/lib/theme-chalk/index.css'
import store from '../../../store'
import Vue from 'vue'
import { DatePicker }from "element-ui"
import { DatePicker } from 'element-ui'
Vue.use(DatePicker)
//
const columns = [
@ -313,6 +329,20 @@ const columns = [
scopedSlots: { customRender: 'goods_price_min' },
sorter: true,
},
{
title: '分销价',
width: '100px',
dataIndex: 'distribute_price',
scopedSlots: { customRender: 'distribute_price' },
sorter: true,
},
{
title: '铺货价',
width: '100px',
dataIndex: 'shop_price',
scopedSlots: { customRender: 'shop_price' },
sorter: true,
},
{
title: '利润',
width: '80px',
@ -836,6 +866,14 @@ export default {
(formData.profit_rate_max || '') +
'&profit_rate_min=' +
(formData.profit_rate_min || '') +
'&min_distribute_price=' +
(formData.min_distribute_price || '') +
'&max_distribute_price=' +
(formData.max_distribute_price || '') +
'&min_shop_price=' +
(formData.min_shop_price || '') +
'&max_shop_price=' +
(formData.max_shop_price || '') +
'&categoryId=' +
this.queryParam.categoryId +
'&channel=' +
@ -847,9 +885,11 @@ export default {
'&is_sale=' +
this.queryParam.is_sale +
'&is_self=' +
this.queryParam.is_self+
'&goodsIds='+goodsIds+
'&Access-Token='+store.getters.token
this.queryParam.is_self +
'&goodsIds=' +
goodsIds +
'&Access-Token=' +
store.getters.token
console.log(params)
window.open(resolve + '?s=/admin/goods/export' + params)
},

Loading…
Cancel
Save