分销价和铺货价列表

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

@ -98,18 +98,18 @@ export default {
if (store.getters.userInfo.role === 1) {
this.menus = []
routes.children.map((val, index) => {
if (val.name == 'dataCenter') {
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,24 +74,40 @@
{{ item.name }}
</a-select-option>
</a-select>
<a-form-item label="添加时间" style="margin-left: 20px">
<div style="display: flex" class="goodsType" id="date">
<el-date-picker
v-model="dateSpan"
style="width: 350px; height: 32px; margin-top: 4px"
type="datetimerange"
:picker-options="pickerOptions"
:unlink-panels="true"
range-separator="至"
start-placeholder="开始时间"
size="mini"
:default-time="['00:00:00', '23:59:59']"
end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</div>
</a-form-item>
</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"
style="width: 350px; height: 32px; margin-top: 4px"
type="datetimerange"
:picker-options="pickerOptions"
:unlink-panels="true"
range-separator="至"
start-placeholder="开始时间"
size="mini"
:default-time="['00:00:00', '23:59:59']"
end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</div>
</a-form-item>
<a-form-item class="search-btn">
<a-button type="primary" icon="search" html-type="submit">搜索</a-button>
@ -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,12 +258,8 @@
</p>
</span>
<span slot="cate_status" slot-scope="text">
<p
class="twoline-hide"
style="width: 40px"
:style="{ color: text == 0 ? 'red' : 'green'}"
>
{{ text == 0 ? '待处理' : '已归类' }}
<p class="twoline-hide" style="width: 40px" :style="{ color: text == 0 ? 'red' : 'green' }">
{{ text == 0 ? '待处理' : '已归类' }}
</p>
</span>
<!-- 商品状态 -->
@ -268,11 +284,11 @@ import * as GoodsApi from '@/api/goods'
import { ContentHeader, STable } from '@/components'
import CategoryModel from '@/common/model/Category'
import * as Api from '@/api/store'
// import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import ElementUI from 'element-ui'
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,10 +885,12 @@ export default {
'&is_sale=' +
this.queryParam.is_sale +
'&is_self=' +
this.queryParam.is_self+
'&goodsIds='+goodsIds+
'&Access-Token='+store.getters.token
console.log(params)
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