产品更改序号

master
lion 2 years ago
parent 275d4552ec
commit 8c7a9272e3

@ -1,166 +1,170 @@
<template>
<div>
<Modal :width="80" :value.sync="isShow" :fullscreen='isFullScreen' @on-visible-change="$emit('update:isShow',$event)"
>
<div class="ivu-modal-header ivu-modal-header-wrap">
<div v-solt:header>
{{name+'订单列表'}}
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i :class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
</div>
</div>
<Button class="select" type="primary" style="margin-bottom: 10px;" @click="downloadExel"></Button>
<xy-table id="print" :is-page="false" :list="list" :table-item="table" :height="300">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</Modal>
</div>
</template>
<script>
import {show} from "@/api/activity"
<template>
<div>
<Modal :width="80" :value.sync="isShow" :fullscreen='isFullScreen'
@on-visible-change="$emit('update:isShow',$event)">
<div class="ivu-modal-header ivu-modal-header-wrap">
<template v-solt:header>
{{name+'订单列表'}}
<a class="ivu-modal-screen" @click="isFullScreen=!isFullScreen"><i
:class="isFullScreen?'el-icon-aim':'el-icon-full-screen'"></i></a>
</template>
</div>
<Button class="select" type="primary" style="margin-bottom: 10px;" @click="downloadExel"></Button>
<xy-table id="print" :is-page="false" :list="list" :table-item="table" :height="300">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</Modal>
</div>
</template>
<script>
import {
show
} from "@/api/activity"
import {
download
} from '@/utils/downloadRequest'
export default {
props:{
id:Number,
name:String,
isShow:{
type:Boolean,
default:false
}
},
data() {
return {
isFullScreen:false,
list:[],
table:[
{
prop: "name",
label: "姓名",
width: 120
},
{
prop: "wechat_nickname",
label: "微信昵称",
width: 120
},
{
label: "头像",
width: 80,
prop:"members.avatar",
customFn: (row) => {
return ( < div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}
} > <el-avatar src = {
row.members?.avatar
} > </el-avatar></div > )
}
},
{
prop: "phone",
label: "联系电话",
width: 120
},
{
prop: "area",
label: "区域",
width: 120
},
{
prop: "address",
label: "地址",
width: 120
},
{
prop: "budget_date",
label: "预产期",
// width: 120
},
{
prop: "hospital",
label: "建卡医院",
width: 120
},
{
prop: "spread_member_name",
label: "推广渠道",
width: 120
},
{
prop: "spread_member_phone",
label: "推广人号码",
width: 120
},
{
prop: "used_time_name",
label: "是否核销",
width: 120
},
],
}
},
methods: {
closeshowChange(){},
fullScreen(){},
async getOrder(){
await show({
id:this.id
}).then(res=>{
for(var k of res.apply){
k.wechat_nickname = k.members?k.members.wechat_nickname:""
k.used_time_name = k.used_time ? '已核销':'待核销'
k.spread_member_name = k.spread_member?k.spread_member.name:''
k.spread_member_phone = k.spread_member?k.spread_member.phone:''
}
this.list = res.apply
})
},
downloadExel(){
// this.$Print('#print')
this.$Export.excel({
title: this.name,
columns: this.table,
data: this.list
});
// download(
// '/api/admin/active/show',
// 'get', {
// id:this.id
// },
// this.name+'.xlsx')
}
},
watch:{
isShow(newVal){
if(newVal){
this.getOrder()
}
}
}
}
</script>
<style scoped lang="scss">
.ivu-modal-header-wrap{
margin-bottom:10px;
padding-top: 0;
.ivu-modal-screen{
top:16px;
}
}
.ivu-modal-close{
top:7px
}
} from '@/utils/downloadRequest'
export default {
props: {
id: Number,
name: String,
isShow: {
type: Boolean,
default: false
}
},
data() {
return {
isFullScreen: false,
list: [],
table: [{
prop: "name",
label: "姓名",
width: 120
},
{
prop: "wechat_nickname",
label: "微信昵称",
width: 120
},
{
label: "头像",
width: 80,
prop: "members.avatar",
customFn: (row) => {
return ( <div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}
} > <el-avatar src = {
row.members?.avatar
} > </el-avatar></div> )
}
},
{
prop: "phone",
label: "联系电话",
width: 120
},
{
prop: "area",
label: "区域",
width: 120
},
{
prop: "address",
label: "地址",
width: 120
},
{
prop: "budget_date",
label: "预产期",
// width: 120
},
{
prop: "hospital",
label: "建卡医院",
width: 120
},
{
prop: "spread_member_name",
label: "推广渠道",
width: 120
},
{
prop: "spread_member_phone",
label: "推广人号码",
width: 120
},
{
prop: "used_time_name",
label: "是否核销",
width: 120
},
],
}
},
methods: {
closeshowChange() {},
fullScreen() {},
async getOrder() {
await show({
id: this.id
}).then(res => {
for (var k of res.apply) {
k.wechat_nickname = k.members ? k.members.wechat_nickname : ""
k.used_time_name = k.used_time ? '已核销' : '待核销'
k.spread_member_name = k.spread_member ? k.spread_member.name : ''
k.spread_member_phone = k.spread_member ? k.spread_member.phone : ''
}
this.list = res.apply
})
},
downloadExel() {
// this.$Print('#print')
this.$Export.excel({
title: this.name,
columns: this.table,
data: this.list
});
// download(
// '/api/admin/active/show',
// 'get', {
// id:this.id
// },
// this.name+'.xlsx')
}
},
watch: {
isShow(newVal) {
if (newVal) {
this.getOrder()
}
}
}
}
</script>
<style scoped lang="scss">
.ivu-modal-header-wrap {
margin-bottom: 10px;
padding-top: 0;
.ivu-modal-screen {
top: 16px;
}
}
.ivu-modal-close {
top: 7px
}
</style>

@ -235,7 +235,8 @@
return {
id: '',
isShow: false,
type: 'add',
type: 'add',
sortnumberNew:'',
action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
pickerOptions: {
shortcuts: [{
@ -376,7 +377,8 @@
time: [res?.start_time, res?.end_time],
sortnumber: res?.sortnumber,
content: res?.content
}
}
console.log("form",this.form)
// this.$refs['tinymce'].setContent(this.form.content || ' ')
},
@ -440,7 +442,13 @@
// }else{
// return str
// }
// },
// },
async updateSortNumber(){
await this.getDetail()
this.form.sortnumber = this.sortnumberNew
await this.submit()
},
submit() {
if (this.type === 'add'||this.type === 'copy') {
store({
@ -471,7 +479,8 @@
})
return
}
if (this.type === 'editor') {
if (this.type === 'editor') {
// return
save({
id: this.id,
name: this.form.name,
@ -495,7 +504,8 @@
Message({
type: 'success',
message: '编辑商品成功'
})
})
this.sortnumberNew = ""
this.isShow = false
this.$emit('refresh')
})

@ -1,365 +1,409 @@
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="产品与服务管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div style="display: flex">
<Input v-model="select.name" style="width: 200px;margin-right: 10px;" placeholder="产品名称搜索" />
<xy-selectors @search="getProducts">
<template>
<div class="select-content-item">
<div class="select-content-item-label">所属商户</div>
<div>
<Select clearable v-model="select.merchantId" style="width: 140px;" placeholder="所属商户">-->
<Scroll :on-reach-bottom="loadMoreMerchant">
<Option v-for="item in merchants" :value="item.id" :key="item.id">
{{item.name}}
</Option>
</Scroll>
</Select>
</div>
</div>
<div class="select-content-item">
<div class="select-content-item-label">
状态
</div>
<div>
<el-radio v-model="select.state" label="inactive"></el-radio>
<el-radio v-model="select.state" label="active"></el-radio>
<el-radio v-model="select.state" label=""></el-radio>
</div>
</div>
<div class="select-content-item">
<div class="select-content-item-label">
类别
</div>
<div>
<el-cascader
clearable
placeholder="类别选择"
style="width: 170px;" size="small"
:options="types" :show-all-levels="false"
:props="{value:'id',label:'title',expandTrigger:'hover'}"
@change="e => select.productTypeId = e.at(-1)">
</el-cascader>
</div>
</div>
</template>
</xy-selectors>
<Button type="primary" @click="searchProducts"></Button>
<Button type="primary" @click="$refs['addProduct'].isShow = true,$refs['addProduct'].type = 'add'" style="margin-left: 10px;">新增</Button>
</div>
<!-- <div class="selector">-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">产品名称</div>-->
<!-- <Input v-model="select.name" style="width: 200px;" placeholder="产品名称搜索" />-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">所属商户</div>-->
<!-- <Select clearable v-model="select.merchantId" style="width: 140px;" placeholder="所属商户">-->
<!-- <Scroll :on-reach-bottom="loadMoreMerchant">-->
<!-- <Option v-for="item in merchants" :value="item.id" :key="item.id">-->
<!-- {{item.name}}-->
<!-- </Option>-->
<!-- </Scroll>-->
<!-- </Select>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">状态选择</div>-->
<!-- <Select clearable style="width: 130px;" clearable placeholder="状态选择" v-model="select.state">-->
<!-- <Option v-for="item in [{value:'active',label:'已上架'},{label:'已下架',value:'inactive'}]" :value="item.value">{{item.label}}</Option>-->
<!-- </Select>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">类别选择</div>-->
<!-- <el-cascader-->
<!-- clearable-->
<!-- placeholder="类别选择"-->
<!-- style="width: 170px;"-->
<!-- size="small"-->
<!-- :options="types"-->
<!-- :show-all-levels="false"-->
<!-- :props="{value:'id',label:'title',expandTrigger:'hover'}"-->
<!-- @change="e => select.productTypeId = e.at(-1)">-->
<!-- </el-cascader>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <Button type="primary" @click="getProducts"></Button>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <Button type="primary" @click="$refs['addProduct'].isShow = true,$refs['addProduct'].type = 'add'">新增</Button>-->
<!-- </div>-->
<!-- </div>-->
</slot>
</lx-header>
</div>
<xy-table :total="total" :list="list" :table-item="table" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="300" header-align="center">
<template slot-scope="scope">
<Button type="primary" size="small" @click="editorShow(scope.row.id,'editor')"></Button>
<Button type="primary" size="small" style="margin-left: 10px;" @click="editorShow(scope.row.id,'copy')"></Button>
<Poptip
transfer
confirm
title="确认要删除吗?"
@on-ok="deleteProduct(scope.row)">
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
</Poptip>
<el-switch
style="margin-left: 10px;"
:value="scope.row.state_name == '已上架' ? true : false"
active-color="#BF617C"
inactive-color="#E5E5E5"
:active-text="scope.row.state_name == '已上架' ? '已上架' : '已下架'"
@change="stateChange(scope.row)">
</el-switch>
</template>
</el-table-column>
</template>
</xy-table>
<addProduct ref="addProduct" :types="types" @refresh="getProducts"></addProduct>
</div>
</template>
<script>
import {index as typeIndex} from '@/api/type'
import {index,toggleActive,destroy} from '@/api/product'
import {index as merchantIndex} from "@/api/merchant"
import addProduct from '@/views/productService/components/addProduct'
import { Message } from 'element-ui'
export default {
components:{
addProduct
},
data() {
return {
select:{
pageIndex:1,
pageSize:10,
name:'',
merchantId:'',
productTypeId:'',
state:''
},
total:0,
list:[],
table:[
{
prop:'name',
label:'名称',
width:260,
align:'left',
fixed:'left'
},
{
prop:'product_type.name',
label:'类别',
width: 180
},
{
prop:'merchant.username',
label:"所属商家",
width: 280
},
{
prop: "price",
label:"单价",
width: 160,
align:'right'
},
{
prop:"fee",
label:"平台佣金",
width: 160,
align:'right'
},
{
prop:'sharing',
label: '分享金',
width: 160,
align:'right'
},
{
prop:'start_time',
label:'上架时间',
width: 220
},
{
prop: 'end_time',
label:"下架时间",
width: 220
},
{
prop:'sortnumber',
label:'同级排序',
width: 130
},
{
prop: 'state_name',
label: '状态',
customFn:(row)=>{
if(row.state_name == '已上架'){
return (<div style="color: green">{row.state_name}</div>)
}else{
return (<div style="color: red">{row.state_name}</div>)
}
}
}
],
types:[],//
merchants:[],//
merchantSelect:{
pageIndex:1,
pageSize:10
}
}
},
methods: {
pageSizeChange(e){
this.select.pageSize=e;
this.searchProducts();
},
searchProducts(){
this.select.pageIndex = 1
this.getProducts()
},
pageChange(e){
this.select.pageIndex = e
this.getProducts()
},
stateChange(row){
toggleActive({id:row.id}).then(res => {
row.state_name = row.state_name == '已上架' ? '已下架' : '已上架'
})
},
deleteProduct(row){
destroy({id:row.id}).then(res => {
Message({
type:'success',
message:'删除成功'
})
this.getProducts()
})
},
editorShow(id,type){
this.$refs['addProduct'].type = type;
this.$refs['addProduct'].id = id;
this.$refs['addProduct'].isShow = true;
},
async getProducts(){
const res = await index({
page_size:this.select.pageSize,
page:this.select.pageIndex,
name:this.select.name,
merchant_id:this.select.merchantId,
product_type_id:this.select.productTypeId,
state:this.select.state
})
this.total = res.total
this.list = res.rows
},
async getTypes(){
const res = await typeIndex()
let hasChild = (array) => {
array.map(item => {
if(item.children.length > 0){
hasChild(item.children)
}else{
item.children = ''
}
})
}
hasChild(res)
this.types = res
},
async getMerchant(){
const res = await merchantIndex({
page:this.merchantSelect.pageIndex,
page_size:this.merchantSelect.pageSize
},false)
if(res.data.length == 0){
this.$Message.info({
content:'没有更多商户了',
duration:1
})
this.merchantSelect.pageIndex --
}
this.merchants.push(...res.data)
},
loadMoreMerchant(){
this.merchantSelect.pageIndex++
this.getMerchant()
}
},
mounted() {
this.getTypes()
this.getMerchant()
this.getProducts()
}
}
</script>
<style scoped lang="scss">
.select-content-item{
display: flex;
align-items: center;
margin-bottom: 10px;
&-label{
width: 110px;
padding: 0 20px;
}
}
.selector{
display: flex;
flex-wrap: wrap;
align-items: center;
align-content: center;
&-item{
display: flex;
align-items: center;
margin-top: 6px;
margin-right: 10px;
&__label{
word-break: keep-all;
}
}
}
::v-deep .ivu-select-dropdown{
}
::v-deep .ivu-scroll-container{
height: 180px !important;
&::after{
content: '加载更多..';
text-align: center;
font-size: 10px;
color: rgb(160,160,160);
background: #fff;
zoom: 0.8;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
}
<template>
<div style="padding: 0 20px">
<div ref="lxHeader">
<lx-header icon="md-apps" text="产品与服务管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div style="display: flex">
<Input v-model="select.name" style="width: 200px;margin-right: 10px;" placeholder="产品名称搜索" />
<xy-selectors @search="getProducts">
<template>
<div class="select-content-item">
<div class="select-content-item-label">所属商户</div>
<div>
<Select clearable v-model="select.merchantId" style="width: 140px;" placeholder="所属商户">-->
<Scroll :on-reach-bottom="loadMoreMerchant">
<Option v-for="item in merchants" :value="item.id" :key="item.id">
{{item.name}}
</Option>
</Scroll>
</Select>
</div>
</div>
<div class="select-content-item">
<div class="select-content-item-label">
状态
</div>
<div>
<el-radio v-model="select.state" label="inactive"></el-radio>
<el-radio v-model="select.state" label="active"></el-radio>
<el-radio v-model="select.state" label=""></el-radio>
</div>
</div>
<div class="select-content-item">
<div class="select-content-item-label">
类别
</div>
<div>
<el-cascader clearable placeholder="类别选择" style="width: 170px;" size="small" :options="types"
:show-all-levels="false" :props="{value:'id',label:'title',expandTrigger:'hover'}"
@change="e => select.productTypeId = e.at(-1)">
</el-cascader>
</div>
</div>
</template>
</xy-selectors>
<Button type="primary" @click="searchProducts"></Button>
<Button type="primary" @click="$refs['addProduct'].isShow = true,$refs['addProduct'].type = 'add'"
style="margin-left: 10px;">新增</Button>
</div>
<!-- <div class="selector">-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">产品名称</div>-->
<!-- <Input v-model="select.name" style="width: 200px;" placeholder="产品名称搜索" />-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">所属商户</div>-->
<!-- <Select clearable v-model="select.merchantId" style="width: 140px;" placeholder="所属商户">-->
<!-- <Scroll :on-reach-bottom="loadMoreMerchant">-->
<!-- <Option v-for="item in merchants" :value="item.id" :key="item.id">-->
<!-- {{item.name}}-->
<!-- </Option>-->
<!-- </Scroll>-->
<!-- </Select>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">状态选择</div>-->
<!-- <Select clearable style="width: 130px;" clearable placeholder="状态选择" v-model="select.state">-->
<!-- <Option v-for="item in [{value:'active',label:'已上架'},{label:'已下架',value:'inactive'}]" :value="item.value">{{item.label}}</Option>-->
<!-- </Select>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <div class="selector-item__label">类别选择</div>-->
<!-- <el-cascader-->
<!-- clearable-->
<!-- placeholder="类别选择"-->
<!-- style="width: 170px;"-->
<!-- size="small"-->
<!-- :options="types"-->
<!-- :show-all-levels="false"-->
<!-- :props="{value:'id',label:'title',expandTrigger:'hover'}"-->
<!-- @change="e => select.productTypeId = e.at(-1)">-->
<!-- </el-cascader>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <Button type="primary" @click="getProducts"></Button>-->
<!-- </div>-->
<!-- <div class="selector-item">-->
<!-- <Button type="primary" @click="$refs['addProduct'].isShow = true,$refs['addProduct'].type = 'add'">新增</Button>-->
<!-- </div>-->
<!-- </div>-->
</slot>
</lx-header>
</div>
<xy-table :total="total" :list="list" :table-item="table" @pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="300" header-align="center">
<template slot-scope="scope">
<Button type="primary" size="small" @click="editorShow(scope.row.id,'editor')"></Button>
<Button type="primary" size="small" style="margin-left: 10px;"
@click="editorShow(scope.row.id,'copy')">复制新增</Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteProduct(scope.row)">
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
</Poptip>
<el-switch style="margin-left: 10px;" :value="scope.row.state_name == '已上架' ? true : false"
active-color="#BF617C" inactive-color="#E5E5E5"
:active-text="scope.row.state_name == '已上架' ? '已上架' : '已下架'" @change="stateChange(scope.row)">
</el-switch>
</template>
</el-table-column>
</template>
</xy-table>
<addProduct ref="addProduct" :types="types" @refresh="getProducts"></addProduct>
</div>
</template>
<script>
import {
index as typeIndex
} from '@/api/type'
import {
index,
toggleActive,
destroy
} from '@/api/product'
import {
index as merchantIndex
} from "@/api/merchant"
import addProduct from '@/views/productService/components/addProduct'
import {
Message
} from 'element-ui'
export default {
components: {
addProduct
},
data() {
return {
select: {
pageIndex: 1,
pageSize: 10,
name: '',
merchantId: '',
productTypeId: '',
state: ''
},
total: 0,
list: [],
table: [{
prop: 'name',
label: '名称',
width: 260,
align: 'left',
fixed: 'left'
},
{
prop: 'product_type.name',
label: '类别',
width: 180
},
{
prop: 'merchant.username',
label: "所属商家",
width: 280
},
{
prop: "price",
label: "单价",
width: 160,
align: 'right'
},
{
prop: "fee",
label: "平台佣金",
width: 160,
align: 'right'
},
{
prop: 'sharing',
label: '分享金',
width: 160,
align: 'right'
},
{
prop: 'start_time',
label: '上架时间',
width: 220
},
{
prop: 'end_time',
label: "下架时间",
width: 220
},
{
prop: 'sortnumber',
label: '同级排序',
width: 130,
customFn: (row) => {
return ( <input class = 'sortinput el-input__inner'
type='number'
on = {
{
["keyup"]: (e) => (this.updateSort(e, row.id, row))
}
}
value = {
row.sortnumber
}> </input>
)
}
},
{
prop: 'state_name',
label: '状态',
customFn: (row) => {
if (row.state_name == '已上架') {
return ( <div style = "color: green" > {
row.state_name
} </div>)
}
else {
return ( <div style = "color: red" > {
row.state_name
} </div>)
}
}
}
],
types: [], //
merchants: [], //
merchantSelect: {
pageIndex: 1,
pageSize: 10
}
}
},
methods: {
pageSizeChange(e) {
this.select.pageSize = e;
this.searchProducts();
},
updateSort(e, id, row, type) {
if (e.keyCode === 13) {
if(e.target.value==row.sortnumber){
return
}
this.$confirm('是否确认更改排序?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs['addProduct'].type = 'editor';
this.$refs['addProduct'].id = id;
this.$refs['addProduct'].sortnumberNew = e.target.value
this.$refs['addProduct'].updateSortNumber()
}).catch(() => {
e.target.value = row.sortnumber
});
}
},
searchProducts() {
this.select.pageIndex = 1
this.getProducts()
},
pageChange(e) {
this.select.pageIndex = e
this.getProducts()
},
stateChange(row) {
toggleActive({
id: row.id
}).then(res => {
row.state_name = row.state_name == '已上架' ? '已下架' : '已上架'
})
},
deleteProduct(row) {
destroy({
id: row.id
}).then(res => {
Message({
type: 'success',
message: '删除成功'
})
this.getProducts()
})
},
editorShow(id, type) {
this.$refs['addProduct'].type = type;
this.$refs['addProduct'].id = id;
this.$refs['addProduct'].isShow = true;
},
async getProducts() {
const res = await index({
page_size: this.select.pageSize,
page: this.select.pageIndex,
name: this.select.name,
merchant_id: this.select.merchantId,
product_type_id: this.select.productTypeId,
state: this.select.state
})
this.total = res.total
this.list = res.rows
},
async getTypes() {
const res = await typeIndex()
let hasChild = (array) => {
array.map(item => {
if (item.children.length > 0) {
hasChild(item.children)
} else {
item.children = ''
}
})
}
hasChild(res)
this.types = res
},
async getMerchant() {
const res = await merchantIndex({
page: this.merchantSelect.pageIndex,
page_size: this.merchantSelect.pageSize
}, false)
if (res.data.length == 0) {
this.$Message.info({
content: '没有更多商户了',
duration: 1
})
this.merchantSelect.pageIndex--
}
this.merchants.push(...res.data)
},
loadMoreMerchant() {
this.merchantSelect.pageIndex++
this.getMerchant()
}
},
mounted() {
this.getTypes()
this.getMerchant()
this.getProducts()
}
}
</script>
<style scoped lang="scss">
.select-content-item {
display: flex;
align-items: center;
margin-bottom: 10px;
&-label {
width: 110px;
padding: 0 20px;
}
}
.selector {
display: flex;
flex-wrap: wrap;
align-items: center;
align-content: center;
&-item {
display: flex;
align-items: center;
margin-top: 6px;
margin-right: 10px;
&__label {
word-break: keep-all;
}
}
}
::v-deep .ivu-select-dropdown {}
::v-deep .ivu-scroll-container {
height: 180px !important;
&::after {
content: '加载更多..';
text-align: center;
font-size: 10px;
color: rgb(160, 160, 160);
background: #fff;
zoom: 0.8;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
}
</style>

Loading…
Cancel
Save