## v1.3.1 更新列表
1. 【修复】申请退款后积分等操作可能出现错误的问题 2. 【修复】拼团支付可能出现支付错误的问题 3. 【修复】退款申请后的订单流程优化和积分赠送的问题 4. 【修复】回收站中的商品无法恢复的问题 5. 【修复】一号通短信查询记录不完整的问题 6. 【修复】用户管理批量加分组,标签的问题 7. 【修复】积分日志搜索显示有误的问题 8. 【修复】手动发送优惠券可能会出错的问题 9. 【修复】核销订单创建在某种条件下会出错的问题 10. 【修复】移动端商品详情,购物车等样式兼容问题 11. 【修复】业务流程性的优化
This commit is contained in:
@@ -136,3 +136,15 @@ export function categroyUpdateStatus(id) {
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章详情
|
||||
* @param pram
|
||||
*/
|
||||
export function articleInfoApi(params) {
|
||||
return request({
|
||||
url: `/admin/article/info`,
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -174,10 +174,11 @@ export function exportTempApi(params) {
|
||||
/**
|
||||
* @description 全部物流公司
|
||||
*/
|
||||
export function expressAllApi() {
|
||||
export function expressAllApi(params) {
|
||||
return request({
|
||||
url: 'admin/express/all',
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
BIN
admin/src/assets/imgs/kefuImg.jpg
Normal file
BIN
admin/src/assets/imgs/kefuImg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<el-input v-model="editPram.name" :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="URL">
|
||||
<el-form-item label="URL" v-if="biztype.value!==1">
|
||||
<el-input v-model="editPram.url" placeholder="URL" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父级" v-if="biztype.value!==3">
|
||||
@@ -31,7 +31,8 @@
|
||||
<el-input-number v-model="editPram.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="editPram.status" :active-value="true" :inactive-value="false" />
|
||||
<el-switch v-model="editPram.status" active-text="显示"
|
||||
inactive-text="隐藏" :active-value="true" :inactive-value="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="扩展字段" v-if="biztype.value !== 1 && biztype.value !== 3 && biztype.value !== 5">
|
||||
<el-input v-model="editPram.extra" type="textarea" placeholder="扩展字段" />
|
||||
@@ -45,7 +46,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 {
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loadingBtn: false,
|
||||
constants,
|
||||
constants: this.$constants,
|
||||
editPram: {
|
||||
extra: null,
|
||||
name: null,
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Url" min-width="250">
|
||||
<el-table-column label="Url" min-width="250" v-if="biztype.value === 5" key="2">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.url }}</span>
|
||||
</template>
|
||||
@@ -141,7 +141,6 @@
|
||||
import * as categoryApi from '@/api/categoryApi.js'
|
||||
import info from './info'
|
||||
import edit from './edit'
|
||||
import * as constants from '@/utils/constants.js'
|
||||
import * as selfUtil from '@/utils/ZBKJIutil.js'
|
||||
export default {
|
||||
// name: "list"
|
||||
@@ -177,7 +176,7 @@ export default {
|
||||
return {
|
||||
selectModelKeysNew: this.selectModelKeys,
|
||||
loading: false,
|
||||
constants,
|
||||
constants: this.$constants,
|
||||
treeProps: {
|
||||
label: 'name',
|
||||
children: 'child',
|
||||
@@ -197,12 +196,12 @@ export default {
|
||||
dataList: [],
|
||||
treeList: [],
|
||||
listPram: {
|
||||
pid: this.pid,
|
||||
pid: this.pid,
|
||||
type: this.biztype.value,
|
||||
status: -1,
|
||||
name: '',
|
||||
page: constants.page.page,
|
||||
limit: constants.page.limit[0]
|
||||
page: this.$constants.page.page,
|
||||
limit: this.$constants.page.limit[0]
|
||||
},
|
||||
viewInfoConfig: {
|
||||
data: null,
|
||||
@@ -293,7 +292,7 @@ export default {
|
||||
this.loading = false
|
||||
}).catch(()=>{
|
||||
this.loading = false
|
||||
}) : categoryApi.listCategroy({ type: 3, status: '', pid: this.listPram.pid}).then(data => {
|
||||
}) : categoryApi.listCategroy({ type: 3, status: this.listPram.status, pid: this.listPram.pid, name: this.listPram.name}).then(data => {
|
||||
this.treeList = data.list
|
||||
})
|
||||
},
|
||||
|
||||
@@ -39,7 +39,6 @@ function formBtns(h) {
|
||||
return <el-col>
|
||||
<el-form-item size='mini'>
|
||||
<el-button type='primary' onClick={this.submitForm}>提交</el-button>
|
||||
<el-button onClick={this.resetForm}>取消</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
}
|
||||
|
||||
@@ -69,7 +69,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'
|
||||
export default {
|
||||
// name: "list",
|
||||
@@ -83,12 +82,12 @@
|
||||
return {
|
||||
templateRadio:'',
|
||||
imgList: [],
|
||||
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: {
|
||||
@@ -130,7 +129,7 @@
|
||||
})
|
||||
},
|
||||
handlerGetCategoryTreeData() {
|
||||
const _pram = { type: constants.categoryType[2].value, status: 1 }
|
||||
const _pram = { type: this.constants.categoryType[2].value, status: 1 }
|
||||
categoryApi.treeCategroy(_pram).then(data => {
|
||||
this.categoryTreeData = selfUtil.addTreeListLabelForCasCard(data)
|
||||
})
|
||||
|
||||
@@ -91,178 +91,178 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { marketingListApi, couponUserApi } from '@/api/marketing'
|
||||
export default {
|
||||
name: 'CouponList',
|
||||
props: {
|
||||
handle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
couponData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
keyNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
userIds: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
import { marketingListApi, couponUserApi } from '@/api/marketing'
|
||||
export default {
|
||||
name: 'CouponList',
|
||||
props: {
|
||||
handle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
name: '',
|
||||
// type: 0,
|
||||
isDel: 0,
|
||||
status: 1
|
||||
},
|
||||
multipleSelection: [],
|
||||
multipleSelectionAll: [],
|
||||
idKey: 'id',
|
||||
nextPageFlag: false,
|
||||
attr: []
|
||||
}
|
||||
couponData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
watch: {
|
||||
keyNum: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
keyNum: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
mounted() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
this.multipleSelectionAll = this.couponData || []
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.multipleSelection = []
|
||||
userIds: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
setTimeout(() => {
|
||||
this.changePageCoreRecordData()
|
||||
}, 50)
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
name: '',
|
||||
// type: 0,
|
||||
isDel: 0,
|
||||
status: 1
|
||||
},
|
||||
// 设置选中的方法
|
||||
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.multipleSelection
|
||||
return
|
||||
}
|
||||
// 总选择里面的key集合
|
||||
const selectAllIds = []
|
||||
this.multipleSelectionAll.forEach(row => {
|
||||
selectAllIds.push(row[idKey])
|
||||
})
|
||||
const selectIds = []
|
||||
// 获取当前页选中的id
|
||||
this.multipleSelection.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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
ok() {
|
||||
if (this.multipleSelection.length > 0) {
|
||||
this.$emit('getCouponId', this.multipleSelectionAll)
|
||||
// this.close()
|
||||
} else {
|
||||
this.$message.warning('请先选择优惠劵')
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
||||
marketingListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
this.$nextTick(function() {
|
||||
this.setSelectRow()// 调用跨页选中方法
|
||||
})
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.changePageCoreRecordData()
|
||||
this.tableFrom.page = page
|
||||
multipleSelection: [],
|
||||
multipleSelectionAll: [],
|
||||
idKey: 'id',
|
||||
nextPageFlag: false,
|
||||
attr: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
keyNum: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.changePageCoreRecordData()
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
// 发送
|
||||
sendGrant(id){
|
||||
this.$modalSure('发送优惠劵吗').then(() => {
|
||||
couponUserApi({ couponId:id, uid:this.userIds }).then(() => {
|
||||
this.$message.success('发送成功')
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
this.multipleSelectionAll = this.couponData || []
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.multipleSelection = []
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
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.multipleSelection
|
||||
return
|
||||
}
|
||||
// 总选择里面的key集合
|
||||
const selectAllIds = []
|
||||
this.multipleSelectionAll.forEach(row => {
|
||||
selectAllIds.push(row[idKey])
|
||||
})
|
||||
const selectIds = []
|
||||
// 获取当前页选中的id
|
||||
this.multipleSelection.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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
ok() {
|
||||
if (this.multipleSelection.length > 0) {
|
||||
this.$emit('getCouponId', this.multipleSelectionAll)
|
||||
// this.close()
|
||||
} else {
|
||||
this.$message.warning('请先选择优惠劵')
|
||||
}
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
||||
marketingListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.listLoading = false
|
||||
this.$nextTick(function() {
|
||||
this.setSelectRow()// 调用跨页选中方法
|
||||
})
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.changePageCoreRecordData()
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.changePageCoreRecordData()
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
},
|
||||
// 发送
|
||||
sendGrant(id){
|
||||
this.$modalSure('发送优惠劵吗').then(() => {
|
||||
couponUserApi({ couponId:id, uid:this.userIds }).then(() => {
|
||||
this.$message.success('发送成功')
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -102,12 +102,11 @@
|
||||
<script>
|
||||
import * as systemAdminApi from '@/api/systemadmin.js'
|
||||
import * as roleApi from '@/api/role.js'
|
||||
import * as constants from '@/utils/constants.js'
|
||||
export default {
|
||||
name: "index",
|
||||
data(){
|
||||
return {
|
||||
constants,
|
||||
constants: this.$constants,
|
||||
loading:false,
|
||||
templateRadio:'',
|
||||
dialogFormVisible:false,
|
||||
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
initialFrameHeight: 500, // 初始容器高度
|
||||
initialFrameWidth: '100%', // 初始容器宽度
|
||||
UEDITOR_HOME_URL: '/UEditor/',
|
||||
serverUrl: 'http://35.201.165.105:8000/controller.php'
|
||||
serverUrl: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="30">
|
||||
<el-col v-bind="grid">
|
||||
@@ -31,34 +31,45 @@
|
||||
>({{ data.name }})</span>
|
||||
</div>
|
||||
<span class="el-ic">
|
||||
<svg-icon
|
||||
icon-class="example"
|
||||
title="添加分类"
|
||||
class="icon-space"
|
||||
@click.stop="onAdd(data.id)"
|
||||
/>
|
||||
<svg-icon
|
||||
icon-class="danyuan"
|
||||
title="添加管理单元"
|
||||
class="icon-space"
|
||||
/>
|
||||
<i
|
||||
v-if="data.id!== 10000"
|
||||
class="el-icon-edit"
|
||||
title="修改"
|
||||
@click.stop="onEdit(data.id)"
|
||||
/>
|
||||
<svg-icon
|
||||
icon-class="detail"
|
||||
title="查看该空间详情"
|
||||
class="icon-space"
|
||||
/>
|
||||
<i
|
||||
v-if="data.id!== 10000"
|
||||
class="el-icon-delete"
|
||||
title="删除分类"
|
||||
@click.stop="() => handleDelete(data.id)"
|
||||
/>
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-more"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="onAdd(data.id)">添加分类</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onEdit(data.id)">编辑分类</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="handleDelete(data.id)">删除分类</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
<!--<svg-icon-->
|
||||
<!--icon-class="example"-->
|
||||
<!--title="添加分类"-->
|
||||
<!--class="icon-space"-->
|
||||
<!--@click.stop="onAdd(data.id)"-->
|
||||
<!--/>-->
|
||||
<!--<svg-icon-->
|
||||
<!--icon-class="danyuan"-->
|
||||
<!--title="添加管理单元"-->
|
||||
<!--class="icon-space"-->
|
||||
<!--/>-->
|
||||
<!--<i-->
|
||||
<!--v-if="data.id!== 10000"-->
|
||||
<!--class="el-icon-edit"-->
|
||||
<!--title="修改"-->
|
||||
<!--@click.stop="onEdit(data.id)"-->
|
||||
<!--/>-->
|
||||
<!--<svg-icon-->
|
||||
<!--icon-class="detail"-->
|
||||
<!--title="查看该空间详情"-->
|
||||
<!--class="icon-space"-->
|
||||
<!--/>-->
|
||||
<!--<i-->
|
||||
<!--v-if="data.id!== 10000"-->
|
||||
<!--class="el-icon-delete"-->
|
||||
<!--title="删除分类"-->
|
||||
<!--@click.stop="() => handleDelete(data.id)"-->
|
||||
<!--/>-->
|
||||
</span>
|
||||
</div>
|
||||
</el-tree>
|
||||
@@ -70,22 +81,60 @@
|
||||
<el-col v-bind="grid2" class="colLeft">
|
||||
<div class="conter mb15">
|
||||
<div class="bnt">
|
||||
<el-button size="mini" type="primary" class="mb10 mr10" @click="checkPics">使用选中图片</el-button>
|
||||
<el-upload
|
||||
class="upload-demo mr10 mb15"
|
||||
action
|
||||
:http-request="handleUploadForm"
|
||||
:on-change="imgSaveToUrl"
|
||||
:headers="myHeaders"
|
||||
:show-file-list="false"
|
||||
multiple
|
||||
>
|
||||
<el-button size="mini" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<el-button type="success" size="mini" @click.stop="onAdd">添加分类</el-button>
|
||||
<el-button type="error" size="mini" class="mr10" :disabled="checkPicList.length===0" @click.stop="editPicList('图片')">删除图片</el-button>
|
||||
<el-select v-model="sleOptions.attachment_category_name" placeholder="图片移动至" class="mb15" size="mini">
|
||||
<!--<el-tooltip class="item" effect="dark" content="使用选中图片" placement="top-start">-->
|
||||
<!--<i class="el-icon-thumb mr20" style="font-size: 25px;" @click="checkPics"></i>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-upload-->
|
||||
<!--class="upload-demo mb15"-->
|
||||
<!--action-->
|
||||
<!--:http-request="handleUploadForm"-->
|
||||
<!--:on-change="imgSaveToUrl"-->
|
||||
<!--:headers="myHeaders"-->
|
||||
<!--:show-file-list="false"-->
|
||||
<!--multiple-->
|
||||
<!-->-->
|
||||
<!--<el-tooltip class="item" effect="dark" content="上传图片" placement="top-start">-->
|
||||
<!--<i class="el-icon-upload2 mr20" style="font-size: 25px;"></i>-->
|
||||
<!--</el-tooltip>-->
|
||||
|
||||
<!--<!–<el-button size="mini" type="primary">点击上传</el-button>–>-->
|
||||
<!--</el-upload>-->
|
||||
<el-button size="small" type="primary" class="mr20 mb20" @click="checkPics">使用选中图片</el-button>
|
||||
<div class="mr20 mb20">
|
||||
<el-button-group>
|
||||
<el-tooltip class="item" effect="dark" content="上传图片" placement="top-start">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:http-request="handleUploadForm"
|
||||
:on-change="imgSaveToUrl"
|
||||
:headers="myHeaders"
|
||||
:show-file-list="false"
|
||||
multiple
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload2" size="mini" style="font-size: 15px;"></el-button>
|
||||
</el-upload>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="添加分类" placement="top-start">
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" style="font-size: 15px;" size="mini" @click="onAdd"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" content="删除图片" placement="top-start">
|
||||
<el-button type="primary" icon="el-icon-delete" style="font-size: 15px;" size="mini" @click.stop="editPicList('图片')"></el-button>
|
||||
</el-tooltip>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<!--<el-tooltip class="item" effect="dark" content="添加分类" placement="top-start">-->
|
||||
<!--<i class="el-icon-circle-plus-outline mr20" style="font-size: 25px;" @click="onAdd"></i>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-button type="success" size="mini" @click.stop="onAdd">添加分类</el-button>-->
|
||||
<!--<el-tooltip class="item" effect="dark" content="删除图片" placement="top-start">-->
|
||||
<!--<i class="el-icon-delete mr20" style="font-size: 25px;" @click.stop="editPicList('图片')"></i>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-button type="error" size="mini" class="mr10" :disabled="checkPicList.length===0" @click.stop="editPicList('图片')">删除图片</el-button>-->
|
||||
<el-select v-model="sleOptions.attachment_category_name" placeholder="图片移动至" class="mb20" size="small">
|
||||
<el-option
|
||||
class="demo"
|
||||
:label="sleOptions.attachment_category_name"
|
||||
:value="sleOptions.attachment_category_id"
|
||||
style="max-width: 560px;height:200px;overflow: auto;background-color:#fff"
|
||||
@@ -106,7 +155,7 @@
|
||||
<i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" />
|
||||
<span class="imagesNo_sp">图片库为空</span>
|
||||
</div>
|
||||
<div class="conters">
|
||||
<div class="conters scrollbarAll">
|
||||
<div
|
||||
v-for="(item, index) in pictrueList.list"
|
||||
:key="index"
|
||||
@@ -121,7 +170,7 @@
|
||||
</div>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[12, 24, 48, 60]"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="tableData.limit"
|
||||
:current-page="tableData.page"
|
||||
:pager-count="5"
|
||||
@@ -142,8 +191,10 @@
|
||||
@close="closeModel"
|
||||
>
|
||||
<el-form ref="editPram" :model="editPram" label-width="100px" v-loading="loading">
|
||||
<el-form-item label="上级分类">
|
||||
<el-cascader v-model="editPram.pid" :options="treeData2" :props="categoryProps" style="width:100%" />
|
||||
<el-form-item label="上级分类" prop="pid"
|
||||
:rules="[{ type: 'number',required:true,message:'请选择上级分类',trigger:['blur','change'] }]"
|
||||
>
|
||||
<el-cascader v-model="editPram.pid" :options="treeData2" :props="categoryProps" style="width:100%"/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="分类名称"
|
||||
@@ -197,7 +248,7 @@ export default {
|
||||
emitPath: false
|
||||
},
|
||||
editPram:{
|
||||
pid: 0,
|
||||
pid: 1000,
|
||||
name: '',
|
||||
type: 2,
|
||||
sort: 1,
|
||||
@@ -213,17 +264,17 @@ export default {
|
||||
},
|
||||
list: [],
|
||||
grid: {
|
||||
xl: 8,
|
||||
lg: 8,
|
||||
md: 8,
|
||||
sm: 8,
|
||||
xl: 7,
|
||||
lg: 7,
|
||||
md: 7,
|
||||
sm: 7,
|
||||
xs: 24
|
||||
},
|
||||
grid2: {
|
||||
xl: 16,
|
||||
lg: 16,
|
||||
md: 16,
|
||||
sm: 16,
|
||||
xl: 17,
|
||||
lg: 17,
|
||||
md: 17,
|
||||
sm: 17,
|
||||
xs: 24
|
||||
},
|
||||
filterText: '',
|
||||
@@ -235,7 +286,7 @@ export default {
|
||||
},
|
||||
tableData: {
|
||||
page: 1,
|
||||
limit: 12,
|
||||
limit: 10,
|
||||
pid: 0
|
||||
},
|
||||
classifyId: 0,
|
||||
@@ -300,7 +351,7 @@ export default {
|
||||
handlerSubmit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if( this.editPram.pid === 10000 ) this.editPram.pid = 0
|
||||
if( this.editPram.pid==10000) this.editPram.pid = 0
|
||||
this.bizTitle==='添加分类' ? addCategroy(this.editPram).then(data => {
|
||||
this.$message.success('创建成功')
|
||||
this.visible = false
|
||||
@@ -457,6 +508,7 @@ export default {
|
||||
},
|
||||
// 删除图片
|
||||
editPicList(tit) {
|
||||
if (!this.checkPicList.length) return this.$message.warning('请先选择图片')
|
||||
this.$modalSure().then(() => {
|
||||
fileDeleteApi(this.ids.join(',')).then(() => {
|
||||
this.$message.success('刪除成功')
|
||||
@@ -500,6 +552,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.demo::-webkit-scrollbar {
|
||||
display: none; /* Chrome Safari */
|
||||
}
|
||||
|
||||
.demo {
|
||||
scrollbar-width: none; /* firefox */
|
||||
-ms-overflow-style: none; /* IE 10+ */
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.temp {
|
||||
height: 0;
|
||||
margin-bottom: 0;
|
||||
@@ -515,6 +577,7 @@ export default {
|
||||
}
|
||||
.upload-demo {
|
||||
display: inline-block !important;
|
||||
float: left;
|
||||
}
|
||||
.tree_w {
|
||||
padding: 20px 30px
|
||||
@@ -524,7 +587,7 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
padding-right: 8px;
|
||||
color: #4386c6;
|
||||
}
|
||||
@@ -607,7 +670,7 @@ export default {
|
||||
box-sizing: border-box;
|
||||
.trees {
|
||||
width: 100%;
|
||||
max-height: 374px;
|
||||
max-height: 345px;
|
||||
}
|
||||
}
|
||||
.scollhide::-webkit-scrollbar {
|
||||
@@ -617,10 +680,12 @@ export default {
|
||||
.conters{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
max-height: 296px;
|
||||
overflow: auto;
|
||||
}
|
||||
.conters:after {content: ""; width: 410px !important; }
|
||||
.gridPic{
|
||||
margin-right: 20px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: 10px;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
@@ -636,11 +701,12 @@ export default {
|
||||
height: 100%;
|
||||
.bnt {
|
||||
width: 100%;
|
||||
padding: 0 13px 10px 15px;
|
||||
padding: 0 13px 10px 7px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
}
|
||||
.pictrueList {
|
||||
padding-left: 15px;
|
||||
/*padding-left: 15px;*/
|
||||
width: 100%;
|
||||
el-image {
|
||||
width: 100%;
|
||||
|
||||
@@ -26,3 +26,17 @@ export function orderStatusFilter(status) {
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 退款状态
|
||||
* 2,已收货,待评价
|
||||
*/
|
||||
export function refundStatusFilter(status) {
|
||||
const statusMap = {
|
||||
'0': '未退款',
|
||||
'1': '申请中',
|
||||
'2': '已退款',
|
||||
'3': '退款中'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
@@ -8,7 +8,12 @@ export function levelFilter(status) {
|
||||
return ''
|
||||
}
|
||||
let arrayList = JSON.parse(localStorage.getItem('levelKey'));
|
||||
return arrayList.filter(item => status === item.id)[0].name
|
||||
let array = arrayList.filter(item => status === item.id)
|
||||
if(array.length){
|
||||
return array[0].name
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -22,3 +27,14 @@ export function typeFilter(status) {
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
export function filterIsPromoter(status) {
|
||||
const statusMap = {
|
||||
true: '推广员',
|
||||
false: '普通用户'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
||||
@@ -5,12 +5,41 @@
|
||||
<router-view :key="key" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
<div class="footers">
|
||||
<el-link v-for="item in links" :key="item.key" :href="item.href" target="_blank" class="mr15 mb20">{{item.title}}</el-link>
|
||||
<div class="title mb15" v-text="copyright"></div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AppMain',
|
||||
data () {
|
||||
return {
|
||||
links: [
|
||||
{
|
||||
title: '官网',
|
||||
key: '1',
|
||||
href: 'https://www.crmeb.com',
|
||||
blankTarget: true
|
||||
},
|
||||
{
|
||||
title: '社区',
|
||||
key: '2',
|
||||
href: 'http://bbs.crmeb.net',
|
||||
blankTarget: true
|
||||
},
|
||||
{
|
||||
title: '文档',
|
||||
key: '3',
|
||||
href: 'https://help.crmeb.net',
|
||||
blankTarget: true
|
||||
}
|
||||
],
|
||||
copyright: 'Copyright © 2020 西安众邦网络科技有限公司'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cachedViews() {
|
||||
return this.$store.state.tagsView.cachedViews
|
||||
@@ -23,6 +52,15 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.footers{
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: #808695;
|
||||
.title{
|
||||
font-size: 14px;
|
||||
color: #808695;
|
||||
}
|
||||
}
|
||||
.app-main {
|
||||
/* 50= navbar 50 */
|
||||
min-height: calc(100vh - 50px);
|
||||
@@ -46,13 +84,10 @@ export default {
|
||||
padding-top: 84px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
// fix css style bug in open el-dialog
|
||||
.el-popup-parent--hidden {
|
||||
.fixed-header {
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -202,9 +202,9 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tags-view-container {
|
||||
height: 34px;
|
||||
padding: 6px 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
background: #f5f7f9;
|
||||
border-bottom: 1px solid #d8dce5;
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
|
||||
.tags-view-wrapper {
|
||||
@@ -212,15 +212,14 @@ export default {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
border: 1px solid #d8dce5;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid #fff;
|
||||
color: #495060;
|
||||
background: #fff;
|
||||
padding: 0 8px;
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
margin-top: 4px;
|
||||
&:first-of-type {
|
||||
margin-left: 15px;
|
||||
}
|
||||
@@ -228,9 +227,9 @@ export default {
|
||||
margin-right: 15px;
|
||||
}
|
||||
&.active {
|
||||
background-color: #42b983;
|
||||
color: #fff;
|
||||
border-color: #42b983;
|
||||
background-color: #fff;
|
||||
color: #498ff7;
|
||||
border-color: #fff;
|
||||
&::before {
|
||||
content: '';
|
||||
background: #fff;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
<div class="open-image" @click="clear" v-if="openImage"><img src="@/assets/imgs/kefuImg.jpg" alt=""></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -23,6 +24,11 @@ import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Layout',
|
||||
data(){
|
||||
return {
|
||||
openImage: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AppMain,
|
||||
Navbar,
|
||||
@@ -50,6 +56,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear () {
|
||||
this.openImage = false;
|
||||
},
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
@@ -60,7 +69,18 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
@import "~@/styles/variables.scss";
|
||||
|
||||
.open-image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
background-color: rgba(0,0,0,0.6);
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
}
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
|
||||
@@ -38,6 +38,7 @@ import scroll from "@/libs/loading";
|
||||
import schema from "async-validator";
|
||||
// 切勿更改 此组件为表单生成中使用的图片上传组件
|
||||
import SelfUpload from '@/components/uploadPicture/forGenrator/index.vue'
|
||||
import util from '@/utils/utils'
|
||||
import modalAttr from '@/libs/modal-attr'
|
||||
import modalIcon from '@/libs/modal-icon'
|
||||
import { modalSure } from '@/libs/public'
|
||||
@@ -49,6 +50,8 @@ import './utils/error-log' // error integralLog
|
||||
import * as filters from './filters' // global filters
|
||||
import { parseQuery } from "@/utils";
|
||||
import * as Auth from '@/libs/wechat';
|
||||
import * as constants from '@/utils/constants.js'
|
||||
|
||||
Vue.use(VueLazyload, {
|
||||
preLoad: 1.3,
|
||||
error: require('./assets/imgs/no.png'),
|
||||
@@ -76,6 +79,8 @@ Vue.prototype.$modalIcon = modalIcon
|
||||
Vue.prototype.$dialog = dialog
|
||||
Vue.prototype.$scroll = scroll;
|
||||
Vue.prototype.$wechat = Auth;
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$constants = constants;
|
||||
Vue.prototype.$validator = function(rule) {
|
||||
return new schema(rule);
|
||||
};
|
||||
|
||||
@@ -19,6 +19,15 @@ const contentRouter = {
|
||||
icon: 'clipboard'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'articleCreat/:id?',
|
||||
name: 'articleCreat',
|
||||
component: () => import('@/views/content/article/edit'),
|
||||
meta: {
|
||||
title: '添加文章',
|
||||
noCache: true, activeMenu: `/content/articleManager`
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'classifManager',
|
||||
name: 'classifManager',
|
||||
|
||||
@@ -98,6 +98,20 @@
|
||||
margin-top: 25px;
|
||||
}
|
||||
}
|
||||
.el-dialog{
|
||||
border-radius: 6px;
|
||||
}
|
||||
/* 去掉滚动条 */
|
||||
.scrollbarAll::-webkit-scrollbar {
|
||||
display: none; /* Chrome Safari */
|
||||
}
|
||||
|
||||
.scrollbarAll {
|
||||
scrollbar-width: none; /* firefox */
|
||||
-ms-overflow-style: none; /* IE 10+ */
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.seachTiele{
|
||||
font-size: 12px;
|
||||
line-height: 29px;
|
||||
|
||||
@@ -40,4 +40,42 @@ export function addTreeListLabelForCasCard(treeData, child) {
|
||||
})
|
||||
}
|
||||
|
||||
//加法函数,用来得到精确的加法结果
|
||||
//说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
|
||||
//调用:$h.Add(arg1,arg2)
|
||||
//返回值:arg1加上arg2的精确结果
|
||||
export function Add(arg1, arg2) {
|
||||
arg2 = parseFloat(arg2);
|
||||
var r1, r2, m;
|
||||
try {
|
||||
r1 = arg1.toString().split(".")[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split(".")[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
m = Math.pow(100, Math.max(r1, r2));
|
||||
return (this.Mul(arg1, m) + this.Mul(arg2, m)) / m;
|
||||
}
|
||||
|
||||
//乘法函数,用来得到精确的乘法结果
|
||||
//说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。
|
||||
//调用:$h.Mul(arg1,arg2)
|
||||
//返回值:arg1乘以arg2的精确结果
|
||||
export function Mul(arg1, arg2) {
|
||||
arg1 = parseFloat(arg1);
|
||||
arg2 = parseFloat(arg2);
|
||||
var m = 0,
|
||||
s1 = arg1.toString(),
|
||||
s2 = arg2.toString();
|
||||
try {
|
||||
m += s1.split(".")[1].length
|
||||
} catch (e) {}
|
||||
try {
|
||||
m += s2.split(".")[1].length
|
||||
} catch (e) {}
|
||||
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
|
||||
}
|
||||
|
||||
52
admin/src/utils/utils.js
Normal file
52
admin/src/utils/utils.js
Normal file
@@ -0,0 +1,52 @@
|
||||
export default {// 设置选中的方法
|
||||
// 记忆选择核心方法
|
||||
changePageCoreRecordData: function (multipleSelectionAll, multipleSelection, tableData, successFn) {
|
||||
// 标识当前行的唯一键的名称
|
||||
const idKey = 'uid'
|
||||
const that = this
|
||||
// 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
|
||||
if (multipleSelectionAll.length <= 0) {
|
||||
multipleSelectionAll=multipleSelection
|
||||
console.log(multipleSelectionAll)
|
||||
successFn(multipleSelectionAll)
|
||||
return
|
||||
}
|
||||
// 总选择里面的key集合
|
||||
const selectAllIds = []
|
||||
multipleSelectionAll.forEach(row => {
|
||||
selectAllIds.push(row[idKey])
|
||||
})
|
||||
const selectIds = []
|
||||
// 获取当前页选中的id
|
||||
multipleSelection.forEach(row => {
|
||||
selectIds.push(row[idKey])
|
||||
// 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
|
||||
if (selectAllIds.indexOf(row[idKey]) < 0) {
|
||||
multipleSelectionAll.push(row)
|
||||
console.log(multipleSelectionAll)
|
||||
// successFn(multipleSelectionAll)
|
||||
}
|
||||
})
|
||||
const noSelectIds = []
|
||||
// 得到当前页没有选中的id
|
||||
tableData.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 < multipleSelectionAll.length; i++) {
|
||||
if (multipleSelectionAll[i][idKey] == uid) {
|
||||
// 如果总选择中有未被选中的,那么就删除这条
|
||||
multipleSelectionAll.splice(i, 1)
|
||||
console.log(multipleSelectionAll)
|
||||
//successFn(multipleSelectionAll)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
successFn(multipleSelectionAll)
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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-->
|
||||
<!-->-->
|
||||
<!--<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>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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: ''
|
||||
|
||||
@@ -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
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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++;
|
||||
|
||||
@@ -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: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: []
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
},
|
||||
methods: {
|
||||
resetForm(formValue) {
|
||||
this.isShow = false
|
||||
this.editData = {}
|
||||
},
|
||||
handlerSubmit(data) {
|
||||
const tempArr = []
|
||||
|
||||
@@ -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: [],
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
// },
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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('删除成功')
|
||||
|
||||
@@ -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=''
|
||||
},
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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: [],
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
/>
|
||||
<el-table-column
|
||||
prop="discount"
|
||||
label="享受折扣"
|
||||
label="享受折扣(%)"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user