分销价和铺货价列表

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

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

Loading…
Cancel
Save