## v1.3.1 更新列表

1. 【修复】申请退款后积分等操作可能出现错误的问题
	2. 【修复】拼团支付可能出现支付错误的问题
	3. 【修复】退款申请后的订单流程优化和积分赠送的问题
	4. 【修复】回收站中的商品无法恢复的问题
	5. 【修复】一号通短信查询记录不完整的问题
	6. 【修复】用户管理批量加分组,标签的问题
	7. 【修复】积分日志搜索显示有误的问题
	8. 【修复】手动发送优惠券可能会出错的问题
	9. 【修复】核销订单创建在某种条件下会出错的问题
	10. 【修复】移动端商品详情,购物车等样式兼容问题
	11. 【修复】业务流程性的优化
This commit is contained in:
stivepeim
2021-01-19 10:16:45 +08:00
parent 92d6d60122
commit c7654e50b1
136 changed files with 19904 additions and 23329 deletions

View File

@@ -135,7 +135,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import { tempAsyncApi, myTempTypeApi, myTempListApi, wechatTemplateStatusApi, wechatTemplateSaveApi, wechatTemplateUpdateApi, wechatTemplateDeleteApi, myTempStatusApi} from '@/api/wxApi'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
export default {
@@ -164,7 +163,7 @@
isCreate: 0,
editData: {},
dialogVisible: false,
switchData: constants.switchStatus,
switchData: this.$constants.switchStatus,
tableFrom: {
page: 1,
limit: 20,

View File

@@ -115,7 +115,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import { wechatTemplateListApi, wechatTemplateStatusApi, wechatTemplateSaveApi, wechatTemplateUpdateApi, wechatTemplateDeleteApi} from '@/api/wxApi'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
export default {
@@ -127,7 +126,7 @@
isCreate: 0,
editData: {},
dialogVisible: false,
switchData: constants.switchStatus,
switchData: this.$constants.switchStatus,
tableFrom: {
page: 1,
limit: 20,

View File

@@ -1,75 +1,78 @@
<template>
<div class="components-container">
<el-form ref="pram" label-width="150px" :model="pram">
<el-form-item label="标题" prop="title" :rules="[{required:true, message:'请填写标题', trigger:['blur','change']}]">
<el-input v-model="pram.title" placeholder="标题" maxlength="100"/>
</el-form-item>
<el-form-item label="作者" prop="author" :rules="[{required:true, message:'请填作者', trigger:['blur','change']}]">
<el-input v-model="pram.author" placeholder="作者" maxlength="20"/>
</el-form-item>
<el-form-item label="文章分类">
<el-select v-model="pram.cid" placeholder="请选择" style="width:100%;">
<el-option
v-for="item in categoryTreeData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="图文封面" prop="imageInput" :rules="[{ required: true, message: '请上传图文封面', trigger: 'change' }]">
<div class="upLoadPicBox" @click="modalPicTap('1')">
<div v-if="pram.imageInput" class="pictrue"><img :src="pram.imageInput"></div>
<div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
</div>
</el-form-item>
<!--<el-form-item label="微信公众号封面" prop="imageInput" :rules="[{ required: true, message: '请上传图文封面', trigger: 'change' }]">-->
<!--<div class="upLoadPicBox">-->
<div class="divBox">
<el-card class="box-card">
<div class="components-container">
<el-form ref="pram" label-width="150px" :model="pram">
<el-form-item label="标题" prop="title" :rules="[{required:true, message:'请填写标题', trigger:['blur','change']}]">
<el-input v-model="pram.title" placeholder="标题" maxlength="100"/>
</el-form-item>
<el-form-item label="作者" prop="author" :rules="[{required:true, message:'请填作者', trigger:['blur','change']}]">
<el-input v-model="pram.author" placeholder="作者" maxlength="20"/>
</el-form-item>
<el-form-item label="文章分类">
<el-select v-model="pram.cid" placeholder="请选择" style="width:100%;">
<el-option
v-for="item in categoryTreeData"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="图文封面" prop="imageInput" :rules="[{ required: true, message: '请上传图文封面', trigger: 'change' }]">
<div class="upLoadPicBox" @click="modalPicTap('1')">
<div v-if="pram.imageInput" class="pictrue"><img :src="pram.imageInput"></div>
<div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
</div>
</el-form-item>
<!--<el-form-item label="微信公众号封面" prop="imageInput" :rules="[{ required: true, message: '请上传图文封面', trigger: 'change' }]">-->
<!--<div class="upLoadPicBox">-->
<!--<div v-if="pram.imageInput" class="pictrue"><img :src="pram.imageInput"></div>-->
<!--<el-upload-->
<!--v-else-->
<!--class="upload-demo mr10 mb15"-->
<!--action-->
<!--:http-request="handleUploadForm"-->
<!--:headers="myHeaders"-->
<!--:show-file-list="false"-->
<!--multiple-->
<!--v-else-->
<!--class="upload-demo mr10 mb15"-->
<!--action-->
<!--:http-request="handleUploadForm"-->
<!--:headers="myHeaders"-->
<!--:show-file-list="false"-->
<!--multiple-->
<!--&gt;-->
<!--<div class="upLoad">-->
<!--<i class="el-icon-camera cameraIconfont" />-->
<!--</div>-->
<!--<div class="upLoad">-->
<!--<i class="el-icon-camera cameraIconfont" />-->
<!--</div>-->
<!--</el-upload>-->
<!--</div>-->
<!--</el-form-item>-->
<el-form-item label="文章简介" prop="synopsis" :rules="[{required:true, message:'请填写文章简介', trigger:['blur','change']}]">
<el-input v-model="pram.synopsis" maxlength="100" type="textarea" :rows="2" resize="none" placeholder="文章简介" />
</el-form-item>
<el-form-item label="文章内容" prop="content" :rules="[{required:true, message:'请填写文章内容', trigger:['blur','change']}]">
<ueditor-from v-model="pram.content" :content="pram.content" />
</el-form-item>
<el-form-item label="是否Banner">
<el-switch v-model="pram.isBanner" />
</el-form-item>
<el-form-item label="是否热门">
<el-switch v-model="pram.isHot" />
</el-form-item>
<!--<el-form-item label="原文链接">-->
<!--<p>原文链接选填填写之后在图文左下方会出现此链接</p>-->
<!--<el-input v-model="pram.url" placeholder="原文链接" />-->
<!--</el-form-item>-->
<el-form-item>
<el-button type="primary" @click="handerSubmit('pram')">保存</el-button>
</el-form-item>
</el-form>
<!--</div>-->
<!--</el-form-item>-->
<el-form-item label="文章简介" prop="synopsis" :rules="[{required:true, message:'请填写文章简介', trigger:['blur','change']}]">
<el-input v-model="pram.synopsis" maxlength="100" type="textarea" :rows="2" resize="none" placeholder="文章简介" />
</el-form-item>
<el-form-item label="文章内容" prop="content" :rules="[{required:true, message:'请填写文章内容', trigger:['blur','change']}]">
<ueditor-from v-model="pram.content" :content="pram.content" />
</el-form-item>
<el-form-item label="是否Banner">
<el-switch v-model="pram.isBanner" />
</el-form-item>
<el-form-item label="是否热门">
<el-switch v-model="pram.isHot" />
</el-form-item>
<!--<el-form-item label="原文链接">-->
<!--<p>原文链接选填填写之后在图文左下方会出现此链接</p>-->
<!--<el-input v-model="pram.url" placeholder="原文链接" />-->
<!--</el-form-item>-->
<el-form-item>
<el-button type="primary" :loading="loading" @click="handerSubmit('pram')">保存</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
</div>
</template>
<script>
import Tinymce from '@/components/Tinymce/index'
import * as categoryApi from '@/api/categoryApi.js'
import * as constants from '@/utils/constants.js'
import * as articleApi from '@/api/article.js'
import * as selfUtil from '@/utils/ZBKJIutil.js'
import { fileImageApi } from '@/api/systemSetting'
@@ -77,18 +80,10 @@ import { getToken } from '@/utils/auth'
export default {
// name: "edit",
components: { Tinymce },
props: {
isEdit: {
type: Number,
required: true
},
editData: {
type: Object
}
},
data() {
return {
constants,
loading:false,
constants: this.$constants,
categoryTreeData: [],
categoryProps: {
value: 'id',
@@ -114,14 +109,27 @@ export default {
id: null
// mediaId: null
},
editData: {},
myHeaders: { 'X-Token': getToken() }
}
},
created() {
this.tempRoute = Object.assign({}, this.$route)
},
mounted() {
if(this.$route.params.id){
this.getInfo()
this.setTagsViewTitle()
}
this.handlerGetCategoryTreeData()
this.hadlerInitEditData()
},
methods: {
getInfo (){
categoryApi.articleInfoApi({ id: this.$route.params.id }).then(data => {
this.editData = data
this.hadlerInitEditData()
})
},
// 上传
handleUploadForm(param){
const formData = new FormData()
@@ -150,13 +158,13 @@ export default {
}, tit, 'content')
},
hadlerInitEditData() {
if (this.isEdit !== 1) return
const { author, cid, content, imageInputs,
if (!this.$route.params.id) return
const { author, cid, content, imageInput,
isBanner, isHot, shareSynopsis, shareTitle, sort, synopsis, title, url, id } = this.editData
this.pram.author = author
this.pram.cid = Number.parseInt(cid)
this.pram.content = content
this.pram.imageInput = imageInputs
this.pram.imageInput = imageInput
this.pram.isBanner = isBanner
this.pram.isHot = isHot
this.pram.shareSynopsis = shareSynopsis
@@ -177,7 +185,7 @@ export default {
handerSubmit(form) {
this.$refs[form].validate(valid => {
if (!valid) return
if (this.isEdit === 0) {
if (!this.$route.params.id) {
this.handlerSave()
} else {
this.handlerUpdate()
@@ -185,23 +193,36 @@ export default {
})
},
handlerUpdate() {
this.loading = true
this.pram.cid = Array.isArray(this.pram.cid) ? this.pram.cid[0] : this.pram.cid
this.pram.shareTitle = this.pram.title
this.pram.shareSynopsis = this.pram.synopsis
articleApi.UpdateArticle(this.pram).then(data => {
this.$message.success('编辑文章成功')
this.$emit('hideDialog')
this.loading = false
this.$router.push({ path: '/content/articleManager' });
}).catch(()=>{
this.loading = false
})
},
handlerSave() {
this.loading = true
this.pram.cid = Array.isArray(this.pram.cid) ? this.pram.cid[0] : this.pram.cid
this.pram.shareTitle = this.pram.title
this.pram.shareSynopsis = this.pram.synopsis
articleApi.AddArticle(this.pram).then(data => {
this.$message.success('新增文章成功')
this.$emit('hideDialog')
this.loading = false
this.$router.push({ path: '/content/articleManager' });
}).catch(()=>{
this.loading = false
})
}
},
setTagsViewTitle() {
const title = '编辑文章'
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
this.$store.dispatch('tagsView/updateVisitedView', route)
},
}
}
</script>

View File

@@ -22,7 +22,10 @@
</el-form-item>
</el-form>
</div>
<el-button size="mini" type="primary" @click="handlerOpenEdit(0)">添加文章</el-button>
<router-link :to=" { path:'/content/articleCreat' } ">
<el-button size="small" type="primary" class="mr10">添加文章</el-button>
</router-link>
<!--<el-button size="mini" type="primary" @click="handlerOpenEdit(0)">添加文章</el-button>-->
</div>
<el-table :data="listData.list" size="mini"
class="table"
@@ -60,7 +63,10 @@
<el-table-column prop="updateTime" label="更新时间" min-width="180"/>
<el-table-column label="操作" min-width="100" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handlerOpenEdit(1, scope.row)">编辑</el-button>
<router-link :to=" { path:'/content/articleCreat/'+ scope.row.id } ">
<el-button size="small" type="text" class="mr10">编辑</el-button>
</router-link>
<!--<el-button type="text" size="small" @click="handlerOpenEdit(1, scope.row)">编辑</el-button>-->
<!--<el-button type="text" size="small" disabled>关联产品</el-button>-->
<el-button type="text" size="small" @click="handlerDelete(scope.row)">删除</el-button>
</template>
@@ -98,7 +104,6 @@
<script>
import * as articleApi from '@/api/article.js'
import * as categoryApi from '@/api/categoryApi.js'
import * as constants from '@/utils/constants.js'
import * as selfUtil from '@/utils/ZBKJIutil.js'
import edit from './edit'
export default {
@@ -106,12 +111,12 @@ export default {
components: { edit },
data() {
return {
constants,
constants: this.$constants,
listPram: {
keywords: null,
cid: null,
page: 1,
limit: constants.page.limit[0]
limit: this.$constants.page.limit[0]
},
listData: { list: [], total: 0 },
editDialogConfig: {

View File

@@ -6,13 +6,12 @@
<script>
import categoryList from '@/components/Category/list'
import * as constants from '@/utils/constants.js'
export default {
// name: "list",
components: { categoryList },
data() {
return {
constants
constants: this.$constants
}
}
}

View File

@@ -10,8 +10,8 @@
<div class="content" v-if="sales">
<span class="content-number spBlock mb15">{{ sales.count }}</span>
<div>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(sales.dayRate)>=0?'up':'down'">{{ sales.dayRate }}</i><i :class="Number(sales.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(sales.weekRate)>=0?'up':'down'">{{ sales.weekRate }}</i><i :class="Number(sales.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(sales.dayRate)>=0?'up':'down'">{{ sales.dayRate }}%</i><i :class="Number(sales.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(sales.weekRate)>=0?'up':'down'">{{ sales.weekRate }}%</i><i :class="Number(sales.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
</div>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
@@ -30,8 +30,8 @@
<div class="content" v-if="views">
<span class="content-number spBlock mb15">{{ views.count }}</span>
<div>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(views.dayRate)>=0?'up':'down'">{{ views.dayRate }}</i><i :class="Number(views.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(views.weekRate)>=0?'up':'down'">{{ views.weekRate }}</i><i :class="Number(views.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(views.dayRate)>=0?'up':'down'">{{ views.dayRate }}%</i><i :class="Number(views.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(views.weekRate)>=0?'up':'down'">{{ views.weekRate }}%</i><i :class="Number(views.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
</div>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
@@ -50,8 +50,8 @@
<div class="content" v-if="order">
<span class="content-number spBlock mb15">{{ order.count }}</span>
<div>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(order.dayRate)>=0?'up':'down'">{{ order.dayRate }}</i><i :class="Number(order.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(order.weekRate)>=0?'up':'down'">{{ order.weekRate }}</i><i :class="Number(order.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(order.dayRate)>=0?'up':'down'">{{ order.dayRate }}%</i><i :class="Number(order.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(order.weekRate)>=0?'up':'down'">{{ order.weekRate }}%</i><i :class="Number(order.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
</div>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">
@@ -70,8 +70,8 @@
<div class="content" v-if="user">
<span class="content-number spBlock mb15">{{ user.count }}</span>
<div>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(user.dayRate)>=0?'up':'down'">{{ user.dayRate }}</i><i :class="Number(user.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(user.weekRate)>=0?'up':'down'">{{ user.weekRate }}</i><i :class="Number(user.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time mr20">日同比<i class="content-is" :class="Number(user.dayRate)>=0?'up':'down'">{{ user.dayRate }}%</i><i :class="Number(user.dayRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
<span class="content-time">周同比<i class="content-is" :class="Number(user.weekRate)>=0?'up':'down'">{{ user.weekRate }}%</i><i :class="Number(user.weekRate)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" /></span>
</div>
<el-divider></el-divider>
<div class="acea-row row-between-wrapper">

View File

@@ -101,7 +101,7 @@
<el-input-number v-model="promoterForm.storeBrokeragePrice" placeholder="满额分销满足金额开通分销权限" :min="0" :precision="2" :step="0.1" class="selWidth"></el-input-number>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" :loading="loading" @click="submitForm('promoterForm')">立即创建</el-button>
<el-button size="mini" type="primary" :loading="loading" @click="submitForm('promoterForm')">提交</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -110,6 +110,7 @@
<script>
import { configApi, configUpdateApi, productCheckApi } from '@/api/distribution'
import * as selfUtil from '@/utils/ZBKJIutil.js'
export default {
name: 'Index',
data() {
@@ -143,6 +144,7 @@
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if(selfUtil.Add(this.promoterForm.storeBrokerageRatio,this.promoterForm.storeBrokerageTwo)>100) return this.$message.warning('返佣比例相加不能超过100%')
this.loading = true
configUpdateApi(this.promoterForm).then(res => {
this.loading = false
@@ -155,7 +157,6 @@
// })
// })
}).catch((res) => {
this.$message.error(res.message)
this.loading = false
})
} else {

View File

@@ -99,15 +99,15 @@
/>
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" class="mr10" @click="onSpread(scope.row.uid, 'man')">推广人</el-button>
<el-button type="text" size="small" class="mr10" @click="onSpread(scope.row.uid, 'man','推广人')">推广人</el-button>
<el-dropdown>
<span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onSpreadOrder(scope.row.uid, 'order')">推广订单</el-dropdown-item>
<el-dropdown-item @click.native="onSpreadOrder(scope.row.uid, 'order','推广订单')">推广订单</el-dropdown-item>
<!--<el-dropdown-item @click.native="onSpreadType(scope.row.uid)">推广方式</el-dropdown-item>-->
<el-dropdown-item @click.native="clearSpread(scope.row)" v-if="scope.row.spreadNickname">清除上级推广人</el-dropdown-item>
<el-dropdown-item @click.native="clearSpread(scope.row)" v-if="scope.row.spreadNickname && scope.row.spreadNickname!=='无'">清除上级推广人</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@@ -128,7 +128,7 @@
<!--推广人-->
<el-dialog
title="提示"
:title="titleName+'列表'"
:visible.sync="dialogVisible"
width="900px"
:before-close="handleClose"
@@ -143,7 +143,7 @@
</el-form-item>
<el-form-item label="用户类型:">
<el-radio-group v-model="spreadFrom.type" size="small" @change="onChanges">
<el-radio-button label="null">全部</el-radio-button>
<el-radio-button label="0">全部</el-radio-button>
<el-radio-button label="1">一级推广人</el-radio-button>
<el-radio-button label="2">二级推广人</el-radio-button>
</el-radio-group>
@@ -194,23 +194,23 @@
min-width="120"
>
<template slot-scope="scope">
<span>{{ scope.row.is_promoter | filterYesOrNo }}</span>
<span>{{ scope.row.isPromoter | filterYesOrNo }}</span>
</template>
</el-table-column>
<el-table-column
sortable
label="推广人数"
min-width="120"
prop="spread_count"
prop="spreadCount"
/>
<el-table-column
sortable
label="订单数"
min-width="120"
prop="pay_count"
prop="payCount"
/>
<el-table-column
prop="create_time"
prop="spreadTime"
label="关注时间"
min-width="150"
/>
@@ -267,7 +267,6 @@
<script>
import { promoterListApi, spreadStatisticsApi, spreadListApi, spreadOrderListApi, spreadClearApi } from '@/api/distribution'
import { fromList } from '@/utils/constants.js'
import cardsData from '@/components/cards/index'
export default {
name: 'AccountsUser',
@@ -287,7 +286,7 @@
page: 1,
limit: 20
},
fromList: fromList,
fromList: this.$constants.fromList,
dialogVisible: false,
spreadData: {
data: [],
@@ -297,14 +296,15 @@
page: 1,
limit: 10,
dateLimit: '',
type: null,
type: 0,
nickName: '',
uid: ''
},
timeValSpread: [],
spreadLoading: false,
uid: '',
onName: ''
onName: '',
titleName: ''
}
},
mounted() {
@@ -318,8 +318,15 @@
},
// 统计
spreadStatistics() {
spreadStatisticsApi({ dateLimit: this.tableFrom.dateLimit, nickName: this.tableFrom.nickName}).then((res) => {
this.cardLists = res
spreadStatisticsApi({ dateLimit: this.tableFrom.dateLimit, keywords: this.tableFrom.nickName}).then((res) => {
//this.cardLists = res
this.cardLists = [
{ name: '分销人员人数', count: res.distributionNum },
{ name: '发展会员人数', count: res.developNum },
{ name: '订单总数', count: res.orderNum },
{ name: '订单金额(元)', count: res.orderPriceCount },
{ name: '提现次数', count: res.withdrawCount }
]
})
},
// 清除
@@ -331,15 +338,16 @@
})
})
},
onSpread(uid, n) {
onSpread(uid, n, p) {
this.onName = n
this.titleName = p
this.uid = uid
this.dialogVisible = true
this.spreadFrom = {
page: 1,
limit: 10,
dateLimit: '',
type: null,
type: 0,
nickName: '',
uid: uid
}
@@ -386,15 +394,16 @@
this.onName === 'man' ? this.getListSpread(this.uid) : this.getSpreadOrderList(this.uid)
},
// 推广订单
onSpreadOrder(uid, n) {
onSpreadOrder(uid, n, p) {
this.uid = uid
this.onName = n
this.titleName = p
this.dialogVisible = true
this.spreadFrom = {
page: 1,
limit: 10,
dateLimit: '',
type: '',
type: 0,
nickName: '',
uid: uid
}

View File

@@ -154,7 +154,6 @@
<script>
import { brokerageListApi, monitorListDetailApi } from '@/api/financial'
import { fromList } from '@/utils/constants.js'
export default {
name: 'AccountsCapital',
data() {
@@ -181,7 +180,7 @@
limit: 10,
dateLimit: ''
},
fromList: fromList,
fromList: this.$constants.fromList,
options: [],
Visible: false,
tablistLoading: false,

View File

@@ -195,7 +195,6 @@
<script>
import { applyListApi, applyBalanceApi, applyUpdateApi, applyStatusApi } from '@/api/financial'
import { fromList } from '@/utils/constants.js'
import cardsData from '@/components/cards/index'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
export default {
@@ -223,7 +222,7 @@
page: 1,
limit: 20
},
fromList: fromList,
fromList: this.$constants.fromList,
cardLists: [],
applyId: null,
extractType: ''

View File

@@ -140,7 +140,6 @@
<script>
import { topUpLogListApi, balanceApi, topUpLogDeleteApi, refundApi } from '@/api/financial'
import cardsData from '@/components/cards/index'
import { fromList } from '@/utils/constants.js'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
export default {
name: 'AccountsBill',
@@ -163,7 +162,7 @@
page: 1,
limit: 20
},
fromList: fromList,
fromList: this.$constants.fromList,
dialogVisible: false
}
},

View File

@@ -86,7 +86,6 @@
<script>
import { monitorListApi, monitorListOptionApi } from '@/api/financial'
import { fromList } from '@/utils/constants.js'
export default {
name: 'AccountsCapital',
data() {
@@ -105,7 +104,7 @@
limit: 20
},
categoryId: '',
fromList: fromList,
fromList: this.$constants.fromList,
optionList: []
}
},

View File

@@ -82,7 +82,6 @@
<script>
import edit from './combineEdit'
import * as constants from '@/utils/constants.js'
import * as systemGroupDataApi from '@/api/systemGroupData.js'
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
export default {
@@ -96,13 +95,13 @@ export default {
},
data() {
return {
constants,
constants: this.$constants,
listPram: {
gid: null,
keywords: null,
status: null, // 1=开启 2=关闭
page: 1,
pageSize: constants.page.limit[0]
pageSize: this.$constants.page.limit[0]
},
editDataConfig: {
visible: false,

View File

@@ -57,7 +57,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import edit from '@/views/maintain/devconfig/combinedDataEdit'
import * as systemGroupApi from '@/api/systemGroup'
import cmDataList from './combineDataList'
@@ -66,7 +65,7 @@ export default {
components: { edit, cmDataList },
data() {
return {
constants,
constants: this.$constants,
dataList: {
list: [],
total: 0
@@ -74,7 +73,7 @@ export default {
listPram: {
keywords: null,
page: 1,
pageSize: constants.page.limit[0]
pageSize: this.$constants.page.limit[0]
},
editDialogConfig: {
visible: false,

View File

@@ -51,7 +51,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import * as categoryApi from '@/api/categoryApi.js'
import * as selfUtil from '@/utils/ZBKJIutil.js'
export default {
@@ -74,14 +73,14 @@ export default {
},
data() {
return {
constants,
constants: this.$constants,
editPram: {
extra: null, // 关联表单id
name: null,
pid: null,
sort: 0,
status: true,
type: constants.categoryType[5].value,
type: this.$constants.categoryType[5].value,
url: null,
id: 0
},

View File

@@ -87,7 +87,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import * as categoryApi from '@/api/categoryApi.js'
import edit from '@/views/maintain/devconfig/configCategotyEdit.vue'
import * as selfUtil from '@/utils/ZBKJIutil.js'
@@ -101,7 +100,7 @@ export default {
},
data() {
return {
constants,
constants: this.$constants,
searchPram: {
status: null,
type: null
@@ -115,11 +114,11 @@ export default {
treeList: [],
listPram: {
pid: 0,
type: constants.categoryType[5].value,
type: this.$constants.categoryType[5].value,
status: null,
name: null,
page: constants.page.page,
limit: constants.page.limit[1]
page: this.$constants.page.page,
limit: this.$constants.page.limit[1]
},
configFormSelectedDialog: {
visible: false,
@@ -172,7 +171,7 @@ export default {
},
handlerGetTreeList() {
// status: this.selectModel?1:-1
const _pram = { type: constants.categoryType[5].value, status: -1 }
const _pram = { type: this.constants.categoryType[5].value, status: -1 }
categoryApi.treeCategroy(_pram).then(data => {
this.treeList = this.handleAddArrt(data)
})

View File

@@ -63,7 +63,6 @@
<script>
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
import * as constants from '@/utils/constants.js'
import edit from './edit'
export default {
// name: "index"
@@ -76,11 +75,11 @@ export default {
},
data() {
return {
constants,
constants: this.$constants,
listPram: {
keywords: null,
page: 1,
limit: constants.page.limit[0]
limit: this.$constants.page.limit[0]
},
editDialogConfig: {
visible: false,

View File

@@ -656,7 +656,7 @@
return this.$message.warning("请选择一个商品属性!");
}else{
if(!this.radio.price) return this.$message.warning("请填写砍价起始金额!");
// if(!this.radio.minPrice) return this.$message.warning("请填写砍价最低价!");
if(!this.radio.minPrice && this.radio.minPrice!=0) return this.$message.warning("请填写砍价最低价!");
if(!this.radio.quota) return this.$message.warning("请填写限量!");
}
this.currentTab++;

View File

@@ -158,7 +158,6 @@
</template>
<script>
import {fromList} from '@/utils/constants.js';
import { bargainListListApi,bargainOrderPinkApi } from '@/api/marketing'
export default {
name: "index",
@@ -180,7 +179,7 @@
page: 1,
limit: 20
},
fromList: fromList,
fromList: this.$constants.fromList,
timeVal: []
}
},

View File

@@ -31,7 +31,7 @@
</div>
</el-form-item>
<el-form-item label="优惠券面值" prop="money">
<el-input-number v-model="ruleForm.money" :min="1" :max="10" label="描述文字"></el-input-number>
<el-input-number v-model="ruleForm.money" :min="1" label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="使用门槛">
<el-radio-group v-model="threshold">
@@ -215,9 +215,9 @@
total: info.total,
status: info.status,
primaryKey: Number(info.primaryKey),
checked: res.product
checked: res.product || []
}
info.minPrice === 0 ? this.threshold = false : this.threshold = true
info.minPrice == 0 ? this.threshold = false : this.threshold = true
info.isForever ? this.isForeverTime = [info.receiveStartTime, info.receiveEndTime] : this.isForeverTime = []
info.isFixedTime ? this.termTime = [info.useStartTime, info.useEndTime] : this.termTime = []
this.loading = false

View File

@@ -54,7 +54,7 @@
min-width="100"
>
<template slot-scope="{ row }">
<span>{{row.useType | couponTypeFilter}}</span>
<span>{{row.type | couponTypeFilter}}</span>
</template>
</el-table-column>
<el-table-column
@@ -224,12 +224,12 @@
// 领取记录
receive(row) {
this.dialogVisible = true
this.getIssueList(row)
this.tableFromIssue.couponId = row.id
this.getIssueList()
},
// 列表
getIssueList(row) {
getIssueList() {
this.Loading = true
this.tableFromIssue.couponId = row.id
couponUserListApi(this.tableFromIssue).then(res => {
this.issueData.data = res.list
this.issueData.total = res.total

View File

@@ -90,7 +90,7 @@
>
<template slot-scope="scope">
<i v-if="scope.row.status === 0" class="el-icon-check" style="font-size: 14px;color: #0092DC;" />
<i v-else class="el-icon-download" style="font-size: 14px;color: #ed5565;" />
<i v-else class="el-icon-close" style="font-size: 14px;color: #ed5565;" />
</template>
</el-table-column>
<el-table-column

View File

@@ -29,6 +29,7 @@
style="width: 100%"
size="mini"
ref="multipleTable"
highlight-current-row
>
<el-table-column
prop="id"
@@ -143,7 +144,7 @@
/>
<el-table-column
label="金额"
prop="price"
prop="totalPrice"
min-width="100"
/>
<el-table-column
@@ -151,7 +152,8 @@
min-width="100"
>
<template slot-scope="scope">
<span>{{scope.row.status | orderStatusFilter}}</span>
<span v-if="scope.row.refundStatus==0">{{scope.row.orderStatus | orderStatusFilter}}</span>
<span v-else>{{scope.row.refundStatus | refundStatusFilter}}</span>
</template>
</el-table-column>
</el-table>
@@ -160,7 +162,6 @@
</template>
<script>
import {fromList} from '@/utils/constants.js';
import { combineListApi, combineStatisticsApi,combineOrderPinkApi } from '@/api/marketing'
import cardsData from '@/components/cards/index'
export default {
@@ -186,7 +187,7 @@
page: 1,
limit: 20
},
fromList: fromList,
fromList: this.$constants.fromList,
timeVal: [],
cardLists: []
}

View File

@@ -32,7 +32,7 @@
},
methods: {
resetForm(formValue) {
this.isShow = false
this.editData = {}
},
handlerSubmit(data) {
const tempArr = []

View File

@@ -3,7 +3,7 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form size="small" label-width="120px">
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small"
@change="selectChange(tableFrom.dateLimit)">
@@ -14,9 +14,9 @@
type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;"
@change="onchangeTime"/>
</el-form-item>
<el-form-item label="用户搜索">
<el-form-item label="用户微信昵称">
<el-select v-model="tableFrom.userIdList" style="width: 500px" reserve-keyword multiple remote filterable
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户称" clearable @change="seachList">
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户微信昵称" clearable @change="seachList">
<el-option
v-for="item in options"
:key="item.uid"
@@ -52,12 +52,14 @@
prop="balance"
label="积分余量"
min-width="120"
:sort-method="(a,b)=>{return a.balance - b.balance}"
/>
<el-table-column
sortable
label="明细数字"
min-width="120"
prop="number"
:sort-method="(a,b)=>{return a.number - b.number}"
/>
<el-table-column
label="备注"
@@ -91,7 +93,6 @@
</template>
<script>
import { fromList } from '@/utils/constants.js'
import { integralListApi } from '@/api/marketing'
import { userListApi } from '@/api/user'
import cardsData from '@/components/cards/index'
@@ -101,7 +102,7 @@
return {
loading: false,
options: [],
fromList: fromList,
fromList: this.$constants.fromList,
listLoading: false,
tableData: {
data: [],

View File

@@ -13,7 +13,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
import * as systemGroupDataApi from '@/api/systemGroupData.js'
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
@@ -35,7 +34,7 @@ export default {
},
data() {
return {
constants,
constants: this.$constants,
formConf: { fields: [] },
selfForm: {
sort: 0,

View File

@@ -72,7 +72,6 @@
<script>
import edit from './edit'
import * as constants from '@/utils/constants.js'
import * as systemGroupDataApi from '@/api/systemGroupData.js'
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
export default {
@@ -80,7 +79,7 @@ export default {
components: { edit },
data() {
return {
constants,
constants: this.$constants,
listPram: {
gid: null,
keywords: null,

View File

@@ -100,7 +100,7 @@
<template slot-scope="scope">
<div v-if=" scope.row.productList && scope.row.productList.length">
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;">
<div class="demo-image__preview">
<div class="demo-image__preview mr10">
<el-image
:src="val.info.productInfo.image"
:preview-src-list="[val.info.productInfo.image]"
@@ -173,8 +173,10 @@
<el-dropdown-item @click.native="onOrderLog(scope.row.id)">订单记录</el-dropdown-item>
<el-dropdown-item @click.native="onOrderMark(scope.row)">订单备注</el-dropdown-item>
<el-dropdown-item v-show="scope.row.statusStr.key === 'refunding'" @click.native="onOrderRefuse(scope.row)">拒绝退款</el-dropdown-item>
<el-dropdown-item v-show="scope.row.statusStr.key !== 'refunded' && ((parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)))" @click.native="onOrderRefund(scope.row)">立即退款</el-dropdown-item>
<el-dropdown-item @click.native="handleDelete(scope.row, scope.$index)">删除订单</el-dropdown-item>
<!--(scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1))-->
<!--&& (parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice))-->
<el-dropdown-item v-show="((scope.row.statusStr.key !== 'refunded' && scope.row.statusStr.key !== 'unPaid') && (parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice))) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)" @click.native="onOrderRefund(scope.row)">立即退款</el-dropdown-item>
<el-dropdown-item v-show="scope.row.statusStr.key === 'deleted'" @click.native="handleDelete(scope.row, scope.$index)">删除订单</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@@ -204,6 +206,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
</el-dialog>
@@ -283,6 +286,7 @@
:is-create="1"
:edit-data="refundData"
@submit="refundhandlerSubmit"
v-if="refundVisible"
@resetForm="resetFormRefundhandler"
/>
</el-dialog>
@@ -297,7 +301,6 @@
import orderSend from './orderSend'
import { storeStaffListApi } from '@/api/storePoint'
import Cookies from 'js-cookie'
import { fromList } from '@/utils/constants.js'
import { isWriteOff } from "@/utils";
export default {
name: 'orderlistDetails',
@@ -342,7 +345,7 @@
},
orderChartType: {},
timeVal: [],
fromList: fromList,
fromList: this.$constants.fromList,
selectionList: [],
ids: '',
orderids: '',
@@ -368,7 +371,6 @@
this.$modalSure('核销订单吗').then(() => {
writeUpdateApi(row.verifyCode).then(() => {
this.$message.success('核销成功')
this.tableFrom.status = 'toBeWrittenOff'
this.tableFrom.page = 1
this.getList()
})
@@ -584,11 +586,10 @@
font-size: 12px;
}
.tabBox_tit {
/*width: 60%;*/
font-size: 12px !important;
margin: 0 2px 0 10px;
/*margin: 0 2px 0 10px;*/
letter-spacing: 1px;
padding: 5px 0;
/*padding: 5px 0;*/
box-sizing: border-box;
}
</style>

View File

@@ -102,50 +102,50 @@
</template>
<script>
import { orderDetailApi, getLogisticsInfoApi } from '@/api/order'
export default {
name: 'OrderDetail',
props: {
orderId: {
type: Number,
default: 0
}
import { orderDetailApi, getLogisticsInfoApi } from '@/api/order'
export default {
name: 'OrderDetail',
props: {
orderId: {
type: Number,
default: 0
}
},
data() {
return {
reverse: true,
dialogVisible: false,
orderDatalist: null,
loading: false,
modal2: false,
result: []
}
},
mounted() {
},
methods: {
openLogistics () {
this.getOrderData()
this.modal2 = true;
},
data() {
return {
reverse: true,
dialogVisible: false,
orderDatalist: null,
loading: false,
modal2: false,
result: []
}
// 获取订单物流信息
getOrderData () {
getLogisticsInfoApi({id:this.orderId}).then(async res => {
this.result = res.list;
})
},
mounted() {
},
methods: {
openLogistics () {
this.getOrderData()
this.modal2 = true;
},
// 获取订单物流信息
getOrderData () {
getLogisticsInfoApi({id:this.orderId}).then(async res => {
this.result = res.list;
})
},
getDetail(id) {
this.loading = true
orderDetailApi({id: id}).then(res => {
this.orderDatalist = res
this.loading = false
}).catch(() => {
this.orderDatalist = null
this.loading = false
})
}
getDetail(id) {
this.loading = true
orderDetailApi({id: id}).then(res => {
this.orderDatalist = res
this.loading = false
}).catch(() => {
this.orderDatalist = null
this.loading = false
})
}
}
}
</script>
<style scoped lang="scss">

View File

@@ -1,209 +1,222 @@
<template>
<el-dialog :visible.sync="modals" title="订单记录" class="order_box" :before-close="handleClose" width="600px">
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent :rules="rules">
<el-form-item label="选择类型:">
<el-radio-group v-model="formItem.type" @change="changeRadio(formItem.type)">
<el-radio label="1">发货</el-radio>
<el-radio label="2">送货</el-radio>
<el-radio label="3">虚拟</el-radio>
</el-radio-group>
</el-form-item>
<div v-if="formItem.type==='1'">
<el-form-item label="发货类型:" prop="expressId">
<el-radio-group v-model="formItem.expressRecordType" @change="changeRadio(formItem.expressRecordType)">
<el-radio label="1">手动填写</el-radio>
<el-radio label="2">电子面单打印</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="快递公司:" prop="expressCode">
<el-select v-model="formItem.expressCode" filterable style="width:80%;" @change="onChangeExport(formItem.expressCode)">
<el-option v-for="(item,i) in express" :value="item.code" :key="i" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="formItem.expressRecordType === '1'" label="快递单号:" prop="expressNumber">
<el-input v-model="formItem.expressNumber" placeholder="请输入快递单号" style="width:80%;"></el-input>
</el-form-item>
<template v-if="formItem.expressRecordType === '2'">
<el-form-item label="电子面单:" class="express_temp_id" prop="expressTempId">
<div class="acea-row">
<el-select v-model="formItem.expressTempId" placeholder="请选择电子面单" :class="[formItem.expressTempId?'width9':'width8']" @change="onChangeImg">
<el-option v-for="(item,i) in exportTempList" :value="item.temp_id" :key="i" :label="item.title"></el-option>
</el-select>
<div v-if="formItem.expressTempId" style="position: relative;">
<!--<span class="tempImg" @click="">预览</span>-->
<div class="tempImgList ml10">
<div class="demo-image__preview">
<el-image
style="width: 36px; height: 36px"
:src="tempImg"
:preview-src-list="[tempImg]"
/>
</div>
</div>
</div>
<!--<Button v-if="formItem.expressTempId" type="text" @click="preview">预览</Button>-->
</div>
<el-dialog :visible.sync="modals" title="发送货" class="order_box" :before-close="handleClose" width="600px">
<el-form ref="formItem" :model="formItem" label-width="110px" @submit.native.prevent :rules="rules">
<el-form-item label="选择类型:">
<el-radio-group v-model="formItem.type" @change="changeRadioType(formItem.type)">
<el-radio label="1">发货</el-radio>
<el-radio label="2">送货</el-radio>
<el-radio label="3">虚拟</el-radio>
</el-radio-group>
</el-form-item>
<div v-if="formItem.type==='1'">
<el-form-item label="发货类型:" prop="expressId">
<el-radio-group v-model="formItem.expressRecordType" @change="changeRadio(formItem.expressRecordType)">
<el-radio label="1">手动填写</el-radio>
<el-radio label="2">电子面单打印</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="快递公司:" prop="expressCode">
<el-select v-model="formItem.expressCode" filterable style="width:80%;"
@change="onChangeExport(formItem.expressCode)">
<el-option v-for="(item,i) in express" :value="item.code" :key="i" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="formItem.expressRecordType === '1'" label="快递单号" prop="expressNumber">
<el-input v-model="formItem.expressNumber" placeholder="请输入快递单号" style="width:80%;"></el-input>
</el-form-item>
<template v-if="formItem.expressRecordType === '2'">
<el-form-item label="电子面单:" class="express_temp_id" prop="expressTempId">
<div class="acea-row">
<el-select v-model="formItem.expressTempId" placeholder="请选择电子面单"
:class="[formItem.expressTempId?'width9':'width8']" @change="onChangeImg">
<el-option v-for="(item,i) in exportTempList" :value="item.temp_id" :key="i"
:label="item.title"></el-option>
</el-select>
<div v-if="formItem.expressTempId" style="position: relative;">
<!--<span class="tempImg" @click="">预览</span>-->
<div class="tempImgList ml10">
<div class="demo-image__preview">
<el-image
style="width: 36px; height: 36px"
:src="tempImg"
:preview-src-list="[tempImg]"
/>
</div>
</div>
</div>
<!--<Button v-if="formItem.expressTempId" type="text" @click="preview">预览</Button>-->
</div>
</el-form-item>
<el-form-item label="寄件人姓名:" prop="toName">
<el-input v-model="formItem.toName" placeholder="请输入寄件人姓名" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="寄件人电话:" prop="toTel">
<el-input v-model="formItem.toTel" placeholder="请输入寄件人电话" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="寄件人地址:" prop="toAddr">
<el-input v-model="formItem.toAddr" placeholder="请输入寄件人地址" style="width:80%;"></el-input>
</el-form-item>
</template>
</div>
<div v-if="formItem.type==='2'">
<el-form-item label="送货人姓名:" prop="deliveryName">
<el-input v-model="formItem.deliveryName" placeholder="请输入送货人姓名" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="送货人电话:" prop="deliveryTel">
<el-input v-model="formItem.deliveryTel" placeholder="请输入送货人电话" style="width:80%;"></el-input>
</el-form-item>
</div>
</el-form>
<div slot="footer">
<el-button size="mini" type="primary" @click="putSend('formItem')">提交</el-button>
<el-button size="mini" @click="cancel('formItem')">取消</el-button>
</div>
</el-dialog>
</el-form-item>
<el-form-item label="寄件人姓名:" prop="toName">
<el-input v-model="formItem.toName" placeholder="请输入寄件人姓名" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="寄件人电话:" prop="toTel">
<el-input v-model="formItem.toTel" placeholder="请输入寄件人电话" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="寄件人地址:" prop="toAddr">
<el-input v-model="formItem.toAddr" placeholder="请输入寄件人地址" style="width:80%;"></el-input>
</el-form-item>
</template>
</div>
<div v-if="formItem.type==='2'">
<el-form-item label="送货人姓名:" prop="deliveryName">
<el-input v-model="formItem.deliveryName" placeholder="请输入送货人姓名" style="width:80%;"></el-input>
</el-form-item>
<el-form-item label="送货人电话:" prop="deliveryTel">
<el-input v-model="formItem.deliveryTel" placeholder="请输入送货人电话" style="width:80%;"></el-input>
</el-form-item>
</div>
</el-form>
<div slot="footer">
<el-button size="mini" type="primary" @click="putSend('formItem')">提交</el-button>
<el-button size="mini" @click="cancel('formItem')">取消</el-button>
</div>
</el-dialog>
</template>
<script>
import { orderSendApi, sheetInfoApi } from '@/api/order'
import { expressAllApi, exportTempApi } from '@/api/sms'
const validatePhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('请填写手机号'));
} else if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('手机号格式不正确!'));
} else {
callback();
}
};
export default {
name: 'orderSend',
props: {
orderId: Number
},
data () {
return {
formItem: {
type: '1',
expressRecordType: '1',
expressId: '',
expressCode: '',
id: '',
deliveryName: '',
deliveryTel: '',
// expressName: '',
expressNumber:'',
expressTempId: '',
toAddr: '',
toName: '',
toTel: '',
},
modals: false,
express: [],
exportTempList: [],
tempImg: '',
rules: {
toName: [
{ required: true, message: '请输寄件人姓名', trigger: 'blur' }
],
toTel: [
{ required: true, validator: validatePhone, trigger: 'blur' }
],
toAddr: [
{ required: true, message: '请输入寄件人地址', trigger: 'blur' }
],
expressCode: [
{ required: true, message: '请选择快递公司', trigger: 'change' }
],
expressNumber: [
{ required: true, message: '请输入快递单号', trigger: 'blur' }
],
expressTempId: [
{ required: true, message: '请选择电子面单', trigger: 'change' }
],
deliveryName: [
{ required: true, message: '请输入送货人姓名', trigger: 'blur' }
],
deliveryTel: [
{ required: true, validator: validatePhone, trigger: 'blur' }
]
}
}
},
mounted () {
},
methods: {
// 默认信息
sheetInfo () {
sheetInfoApi().then(async res => {
this.formItem.toAddr= res.exportToAddress || '';
this.formItem.toName= res.exportToName || '';
this.formItem.toTel= res.exportToTel || '';
})
},
// 快递公司选择
onChangeExport (val) {
this.formItem.expressTempId = '';
this.exportTemp(val);
},
// 电子面单模板
exportTemp (val) {
exportTempApi({ com: val }).then(async res => {
this.exportTempList = res.data.data || [];
})
},
onChangeImg (item) {
this.exportTempList.map(i => {
if (i.temp_id === item) this.tempImg = i.pic
})
},
changeRadio (o) {
if( o === '3'){
this.formItem.expressId = ''
this.formItem.expressCode = ''
}
},
// 物流公司列表
getList () {
expressAllApi().then(async res => {
this.express = res
})
},
// 提交
putSend(name) {
this.formItem.id = this.orderId
this.$refs[name].validate((valid) => {
if (valid) {
orderSendApi(this.formItem).then(async => {
this.$message.success('发送货成功');
this.modals = false;
this.$refs[name].resetFields();
this.$emit('submitFail')
})
} else {
this.$message.error('请填写信息');
}
})
},
handleClose(){
this.cancel('formItem');
},
cancel (name) {
this.modals = false;
this.$refs[name].resetFields();
this.formItem.type = '1';
this.formItem.expressRecordType = '1';
}
}
import {orderSendApi, sheetInfoApi} from '@/api/order'
import {expressAllApi, exportTempApi} from '@/api/sms'
const validatePhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('请填写手机号'));
} else if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('手机号格式不正确!'));
} else {
callback();
}
};
export default {
name: 'orderSend',
props: {
orderId: Number
},
data() {
return {
formItem: {
type: '1',
expressRecordType: '1',
expressId: '',
expressCode: '',
id: '',
deliveryName: '',
deliveryTel: '',
// expressName: '',
expressNumber: '',
expressTempId: '',
toAddr: '',
toName: '',
toTel: '',
},
modals: false,
express: [],
exportTempList: [],
tempImg: '',
rules: {
toName: [
{required: true, message: '请输寄件人姓名', trigger: 'blur'}
],
toTel: [
{required: true, validator: validatePhone, trigger: 'blur'}
],
toAddr: [
{required: true, message: '请输入寄件人地址', trigger: 'blur'}
],
expressCode: [
{required: true, message: '请选择快递公司', trigger: 'change'}
],
expressNumber: [
{required: true, message: '请输入快递单号', trigger: 'blur'}
],
expressTempId: [
{required: true, message: '请选择电子面单', trigger: 'change'}
],
deliveryName: [
{required: true, message: '请输入送货人姓名', trigger: 'blur'}
],
deliveryTel: [
{required: true, validator: validatePhone, trigger: 'blur'}
]
},
expressType: 'normal'
}
},
mounted() {
},
methods: {
// 默认信息
sheetInfo() {
sheetInfoApi().then(async res => {
this.formItem.toAddr = res.exportToAddress || '';
this.formItem.toName = res.exportToName || '';
this.formItem.toTel = res.exportToTel || '';
})
},
// 快递公司选择
onChangeExport(val) {
this.formItem.expressTempId = '';
if (this.formItem.expressRecordType === '2') this.exportTemp(val);
},
// 电子面单模板
exportTemp(val) {
exportTempApi({com: val}).then(async res => {
this.exportTempList = res.data.data || [];
})
},
onChangeImg(item) {
this.exportTempList.map(i => {
if (i.temp_id === item) this.tempImg = i.pic
})
},
changeRadioType() {
this.formItem.expressId = ''
this.formItem.expressCode = ''
},
changeRadio(o) {
if (o == 2){
this.expressType = 'elec'
}else{
this.expressType = 'normal'
}
this.formItem.expressId = ''
this.formItem.expressCode = ''
this.getList();
},
// 物流公司列表
getList() {
expressAllApi({type: this.expressType}).then(async res => {
this.express = res
})
},
// 提交
putSend(name) {
this.formItem.id = this.orderId
this.$refs[name].validate((valid) => {
if (valid) {
orderSendApi(this.formItem).then(async => {
this.$message.success('发送货成功');
this.modals = false;
this.$refs[name].resetFields();
this.$emit('submitFail')
})
} else {
this.$message.error('请填写信息');
}
})
},
handleClose() {
this.cancel('formItem');
},
cancel(name) {
this.modals = false;
this.$refs[name].resetFields();
this.formItem.type = '1';
this.formItem.expressRecordType = '1';
}
}
}
</script>
<style scoped lang="scss">

View File

@@ -36,7 +36,7 @@
:label="item.title"
:min-width="item.minWidth">
<template slot-scope="scope">
<div v-if="['content'].indexOf(item.key) > -1" class="demo-image__preview">
<div v-if="['content'].indexOf(item.key) > -1 && tableFrom.type==='expr_query'" class="demo-image__preview">
<span>{{scope.row[item.key].num}}</span>
</div>
<span v-else>{{ scope.row[item.key] }}</span>
@@ -70,7 +70,7 @@
<div class="smsBox" v-if="(isDump && tableFrom.type==='expr_dump') || (isSms && tableFrom.type==='sms')">
<div class="index_from page-account-container">
<div class="page-account-top">
<span class="page-account-top-tit">开通电子面单服务</span>
<span class="page-account-top-tit">开通{{tableFrom.type | onePassTypeFilter}}服务</span>
</div>
<el-form ref="formInlineDump" :model="formInlineDump" :rules="ruleInline" @submit.native.prevent @keyup.enter="handleSubmitDump('formInlineDump')">
<el-form-item prop="sign" class="maxInpt" v-if="isSms && tableFrom.type==='sms'" key="1">
@@ -316,7 +316,7 @@ export default {
this.$refs[name].validate((valid) => {
if (valid) {
smsSignApi(this.formInline).then(async res => {
this.$message.success('修改成功!');
this.$message.success('修改签名之后一号通需要审核过后通过!');
this.dialogVisible = false;
this.$refs[formName].resetFields();
})
@@ -474,7 +474,7 @@ export default {
this.columns2 = [
// {
// title: '订单号',
// slot: 'num',
// key: 'order_id',
// minWidth: 150
// },
{

View File

@@ -146,7 +146,7 @@
:modal="false"
class="taoBaoModal"
:before-close="handleClose">
<tao-bao v-if="dialogVisible" @handleClose="handleClose"></tao-bao>
<tao-bao v-if="dialogVisible" @handleCloseMod="handleCloseMod"></tao-bao>
</el-dialog>
</div>
</template>

View File

@@ -6,13 +6,12 @@
<script>
import categoryList from '@/components/Category/list'
import * as constants from '@/utils/constants.js'
export default {
// name: "list",
components: { categoryList },
data() {
return {
constants
constants: this.$constants
}
}
}

View File

@@ -17,6 +17,7 @@
</div>
</div>
<el-table
ref="table"
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
@@ -98,6 +99,9 @@ export default {
},
listLoading: true,
selectionList: [],
multipleSelectionAll: [],
idKey: 'id',
nextPageFlag: false,
keyNum: 0
}
},
@@ -111,11 +115,71 @@ export default {
},
handleSelectionChange(val) {
this.selectionList = val
const data = []
this.selectionList.map((item) => {
data.push(item.id)
setTimeout(() => {
this.changePageCoreRecordData()
}, 50)
},
// 设置选中的方法
setSelectRow() {
if (!this.multipleSelectionAll || this.multipleSelectionAll.length <= 0) {
return
}
// 标识当前行的唯一键的名称
const idKey = this.idKey
const selectAllIds = []
this.multipleSelectionAll.forEach(row => {
selectAllIds.push(row[idKey])
})
this.$refs.table.clearSelection()
for (var i = 0; i < this.tableData.data.length; i++) {
if (selectAllIds.indexOf(this.tableData.data[i][idKey]) >= 0) {
// 设置选中记住table组件需要使用ref="table"
this.$refs.table.toggleRowSelection(this.tableData.data[i], true)
}
}
},
// 记忆选择核心方法
changePageCoreRecordData() {
// 标识当前行的唯一键的名称
const idKey = this.idKey
const that = this
// 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
if (this.multipleSelectionAll.length <= 0) {
this.multipleSelectionAll = this.selectionList
return
}
// 总选择里面的key集合
const selectAllIds = []
this.multipleSelectionAll.forEach(row => {
selectAllIds.push(row[idKey])
})
const selectIds = []
// 获取当前页选中的id
this.selectionList.forEach(row => {
selectIds.push(row[idKey])
// 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
if (selectAllIds.indexOf(row[idKey]) < 0) {
that.multipleSelectionAll.push(row)
}
})
const noSelectIds = []
// 得到当前页没有选中的id
this.tableData.data.forEach(row => {
if (selectIds.indexOf(row[idKey]) < 0) {
noSelectIds.push(row[idKey])
}
})
noSelectIds.forEach(id => {
if (selectAllIds.indexOf(id) >= 0) {
for (let i = 0; i < that.multipleSelectionAll.length; i++) {
if (that.multipleSelectionAll[i][idKey] == id) {
// 如果总选择中有未被选中的,那么就删除这条
that.multipleSelectionAll.splice(i, 1)
break
}
}
}
})
this.ids = data.join(',')
},
add() {
const _this = this
@@ -133,16 +197,21 @@ export default {
for (var i = 0; i < list.length; i++) {
list[i].ruleValue = JSON.parse(list[i].ruleValue)
}
this.$nextTick(function() {
this.setSelectRow()// 调用跨页选中方法
})
this.listLoading = false
}).catch(() => {
this.listLoading = false
})
},
pageChange(page) {
this.changePageCoreRecordData()
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.changePageCoreRecordData()
this.tableFrom.limit = val
this.getList()
},
@@ -157,7 +226,12 @@ export default {
})
},
handleDeleteAll(){
if(!this.selectionList.length) return this.$message.warning('请选择商品规格')
if(!this.multipleSelectionAll.length) return this.$message.warning('请选择商品规格')
const data = []
this.multipleSelectionAll.map((item) => {
data.push(item.id)
})
this.ids = data.join(',')
this.$modalSure().then(() => {
attrDeleteApi( this.ids ).then(() => {
this.$message.success('删除成功')

View File

@@ -54,8 +54,8 @@
</div>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="submitForm('formValidate')">立即创建</el-button>
<el-button size="mini" @click="resetForm('formValidate')">取消</el-button>
<el-button size="mini" type="primary" @click="submitForm('formValidate')" :loading="loadingbtn">提交</el-button>
<el-button size="mini" @click="resetForm('formValidate')">重置</el-button>
</el-form-item>
</el-form>
</template>
@@ -69,7 +69,8 @@
pics: '',
productId: '',
productScore: null,
serviceScore: null
serviceScore: null,
sku: ''
}
export default {
name: "creatComment",
@@ -95,6 +96,7 @@
}
};
return {
loadingbtn: false,
loading: false,
pics: [],
image: '',
@@ -138,6 +140,7 @@
this.$modalGoodList(function(row) {
_this.image = row.image
_this.formValidate.productId = row.id
_this.formValidate.sku = row.attrValue[0].suk
})
},
// 点击商品图
@@ -153,7 +156,8 @@
this.pics.splice(i, 1)
},
submitForm(formName) {
this.formValidate.pics = JSON.stringify(this.pics)
this.loadingbtn = true;
this.formValidate.pics = this.pics.length>0 ? JSON.stringify(this.pics) : ''
this.$refs[formName].validate((valid) => {
if (valid) {
replyCreatApi(this.formValidate).then(() => {
@@ -162,6 +166,9 @@
// this.clear();
this.$emit('getList');
}, 600);
this.loadingbtn = false;
}).catch(()=>{
this.loadingbtn = false;
})
} else {
return false;
@@ -170,7 +177,6 @@
},
resetForm(formName) {
this.$refs[formName].resetFields()
this.$msgbox.close()
this.pics=[]
this.formValidate.pics=''
},

View File

@@ -166,19 +166,7 @@ export default {
value: 'id',
emitPath: false
},
fromList: {
title: '选择时间',
custom: true,
fromTxt: [
{ text: '全部', val: '' },
{ text: '今天', val: 'today' },
{ text: '昨天', val: 'yesterday' },
{ text: '最近7天', val: 'lately7' },
{ text: '最近30天', val: 'lately30' },
{ text: '本月', val: 'month' },
{ text: '本年', val: 'year' }
]
},
fromList: this.$constants.fromList,
tableData: {
data: [],
total: 0
@@ -202,6 +190,12 @@ export default {
timer: ''
}
},
watch: {
$route(to, from) {
this.getList()
this.getCategorySelect()
}
},
mounted() {
// this.getLstFilterApi()
this.getList()

View File

@@ -477,6 +477,7 @@
ficti: res.ficti
}
if(this.formValidate.attr.length){
this.oneFormBatch[0].image = res.image
for (var i = 0; i < this.formValidate.attr.length; i++) {
this.formValidate.attr[i].attrValue = JSON.parse(this.formValidate.attr[i].attrValues)
}

View File

@@ -41,7 +41,6 @@
</template>
<script>
import * as constants from '@/utils/constants.js'
import * as roleApi from '@/api/role.js'
import * as systemAdminApi from '@/api/systemadmin.js'
export default {
@@ -70,7 +69,7 @@ export default {
}
}
return {
constants,
constants:this.$constants,
pram: {
account: null,
level: null,
@@ -103,7 +102,7 @@ export default {
handleGetRoleList() {
const _pram = {
page: 1,
limit: constants.page.limit[4],
limit: this.constants.page.limit[4],
status: 1
}
roleApi.getRoleList(_pram).then(data => {

View File

@@ -107,14 +107,13 @@
<script>
import * as systemAdminApi from '@/api/systemadmin.js'
import * as roleApi from '@/api/role.js'
import * as constants from '@/utils/constants.js'
import edit from './edit'
export default {
// name: "index"
components: { edit },
data() {
return {
constants,
constants:this.$constants,
listData: { list: [] },
listPram: {
account: null,
@@ -127,7 +126,7 @@ export default {
roles: null,
status: null,
page: 1,
limit: constants.page.limit[0]
limit: this.$constants.page.limit[0]
},
roleList: [],
menuList: [],
@@ -160,7 +159,7 @@ export default {
handleGetRoleList() {
const _pram = {
page: 1,
limit: constants.page.limit[4]
limit: this.constants.page.limit[4]
}
roleApi.getRoleList(_pram).then(data => {
this.roleList = data

View File

@@ -26,7 +26,6 @@
<script>
import categoryList from '@/components/Category/list'
import * as constants from '@/utils/constants.js'
import * as roleApi from '@/api/role.js'
export default {
// name: "edit"
@@ -43,7 +42,7 @@ export default {
},
data() {
return {
constants,
constants:this.$constants,
pram: {
level: 1,
roleName: null,

View File

@@ -74,21 +74,20 @@
<script>
import * as roleApi from '@/api/role.js'
import * as categroyApi from '@/api/categoryApi.js'
import * as constants from '@/utils/constants.js'
import edit from './edit'
export default {
// name: "index"
components: { edit },
data() {
return {
constants,
constants:this.$constants,
listData: { list: [] },
listPram: {
createTime: null,
updateTime: null,
level: null,
page: 1,
limit: constants.page.limit[0],
limit: this.$constants.page.limit[0],
roleName: null,
rules: null,
status: null

View File

@@ -8,14 +8,13 @@
import { asyncRoutes, constantRoutes } from '@/router'
import * as categoryApi from '@/api/categoryApi.js'
import categoryList from '@/components/Category/list'
import * as constants from '@/utils/constants.js'
export default {
// name: "index"
components: { categoryList },
data() {
return {
asyncRoutes,
constants
constants: this.$constants
}
},
mounted() {

View File

@@ -115,143 +115,143 @@
</template>
<script>
import parser from '@/components/FormGenerator/components/parser/Parser'
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
import * as logistics from '@/api/logistics.js'
export default {
name: 'CompanyList',
components: { parser },
data() {
return {
constants:this.$constants,
// 表单
formConf: { fields: [] },
form: {
keywords: ''
},
tableData: {},
page: 1,
limit: 20,
loading: false,
dialogVisible: false,
fromType: 'add',
formData: {
status: false
},
isCreate: 0,
formShow: false,
editId: 0,
rules: {
sort: [
{ required: true, message: '请输入排序', trigger: 'blur' },
],
account: [
{ required: true, message: '请输入月结账号', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入月结密码', trigger: 'blur' },
],
netName: [
{ required: true, message: '请输入网点名称', trigger: 'blur' },
]
}
}
},
created() {
this.getExpressList()
},
methods: {
handlerSearch() {
this.page = 1
this.getExpressList()
import parser from '@/components/FormGenerator/components/parser/Parser'
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
import * as logistics from '@/api/logistics.js'
export default {
name: 'CompanyList',
components: { parser },
data() {
return {
constants:this.$constants,
// 表单
formConf: { fields: [] },
form: {
keywords: ''
},
// 获取物流公司列表
getExpressList() {
this.loading = true
logistics.expressList({
page: this.page,
limit: this.limit,
keywords: this.form.keywords
}).then(res => {
this.loading = false
this.tableData = res
}).catch(()=>{
this.loading = false
})
tableData: {},
page: 1,
limit: 20,
loading: false,
dialogVisible: false,
fromType: 'add',
formData: {
status: false
},
// 物流开关
bindStatus(item) {
logistics.expressUpdateShow({
account: item.account,
code: item.code,
id: item.id,
isShow: item.isShow,
name: item.name,
sort: item.sort
}).then(res => {
this.$message.success('操作成功')
this.getExpressList()
}).catch(() => {
item.isShow = !item.isShow
})
},
// 分页
pageChange(e) {
this.page = e
this.getExpressList()
},
handleSizeChange(e) {
this.limit = e
this.getExpressList()
},
// 添加物流公司
addExpress() {
logistics.expressSyncApi().then(data => {
this.page = 1
this.getExpressList()
})
},
// 删除物流公司
bindDelete(item) {
this.$modalSure().then(() => {
logistics.expressDelete({ id: item.id }).then(res => {
this.$message.success('删除成功')
this.getExpressList()
})
})
},
// 表单提交
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
logistics.expressUpdate(this.formData).then(res => {
this.$message.success('操作成功')
this.handleClose()
this.getExpressList()
})
} else {
return false;
}
});
},
// 关闭模态框
handleClose(done) {
this.formShow = false
// this.formData = {}
this.formConf.fields = []
this.dialogVisible = false
this.isCreate = 0
},
// 编辑
bindEdit(item) {
this.dialogVisible = true
this.editId = item.id
logistics.expressInfo({ id: item.id }).then(res => {
this.formData = res
})
isCreate: 0,
formShow: false,
editId: 0,
rules: {
sort: [
{ required: true, message: '请输入排序', trigger: 'blur' },
],
account: [
{ required: true, message: '请输入月结账号', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入月结密码', trigger: 'blur' },
],
netName: [
{ required: true, message: '请输入网点名称', trigger: 'blur' },
]
}
}
},
created() {
this.getExpressList()
},
methods: {
handlerSearch() {
this.page = 1
this.getExpressList()
},
// 获取物流公司列表
getExpressList() {
this.loading = true
logistics.expressList({
page: this.page,
limit: this.limit,
keywords: this.form.keywords
}).then(res => {
this.loading = false
this.tableData = res
}).catch(()=>{
this.loading = false
})
},
// 物流开关
bindStatus(item) {
logistics.expressUpdateShow({
account: item.account,
code: item.code,
id: item.id,
isShow: item.isShow,
name: item.name,
sort: item.sort
}).then(res => {
this.$message.success('操作成功')
this.getExpressList()
}).catch(() => {
item.isShow = !item.isShow
})
},
// 分页
pageChange(e) {
this.page = e
this.getExpressList()
},
handleSizeChange(e) {
this.limit = e
this.getExpressList()
},
// 添加物流公司
addExpress() {
logistics.expressSyncApi().then(data => {
this.page = 1
this.getExpressList()
})
},
// 删除物流公司
bindDelete(item) {
this.$modalSure().then(() => {
logistics.expressDelete({ id: item.id }).then(res => {
this.$message.success('删除成功')
this.getExpressList()
})
})
},
// 表单提交
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
logistics.expressUpdate(this.formData).then(res => {
this.$message.success('操作成功')
this.handleClose()
this.getExpressList()
})
} else {
return false;
}
});
},
// 关闭模态框
handleClose(done) {
this.formShow = false
// this.formData = {}
this.formConf.fields = []
this.dialogVisible = false
this.isCreate = 0
},
// 编辑
bindEdit(item) {
this.dialogVisible = true
this.editId = item.id
logistics.expressInfo({ id: item.id }).then(res => {
this.formData = res
})
}
}
}
</script>
<style lang="scss" scoped>

View File

@@ -60,7 +60,6 @@
<script>
import parser from '@/components/FormGenerator/components/parser/Parser'
import * as constants from '@/utils/constants.js'
import * as categoryApi from '@/api/categoryApi.js'
import * as selfUtil from '@/utils/ZBKJIutil.js'
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
@@ -189,28 +188,10 @@ export default {
let _formId = 0
systemSettingApi.systemConfigSave(_pram).then(data => {
this.$message.success('添加数据成功')
// 81 82 83
// 针对云存储配置特殊处理 切勿随意改动
// _formId = parseInt(_pram.id)
// if(_formId === 108 || _formId === 81 || _formId === 82 || _formId === 83){
// let _value
// switch (_formId) {
// case 108: _value = 1
// break;
// case 81: _value = 2
// break;
// case 82: _value = 3
// break;
// case 83: _value = 4
// break;
// }
// const _pram = { key:"uploadType",value:_value }
// systemConfigApi.configSaveUniq(_pram)
// }
})
},
handlerGetTreeList() {
const _pram = { type: constants.categoryType[5].value, status: 1 }
const _pram = { type: this.$constants.categoryType[5].value, status: 1 }
this.loading = true
categoryApi.treeCategroy(_pram).then(data => {
this.treeList = this.handleAddArrt(data)

View File

@@ -129,7 +129,6 @@
<script>
import { orderListApi, storeListApi } from '@/api/storePoint'
import cardsData from '@/components/cards/index'
import { fromList } from '@/utils/constants.js'
export default {
components: { cardsData },
data() {
@@ -149,7 +148,7 @@
limit: 20
},
timeVal: [],
fromList: fromList,
fromList: this.$constants.fromList,
ids: '',
cardLists: [],
}

View File

@@ -11,13 +11,13 @@
<el-form-item label="等级" prop="grade">
<el-input v-model.number="formValidate.grade" placeholder="请输入等级"></el-input>
</el-form-item>
<el-form-item label="享受折扣" prop="discount">
<el-input v-model="formValidate.discount" placeholder="请输入享受折扣"></el-input>
<el-form-item label="享受折扣(%)" prop="discount">
<el-input-number :min="0" :max="100" step-strictly v-model="formValidate.discount" placeholder="请输入享受折扣"></el-input-number>
</el-form-item>
<el-form-item label="经验" prop="experience">
<el-input v-model.number="formValidate.experience" placeholder="请输入经验"></el-input>
</el-form-item>
<el-form-item label="图标" prop="icon">
<el-form-item label="图标" prop="icon">
<div class="upLoadPicBox" @click="modalPicTap('1', 'icon')">
<div v-if="formValidate.icon" class="pictrue"><img :src="formValidate.icon"></div>
<div v-else class="upLoad">
@@ -25,7 +25,7 @@
</div>
</div>
</el-form-item>
<el-form-item label="用户背景" required prop="image">
<el-form-item label="用户背景" required prop="image">
<div class="upLoadPicBox" @click="modalPicTap('1', 'image')">
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
<div v-else class="upLoad">

View File

@@ -54,7 +54,7 @@
/>
<el-table-column
prop="discount"
label="享受折扣"
label="享受折扣(%)"
min-width="100"
/>
<el-table-column

View File

@@ -2,7 +2,7 @@
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-tabs v-model="loginType" @tab-click="getList">
<el-tabs v-model="loginType" @tab-click="getList(1)">
<el-tab-pane :label="item.name" :name="item.type.toString()" v-for="(item,index) in headeNum" :key="index"/>
</el-tabs>
<div class="container">
@@ -94,7 +94,7 @@
<span>推广员</span>
</el-radio-button>
<el-radio-button label="0">
<span>普通会员</span>
<span>普通用户</span>
</el-radio-button>
</el-radio-group>
</el-form-item>
@@ -169,6 +169,7 @@
<el-button class="mr10" size="small" @click="setBatch('label')">批量设置标签</el-button>
</div>
<el-table
ref="table"
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
@@ -179,6 +180,9 @@
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="身份:">
<span>{{ props.row.isPromoter | filterIsPromoter }}</span>
</el-form-item>
<el-form-item label="首次访问:">
<span>{{ props.row.createTime | filterEmpty }}</span>
</el-form-item>
@@ -203,7 +207,7 @@
<el-form-item label="地址:">
<span>{{ props.row.addres | filterEmpty }}</span>
</el-form-item>
<el-form-item label="备注:">
<el-form-item label="备注:" style="width: 100%;display: flex;margin-right: 10px;">
<span>{{ props.row.mark | filterEmpty}}</span>
</el-form-item>
</el-form>
@@ -231,18 +235,10 @@
</el-table-column>
<el-table-column
label="姓名"
min-width="150"
min-width="130"
>
<template slot-scope="scope">
<span>{{scope.row.nickname | filterEmpty}}</span>
</template>
</el-table-column>
<el-table-column
label="性别"
min-width="60"
>
<template slot-scope="scope">
<span>{{scope.row.sex | sexFilter}}</span>
<span>{{scope.row.nickname | filterEmpty }} | {{scope.row.sex | sexFilter}}</span>
</template>
</el-table-column>
<el-table-column
@@ -250,7 +246,7 @@
min-width="100"
>
<template slot-scope="scope">
<!--<span>{{scope.row.level | levelFilter | filterEmpty}}</span>-->
<span>{{scope.row.level | levelFilter | filterEmpty}}</span>
</template>
</el-table-column>
<el-table-column
@@ -302,7 +298,7 @@
</el-table>
<div class="block">
<el-pagination
:page-sizes="[20, 40, 60, 80]"
:page-sizes="[15, 30, 45, 60]"
:page-size="userFrom.limit"
:current-page="userFrom.page"
layout="total, sizes, prev, pager, next, jumper"
@@ -629,7 +625,9 @@
uid: 0,
Visible: false,
keyNum: 0,
address: []
address: [],
multipleSelectionAll: [],
idKey:'uid'
}
},
mounted() {
@@ -786,6 +784,13 @@
this.visible = true
},
submitForm(formName) {
let data = [];
if(this.multipleSelectionAll.length){
this.multipleSelectionAll.map((item) => {
data.push(item.uid)
});
this.userIds = data.join(',');
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.loading = true
@@ -811,29 +816,21 @@
},
setBatch(name, row){
this.batchName = name
if(row){
this.selectionList = [row]
this.userIds = row.uid
}else{
this.selectionList=[]
}
// row?this.selectionList = [row]:this.selectionList=[]
if (this.selectionList.length === 0) return this.$message.warning('请选择要设置的用户')
if(row) this.userIds = row.uid
if (this.multipleSelectionAll.length === 0 && !row) return this.$message.warning('请选择要设置的用户')
this.dialogVisible = true
},
handleClose(){
this.dialogVisible = false
this.multipleSelectionAll = [];
this.$refs['dynamicValidateForm'].resetFields();
},
// 全选
onSelectTab (selection) {
this.selectionList = selection;
let data = [];
this.selectionList.map((item) => {
data.push(item.uid)
});
this.userIds = data.join(',');
setTimeout(() => {
this.changePageCoreRecordData()
}, 50)
},
// 搜索
userSearchs () {
@@ -879,8 +876,9 @@
})
},
// 列表
getList() {
getList(num) {
this.listLoading = true
this.userFrom.page = num ? num : this.userFrom.page;
this.userFrom.userType = this.loginType
if(this.loginType == 0) this.userFrom.userType =''
this.userFrom.level = this.levelData.join(',')
@@ -889,16 +887,83 @@
userListApi(this.userFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.$nextTick(function() {
this.setSelectRow()// 调用跨页选中方法
})
this.listLoading = false
}).catch(() => {
this.listLoading = false
})
},
// 设置选中的方法
setSelectRow() {
if (!this.multipleSelectionAll || this.multipleSelectionAll.length <= 0) {
return
}
// 标识当前行的唯一键的名称
const idKey = this.idKey
const selectAllIds = []
this.multipleSelectionAll.forEach(row => {
selectAllIds.push(row[idKey])
})
this.$refs.table.clearSelection()
for (var i = 0; i < this.tableData.data.length; i++) {
if (selectAllIds.indexOf(this.tableData.data[i][idKey]) >= 0) {
// 设置选中记住table组件需要使用ref="table"
this.$refs.table.toggleRowSelection(this.tableData.data[i], true)
}
}
},
// 记忆选择核心方法
changePageCoreRecordData() {
// 标识当前行的唯一键的名称
const idKey = this.idKey
const that = this
// 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
if (this.multipleSelectionAll.length <= 0) {
this.multipleSelectionAll = this.selectionList
return
}
// 总选择里面的key集合
const selectAllIds = []
this.multipleSelectionAll.forEach(row => {
selectAllIds.push(row[idKey])
})
const selectIds = []
// 获取当前页选中的id
this.selectionList.forEach(row => {
selectIds.push(row[idKey])
// 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
if (selectAllIds.indexOf(row[idKey]) < 0) {
that.multipleSelectionAll.push(row)
}
})
const noSelectIds = []
// 得到当前页没有选中的id
this.tableData.data.forEach(row => {
if (selectIds.indexOf(row[idKey]) < 0) {
noSelectIds.push(row[idKey])
}
})
noSelectIds.forEach(uid => {
if (selectAllIds.indexOf(uid) >= 0) {
for (let i = 0; i < that.multipleSelectionAll.length; i++) {
if (that.multipleSelectionAll[i][idKey] == uid) {
// 如果总选择中有未被选中的,那么就删除这条
that.multipleSelectionAll.splice(i, 1)
break
}
}
}
})
},
pageChange(page) {
this.changePageCoreRecordData()
this.userFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.changePageCoreRecordData()
this.userFrom.limit = val
this.getList()
},