全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
stivepeim
2021-06-11 17:41:16 +08:00
parent 0b9f28fa52
commit b76840e10f
582 changed files with 35633 additions and 28276 deletions

View File

@@ -12,6 +12,17 @@ export function marketingListApi(params) {
})
}
/**
* 用户管理 优惠券列表
* @param pram
*/
export function marketingSendApi(params) {
return request({
url: '/admin/marketing/coupon/send/list',
method: 'get',
params
})
}
/**
* 优惠券 详情
@@ -61,6 +72,18 @@ export function couponIssueStatusApi(params) {
})
}
/**
* 优惠券 删除
* @param pram
*/
export function couponDeleteApi(params) {
return request({
url: '/admin/marketing/coupon/delete',
method: 'post',
params
})
}
/**
* 会员领取记录 列表
* @param pram
@@ -79,7 +102,7 @@ export function couponUserListApi(params) {
*/
export function integralListApi(params, data) {
return request({
url: '/admin/user/bill/list',
url: '/admin/user/integral/list',
method: 'post',
params,
data
@@ -439,3 +462,109 @@ export function exportcombiantionApi(params) {
params
})
}
/**
* 视频号 草稿列表
*/
export function draftListApi(params) {
return request({
url: `/admin/pay/component/product/draft/list`,
method: 'get',
params
})
}
/**
* 视频号 商品列表
*/
export function videoProductListApi(params) {
return request({
url: `/admin/pay/component/product/list`,
method: 'get',
params
})
}
/**
* 视频号 类目
*/
export function catListApi(params) {
return request({
url: `/admin/pay/component/cat/get/list`,
method: 'get'
})
}
/**
* 视频号 添加
*/
export function videoAddApi(data) {
return request({
url: `/admin/pay/component/product/add`,
method: 'post',
data
})
}
/**
* 视频号 编辑
*/
export function videoUpdateApi(data) {
return request({
url: `/admin/pay/component/product/update`,
method: 'post',
data
})
}
/**
* 视频号 上架
*/
export function videoUpApi(proId) {
return request({
url: `/admin/pay/component/product/listing/${proId}`,
method: 'post'
})
}
/**
* 视频号 下架
*/
export function videoDownApi(proId) {
return request({
url: `/admin/pay/component/product/delisting/${proId}`,
method: 'post'
})
}
/**
* 视频号 删除
*/
export function videoDelApi(proId) {
return request({
url: `/admin/pay/component/product/delete/${proId}`,
method: 'post'
})
}
/**
* 视频号 草稿商品详情
*/
export function draftInfoApi(id) {
return request({
url: `/admin/pay/component/product/draft/get/${id}`,
method: 'get'
})
}
/**
* 视频号 草稿商品编辑
*/
export function draftUpdateApi(data) {
return request({
url: `/admin/pay/component/product/update`,
method: 'post',
data
})
}

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
/**
* 订单 列表
* @param pram
* @param prams
*/
export function orderListApi(params) {
return request({
@@ -12,10 +12,32 @@ export function orderListApi(params) {
})
}
/**
* 订单 列表 获取各状态数量
* @param params
*/
export function orderStatusNumApi(params) {
return request({
url: '/admin/store/order/status/num',
method: 'get',
params
})
}
/**
* 订单 列表 数据统计
* @param params
*/
export function orderListDataApi(params) {
return request({
url: '/admin/store/order/list/data',
method: 'get',
params
})
}
/**
* 订单 删除
* @param pram
* @param params
*/
export function orderDeleteApi(params) {
return request({
@@ -27,7 +49,7 @@ export function orderDeleteApi(params) {
/**
* 订单 编辑
* @param pram
* @param prams
*/
export function orderUpdateApi(data, params) {
return request({
@@ -40,7 +62,7 @@ export function orderUpdateApi(data, params) {
/**
* 订单 记录
* @param pram
* @param prams
*/
export function orderLogApi(params) {
return request({
@@ -52,7 +74,7 @@ export function orderLogApi(params) {
/**
* 订单 详情
* @param pram
* @param prams
*/
export function orderDetailApi(params) {
return request({
@@ -64,7 +86,7 @@ export function orderDetailApi(params) {
/**
* 订单 备注
* @param pram
* @param prams
*/
export function orderMarkApi(params) {
return request({
@@ -76,7 +98,7 @@ export function orderMarkApi(params) {
/**
* 订单 发货
* @param pram
* @param prams
*/
export function orderSendApi(data) {
return request({
@@ -88,7 +110,7 @@ export function orderSendApi(data) {
/**
* 订单 拒绝退款
* @param pram
* @param prams
*/
export function orderRefuseApi(params) {
return request({
@@ -100,7 +122,7 @@ export function orderRefuseApi(params) {
/**
* 订单 立即退款
* @param pram
* @param prams
*/
export function orderRefundApi(params) {
return request({
@@ -112,7 +134,7 @@ export function orderRefundApi(params) {
/**
* 订单 核销订单
* @param pram
* @param prams
*/
export function writeUpdateApi(vCode) {
return request({
@@ -123,7 +145,7 @@ export function writeUpdateApi(vCode) {
/**
* 订单 核销码查询待核销订单
* @param pram
* @param prams
*/
export function writeConfirmApi(vCode) {
return request({
@@ -195,3 +217,24 @@ export function getLogisticsInfoApi(params) {
params
})
}
/**
*视频号物流公司
*/
export function companyGetListApi() {
return request({
url: `/admin/pay/component/delivery/company/get/list`,
method: 'get'
})
}
/**
*视频号物流公司
*/
export function videoSendApi(data) {
return request({
url: `/admin/store/order/video/send`,
method: 'post',
data
})
}

View File

@@ -44,7 +44,8 @@ export function adminAdd(pram) {
pwd: pram.pwd,
realName: pram.realName,
roles: pram.roles.join(','),
status: pram.status
status: pram.status,
phone: pram.phone
}
return request({
url: '/admin/system/admin/save',

View File

@@ -357,3 +357,14 @@ export function updateSpreadApi(data) {
data
})
}
/**
* @description 修改手机号
*/
export function updatePhoneApi(params) {
return request({
url: `/admin/user/update/phone`,
method: 'get',
params
})
}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 95 KiB

85
admin/src/assets/js/canvas-nest.min.js vendored Normal file
View File

@@ -0,0 +1,85 @@
// JavaScript Document
! function() {
function o(w, v, i) {
return w.getAttribute(v) || i
}
function j(i) {
return document.getElementsByTagName(i)
}
function l() {
var i = j("script"),
w = i.length,
v = i[w - 1];
return {
l: w,
z: o(v, "zIndex", -2),
o: o(v, "opacity", 0.8),
c: o(v, "color", "255,255,255"),
n: o(v, "count", 240)
}
}
function k() {
r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
}
function b() {
delay = delay + 1;
if( delay < 5 ) { m(b) } else { delay = 0;
e.clearRect(0, 0, r, n);
var w = [f].concat(t);
var x, v, A, B, z, y;
t.forEach(function(i) {
i.x += i.xa, i.y += i.ya, i.xa *= i.x > r || i.x < 0 ? -1 : 1, i.ya *= i.y > n || i.y < 0 ? -1 : 1, e.fillRect(i.x - 0.5, i.y - 0.5, 2, 2);e.fillStyle="#FFFFFF";
for (v = 0; v < w.length; v++) {
x = w[v];
if (i !== x && null !== x.x && null !== x.y) {
B = i.x - x.x, z = i.y - x.y, y = B * B + z * z;
y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
}
}
w.splice(w.indexOf(i), 1)
}), m(b) }
}
var u = document.createElement("canvas"),
s = l(),
c = "c_n" + s.l,
e = u.getContext("2d"),
delay = 0,
r, n, m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(i) {
window.setTimeout(i, 1000 / 45)
},
a = Math.random,
f = {
x: null,
y: null,
max: 20000
}
u.id = c;
u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o;
j("body")[0].appendChild(u);
k(), window.onresize = k;
window.onmousemove = function(i) {
i = i || window.event, f.x = i.clientX, f.y = i.clientY
}, window.onmouseout = function() {
f.x = null, f.y = null
};
for (var t = [], p = 0; s.n > p; p++) {
var h = a() * r,
g = a() * n,
q = 2 * a() - 1,
d = 2 * a() - 1;
t.push({
x: h,
y: g,
xa: q,
ya: d,
max: 6000
})
}
setTimeout(function() {
b()
}, 100)
}();

View File

@@ -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" v-if="biztype.value!==1">
<el-form-item label="URL" v-if="biztype.value!==1 && biztype.value!==3">
<el-input v-model="editPram.url" placeholder="URL" />
</el-form-item>
<el-form-item label="父级" v-if="biztype.value!==3">

View File

@@ -13,13 +13,14 @@ couponFrom.install = function(Vue, options) {
const instance = new ToastConstructor()
instance.$mount(document.createElement('div'))
document.body.appendChild(instance.$el)
Vue.prototype.$modalCoupon = function(handle, keyNum, coupons=[], callback, userIds='') {
Vue.prototype.$modalCoupon = function(handle, keyNum, coupons=[], callback, userIds='', userType='') {
instance.visible = true
instance.handle = handle
instance.keyNum = keyNum
instance.coupons = coupons
instance.userIds = userIds
instance.callback = callback
instance.userType = userType
}
}
export default couponFrom

View File

@@ -6,7 +6,7 @@
width="896px"
:before-close="handleClose"
>
<coupon-list v-if="visible" :handle="handle" :userIds="userIds" :couponData="coupons" @getCouponId="getCouponId" :keyNum="keyNum"></coupon-list>
<coupon-list v-if="visible" :handle="handle" :userIds="userIds" :couponData="coupons" @getCouponId="getCouponId" :keyNum="keyNum" :userType="userType"></coupon-list>
<!--<upload-index v-if="visible" :isMore="isMore" @getImage="getImage" />-->
</el-dialog>
</div>
@@ -24,7 +24,8 @@
handle: '',
keyNum: 0,
coupons: [],
userIds: ''
userIds: '',
userType: ''
}
},
watch: {

View File

@@ -3,8 +3,8 @@
<div class="header clearfix">
<div class="container">
<el-form inline size="small">
<el-form-item label="优惠名称:">
<el-input v-model="tableFrom.name" placeholder="请输入优惠券名称" class="selWidth" size="small">
<el-form-item label="优惠名称:">
<el-input v-model="tableFrom.keywords" placeholder="请输入优惠券名称" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
@@ -91,7 +91,7 @@
</template>
<script>
import { marketingListApi, couponUserApi } from '@/api/marketing'
import { marketingListApi, couponUserApi, marketingSendApi } from '@/api/marketing'
export default {
name: 'CouponList',
props: {
@@ -110,6 +110,10 @@ export default {
userIds: {
type: String,
default: ''
},
userType: {
type: String,
default: ''
}
},
data() {
@@ -122,10 +126,8 @@ export default {
tableFrom: {
page: 1,
limit: 10,
name: '',
// type: 0,
isDel: 0,
status: 1
keywords: '',
type: ''
},
multipleSelection: [],
multipleSelectionAll: [],
@@ -145,6 +147,7 @@ export default {
mounted() {
this.tableFrom.page = 1
this.getList()
if(!this.couponData) return;
this.couponData.forEach(row => {
this.$refs.table.toggleRowSelection(row);
});
@@ -233,7 +236,8 @@ export default {
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
marketingListApi(this.tableFrom).then(res => {
this.userType ? this.tableFrom.type = 1 : this.tableFrom.type = 3;
marketingSendApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.listLoading = false

View File

@@ -37,8 +37,8 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onAdd(data.id)">添加分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部分类'" @click.native="onEdit(data.id)">编辑分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部分类'" @click.native="handleDelete(data.id)">删除分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部图片'" @click.native="onEdit(data.id)">编辑分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部图片'" @click.native="handleDelete(data.id)">删除分类</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</span>
@@ -94,7 +94,7 @@
</el-option>
</el-select>
</div>
<div class="pictrueList acea-row">
<div class="pictrueList acea-row" v-loading="loadingPic">
<div v-show="isShowPic" class="imagesNo">
<i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" />
<span class="imagesNo_sp">图片库为空</span>
@@ -184,6 +184,7 @@ export default {
},
data() {
return {
loadingPic: false,
loading: false,
modals: false,
allTreeList:[],
@@ -318,7 +319,7 @@ export default {
// 表单分类
handlerGetList() {
let datas = {
name: '全部分类',
name: '全部图片',
id: ''
}
treeCategroy(this.treeFrom).then(data => {
@@ -334,7 +335,7 @@ export default {
// 所有分类
getList() {
const data = {
name: '全部分类',
name: '全部图片',
id: 10000
}
treeCategroy(this.treeFrom).then(res => {
@@ -409,6 +410,7 @@ export default {
// 文件列表
getFileList() {
if ( this.tableData.pid === 10000) this.tableData.pid = 0
this.loadingPic = true;
fileListApi(this.tableData).then(async res => {
this.pictrueList.list = res.list
if(this.tableData.page === 1 && this.pictrueList.list.length > 0) this.pictrueList.list[0].localImg = this.localImg
@@ -418,6 +420,9 @@ export default {
this.isShowPic = true
}
this.pictrueList.total = res.total
this.loadingPic = false;
}).catch(()=>{
this.loadingPic = false;
})
},
pageChange(page) {

View File

@@ -58,14 +58,6 @@
<span>{{ scope.row.addres }}</span>
</template>
</el-table-column>
<el-table-column
label="是否关注公众号"
min-width="120"
>
<template slot-scope="scope">
<span>{{ scope.row.sex | saxFilter }}</span>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination

View File

@@ -202,3 +202,29 @@ export function onePassTypeFilter(status) {
}
return statusMap[status]
}
/**
* @description 视频号商品草稿状态
*/
export function editStatusFilter(status) {
const statusMap = {
1: '未审核',
2: '审核中',
3: '审核失败',
4: '审核成功'
}
return statusMap[status]
}
/**
* @description 视频号正式商品状态
*/
export function videoStatusFilter(status) {
const statusMap = {
0: '初始值',
5: '上架',
11: '自主下架',
13: '违规下架/风控系统下架'
}
return statusMap[status]
}

View File

@@ -78,6 +78,7 @@ export default {
background: #f5f5f5;
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
overflow-y: scroll;
}
.fixed-header+.app-main {

View File

@@ -25,7 +25,6 @@ import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
export default {
components: { SidebarItem, Logo },
computed: {

View File

@@ -69,6 +69,16 @@ const maintainRouter = {
icon: 'clipboard'
},
hidden: false
},
{
path: 'authCRMEB',
name: 'authCRMEB',
component: () => import('@/views/maintain/authCRMEB'),
meta: {
title: '授权',
icon: 'clipboard'
},
hidden: false
}
]
}

View File

@@ -46,7 +46,7 @@ const marketingRouter = {
path: 'record',
component: () => import('@/views/marketing/coupon/record/index'),
name: 'Record',
meta: { title: '会员领取记录', icon: '' }
meta: { title: '领取记录', icon: '' }
}
]
},

View File

@@ -35,7 +35,7 @@ const storeRouter = {
meta: { title: '商品评论', icon: '' }
},
{
path: 'list/creatProduct/:id?',
path: 'list/creatProduct/:id?/:isDisabled?',
component: () => import('@/views/store/creatStore/index'),
name: 'SortCreat',
meta: { title: '商品添加', noCache: true, activeMenu: `/store/index` },

View File

@@ -89,6 +89,15 @@
justify-content: space-around;
-webkit-justify-content: space-around;
}
//登录页动画
.index_bg {
width: 100%;
height: 100vh;
background: rgba(0, 0, 0, .6) !important;
z-index: 0 !important;
}
.divBox{
padding: 20px;
box-sizing: border-box;

View File

@@ -85,11 +85,11 @@ export function setDomain(url) {
url = url ? url.toString() : '';
// 正则替换存在的转义符
url = url.replace(/\\/g,'');
url = url.replace('http://','https://');
url = window.location.protocol==='https:'? url.replace('http://','https://') : url;
if(url.startsWith('src="')){
url = url.replaceAll('src="','');
}
if(url.startsWith('//img')){
if(url.startsWith('//img') && window.location.protocol==='https:'){
url = url.replace('//img','https://img');
}
return url;

View File

@@ -6,7 +6,7 @@ import SettingMer from '@/utils/settingMer'
import { isPhone } from "@/libs/wechat";
const service = axios.create({
baseURL: SettingMer.apiBaseURL,
timeout: 20000 // 过期时间
timeout: 60000 // 过期时间
})
// request interceptor

View File

@@ -78,11 +78,11 @@
<el-form-item label="appid" prop="appid">
<el-input v-model="formValidate.appid" placeholder="请填写appid" class="spwidth" />
</el-form-item>
<el-form-item label="备用网页" prop="pagepath">
<el-input v-model="formValidate.pagepath" placeholder="请填写备用网页" class="spwidth" />
<el-form-item label="备用网页" prop="url">
<el-input v-model="formValidate.url" placeholder="请填写备用网页" class="spwidth" />
</el-form-item>
<el-form-item label="小程序路径" prop="url">
<el-input v-model="formValidate.url" placeholder="请填写小程序路径" class="spwidth" />
<el-form-item label="小程序路径" prop="pagepath">
<el-input v-model="formValidate.pagepath" placeholder="请填写小程序路径" class="spwidth" />
</el-form-item>
</div>
<div v-if="formValidate.type === 'view'">
@@ -144,7 +144,7 @@
{ required: true, message: '请填写appid', trigger: 'blur' }
],
pagepath: [
{ required: true, message: '请填写备用网页', trigger: 'blur' }
{ required: true, message: '请填写小程序路径', trigger: 'blur' }
],
url: [
{ required: true, message: '请填写跳转地址', trigger: 'blur' }

View File

@@ -24,7 +24,7 @@
<el-col v-bind="grid" class="ivu-mb">
<el-card :bordered="false" dis-hover :padding="12">
<div slot="header" class="acea-row row-between-wrapper">
<span>用户访问</span>
<span>用户访问</span>
<el-tag type="success">昨日</el-tag>
</div>
<div class="content" v-if="views">

View File

@@ -17,7 +17,7 @@
<el-form-item prop="storeBrokerageStatus">
<span slot="label">
<span>分销模式</span>
<el-tooltip class="item" effect="dark" content="人人分销”默认每个人都可以分销,“指定分销”仅可后台手动设置推广员,“满额分销”指用户购买商品满足消费金额后自动开启分销" placement="top-start">
<el-tooltip class="item" effect="dark" content="人人分销”默认每个人都可以分销,“指定分销”仅可后台手动设置推广员" placement="top-start">
<i class="el-icon-warning-outline" />
</el-tooltip>
</span>

View File

@@ -53,43 +53,50 @@
<el-table-column
sortable
prop="spreadCount"
label="推广用户数量"
min-width="120"
label="推广用户(一级)数量"
:sort-method="(a,b)=>{return a.spreadCount - b.spreadCount}"
min-width="150"
/>
<el-table-column
sortable
label="推广订单数量"
prop="spreadOrderNum"
:sort-method="(a,b)=>{return a.spreadOrderNum - b.spreadOrderNum}"
min-width="120"
/>
<el-table-column
sortable
label="推广订单金额"
min-width="120"
:sort-method="(a,b)=>{return a.spreadOrderTotalPrice - b.spreadOrderTotalPrice}"
prop="spreadOrderTotalPrice"
/>
<el-table-column
sortable
label="佣金总金额"
min-width="120"
:sort-method="(a,b)=>{return a.totalBrokeragePrice - b.totalBrokeragePrice}"
prop="totalBrokeragePrice"
/>
<el-table-column
sortable
label="已提现金额"
min-width="120"
:sort-method="(a,b)=>{return a.extractCountPrice - b.extractCountPrice}"
prop="extractCountPrice"
/>
<el-table-column
sortable
label="已提现次数"
min-width="120"
:sort-method="(a,b)=>{return a.extractCountNum - b.extractCountNum}"
prop="extractCountNum"
/>
<el-table-column
sortable
label="未提现金额"
min-width="120"
:sort-method="(a,b)=>{return a.brokeragePrice - b.brokeragePrice}"
prop="brokeragePrice"
/>
<el-table-column
@@ -209,11 +216,11 @@
min-width="120"
prop="payCount"
/>
<el-table-column
prop="spreadTime"
label="关注时间"
min-width="150"
/>
<!--<el-table-column-->
<!--prop="spreadTime"-->
<!--label="关注时间"-->
<!--min-width="150"-->
<!--/>-->
</el-table>
<el-table
v-if="onName === 'order'"
@@ -239,7 +246,7 @@
</template>
</el-table-column>
<el-table-column
prop="createTime"
prop="updateTime"
label="时间"
min-width="150"
/>
@@ -247,7 +254,7 @@
sortable
label="返佣金额"
min-width="120"
prop="deductionPrice"
prop="price"
/>
</el-table>
<div class="block">
@@ -322,8 +329,8 @@
this.cardLists = [
{ name: '分销人员人数', count: res.distributionNum },
{ name: '发展会员人数', count: res.developNum },
{ name: '订单总数', count: res.orderNum },
{ name: '订单金额(元)', count: res.orderPriceCount },
{ name: '推广总数', count: res.orderNum },
{ name: '推广金额(元)', count: res.orderPriceCount },
{ name: '提现次数', count: res.withdrawCount }
]
})
@@ -423,7 +430,7 @@
this.tableFrom.page = 1
this.timeVal = []
this.spreadStatistics()
// this.getList()
this.getList()
},
// 具体日期
onchangeTime(e) {

View File

@@ -59,7 +59,7 @@
:default-sort = "{prop: 'brokerage', order: 'descending'}"
prop="brokerage"
label="账户佣金"
min-width="200"
min-width="100"
/>
<el-table-column
sortable

View File

@@ -3,7 +3,7 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form size="small" label-width="100px" inline>
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
@@ -17,8 +17,13 @@
<!--<el-radio-button label="0">未支付</el-radio-button>-->
<!--</el-radio-group>-->
<!--</el-form-item>-->
<el-form-item label="关键字:" class="width100">
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/姓名/订单号" class="selWidth" size="small" clearable>
<el-form-item label="用户id">
<el-input v-model="tableFrom.uid" placeholder="用户id" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
<el-form-item label="订单号:">
<el-input v-model="tableFrom.keywords" placeholder="订单号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
@@ -35,8 +40,8 @@
highlight-current-row
>
<el-table-column
prop="id"
label="ID"
prop="uid"
label="UID"
width="60"
/>
<el-table-column
@@ -156,7 +161,8 @@
},
listLoading: true,
tableFrom: {
paid: '',
uid: '',
// paid: '',
dateLimit: '',
keywords: '',
page: 1,

View File

@@ -92,6 +92,7 @@
<script>
import { validUsername } from '@/utils/validate'
import "@/assets/js/canvas-nest.min.js";
import { getLoginPicApi, captchaApi, codeCheckApi } from '@/api/user'
import { getStoreStaff } from '@/libs/public'
import { getWXCodeByUrl, loginByWxCode } from "@/libs/wechat";
@@ -191,6 +192,15 @@ export default {
},
mounted() {
this.getInfo()
this.$nextTick(() => {
if (this.screenWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
});
if (this.loginForm.account === '') {
this.$refs.account.focus()
} else if (this.loginForm.pwd === '') {
@@ -199,11 +209,23 @@ export default {
this.getCaptcha()
this.agentWeiXinLogin()
},
beforeCreate() {
if (this.fullWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
},
destroyed() {
// window.removeEventListener('storage', this.afterQRScan)
},
beforeDestroy: function() {
window.removeEventListener('resize', this.handleResize)
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
},
methods: {
agentWeiXinLogin(){ // 判断是否需要微信公众号登陆
@@ -237,6 +259,13 @@ export default {
},
handleResize(event) {
this.fullWidth = document.body.clientWidth
if (this.fullWidth < 768) {
document
.getElementsByTagName("canvas")[0]
.removeAttribute("class", "index_bg");
} else {
document.getElementsByTagName("canvas")[0].className = "index_bg";
}
},
getInfo() {
getLoginPicApi().then(res => {

View File

@@ -0,0 +1,11 @@
import iHeaderI18n from '@/layouts/basic-layout/header-i18n'
import { mapState } from 'vuex'
export default {
components: { iHeaderI18n },
computed: {
...mapState('admin/layout', [
'showI18n'
])
}
}

View File

@@ -0,0 +1,24 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div class="acea-row row-center-wrapper">
<el-button type="primary" @click="onClick">申请授权</el-button>
</div>
</el-card>
</div>
</template>
<script>
export default {
name: "index",
methods:{
onClick() {
window.open('http://crmeb.com/web/auth/apply')
}
}
}
</script>
<style scoped>
</style>

View File

@@ -218,9 +218,6 @@
<el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item>
<el-form-item label="商品规则:">
<ueditor-from v-model="formValidate.rule" :content="formValidate.rule" />
</el-form-item>
</div>
<el-form-item style="margin-top:30px;">
<el-button
@@ -300,8 +297,7 @@
startTime: '',
stopTime: '',
timeVal: [],
status: 0,
rule: ''
status: 0
}
const objTitle = {
price: {
@@ -565,8 +561,7 @@
status: 0,
num : 1,
bargainNum : 2,
peopleNum : 1,
rule : ''
peopleNum : 1
}
if(res.specType){
res.attrValues.forEach((row) => {
@@ -614,8 +609,7 @@
status: res.status,
num : res.num,
bargainNum : res.bargainNum,
peopleNum : res.peopleNum,
rule : res.rule
peopleNum : res.peopleNum
}
if(res.specType){
this.ManyAttrValue = res.attrValues;

View File

@@ -108,12 +108,13 @@
/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="130" fixed="right">
<el-table-column label="操作" min-width="180" fixed="right">
<template slot-scope="scope">
<el-button type="text" class="mr10" size="small" @click="receive(scope.row)">领取记录</el-button>
<router-link :to=" { path: '/marketing/coupon/list/save/' + scope.row.id } ">
<el-button v-if="scope.row.status" type="text" size="small">复制</el-button>
<el-button v-if="scope.row.status" type="text" size="small" class="mr10">复制</el-button>
</router-link>
<el-button type="text" class="mr10" size="small" @click="handleDelMenu(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -179,7 +180,7 @@
</template>
<script>
import { marketingListApi, couponIssueStatusApi, couponUserListApi } from '@/api/marketing'
import { marketingListApi, couponIssueStatusApi, couponUserListApi, couponDeleteApi } from '@/api/marketing'
import { roterPre } from '@/settings'
export default {
name: 'CouponList',
@@ -274,7 +275,15 @@
}).catch(()=>{
row.status = !row.status
})
}
},
handleDelMenu(rowData) {
this.$confirm('确定删除当前数据?').then(() => {
couponDeleteApi({id: rowData.id}).then(data => {
this.$message.success('删除成功')
this.getList()
})
})
},
}
}
</script>

View File

@@ -13,7 +13,7 @@
</el-form-item>
<el-form-item label="领取人:">
<el-select v-model="tableFromIssue.uid" class="selWidth" reserve-keyword 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"

View File

@@ -15,15 +15,9 @@
@change="onchangeTime"/>
</el-form-item>
<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">
<el-option
v-for="item in options"
:key="item.uid"
:label="item.nickname"
:value="item.uid">
</el-option>
</el-select>
<el-input v-model="tableFrom.keywords" placeholder="请输入用户微信昵称" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
</el-form>
</div>
@@ -58,8 +52,8 @@
sortable
label="明细数字"
min-width="120"
prop="number"
:sort-method="(a,b)=>{return a.number - b.number}"
prop="integral"
:sort-method="(a,b)=>{return a.integral - b.integral}"
/>
<el-table-column
label="备注"
@@ -72,7 +66,7 @@
prop="nickName"
/>
<el-table-column
prop="createTime"
prop="updateTime"
label=" 添加时间"
min-width="150"
/>
@@ -94,7 +88,6 @@
<script>
import { integralListApi } from '@/api/marketing'
import { userListApi } from '@/api/user'
import cardsData from '@/components/cards/index'
export default {
components: { cardsData },
@@ -111,9 +104,8 @@
tableFrom: {
page: 1,
limit: 20,
category: 'integral',
dateLimit: '',
userIdList: []
keywords: ''
},
userIdList: [],
userList: [],
@@ -126,19 +118,6 @@
// this.getUserList()
},
methods: {
remoteMethod(query) {
if (query !== '') {
this.loading = true;
setTimeout(() => {
this.loading = false;
userListApi({keywords: query, page: 1, limit: 10}).then(res => {
this.options = res.list
})
}, 200);
} else {
this.options = [];
}
},
seachList() {
this.tableFrom.page = 1
this.getList()

View File

@@ -3,13 +3,10 @@
<div class="priceChange" :class="change === true ? 'on' : ''">
<div class="priceTitle">
{{
status === 0 || status === 2
? orderInfo.refundStatus === 1
? "立即退款"
: "一键改价"
: "订单备注"
status === 0 || status === 2 ? orderInfo.refundStatus === 1 ? "立即退款" : "一键改价" : status === 1?"订单备注":"拒绝原因"
}}
<span class="iconfont icon-guanbi" @click="close"></span>
<i class="el-icon-circle-close iconfonts" @click="close"></i>
<!--<span class="iconfont icon-guanbi" @click="close"></span>-->
</div>
<div class="listChange" v-if="status === 0 || status === 2">
<div
@@ -68,6 +65,12 @@
</div>
</div>
</div>
<div class="listChange" v-else-if="status === 3">
<textarea
placeholder="请填写退款原因"
v-model="reason" maxlength="100"
></textarea>
</div>
<div class="listChange" v-else>
<textarea
:placeholder="
@@ -77,11 +80,11 @@
></textarea>
</div>
<div class="modify" @click="save">
{{ orderInfo.refundStatus === 0 || status === 1 ? "立即修改" : "确认退款" }}
</div>
<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">
拒绝退款
{{ orderInfo.refundStatus === 0 || status === 1 || status === 3 ? "立即提交" : "确认退款" }}
</div>
<!--<div class="modify1" @click="refuse" v-if="orderInfo.refundStatus === 1 && status === 2">-->
<!--拒绝退款-->
<!--</div>-->
</div>
<div class="maskModel" @touchmove.prevent v-show="change === true"></div>
</div>
@@ -109,7 +112,8 @@
focus: false,
price: 0,
refundPrice: 0,
remark: ""
remark: "",
reason: ''
};
},
watch: {
@@ -131,14 +135,17 @@
this.$emit("closechange", false);
},
save() {
this.savePrice({
price: this.price,
refundPrice: this.refundPrice,
type: 1,
remark: this.remark,
id: this.orderInfo.id,
orderId: this.orderInfo.orderId
})
if(this.status === 3) {
this.refuse();
}else{
this.savePrice({
price: this.price,
refundPrice: this.refundPrice,
type: 1,
remark: this.remark,
orderId: this.orderInfo.orderId
})
}
},
async savePrice(opt) {
let that = this,
@@ -159,7 +166,7 @@
return validatorDefaultCatch(e);
}
data.price = price;
data.orderId = opt.orderId;
data.orderNo = opt.orderId;
editPriceApi(data).then(() => {
// that.change = false;
this.$emit("closechange", false);
@@ -182,7 +189,7 @@
}
data.amount = refundPrice;
data.type = opt.type;
data.orderId = opt.id;
data.orderNo = opt.orderId;
orderRefundApi(data).then(
res => {
this.$emit("closechange", false);
@@ -205,7 +212,7 @@
return validatorDefaultCatch(e);
}
data.mark = remark;
data.id = opt.id;
data.orderNo = opt.orderId;
orderMarkApi(data).then(
res => {
this.$emit("closechange", false);
@@ -222,9 +229,16 @@
);
}
},
refuse: function () {
let that = this;
that.$emit("getRefuse", this.orderInfo.id);
async refuse() {
let reason= this.reason;
try {
await this.$validator({
reason: [required(required.message("备注"))]
}).validate({reason});
} catch (e) {
return validatorDefaultCatch(e);
}
this.$emit("getRefuse", this.orderInfo.orderId, reason);
}
}
};
@@ -235,7 +249,7 @@
transform: scale(0);opacity:0;}
.priceChange.on{opacity:1;transform: scale(1);-webkit-transform:scale(1);-o-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);}
.priceChange .priceTitle{background:url("../../../assets/imgs/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:1.6rem;border-radius:0.1rem 0.1rem 0 0;text-align:center;font-size:0.4rem;color:#fff;line-height:1.6rem;position:relative;}
.priceChange .priceTitle .iconfont{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;}
.priceChange .priceTitle .iconfonts{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;}
.priceChange .listChange{padding:0 0.4rem;}
.priceChange .listChange .item{height:1.03rem;border-bottom:1px solid #e3e3e3;font-size:0.32rem;color:#333;}
.priceChange .listChange .item .money{color:#666;width:3rem;text-align:right;}

View File

@@ -1,7 +1,7 @@
<template>
<div v-show="iShidden === false">
<div class="WriteOff">
<div class="pictrue"><img :src="orderInfo.storeOrderInfoVos[0].info.productInfo.image" /></div>
<div class="pictrue"><img :src="orderInfo.storeOrderInfoVos[0].info.image" /></div>
<div class="num acea-row row-center-wrapper">
{{ orderInfo.orderId }}
<div class="views" @click="toDetail(orderInfo)">
@@ -37,7 +37,7 @@ export default {
methods: {
toDetail: function(item) {
this.$router.push({
path: "/javaMobile/orderDetail/" + item.id + "/looks"
path: "/javaMobile/orderDetail/" + item.orderId + "/looks"
});
},
cancel: function() {

View File

@@ -4,7 +4,7 @@
<div class="order-num acea-row row-between-wrapper">
<div class="num line1">订单号{{ orderId }}</div>
<div class="name line1">
<span class="iconfont icon-yonghu2"></span>{{ delivery.user.nickname }}
<span class="iconfont icon-yonghu2"></span>{{ delivery.nickname }}
</div>
</div>
<div class="address">
@@ -34,10 +34,10 @@
<div class="list" v-show="active === 0">
<div class="item acea-row row-between-wrapper">
<div>发货方式</div>
<select class="mode" v-model="expressId">
<select class="mode" v-model="expressCode">
<option value="">选择快递公司</option>
<option
:value="item.id"
:value="item.code"
v-for="(item, index) in express"
:key="index"
>{{ item.name }}</option
@@ -50,7 +50,7 @@
<input
type="text"
placeholder="填写快递单号"
v-model="expressCode"
v-model="expressNumber"
class="mode"
/>
</div>
@@ -61,7 +61,7 @@
<input
type="text"
placeholder="填写送货人"
v-model="expressId"
v-model="deliveryName"
class="mode"
/>
</div>
@@ -70,7 +70,7 @@
<input
type="text"
placeholder="填写送货电话"
v-model="expressCode"
v-model="deliveryTel"
class="mode"
/>
</div>
@@ -111,8 +111,10 @@ export default {
delivery: {},
express: [],
type: "1",
expressId: "",
expressCode: ""
deliveryName: "",
expressCode: "",
expressNumber: '',
deliveryTel: ""
};
},
watch: {
@@ -133,14 +135,16 @@ export default {
this.getLogistics();
},
methods: {
changeType: function(item, index) {
changeType(item, index) {
this.active = index;
this.type = item.type;
this.expressId = "";
this.deliveryName = "";
this.deliveryTel = "";
this.expressCode = "";
this.expressNumber = "";
},
getIndex() {
orderDetailApi({ id: this.$route.params.id }).then(res => {
orderDetailApi({ orderNo: this.orderId }).then(res => {
this.delivery = res
}).catch((error)=>{
this.$dialog.error(error.message);
@@ -152,14 +156,29 @@ export default {
})
},
async saveInfo() {
// type: '1',
// expressRecordType: '1',
// expressId: '',
// expressCode: '',
// deliveryName: '',
// deliveryTel: '',
// // expressName: '',
// expressNumber: '',
// expressTempId: '',
// toAddr: '',
// toName: '',
// toTel: '',
// orderNo: ''
let that = this,
type = that.type,
expressId = that.expressId,
expressCode = that.expressCode,
deliveryName = that.deliveryName,
deliveryTel = that.deliveryTel,
save = {};
save.id = that.$route.params.id;
save.type = that.type;
switch (type) {
save.orderNo = that.orderId;
switch (that.type) {
case "1":
// try {
// await this.$validator({
@@ -169,24 +188,24 @@ export default {
// } catch (e) {
// return validatorDefaultCatch(e);
// }
if( !that.expressId ) return that.$dialog.error('请输入快递公司');
if( !that.expressCode ) return that.$dialog.error('请输入快递单号');
save.expressId = expressId;
save.expressCode = expressCode;
save.id = this.$route.params.id;
if( !that.expressCode ) return that.$dialog.error('请输入快递公司');
if( !that.expressNumber ) return that.$dialog.error('请输入快递单号');
save.expressNumber = that.expressNumber;
save.expressRecordType = 1;
save.expressCode = that.expressCode;
that.setInfo(save);
break;
case "2":
try {
await this.$validator({
expressId: [required(required.message("发货人姓名"))],
expressCode: [required(required.message("发货人电话"))]
}).validate({ expressId, expressCode });
deliveryName: [required(required.message("发货人姓名"))],
deliveryTel: [required(required.message("发货人电话"))]
}).validate({ deliveryName, deliveryTel });
} catch (e) {
return validatorDefaultCatch(e);
}
save.expressId = expressId;
save.expressCode = expressCode;
save.deliveryName = deliveryName;
save.deliveryTel = deliveryTel;
that.setInfo(save);
break;
case "3":

View File

@@ -43,19 +43,19 @@
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="item.info.productInfo.image"/>
<img :src="item.info.image"/>
</div>
<div class="text">
<div class="info line2">
{{ item.info.productInfo.storeName }}
{{ item.info.productName }}
</div>
<div class="attr">{{ item.info.productInfo.attrInfo.suk }}</div>
<div class="attr">{{ item.info.sku }}</div>
</div>
</div>
<div class="money">
<div class="x-money">{{ item.info.productInfo.price }}</div>
<div class="num">x{{ item.info.cartNum }}</div>
<div class="y-money">{{ item.info.productInfo.otPrice }}</div>
<div class="x-money">{{ item.info.price }}</div>
<div class="num">x{{ item.info.payNum }}</div>
<!--<div class="y-money">{{ item.info.price }}</div>-->
</div>
</div>
</div>
@@ -249,7 +249,7 @@ export default {
},
getIndex: function() {
let that = this;
orderDetailApi({id: this.$route.params.id}).then(
orderDetailApi({orderNo: this.$route.params.id}).then(
res => {
that.orderInfo = res;
that.types = res.statusStr.key;

View File

@@ -63,20 +63,20 @@
>
<div class="picTxt acea-row row-between-wrapper">
<div class="pictrue">
<img :src="val.info.productInfo.image" />
<img :src="val.info.image" />
</div>
<div class="text ">
<div class="info line2">
{{ val.info.productInfo.storeName }}
{{ val.info.productName }}
</div>
<div class="attr" v-if="val.info.productInfo.attrInfo.suk">
{{ val.info.productInfo.attrInfo.suk }}
<div class="attr" v-if="val.info.sku">
{{ val.info.sku }}
</div>
</div>
</div>
<div class="money">
<div class="x-money">{{ val.info.productInfo.attrInfo.price }}</div>
<div class="num">x{{ val.info.cartNum }}</div>
<div class="x-money">{{ val.info.price }}</div>
<div class="num">x{{ val.info.payNum }}</div>
<div class="y-money">
<!--{{ val.info.productInfo.attrInfo.otPrice }}-->
</div>
@@ -113,6 +113,13 @@
>
立即退款
</div>
<div
class="bnt"
@click="modify(item, 3)"
v-if="where.status === 'refunding' && item.refundStatus === 1"
>
拒绝退款
</div>
<!--<div-->
<!--class="bnt cancel"-->
<!--v-if="item.pay_type === 'offline' && item.paid === 0"-->
@@ -147,6 +154,7 @@
:orderInfo="orderInfo"
v-on:closechange="changeclose($event)"
:status="status"
@getRefuse="getRefuse"
></PriceChange>
</div>
</template>
@@ -220,13 +228,13 @@
this.init()
},
// 拒绝退款
getRefuse(id) {
orderRefuseApi(data).then(() =>{
that.change = false;
that.$dialog.success("已拒绝退款");
that.init();
getRefuse(id, reason) {
orderRefuseApi({ orderNo: id, reason: reason}).then(() =>{
this.change = false;
this.$dialog.success("已拒绝退款");
this.init();
}).catch((error) => {
that.$dialog.error(error.message);
this.$dialog.error(error.message);
});
},
async savePrice(opt) {
@@ -247,7 +255,7 @@
return validatorDefaultCatch(e);
}
data.price = price;
data.orderId = opt.orderId;
data.orderNo = opt.orderId;
editPriceApi(data).then(() =>{
that.change = false;
that.$dialog.success("改价成功");
@@ -268,7 +276,7 @@
}
data.amount = refundPrice;
data.type = opt.type;
data.orderId = opt.orderId;
data.orderNo = opt.orderId;
orderRefundApi(data).then(
res => {
that.change = false;
@@ -289,7 +297,7 @@
return validatorDefaultCatch(e);
}
data.mark = remark;
data.id = opt.id;
data.orderNo = opt.orderId;
orderMarkApi(data).then(
res => {
that.change = false;
@@ -317,8 +325,8 @@
orderListApi(this.where).then(
res => {
this.loading = false;
this.loaded = res.list.list.length < this.where.limit;
this.list.push.apply(this.list, res.list.list);
this.loaded = res.list.length < this.where.limit;
this.list.push.apply(this.list, res.list);
this.where.page = this.where.page + 1;
},
err => {
@@ -333,7 +341,7 @@
}
},
toDetail(item) {
this.$router.push({ path: "/javaMobile/orderDetail/" + item.id });
this.$router.push({ path: "/javaMobile/orderDetail/" + item.orderId });
},
offlinePay(item) {
// setOfflinePay({ order_id: item.order_id }).then(

View File

@@ -31,8 +31,18 @@
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @change="onchangeTime" />
</el-form-item>
<el-form-item label="订单类型:" class="width100">
<el-select v-model="tableFrom.type" placeholder="请选择" class="selWidth" @change="seachList">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号:" class="width100">
<el-input v-model="tableFrom.orderId" placeholder="请输入订单号" class="selWidth" size="small" clearable>
<el-input v-model="tableFrom.orderNo" placeholder="请输入订单号" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
@@ -49,27 +59,27 @@
highlight-current-row
@selection-change="handleSelectionChange"
>
<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.totalPrice }}</span>
</el-form-item>
<el-form-item label="推广人:">
<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>
</el-form-item>
<el-form-item label="用户备注:">
<span>{{ props.row.mark }}</span>
</el-form-item>
<el-form-item label="商家备注:">
<span>{{ props.row.remark }}</span>
</el-form-item>
<el-form-item label="核销码:" v-if="props.row.shippingType === 2">
<span>{{ props.row.verifyCode }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<!--<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.totalPrice | filterEmpty }}</span>-->
<!--</el-form-item>-->
<!--<el-form-item label="推广人:">-->
<!--<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>-->
<!--</el-form-item>-->
<!--<el-form-item label="用户备注:">-->
<!--<span>{{ props.row.mark | filterEmpty }}</span>-->
<!--</el-form-item>-->
<!--<el-form-item label="商家备注:">-->
<!--<span>{{ props.row.remark | filterEmpty }}</span>-->
<!--</el-form-item>-->
<!--<el-form-item label="核销码:" v-if="props.row.verifyCode">-->
<!--<span>{{ props.row.verifyCode }}</span>-->
<!--</el-form-item>-->
<!--</el-form>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column
type="selection"
width="55"
@@ -102,13 +112,13 @@
<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 mr10">
<el-image
:src="val.info.productInfo.image"
:preview-src-list="[val.info.productInfo.image]"
:src="val.info.image"
:preview-src-list="[val.info.image]"
/>
</div>
<div>
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.sku ? val.info.sku:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
</div>
</div>
</div>
@@ -162,15 +172,15 @@
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.paid === false" type="text" size="small" @click="edit(scope.row)" class="mr10">编辑</el-button>
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.shippingType === 1 && scope.row.refundStatus !==2" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button>
<el-button v-if="scope.row.shippingType === 2 && scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.refundStatus ===0" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button>
<el-button v-if=" scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
<el-dropdown trigger="click">
<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="onOrderDetails(scope.row.id)">订单详情</el-dropdown-item>
<el-dropdown-item @click.native="onOrderLog(scope.row.id)">订单记录</el-dropdown-item>
<el-dropdown-item @click.native="onOrderDetails(scope.row.orderId)">订单详情</el-dropdown-item>
<el-dropdown-item @click.native="onOrderLog(scope.row.orderId)">订单记录</el-dropdown-item>
<el-dropdown-item @click.native="onOrderMark(scope.row)">订单备注</el-dropdown-item>
<el-dropdown-item v-show="scope.row.refundStatus === 1" @click.native="onOrderRefuse(scope.row)">拒绝退款</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)"-->
@@ -259,6 +269,9 @@
<!-- 发送货 -->
<order-send ref="send" :orderId="orderId" @submitFail="getList"></order-send>
<!-- 发送货视频号商品 -->
<order-video-send ref="videoSend" :orderId="orderId" @submitFail="getList"></order-video-send>
<!--拒绝退款-->
<el-dialog
title="拒绝退款原因"
@@ -274,7 +287,7 @@
/>
</el-dialog>
<!--立即拒绝-->
<!--立即退款-->
<el-dialog
title="退款处理"
:visible.sync="refundVisible"
@@ -293,11 +306,12 @@
</template>
<script>
import { writeUpdateApi, orderListApi, orderUpdateApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi } from '@/api/order'
import { orderListDataApi, orderStatusNumApi, writeUpdateApi, orderListApi, orderUpdateApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi } from '@/api/order'
import cardsData from '@/components/cards/index'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
import detailsFrom from './orderDetail'
import orderSend from './orderSend'
import orderVideoSend from './orderVideoSend'
import { storeStaffListApi } from '@/api/storePoint'
import Cookies from 'js-cookie'
import { isWriteOff } from "@/utils";
@@ -307,13 +321,21 @@
cardsData,
zbParser,
detailsFrom,
orderSend
orderSend,
orderVideoSend
},
data() {
return {
options: [{
value: 0,
label: '商城订单'
}, {
value: 1,
label: '视频号订单'
}],
RefuseVisible: false,
RefuseData:{},
orderId: 0,
orderId: '',
refundVisible: false,
refundData: {},
dialogVisibleJI: false,
@@ -324,7 +346,7 @@
tableFromLog: {
page: 1,
limit: 10,
oid: null
orderNo: 0
},
LogLoading: false,
isCreate: 1,
@@ -338,9 +360,10 @@
tableFrom: {
status: 'all',
dateLimit: '',
orderId: '',
orderNo: '',
page: 1,
limit: 20
limit: 20,
type: ''
},
orderChartType: {},
timeVal: [],
@@ -349,11 +372,14 @@
ids: '',
orderids: '',
cardLists: [],
isWriteOff: isWriteOff()
isWriteOff: isWriteOff(),
proType: 0
}
},
mounted() {
this.getList()
this.getList();
this.getOrderStatusNum();
this.getOrderListData();
},
methods: {
resetFormRefundhandler(){
@@ -384,7 +410,7 @@
this.RefuseVisible = false
},
onOrderRefuse(row) {
this.orderids = row.id
this.orderids = row.orderId
this.RefuseData = {
orderId: row.orderId,
reason: ''
@@ -392,7 +418,7 @@
this.RefuseVisible = true
},
RefusehandlerSubmit(formValue) {
orderRefuseApi({ id: this.orderids, reason: formValue.reason}).then(data => {
orderRefuseApi({ orderNo: this.orderids, reason: formValue.reason}).then(data => {
this.$message.success('操作成功')
this.RefuseVisible = false
this.getList()
@@ -408,11 +434,11 @@
amount: row.payPrice,
type: ''
}
this.orderids = row.id
this.orderids = row.orderId
this.refundVisible = true
},
refundhandlerSubmit(formValue) {
orderRefundApi({ amount: formValue.amount, orderId: this.orderids, type: formValue.type}).then(data => {
orderRefundApi({ amount: formValue.amount, orderNo: this.orderids}).then(data => {
this.$message.success('操作成功')
this.refundVisible = false
this.getList()
@@ -420,16 +446,21 @@
},
// 发送
sendOrder(row) {
this.$refs.send.modals = true;
this.$refs.send.getList();
this.$refs.send.sheetInfo();
this.orderId = row.id;
if(row.type===0){
this.$refs.send.modals = true;
this.$refs.send.getList();
this.$refs.send.sheetInfo();
}else{
this.$refs.videoSend.modals = true;
if(!JSON.parse(sessionStorage.getItem('videoExpress'))) this.$refs.videoSend.companyGetList();
}
this.orderId = row.orderId;
},
// 订单删除
handleDelete(row, idx) {
if (row.isDel) {
this.$modalSure().then(() => {
orderDeleteApi({ id: row.id }).then(() => {
orderDeleteApi({ orderNo: row.orderId }).then(() => {
this.$message.success('删除成功')
this.tableData.data.splice(idx, 1)
})
@@ -451,7 +482,7 @@
onOrderLog(id) {
this.dialogVisibleJI = true
this.LogLoading = true
this.tableFromLog.oid = id
this.tableFromLog.orderNo = id
orderLogApi( this.tableFromLog ).then(res => {
this.tableDataLog.data = res.list
this.tableDataLog.total = res.total
@@ -462,11 +493,11 @@
},
pageChangeLog(page) {
this.tableFromLog.page = page
this.getList()
this.onOrderLog()
},
handleSizeChangeLog(val) {
this.tableFromLog.limit = val
this.getList()
this.onOrderLog()
},
handleClose() {
this.dialogVisible = false
@@ -482,7 +513,7 @@
inputPlaceholder: '请输入订单备注',
inputValidator: (value) => { if(!value) return '输入不能为空'}
}).then(({value}) => {
orderMarkApi({ mark : value, id: row.id}).then(() => {
orderMarkApi({ mark : value, orderNo: row.orderId}).then(() => {
this.$message.success('操作成功')
this.getList();
})
@@ -503,6 +534,8 @@
this.timeVal = [];
this.tableFrom.page = 1
this.getList();
this.getOrderStatusNum();
this.getOrderListData();
},
// 具体日期
onchangeTime (e) {
@@ -510,6 +543,8 @@
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
this.tableFrom.page = 1
this.getList();
this.getOrderStatusNum();
this.getOrderListData();
},
// 编辑
edit(row) {
@@ -535,21 +570,30 @@
getList() {
this.listLoading = true
orderListApi(this.tableFrom).then(res => {
this.tableData.data = res.list.list || []
this.tableData.total = res.list.total
this.orderChartType = res.status
const stat = res.top
this.cardLists = [
{ name: '订单数量', count: stat.count },
{ name: '订单金额', count: stat.amount },
{ name: '微信支付金额', count: stat.weChatAmount },
{ name: '余额支付金额', count: stat.yueAmount }
]
this.tableData.data = res.list || [];
this.tableData.total = res.total;
this.listLoading = false
}).catch(() => {
this.listLoading = false
})
},
// 数据统计
getOrderListData() {
orderListDataApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
this.cardLists = [
{ name: '订单数量', count: res.count },
{ name: '订单金额', count: res.amount },
{ name: '微信支付金额', count: res.weChatAmount },
{ name: '余额支付金额', count: res.yueAmount }
]
});
},
// 获取各状态数量
getOrderStatusNum() {
orderStatusNumApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
this.orderChartType = res;
});
},
pageChange(page) {
this.tableFrom.page = page
this.getList()

View File

@@ -9,8 +9,8 @@
<div class="description" v-loading="loading">
<div class="title">用户信息</div>
<div class="acea-row">
<div class="description-term">用户昵称{{orderDatalist.user?orderDatalist.user.nickname:orderDatalist.realName}}</div>
<div class="description-term">绑定电话{{orderDatalist.user.phone ? orderDatalist.user.phone : '无'}}</div>
<div class="description-term">用户昵称{{orderDatalist.realName}}</div>
<div class="description-term">绑定电话{{orderDatalist.phone ? orderDatalist.phone : '无'}}</div>
</div>
<el-divider></el-divider>
<div class="title">{{orderDatalist.statusStr.key === 'toBeWrittenOff'?'提货信息': '收货信息'}}</div>
@@ -25,8 +25,8 @@
<div class="description-term">订单编号{{orderDatalist.orderId}}</div>
<div class="description-term" style="color: red">订单状态{{orderDatalist.statusStr.value}}</div>
<div class="description-term">商品总数{{orderDatalist.totalNum}}</div>
<div class="description-term">商品总价{{orderDatalist.totalPrice}}</div>
<div class="description-term">付邮费{{orderDatalist.payPostage}}</div>
<div class="description-term">商品总价{{orderDatalist.proTotalPrice}}</div>
<div class="description-term">付邮费{{orderDatalist.payPostage}}</div>
<div class="description-term">优惠券金额{{orderDatalist.couponPrice}}</div>
<div class="description-term">实际支付{{orderDatalist.payPrice}}</div>
<div class="description-term fontColor3" v-if="orderDatalist.refundPrice">退款金额{{orderDatalist.refundPrice}}</div>
@@ -34,7 +34,7 @@
<div class="description-term" v-if="orderDatalist.backIntegral">退回积分{{orderDatalist.backIntegral}}</div>
<div class="description-term">创建时间{{orderDatalist.createTime}}</div>
<div class="description-term">支付方式{{orderDatalist.payTypeStr}}</div>
<div class="description-term">推广人{{orderDatalist.spreadInfo.id + ' / ' +orderDatalist.spreadInfo.name}}</div>
<div class="description-term">推广人{{orderDatalist.spreadName | filterEmpty}}</div>
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">门店名称{{orderDatalist.storeName}}</div>
<div class="description-term" v-if="orderDatalist.shippingType === 2 && orderDatalist.statusStr.key === 'notShipped'">核销码{{orderDatalist.user_phone}}</div>
<div class="description-term">商家备注{{orderDatalist.remark}}</div>
@@ -106,7 +106,7 @@ export default {
name: 'OrderDetail',
props: {
orderId: {
type: Number,
type: String,
default: 0
}
},
@@ -129,13 +129,13 @@ export default {
},
// 获取订单物流信息
getOrderData () {
getLogisticsInfoApi({id:this.orderId}).then(async res => {
getLogisticsInfoApi({orderNo:this.orderId}).then(async res => {
this.result = res.list;
})
},
getDetail(id) {
this.loading = true
orderDetailApi({id: id}).then(res => {
orderDetailApi({orderNo: id}).then(res => {
this.orderDatalist = res
this.loading = false
}).catch(() => {

View File

@@ -91,7 +91,7 @@
export default {
name: 'orderSend',
props: {
orderId: Number
orderId: String
},
data() {
return {
@@ -100,7 +100,6 @@
expressRecordType: '1',
expressId: '',
expressCode: '',
id: '',
deliveryName: '',
deliveryTel: '',
// expressName: '',
@@ -109,6 +108,7 @@
toAddr: '',
toName: '',
toTel: '',
orderNo: ''
},
modals: false,
express: [],
@@ -192,7 +192,7 @@
},
// 提交
putSend(name) {
this.formItem.id = this.orderId
this.formItem.orderNo = this.orderId;
this.$refs[name].validate((valid) => {
if (valid) {
orderSendApi(this.formItem).then(async => {

View File

@@ -0,0 +1,120 @@
<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="快递公司:" prop="expressCode">
<el-select v-model="formItem.deliveryId" filterable style="width:80%;">
<el-option v-for="(item,i) in express" :value="item.deliveryId" :key="i" :label="item.deliveryName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="快递单号:" prop="waybillId">
<el-input v-model="formItem.waybillId" placeholder="请输入快递单号" style="width:80%;"></el-input>
</el-form-item>
</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 {videoSendApi, sheetInfoApi, companyGetListApi} from '@/api/order'
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: String
},
data() {
return {
formItem: {
deliveryId: '',
orderNo: '',
waybillId: ''
},
modals: false,
express: [],
exportTempList: [],
tempImg: '',
rules: {
deliveryId: [
{required: true, message: '请选择快递公司', trigger: 'change'}
],
waybillId: [
{required: true, message: '请输入快递单号', trigger: 'blur'}
]
},
expressType: 'normal'
}
},
mounted() {
this.express = JSON.parse(sessionStorage.getItem('videoExpress'));
},
methods: {
// 视频号快递公司
companyGetList() {
companyGetListApi().then(async res => {
this.express = res;
sessionStorage.setItem('videoExpress', JSON.stringify(res))
})
},
// 提交
putSend(name) {
this.formItem.orderNo = this.orderId;
this.$refs[name].validate((valid) => {
if (valid) {
videoSendApi(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">
.width8 {
width: 80%;
}
.width9 {
width: 70%;
}
.tempImgList {
// opacity: 1;
width: 38px !important;
height: 30px !important;
// margin-top: -30px;
cursor: pointer;
position: absolute;
z-index: 11;
img {
width: 38px !important;
height: 30px !important;
}
}
</style>

View File

@@ -38,11 +38,19 @@
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;"
@click="handleSubmit('formInline')">登录
</el-button>
<div class="acea-row row-center-wrapper">
<div class="acea-row row-center-wrapper mb20">
<el-button size="mini" type="text" style="margin-left: 0" @click="changePassword">忘记密码</el-button>
<el-divider direction="vertical"></el-divider>
<el-button size="mini" type="text" style="margin-left: 0" @click="changeReg">注册账户</el-button>
</div>
<el-tooltip class="item" effect="dark" content="
一号通为我司一个第三方平台
专门提供短信 物流查询,商品复制,电子面单等个性化服务
省去了自己单独接入功能的麻烦
初次运行代码默认是没有账号的,需要自行注册,
登录成功后根据提示购买自己需要用到的服务即可" placement="bottom">
<span style="margin-left: 0">平台说明</span>
</el-tooltip>
</el-form>
</el-col>
</el-row>

View File

@@ -11,6 +11,15 @@
<span class="mr10" @click="onChangePassswordIndex">修改密码</span>
<span class="mr10" @click="onChangePhone">修改手机号</span>
<span @click="signOut" class="mr10">退出登录</span>
<el-tooltip class="item" effect="dark" content="
一号通为我司一个第三方平台
专门提供短信 物流查询,商品复制,电子面单等个性化服务
省去了自己单独接入功能的麻烦
初次运行代码默认是没有账号的,需要自行注册,
登录成功后根据提示购买自己需要用到的服务即可" placement="right">
<span class="mr10">平台说明</span>
</el-tooltip>
</div>
</div>
</div>

View File

@@ -51,7 +51,7 @@
>
<div class="list-goods-list-item-title" :class="{active:index === current}">¥ <i>{{ item.price }}</i></div>
<div class="list-goods-list-item-price" :class="{active:index === current}">
<span>短信条数: {{ item.num }}</span>
<span>{{tableFrom.type | onePassTypeFilter}}条数: {{ item.num }}</span>
</div>
</div>
</el-col>

View File

@@ -6,7 +6,7 @@
<el-step title="商品信息" />
<el-step title="商品详情" />
<el-step title="其他设置" />
<el-step title="规格设置" />
<!--<el-step title="规格设置" />-->
</el-steps>
</div>
<el-form ref="formValidate" v-loading="fullscreenLoading" class="formValidate mt20" :rules="ruleValidate" :model="formValidate" label-width="120px" @submit.native.prevent>
@@ -14,32 +14,32 @@
<!-- 商品信息-->
<el-col v-bind="grid2">
<el-form-item label="商品名称:" prop="storeName">
<el-input v-model="formValidate.storeName" maxlength="249" placeholder="请输入商品名称" />
<el-input v-model="formValidate.storeName" maxlength="249" placeholder="请输入商品名称" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="商品分类:" prop="cateIds">
<el-cascader v-model="formValidate.cateIds" :options="merCateList" :props="props2" clearable class="selWidth" :show-all-levels="false" />
<el-cascader v-model="formValidate.cateIds" :options="merCateList" :props="props2" clearable class="selWidth" :show-all-levels="false" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="商品关键字:">
<el-input v-model="formValidate.keyword" placeholder="请输入商品关键字" />
<el-input v-model="formValidate.keyword" placeholder="请输入商品关键字" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="单位:" prop="unitName">
<el-input v-model="formValidate.unitName" placeholder="请输入单位" />
<el-input v-model="formValidate.unitName" placeholder="请输入单位" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="商品简介:">
<el-input v-model="formValidate.storeInfo" type="textarea" maxlength="250" :rows="3" placeholder="请输入商品简介" />
<el-input v-model="formValidate.storeInfo" type="textarea" maxlength="250" :rows="3" placeholder="请输入商品简介" :disabled="isDisabled"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="商品封面图:" prop="image">
<div class="upLoadPicBox" @click="modalPicTap('1')">
<div class="upLoadPicBox" @click="modalPicTap('1')" :disabled="isDisabled">
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
<div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont" />
@@ -61,9 +61,9 @@
@dragend="handleDragEnd($event, item)"
>
<img :src="item">
<i class="el-icon-error btndel" @click="handleRemove(index)" />
<i v-if="!isDisabled" class="el-icon-error btndel" @click="handleRemove(index)" />
</div>
<div v-if="formValidate.sliderImages.length<10" class="upLoadPicBox" @click="modalPicTap('2')">
<div v-if="formValidate.sliderImages.length<10 && !isDisabled" class="upLoadPicBox" @click="modalPicTap('2')">
<div class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
@@ -74,7 +74,7 @@
<el-col :span="24">
<el-form-item label="运费模板:" prop="tempId">
<div class="acea-row">
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidthd mr20">
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidthd mr20" :disabled="isDisabled">
<el-option
v-for="item in shippingList"
:key="item.id"
@@ -82,97 +82,26 @@
:value="item.id"
/>
</el-select>
<el-button class="mr15" @click="addTem">添加运费模板</el-button>
<el-button v-show="!isDisabled" class="mr15" @click="addTem">添加运费模板</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="优惠券:" class="proCoupon">
<div class="acea-row">
<el-tag
v-for="(tag, index) in formValidate.coupons"
:key="index"
class="mr10 mb10"
closable
:disable-transitions="false"
@close="handleCloseCoupon(tag)"
>
{{ tag.name }}
</el-tag>
<el-button class="mr15" size="mini" @click="addCoupon">选择优惠券</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<!-- 商品详情-->
<el-row v-show="currentTab === 1">
<el-col :span="24">
<el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item>
</el-col>
</el-row>
<!-- 其他设置-->
<el-row v-show="currentTab === 2">
<el-col :span="24">
<el-col v-bind="grid">
<el-form-item label="排序:">
<el-input-number v-model="formValidate.sort" :max="9999" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="积分:">
<el-input-number v-model="formValidate.giveIntegral" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="虚拟销量:">
<el-input-number v-model="formValidate.ficti" placeholder="请输入排序" />
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-form-item label="商品推荐:">
<el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup">
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动优先级:">
<div class="color-list acea-row row-middle">
<div
class="color-item" :class="activity[item]"
v-for="item in formValidate.activity"
:key="item"
draggable="true"
@dragstart="handleDragStart($event, item)"
@dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnterFont($event, item)"
@dragend="handleDragEnd($event, item)"
>{{item}}</div>
<div class="tip">可拖动按钮调整活动的优先展示顺序</div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentTab === 3">
<el-col :span="24">
<el-form-item label="商品规格:" props="specType">
<el-radio-group v-model="formValidate.specType" @change="onChangeSpec(formValidate.specType)">
<el-radio-group v-model="formValidate.specType" @change="onChangeSpec(formValidate.specType)" :disabled="isDisabled">
<el-radio :label="false" class="radio">单规格</el-radio>
<el-radio :label="true">多规格</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="佣金设置:" props="isSub">
<el-radio-group v-model="formValidate.isSub" @change="onChangetype(formValidate.isSub)">
<el-radio-group v-model="formValidate.isSub" @change="onChangetype(formValidate.isSub)" :disabled="isDisabled">
<el-radio :label="true" class="radio">单独设置</el-radio>
<el-radio :label="false">默认设置</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- 多规格添加-->
<el-col v-if="formValidate.specType" :span="24" class="noForm">
<el-col v-if="formValidate.specType && !isDisabled" :span="24" class="noForm">
<el-form-item label="选择规格:" prop="">
<div class="acea-row">
<el-select v-model="formValidate.selectRule">
@@ -233,7 +162,7 @@
</el-form-item>
</el-col>
<!-- 批量设置-->
<el-col v-if="formValidate.attr.length>0 && formValidate.specType" :span="24" class="noForm">
<el-col v-if="formValidate.attr.length>0 && formValidate.specType && !isDisabled" :span="24" class="noForm">
<el-form-item label="批量设置:" class="labeltop">
<el-table :data="oneFormBatch" border class="tabNumWidth" size="mini">
<el-table-column align="center" label="图片" min-width="80">
@@ -287,30 +216,30 @@
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" />
<el-input :disabled="isDisabled" v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" />
</template>
</el-table-column>
<template v-if="formValidate.isSub">
<el-table-column align="center" label="一级返佣(元)" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" />
<el-input :disabled="isDisabled" v-model="scope.row.brokerage" type="number" :min="0" class="priceBox" />
</template>
</el-table-column>
<el-table-column align="center" label="二级返佣(元)" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" />
<el-input :disabled="isDisabled" v-model="scope.row.brokerageTwo" type="number" :min="0" class="priceBox" />
</template>
</el-table-column>
</template>
</el-table>
</el-form-item>
<!-- 多规格表格-->
<el-form-item v-if="formValidate.attr.length>0 && formValidate.specType" label="商品属性:" class="labeltop">
<el-form-item v-if="formValidate.attr.length>0 && formValidate.specType" label="商品属性:" class="labeltop" :class="isDisabled?'disLabel':'disLabelmoren'">
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
<template v-if="manyTabDate">
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="80">
<template slot-scope="scope">
<span class="priceBox" v-text="scope.row[iii]" />
<span class="priceBox" v-text="scope.row[iii]"/>
</template>
</el-table-column>
</template>
@@ -326,20 +255,20 @@
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />
<el-input :disabled="isDisabled" v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />
</template>
</el-table-column>
<el-table-column align="center" label="一级返佣(元)" min-width="120" v-if="formValidate.isSub">
<template slot-scope="scope">
<el-input v-model="scope.row.brokerage" type="number" :min="0" :max="scope.row.price" class="priceBox" />
<el-input :disabled="isDisabled" v-model="scope.row.brokerage" type="number" :min="0" :max="scope.row.price" class="priceBox" />
</template>
</el-table-column>
<el-table-column align="center" label="二级返佣(元)" min-width="120" v-if="formValidate.isSub">
<template slot-scope="scope">
<el-input v-model="scope.row.brokerageTwo" type="number" :min="0" :max="scope.row.price" class="priceBox" />
<el-input :disabled="isDisabled" v-model="scope.row.brokerageTwo" type="number" :min="0" :max="scope.row.price" class="priceBox" />
</template>
</el-table-column>
<el-table-column key="3" align="center" label="操作" min-width="80">
<el-table-column v-if="!isDisabled" key="3" align="center" label="操作" min-width="80">
<template slot-scope="scope">
<el-button type="text" class="submission" @click="delAttrTable(scope.$index)">删除</el-button>
</template>
@@ -348,10 +277,89 @@
</el-form-item>
</el-col>
</el-row>
<!-- 商品详情-->
<el-row v-show="currentTab === 1 && !isDisabled">
<el-col :span="24">
<el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentTab === 1 && isDisabled">
<el-col :span="24">
<el-form-item label="商品详情:">
<span v-html="formValidate.content || '无'"></span>
</el-form-item>
</el-col>
</el-row>
<!-- 其他设置-->
<el-row v-show="currentTab === 2">
<el-col :span="24">
<el-col v-bind="grid">
<el-form-item label="排序:">
<el-input-number v-model="formValidate.sort" :max="9999" placeholder="请输入排序" :disabled="isDisabled" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="积分:">
<el-input-number v-model="formValidate.giveIntegral" placeholder="请输入排序" :disabled="isDisabled" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-form-item label="虚拟销量:">
<el-input-number v-model="formValidate.ficti" placeholder="请输入排序" :disabled="isDisabled" />
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-form-item label="商品推荐:">
<el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup" :disabled="isDisabled">
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动优先级:">
<div class="color-list acea-row row-middle">
<div
:disabled="isDisabled"
class="color-item" :class="activity[item]"
v-for="item in formValidate.activity"
:key="item"
draggable="true"
@dragstart="handleDragStart($event, item)"
@dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnterFont($event, item)"
@dragend="handleDragEnd($event, item)"
>{{item}}</div>
<div class="tip">可拖动按钮调整活动的优先展示顺序</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="优惠券:" class="proCoupon">
<div class="acea-row">
<el-tag
v-if="!isDisabled"
v-for="(tag, index) in formValidate.coupons"
:key="index"
class="mr10 mb10"
:closable="!isDisabled"
:disable-transitions="false"
@close="handleCloseCoupon(tag)"
>
{{ tag.name }}
</el-tag>
<span v-if="isDisabled"></span>
<el-button v-if="!isDisabled" class="mr15" size="mini" @click="addCoupon">选择优惠券</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-button v-show="currentTab>0" type="primary" class="submission" @click="handleSubmitUp">上一步</el-button>
<el-button v-show="currentTab<3" type="primary" class="submission" @click="handleSubmitNest('formValidate')">下一步</el-button>
<el-button v-show="currentTab===3 || $route.params.id" type="primary" class="submission" @click="handleSubmit('formValidate')">提交</el-button>
<el-button v-show="currentTab<2" type="primary" class="submission" @click="handleSubmitNest('formValidate')">下一步</el-button>
<el-button v-show="(currentTab===2 || $route.params.id) && !isDisabled" type="primary" class="submission" @click="handleSubmit('formValidate')">提交</el-button>
</el-form-item>
</el-form>
</el-card>
@@ -434,6 +442,7 @@
components: {Templates, CreatTemplates },
data() {
return {
isDisabled: this.$route.params.isDisabled==='1'?true:false,
activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' },
props2: {
children: 'child',
@@ -581,7 +590,7 @@
}, '')
},
setTagsViewTitle() {
const title = '编辑商品'
const title = this.isDisabled?'商品详情':'编辑商品'
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
this.$store.dispatch('tagsView/updateVisitedView', route)
},
@@ -804,6 +813,7 @@
this.isBtn = false
},
clearAttr() {
this.isAttr = true
this.formDynamic.attrsName = ''
this.formDynamic.attrsVal = ''
},
@@ -860,7 +870,7 @@
getInfo () {
this.fullscreenLoading = true
productDetailApi(this.$route.params.id).then(async res => {
this.isAttr = false;
this.isAttr = true;
let info = res
this.formValidate = {
image: this.$selfUtil.setDomain(info.image),
@@ -896,7 +906,7 @@
let imgss = []
Object.keys(imgs).map(i => {
imgss.push(this.$selfUtil.setDomain(imgs[i]))
})
})
this.formValidate.sliderImages = [ ...imgss ]
if(info.isHot) this.checkboxGroup.push('isHot')
if(info.isGood) this.checkboxGroup.push('isGood')
@@ -940,7 +950,8 @@
},
// 点击商品图
modalPicTap (tit, num, i) {
const _this = this
const _this = this;
if(_this.isDisabled) return;
this.$modalUpload(function(img) {
if(tit==='1'&& !num){
_this.formValidate.image = img[0].sattDir
@@ -1032,40 +1043,55 @@
},
// 移动
handleDragStart (e, item) {
this.dragging = item;
if(!this.isDisabled) this.dragging = item;
},
handleDragEnd (e, item) {
this.dragging = null
if(!this.isDisabled) this.dragging = null
},
handleDragOver (e) {
e.dataTransfer.dropEffect = 'move'
if(!this.isDisabled) e.dataTransfer.dropEffect = 'move'
},
handleDragEnter (e, item) {
e.dataTransfer.effectAllowed = 'move'
if (item === this.dragging) {
return
if(!this.isDisabled){
e.dataTransfer.effectAllowed = 'move'
if (item === this.dragging) {
return
}
const newItems = [...this.formValidate.sliderImages]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.sliderImages = newItems;
}
const newItems = [...this.formValidate.sliderImages]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.sliderImages = newItems;
},
handleDragEnterFont(e, item) {
e.dataTransfer.effectAllowed = 'move'
if (item === this.dragging) {
return
if(!this.isDisabled){
e.dataTransfer.effectAllowed = 'move'
if (item === this.dragging) {
return
}
const newItems = [...this.formValidate.activity]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.activity = newItems;
}
const newItems = [...this.formValidate.activity]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.activity = newItems;
}
}
}
</script>
<style scoped lang="scss">
.disLabel{
/deep/.el-form-item__label{
margin-left: 36px !important;
}
}
.disLabelmoren{
/deep/.el-form-item__label{
margin-left: 120px !important;
}
}
.color-item{
height: 30px;
line-height: 30px;
@@ -1167,7 +1193,6 @@
/deep/.el-form-item__label{
float: none !important;
display: inline-block !important;
margin-left: 120px !important;
width: auto !important;
}
}

View File

@@ -118,8 +118,11 @@
</el-table-column>
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<router-link :to="{path: '/store/list/creatProduct/' + scope.row.id + '/1'}">
<el-button type="text" size="small" class="mr10">详情</el-button>
</router-link>
<router-link :to="{path: '/store/list/creatProduct/' + scope.row.id}">
<el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5'">编辑</el-button>
<el-button type="text" size="small" class="mr10" v-if="tableFrom.type !== '5' && tableFrom.type !== '1'">编辑</el-button>
</router-link>
<el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)">恢复商品</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.id, tableFrom.type)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button>
@@ -221,9 +224,8 @@ export default {
// 导出
exports () {
productExcelApi({cateId:this.tableFrom.cateId,keywords: this.tableFrom.keywords, type:this.tableFrom.type}).then((res) => {
window.open(res.fileName)
window.location.href = res.fileName;
})
// window.open(this.objectUrl + 'admin/export/excel/product?type=1&Authori-zation=' + getToken())
},
// 获取商品表单头数量
goodHeade () {

View File

@@ -3,7 +3,7 @@
<el-card>
<div>生成的商品默认是没有上架的请手动上架商品
<span v-if="copyConfig.copyType && copyConfig.copyType==1">您当前剩余{{copyConfig.copyNum}}条采集次数
<router-link :to="{path:'/operation/onePass'}">
<router-link :to="{path:'/operation/systemSms/pay?type=copy'}">
<el-link type="primary" :underline="false">增加采集次数</el-link>
</router-link>
</span>
@@ -145,7 +145,7 @@
</el-col>
<el-col :span="24">
<el-form-item label="商品规格:" props="spec_type" label-for="spec_type">
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
<el-table :data="formValidate.attrValue" border class="tabNumWidth" size="mini">
<template v-if="manyTabDate">
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center"
:label="manyTabTit[iii].title" min-width="80">
@@ -156,19 +156,24 @@
</template>
<el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope">
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
<div v-if="scope.row.image" class="pictrue pictrueTab"><img :src="scope.row.image"></div>
<div v-else class="upLoad pictrueTab">
<i class="el-icon-camera cameraIconfont"/>
<el-form-item :rules="[{required: true, message: '请上传图片', trigger: 'change'}]" :prop="'attrValue.'+scope.$index+'.image'">
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
<div v-if="scope.row.image" class="pictrue pictrueTab"><img :src="scope.row.image"></div>
<div v-else class="upLoad pictrueTab">
<i class="el-icon-camera cameraIconfont"/>
</div>
</div>
</div>
</el-form-item>
</template>
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title"
align="center" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'"
class="priceBox"/>
<el-form-item :rules="[{required: true, message: '请输入'+formThead[iii].title, trigger: 'blur'}]" :prop="formThead[iii].title!=='商品编号'?'attrValue.'+scope.$index+'.'+iii:''">
<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />
</el-form-item>
<!--<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'"-->
<!--class="priceBox"/>-->
</template>
</el-table-column>
<el-table-column align="center" label="操作" min-width="80">
@@ -216,8 +221,8 @@
otPrice: null,
stock: null,
barCode: '',
weight: null,
volume: null
weight: 0,
volume: 0
}]
const objTitle = {
price: {
@@ -287,6 +292,9 @@
],
keyword: [
{required: true, message: '请输入商品关键字', trigger: 'blur'}
],
attrValue: [
{ required: true, message: '请上传商品轮播图', type: 'array', trigger: 'change' }
]
},
grid: {
@@ -330,7 +338,7 @@
methods: {
// 删除表格中的属性
delAttrTable(index) {
this.ManyAttrValue.splice(index, 1)
this.formValidate.attrValue.splice(index, 1)
},
getCopyConfig() {
copyConfigApi().then(res => {
@@ -341,7 +349,7 @@
batchAdd() {
// if (!this.oneFormBatch[0].pic || !this.oneFormBatch[0].price || !this.oneFormBatch[0].cost || !this.oneFormBatch[0].ot_price ||
// !this.oneFormBatch[0].stock || !this.oneFormBatch[0].bar_code) return this.$Message.warning('请填写完整的批量设置内容!');
for (const val of this.ManyAttrValue) {
for (const val of this.formValidate.attrValue) {
this.$set(val, 'image', this.oneFormBatch[0].image)
this.$set(val, 'price', this.oneFormBatch[0].price)
this.$set(val, 'cost', this.oneFormBatch[0].cost)
@@ -359,7 +367,7 @@
tmp['value' + i] = {title: o.attrName}
tmpTab['value' + i] = ''
})
this.ManyAttrValue = this.attrFormat(val)
this.formValidate.attrValue = this.attrFormat(val)
this.manyTabTit = tmp
this.manyTabDate = tmpTab
this.formThead = Object.assign({}, this.formThead, tmp)
@@ -555,7 +563,7 @@
},
// 提交
handleSubmit(name) {
this.formValidate.attr.length ? this.formValidate.attrValue = this.ManyAttrValue : this.formValidate.attrValue = []
// this.formValidate.attr.length ? this.formValidate.attrValue = this.ManyAttrValue : this.formValidate.attrValue = []
this.formValidate.cateId = this.formValidate.cateIds.join(',')
this.formValidate.sliderImage = JSON.stringify(this.formValidate.sliderImages)
for (var i = 0; i < this.formValidate.attr.length; i++) {
@@ -598,7 +606,7 @@
_this.OneattrValue[0].image = img[0].sattDir
}
if (tit === '1' && num === 'duo') {
_this.ManyAttrValue[i].image = img[0].sattDir
_this.this.formValidate.attrValue[i].image = img[0].sattDir
}
if (tit === '1' && num === 'pi') {
_this.oneFormBatch[0].image = img[0].sattDir
@@ -633,6 +641,11 @@
</script>
<style scoped lang="scss">
.formValidate{
/deep/ .el-form-item__error{
position: static !important;
}
}
.selWidth {
width: 100%;
}

View File

@@ -64,12 +64,12 @@
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">
<div class="demo-image__preview">
<el-image
:src="val.info.productInfo.image"
:preview-src-list="[val.info.productInfo.image]"
:src="val.info.image"
:preview-src-list="[val.info.image]"
/>
</div>
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.suk ? val.info.suk:'-' }}</span>
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
</div>
</div>
</template>

View File

@@ -15,7 +15,7 @@
<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-input-number v-model.number="formValidate.experience" placeholder="请输入经验" :max="999999" step-strictly></el-input-number>
</el-form-item>
<el-form-item label="图标" prop="icon">
<div class="upLoadPicBox" @click="modalPicTap('1', 'icon')">

View File

@@ -80,6 +80,7 @@
cancelButtonText: '取消',
inputErrorMessage: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
inputType: 'text',
closeOnClickModal: false,
inputValue: row ? (this.$route.path.indexOf('group') !== -1?row.groupName:row.name): '' ,
inputPlaceholder: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
inputValidator: (value) => { if(!value) return '输入不能为空'}

View File

@@ -3,25 +3,25 @@
<el-form-item label="用户编号:">
<el-input v-model="ruleForm.id" disabled class="selWidth"></el-input>
</el-form-item>
<el-form-item label="真实姓名:">
<el-input v-model="ruleForm.realName" class="selWidth"></el-input>
</el-form-item>
<el-form-item label="手机号码:" prop="phone">
<el-input v-model.number="ruleForm.phone" class="selWidth"></el-input>
</el-form-item>
<el-form-item label="生日:">
<el-date-picker
v-model="ruleForm.birthday"
type="date"
class="selWidth"
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="身份证号:">
<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>
</el-form-item>
<!--<el-form-item label="真实姓名:">-->
<!--<el-input v-model="ruleForm.realName" class="selWidth"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="手机号码:" prop="phone">-->
<!--<el-input v-model.number="ruleForm.phone" class="selWidth" readonly></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="生日:">-->
<!--<el-date-picker-->
<!--v-model="ruleForm.birthday"-->
<!--type="date"-->
<!--class="selWidth"-->
<!--placeholder="选择日期"-->
<!--format="yyyy 年 MM 月 dd 日"-->
<!--value-format="yyyy-MM-dd">-->
<!--</el-date-picker>-->
<!--</el-form-item>-->
<!--<el-form-item label="身份证号:">-->
<!--<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="用户地址:">
<el-input v-model="ruleForm.addres" class="selWidth"></el-input>
</el-form-item>
@@ -65,17 +65,17 @@
<script>
import { groupListApi, levelListApi, tagListApi, userInfoApi, userUpdateApi } from '@/api/user'
const defaultObj = {
birthday: '',
cardId: '',
// birthday: '',
// cardId: '',
id : null,
mark: '',
phone: '',
realName: '',
// phone: '',
// realName: '',
addres:'',
groupId: '',
level: '',
isPromoter: false,
status: false,
status: false
}
export default {
name: "UserEdit",
@@ -107,12 +107,12 @@
userInfo () {
userInfoApi({ id: this.uid}).then(async res => {
this.ruleForm = {
birthday: res.birthday,
cardId: res.cardId,
// birthday: res.birthday,
// cardId: res.cardId,
id : res.uid,
mark: res.mark,
phone: res.phone,
realName: res.realName,
// phone: res.phone,
// realName: res.realName,
status: res.status,
addres: res.addres,
groupId: Number(res.groupId) || '',

View File

@@ -11,7 +11,7 @@
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
<el-col v-bind="grid">
<el-form-item label="用户搜索:">
<el-input v-model="userFrom.keywords" placeholder="请输入" clearable class="selWidth"/>
<el-input v-model="userFrom.keywords" placeholder="请输入姓名" clearable class="selWidth"/>
</el-form-item>
</el-col>
<!--<el-col :span="24">-->
@@ -115,12 +115,12 @@
<el-form-item label="消费情况:">
<el-select v-model="userFrom.payCount" placeholder="请选择" class="selWidth" clearable>
<el-option value="" label="全部"></el-option>
<el-option value="-1" label="0"></el-option>
<el-option value="0" label="1+"></el-option>
<el-option value="1" label="2+"></el-option>
<el-option value="2" label="3+"></el-option>
<el-option value="3" label="4+"></el-option>
<el-option value="4" label="5+"></el-option>
<el-option value="0" label="0"></el-option>
<el-option value="1" label="1+"></el-option>
<el-option value="2" label="2+"></el-option>
<el-option value="3" label="3+"></el-option>
<el-option value="4" label="4+"></el-option>
<el-option value="5" label="5+"></el-option>
</el-select>
</el-form-item>
</el-col>
@@ -189,21 +189,21 @@
<el-form-item label="近次访问:">
<span>{{ props.row.updateTime | filterEmpty }}</span>
</el-form-item>
<el-form-item label="身份证号:">
<span>{{ props.row.cardId | filterEmpty }}</span>
</el-form-item>
<!--<el-form-item label="身份证号:">-->
<!--<span>{{ props.row.cardId | filterEmpty }}</span>-->
<!--</el-form-item>-->
<el-form-item label="手机号:">
<span>{{ props.row.phone | filterEmpty }}</span>
</el-form-item>
<el-form-item label="真实姓名:">
<span>{{ props.row.realName | filterEmpty }}</span>
</el-form-item>
<!--<el-form-item label="真实姓名:">-->
<!--<span>{{ props.row.realName | filterEmpty }}</span>-->
<!--</el-form-item>-->
<el-form-item label="标签:">
<span>{{ props.row.tagName | filterEmpty }}</span>
</el-form-item>
<el-form-item label="生日:">
<span>{{ props.row.birthday | filterEmpty }}</span>
</el-form-item>
<!--<el-form-item label="生日:">-->
<!--<span>{{ props.row.birthday | filterEmpty }}</span>-->
<!--</el-form-item>-->
<el-form-item label="地址:">
<span>{{ props.row.addres | filterEmpty }}</span>
</el-form-item>
@@ -260,13 +260,21 @@
min-width="130"
/>
<el-table-column
label="用户类型"
label="手机号"
min-width="100"
>
<template slot-scope="scope">
<span>{{scope.row.userType | typeFilter}}</span>
<span>{{scope.row.phone | filterEmpty}}</span>
</template>
</el-table-column>
<!--<el-table-column-->
<!--label="用户类型"-->
<!--min-width="100"-->
<!--&gt;-->
<!--<template slot-scope="scope">-->
<!--<span>{{scope.row.userType | typeFilter}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column
prop="nowMoney"
label="余额"
@@ -289,6 +297,7 @@
<el-dropdown-item @click.native="editPoint(scope.row.uid)">积分余额</el-dropdown-item>
<el-dropdown-item @click.native="setBatch('group',scope.row)">设置分组</el-dropdown-item>
<el-dropdown-item @click.native="setBatch('label',scope.row)">设置标签</el-dropdown-item>
<el-dropdown-item @click.native="setPhone(scope.row)">修改手机号</el-dropdown-item>
<el-dropdown-item @click.native="setExtension(scope.row)">修改上级推广人</el-dropdown-item>
<el-dropdown-item @click.native="clearSpread(scope.row)" v-if="scope.row.spreadUid && scope.row.spreadUid>0">清除上级推广人</el-dropdown-item>
</el-dropdown-menu>
@@ -403,7 +412,7 @@
label="余额"
required
>
<el-input-number type="text" v-model="PointValidateForm.moneyValue" :max="999999"></el-input-number>
<el-input-number type="text" v-model="PointValidateForm.moneyValue" :precision="2" :step="0.1" :min="0" :max="999999"></el-input-number>
</el-form-item>
<el-form-item
label="修改积分"
@@ -418,7 +427,7 @@
label="积分"
required
>
<el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue" :max="999999"></el-input-number>
<el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue" :min="0" :max="999999"></el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -439,7 +448,7 @@
</template>
<script>
import { userListApi, groupListApi, levelListApi, tagListApi, groupPiApi, tagPiApi, foundsApi, updateSpreadApi } from '@/api/user'
import { userListApi, groupListApi, levelListApi, tagListApi, groupPiApi, tagPiApi, foundsApi, updateSpreadApi, updatePhoneApi } from '@/api/user'
import { spreadClearApi } from '@/api/distribution'
import editFrom from './edit'
import userDetails from './userDetails'
@@ -638,6 +647,29 @@
this.getCityList()
},
methods: {
setPhone(row) {
this.$prompt('修改手机号', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputErrorMessage: '请输入修改手机号',
inputType: 'text',
inputValue: row.phone,
inputPlaceholder: '请输入手机号',
closeOnClickModal: false,
inputValidator: (value) => {
if (!value) return '请填写手机号'
if (!/^1[3456789]\d{9}$/.test(value)) return '手机号格式不正确!'
// if(!value) return '输入不能为空'
}
}).then(({value}) => {
updatePhoneApi({id: row.uid,phone: value}).then(() => {
this.$message.success('编辑成功')
this.getList();
})
}).catch(() => {
this.$message.info('取消输入')
})
},
// 清除
clearSpread(row) {
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
@@ -735,7 +767,7 @@
_this.couponData.push(item.title)
})
_this.selectionList = []
},this.userIds)
},this.userIds,'user')
},
Close() {
this.Visible = false

View File

@@ -53,6 +53,7 @@
<script>
import { infobyconditionApi, topdetailApi } from '@/api/user'
import { integralListApi } from '@/api/marketing'
export default {
name: "UserDetails",
props:{
@@ -97,7 +98,48 @@
methods: {
changeType(key) {
this.tableFrom.type = key
this.getInfo()
if(key === '1'){
this.integral()
}else{
this.getInfo()
}
},
integral() {
this.loading = true
integralListApi({ limit:this.tableFrom.limit, page: this.tableFrom.page}, {uid:this.uid}).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120
},
{
title: '积分变化',
key: 'integral',
minWidth: 120
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120
},
{
title: '日期',
key: 'updateTime',
minWidth: 120
},
{
title: '备注',
key: 'mark',
minWidth: 120
}
]
this.loading = false
}).catch(res => {
this.loading = false
})
},
getInfo() {
this.tableFrom.userId = this.uid
@@ -140,35 +182,6 @@
}
]
break;
case '1':
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120
},
{
title: '积分变化',
key: 'number',
minWidth: 120
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120
},
{
title: '日期',
key: 'add_time',
minWidth: 120
},
{
title: '备注',
key: 'mark',
minWidth: 120
}
]
break;
case '2':
this.columns = [
{
@@ -217,7 +230,7 @@
},
{
title: '兑换时间',
key: 'useTime',
key: 'updateTime',
minWidth: 120
}
]