2024-1-8
This commit is contained in:
@@ -8,7 +8,7 @@ VUE_APP_BASE_API = '/api'
|
||||
# VUE_APP_URL = "http://jianguan.yyundong.com/shgfapi"
|
||||
|
||||
|
||||
VUE_APP_URL = "http://192.168.2.105:7201"
|
||||
VUE_APP_URL = "http://192.168.2.106:7201"
|
||||
VUE_APP_REPORT_URL = "http://192.168.2.106:7202"
|
||||
##VUE_APP_REPORT_URL = "https://lpk.yyundong.com"
|
||||
##VUE_APP_REPORT_URL = "https://supervise.yxtsoft.com/lpk"
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 导出提货卡报表
|
||||
// 导出企业卡报表
|
||||
empCardStatisticsListExport: function(data) {
|
||||
return request({
|
||||
url: '/empcard/empCardStatisticsListExport',
|
||||
@@ -53,4 +53,29 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
// 查询福利卡分页列表
|
||||
empCardGiftStatisticsList: function(params) {
|
||||
return request({
|
||||
url: '/empcardgift/empCardGiftStatisticsList',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出福礼卡报表
|
||||
empCardStatisticsListExport: function(data) {
|
||||
return request({
|
||||
url: '/empcard/empCardStatisticsListExport',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
@@ -36,6 +36,18 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// 修改商品是否属于小程序状态
|
||||
updateAppletUseTo: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/lpkgoods/appletUseTo/'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
|
||||
// 修改上架/下架状态
|
||||
updateIsEnable: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/lpkgoods/appletGrounding/'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -130,5 +130,43 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 小程序礼包
|
||||
// 获取礼包列表
|
||||
appletGiftBagListPage: function(data) {
|
||||
return request({
|
||||
url: '/appletgiftbag/giftBagListPage',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 修改小程序礼包上架/下架状态
|
||||
updateAppletgiftbagState: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/appletgiftbag/isGrounding//'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
|
||||
// 新增、保存礼包
|
||||
saveAppletGiftBag: function(data) {
|
||||
return request({
|
||||
url: '/appletgiftbag/saveGiftBag',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化礼包
|
||||
AppletGiftBagInit: function(data) {
|
||||
return request({
|
||||
url: '/lpkgiftbag/giftBagInit/'+data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,16 @@
|
||||
name: "/marketingCard",
|
||||
path: "/marketingCard",
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "index",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "小程序礼包设置",
|
||||
},
|
||||
name: "/marketingCard/applet",
|
||||
path: "/marketingCard/applet",
|
||||
},
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
@@ -75,7 +85,7 @@
|
||||
component: "pickupCardSet",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "提货卡设置",
|
||||
title: "个人卡设置",
|
||||
},
|
||||
name: "/marketingCard/pickupCardSet",
|
||||
path: "/marketingCard/pickupCardSet",
|
||||
@@ -122,18 +132,18 @@
|
||||
name: "/cardManage",
|
||||
path: "/cardManage",
|
||||
children: [
|
||||
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "person",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "提货卡统计",
|
||||
title: "个人卡统计",
|
||||
},
|
||||
name: "/cardManage/person",
|
||||
path: "/cardManage/person",
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "enterprise",
|
||||
@@ -143,6 +153,15 @@
|
||||
},
|
||||
name: "/cardManage/enterprise",
|
||||
path: "/cardManage/enterprise",
|
||||
}, {
|
||||
alwaysShow: true,
|
||||
component: "giftCard",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "福利卡统计",
|
||||
},
|
||||
name: "/cardManage/giftCard",
|
||||
path: "/cardManage/giftCard",
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -177,127 +196,127 @@
|
||||
path: "/commodity/index"
|
||||
},
|
||||
|
||||
{alwaysShow: true,
|
||||
component: "order",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "订单管理",
|
||||
},
|
||||
name: "/order",
|
||||
path: "/order",
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "index",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "订单统计",
|
||||
},
|
||||
name: "/order/index",
|
||||
path: "/order/index",
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "order",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "订单管理",
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "distributionCount",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "网点配货统计",
|
||||
name: "/order",
|
||||
path: "/order",
|
||||
children: [{
|
||||
alwaysShow: true,
|
||||
component: "index",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "订单统计",
|
||||
},
|
||||
name: "/order/index",
|
||||
path: "/order/index",
|
||||
},
|
||||
name: "/order/distributionCount",
|
||||
path: "/order/distributionCount",
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "subBranch",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "支行配货统计",
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "distributionCount",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "网点配货统计",
|
||||
},
|
||||
name: "/order/distributionCount",
|
||||
path: "/order/distributionCount",
|
||||
},
|
||||
name: "/order/subBranch",
|
||||
path: "/order/subBranch",
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "allDistributionCount",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "总配货统计",
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "subBranch",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "支行配货统计",
|
||||
},
|
||||
name: "/order/subBranch",
|
||||
path: "/order/subBranch",
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "allDistributionCount",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "总配货统计",
|
||||
},
|
||||
name: "/order/allDistributionCount",
|
||||
path: "/order/allDistributionCount",
|
||||
},
|
||||
name: "/order/allDistributionCount",
|
||||
path: "/order/allDistributionCount",
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "order",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "订单信息",
|
||||
// },
|
||||
// name: "/order/index",
|
||||
// path: "/order/index"
|
||||
// },
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "print",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "打印电子卡",
|
||||
]
|
||||
},
|
||||
name: "/print/index",
|
||||
path: "/print/index"
|
||||
}
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "statisticalReport",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "统计报表",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// children: [
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "index",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货卡汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "collectionSummary",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/collectionSummary",
|
||||
// path: "/statisticalReport/collectionSummary",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "deliveryDetails",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "客户提货明细",
|
||||
// },
|
||||
// name: "/statisticalReport/deliveryDetails",
|
||||
// path: "/statisticalReport/deliveryDetails",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "order",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "订单信息",
|
||||
// },
|
||||
// name: "/order/index",
|
||||
// path: "/order/index"
|
||||
// },
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "print",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "打印电子卡",
|
||||
},
|
||||
name: "/print/index",
|
||||
path: "/print/index"
|
||||
}
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "statisticalReport",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "统计报表",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// children: [
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "index",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货卡汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "collectionSummary",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/collectionSummary",
|
||||
// path: "/statisticalReport/collectionSummary",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "deliveryDetails",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "客户提货明细",
|
||||
// },
|
||||
// name: "/statisticalReport/deliveryDetails",
|
||||
// path: "/statisticalReport/deliveryDetails",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["sidebar"]),
|
||||
// routes() {
|
||||
// f4d2e507-c4ed-451c-b364-04c08f962045
|
||||
|
||||
@@ -9,294 +9,313 @@ import Layout from '@/layout'
|
||||
|
||||
import codemenu from './modules/codemenu'
|
||||
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: 'login'
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/login.vue'),
|
||||
name: 'login'
|
||||
export const constantRoutes = [{
|
||||
path: '/',
|
||||
redirect: 'login'
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/login.vue'),
|
||||
name: 'login'
|
||||
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// path: '/',
|
||||
// redirect: 'userInfo/index'
|
||||
// },
|
||||
// {
|
||||
// path: '/index',
|
||||
// component: () => import('@/views/userInfo/index.vue'),
|
||||
// name: 'index'
|
||||
|
||||
// },
|
||||
|
||||
{
|
||||
path: '/index',
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
children: [{
|
||||
path: '/index',
|
||||
component: () =>
|
||||
import('@/views/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '主页',
|
||||
noCache: true,
|
||||
affix: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: '/userInfo',
|
||||
component: Layout,
|
||||
redirect: null,
|
||||
meta: {
|
||||
title: '用户信息'
|
||||
},
|
||||
children: [{
|
||||
path: '/userInfo/index',
|
||||
component: () =>
|
||||
import('@/views/userInfo/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '用户信息列表'
|
||||
}
|
||||
},
|
||||
]
|
||||
}, {
|
||||
path: '/marketingCard',
|
||||
component: Layout,
|
||||
redirect: '/marketingCard/index',
|
||||
children: [{
|
||||
path: '/marketingCard/index',
|
||||
component: () => import('@/views/marketingCard/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '礼包设置',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: '/marketingCard/pickupCardSet',
|
||||
component: () => import('@/views/marketingCard/pickupCardSet.vue'),
|
||||
name: 'pickupCardSet',
|
||||
meta: {
|
||||
title: '提货卡设置',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/marketingCard/corporateCardSet',
|
||||
component: () => import('@/views/marketingCard/corporateCardSet.vue'),
|
||||
name: 'corporateCardSet',
|
||||
meta: {
|
||||
title: '企业卡设置',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: '/marketingCard/grantRecords',
|
||||
// component: () => import('@/views/marketingCard/grantRecords.vue'),
|
||||
// name: 'grantRecords',
|
||||
// meta: {
|
||||
// title: '发放记录',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/marketingCard/carList',
|
||||
// component: () => import('@/views/marketingCard/carList.vue'),
|
||||
// name: 'carList',
|
||||
// meta: {
|
||||
// title: '提货卡列表',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
]
|
||||
},{
|
||||
path: '/cardManage',
|
||||
component: Layout,
|
||||
redirect: '/cardManage/person',
|
||||
children: [{
|
||||
path: '/cardManage/person',
|
||||
component: () => import('@/views/cardManage/person.vue'),
|
||||
name: 'person',
|
||||
meta: {
|
||||
title: '提货卡统计',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: '/cardManage/enterprise',
|
||||
component: () => import('@/views/cardManage/enterprise.vue'),
|
||||
name: 'enterprise',
|
||||
meta: {
|
||||
title: '企业卡统计',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
]
|
||||
},{
|
||||
path: '/pickupPoint',
|
||||
component: Layout,
|
||||
redirect: '/pickupPoint/index',
|
||||
children: [{
|
||||
path: '/pickupPoint/index',
|
||||
component: () =>
|
||||
import('@/views/pickupPoint/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '提货点信息'
|
||||
}
|
||||
},]
|
||||
},
|
||||
{
|
||||
path: '/network',
|
||||
component: Layout,
|
||||
redirect: '/network/index',
|
||||
children: [{
|
||||
path: '/network/index',
|
||||
component: () =>
|
||||
import('@/views/network/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '支行管理'
|
||||
}
|
||||
},]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/commodity',
|
||||
component: Layout,
|
||||
redirect: '/commodity/index',
|
||||
children: [{
|
||||
path: '/commodity/index',
|
||||
component: () =>
|
||||
import('@/views/commodity/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '商品信息'
|
||||
}
|
||||
},]
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
component: Layout,
|
||||
redirect: '/order/index',
|
||||
children: [{
|
||||
path: '/order/index',
|
||||
component: () =>
|
||||
import('@/views/order/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '订单统计'
|
||||
}
|
||||
},{
|
||||
path: '/order/distributionCount',
|
||||
component: () =>
|
||||
import('@/views/order/distributionCount.vue'),
|
||||
name: 'distributionCount',
|
||||
meta: {
|
||||
title: '网点配货统计'
|
||||
}
|
||||
},{
|
||||
path: '/order/subBranch',
|
||||
component: () =>
|
||||
import('@/views/order/subBranch.vue'),
|
||||
name: 'subBranch',
|
||||
meta: {
|
||||
title: '支行配货统计'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/order/allDistributionCount',
|
||||
component: () =>
|
||||
import('@/views/order/allDistributionCount.vue'),
|
||||
name: 'allDistributionCount',
|
||||
meta: {
|
||||
title: '总配货统计'
|
||||
}
|
||||
}]
|
||||
},{
|
||||
path: '/statisticalReport',
|
||||
component: Layout,
|
||||
redirect: '/statisticalReport/index',
|
||||
children: [{
|
||||
path: '/statisticalReport/index',
|
||||
component: () => import('@/views/statisticalReport/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '提货卡汇总',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/statisticalReport/collectionSummary',
|
||||
component: () => import('@/views/statisticalReport/collectionSummary.vue'),
|
||||
name: 'collectionSummary',
|
||||
meta: {
|
||||
title: '提货汇总',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/statisticalReport/deliveryDetails',
|
||||
component: () => import('@/views/statisticalReport/deliveryDetails.vue'),
|
||||
name: 'deliveryDetails',
|
||||
meta: {
|
||||
title: '客户提货明细',
|
||||
noCache: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: '/print',
|
||||
component: Layout,
|
||||
redirect: '/print/index',
|
||||
children: [{
|
||||
path: '/print/index',
|
||||
component: () =>
|
||||
import('@/views/print/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '打印电子卡'
|
||||
}
|
||||
},]
|
||||
},
|
||||
|
||||
|
||||
...codemenu,
|
||||
{
|
||||
path: '/404',
|
||||
component: () =>
|
||||
import('@/views/404'),
|
||||
hidden: true
|
||||
}
|
||||
// 404 page must be placed at the end !!!
|
||||
// { path: '*', redirect: '/404', hidden: true }
|
||||
|
||||
// {
|
||||
// path: '/',
|
||||
// redirect: 'userInfo/index'
|
||||
// },
|
||||
// {
|
||||
// path: '/index',
|
||||
// component: () => import('@/views/userInfo/index.vue'),
|
||||
// name: 'index'
|
||||
|
||||
// },
|
||||
|
||||
{
|
||||
path: '/index',
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
children: [{
|
||||
path: '/index',
|
||||
component: () =>
|
||||
import('@/views/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '主页',
|
||||
noCache: true,
|
||||
affix: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
path: '/userInfo',
|
||||
component: Layout,
|
||||
redirect: null,
|
||||
meta: {
|
||||
title: '用户信息'
|
||||
},
|
||||
children: [{
|
||||
path: '/userInfo/index',
|
||||
component: () =>
|
||||
import('@/views/userInfo/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '用户信息列表'
|
||||
}
|
||||
}, ]
|
||||
}, {
|
||||
path: '/marketingCard',
|
||||
component: Layout,
|
||||
redirect: '/marketingCard/applet',
|
||||
children: [
|
||||
|
||||
{
|
||||
path: '/marketingCard/applet',
|
||||
component: () => import('@/views/marketingCard/applet.vue'),
|
||||
name: 'applet',
|
||||
meta: {
|
||||
title: '小程序礼包设置',
|
||||
noCache: true
|
||||
}
|
||||
}, {
|
||||
path: '/marketingCard/index',
|
||||
component: () => import('@/views/marketingCard/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '礼包设置',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: '/marketingCard/pickupCardSet',
|
||||
component: () => import('@/views/marketingCard/pickupCardSet.vue'),
|
||||
name: 'pickupCardSet',
|
||||
meta: {
|
||||
title: '个人卡设置',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/marketingCard/corporateCardSet',
|
||||
component: () => import('@/views/marketingCard/corporateCardSet.vue'),
|
||||
name: 'corporateCardSet',
|
||||
meta: {
|
||||
title: '企业卡设置',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: '/marketingCard/grantRecords',
|
||||
// component: () => import('@/views/marketingCard/grantRecords.vue'),
|
||||
// name: 'grantRecords',
|
||||
// meta: {
|
||||
// title: '发放记录',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/marketingCard/carList',
|
||||
// component: () => import('@/views/marketingCard/carList.vue'),
|
||||
// name: 'carList',
|
||||
// meta: {
|
||||
// title: '提货卡列表',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
]
|
||||
}, {
|
||||
path: '/cardManage',
|
||||
component: Layout,
|
||||
redirect: '/cardManage/person',
|
||||
children: [{
|
||||
path: '/cardManage/person',
|
||||
component: () => import('@/views/cardManage/person.vue'),
|
||||
name: 'person',
|
||||
meta: {
|
||||
title: '个人卡统计',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: '/cardManage/enterprise',
|
||||
component: () => import('@/views/cardManage/enterprise.vue'),
|
||||
name: 'enterprise',
|
||||
meta: {
|
||||
title: '企业卡统计',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/cardManage/giftCard',
|
||||
component: () => import('@/views/cardManage/giftCard.vue'),
|
||||
name: 'giftCard',
|
||||
meta: {
|
||||
title: '福利卡统计',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
]
|
||||
}, {
|
||||
path: '/pickupPoint',
|
||||
component: Layout,
|
||||
redirect: '/pickupPoint/index',
|
||||
children: [{
|
||||
path: '/pickupPoint/index',
|
||||
component: () =>
|
||||
import('@/views/pickupPoint/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '提货点信息'
|
||||
}
|
||||
}, ]
|
||||
},
|
||||
{
|
||||
path: '/network',
|
||||
component: Layout,
|
||||
redirect: '/network/index',
|
||||
children: [{
|
||||
path: '/network/index',
|
||||
component: () =>
|
||||
import('@/views/network/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '支行管理'
|
||||
}
|
||||
}, ]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/commodity',
|
||||
component: Layout,
|
||||
redirect: '/commodity/index',
|
||||
children: [{
|
||||
path: '/commodity/index',
|
||||
component: () =>
|
||||
import('@/views/commodity/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '商品信息'
|
||||
}
|
||||
}, ]
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
component: Layout,
|
||||
redirect: '/order/index',
|
||||
children: [{
|
||||
path: '/order/index',
|
||||
component: () =>
|
||||
import('@/views/order/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '订单统计'
|
||||
}
|
||||
}, {
|
||||
path: '/order/distributionCount',
|
||||
component: () =>
|
||||
import('@/views/order/distributionCount.vue'),
|
||||
name: 'distributionCount',
|
||||
meta: {
|
||||
title: '网点配货统计'
|
||||
}
|
||||
}, {
|
||||
path: '/order/subBranch',
|
||||
component: () =>
|
||||
import('@/views/order/subBranch.vue'),
|
||||
name: 'subBranch',
|
||||
meta: {
|
||||
title: '支行配货统计'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/order/allDistributionCount',
|
||||
component: () =>
|
||||
import('@/views/order/allDistributionCount.vue'),
|
||||
name: 'allDistributionCount',
|
||||
meta: {
|
||||
title: '总配货统计'
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/statisticalReport',
|
||||
component: Layout,
|
||||
redirect: '/statisticalReport/index',
|
||||
children: [{
|
||||
path: '/statisticalReport/index',
|
||||
component: () => import('@/views/statisticalReport/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '提货卡汇总',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/statisticalReport/collectionSummary',
|
||||
component: () => import('@/views/statisticalReport/collectionSummary.vue'),
|
||||
name: 'collectionSummary',
|
||||
meta: {
|
||||
title: '提货汇总',
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/statisticalReport/deliveryDetails',
|
||||
component: () => import('@/views/statisticalReport/deliveryDetails.vue'),
|
||||
name: 'deliveryDetails',
|
||||
meta: {
|
||||
title: '客户提货明细',
|
||||
noCache: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/print',
|
||||
component: Layout,
|
||||
redirect: '/print/index',
|
||||
children: [{
|
||||
path: '/print/index',
|
||||
component: () =>
|
||||
import('@/views/print/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '打印电子卡'
|
||||
}
|
||||
}, ]
|
||||
},
|
||||
|
||||
|
||||
...codemenu,
|
||||
{
|
||||
path: '/404',
|
||||
component: () =>
|
||||
import('@/views/404'),
|
||||
hidden: true
|
||||
}
|
||||
// 404 page must be placed at the end !!!
|
||||
// { path: '*', redirect: '/404', hidden: true }
|
||||
]
|
||||
|
||||
const createRouter = () => new Router({
|
||||
// mode: 'history', // require service support
|
||||
scrollBehavior: () => ({
|
||||
y: 0
|
||||
}),
|
||||
routes: constantRoutes
|
||||
// mode: 'history', // require service support
|
||||
scrollBehavior: () => ({
|
||||
y: 0
|
||||
}),
|
||||
routes: constantRoutes
|
||||
})
|
||||
|
||||
const router = createRouter()
|
||||
|
||||
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
||||
export function resetRouter() {
|
||||
const newRouter = createRouter()
|
||||
router.matcher = newRouter.matcher // reset router
|
||||
const newRouter = createRouter()
|
||||
router.matcher = newRouter.matcher // reset router
|
||||
}
|
||||
|
||||
export default router
|
||||
export default router
|
||||
308
src/views/cardManage/giftCard.vue
Normal file
308
src/views/cardManage/giftCard.vue
Normal file
@@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="福利卡统计" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="卡片序列号">
|
||||
<el-input v-model="queryParams.params.serialNumber" placeholder="" clearable />
|
||||
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="卡片状态">
|
||||
<el-select v-model="queryParams.params.state" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in stateList" :key="i" :label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="所属支行">
|
||||
<el-select v-model="queryParams.params.bankSid" filterable class="item_input" clearable
|
||||
placeholder="请选择" style="width:100%" @change="bankSelect">
|
||||
<el-option v-for="item in bankList" :key="item.name" :label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search"
|
||||
@click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">企业卡列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" :row-style="{height: '40px'}">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<!-- <el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="serialNumber" label="卡券序列号" align="center" />
|
||||
<el-table-column prop="code" label="提货编码" align="center" />
|
||||
<el-table-column prop="createTime" label="发行时间" align="center" />
|
||||
<el-table-column prop="stateValue" label="卡券状态" align="center" />
|
||||
<el-table-column prop="bindDate" label="绑定时间" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/cardManage/cardManage.js'
|
||||
import req2 from '@/api/pickupPoint/pickupPoint.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [
|
||||
{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'build',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
serialNumber: '',
|
||||
state: '',
|
||||
bankSid:""
|
||||
|
||||
}
|
||||
},
|
||||
bankList: [],
|
||||
stateList: [{
|
||||
name: "全部",
|
||||
sid: ""
|
||||
}, {
|
||||
name: "未绑定用户",
|
||||
sid: "2"
|
||||
},
|
||||
{
|
||||
name: "未提货",
|
||||
sid: "3"
|
||||
},
|
||||
{
|
||||
name: "部分提货",
|
||||
sid: "4"
|
||||
},
|
||||
{
|
||||
name: "提货完成",
|
||||
sid: "5"
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
// this.getBankList()
|
||||
},
|
||||
methods: {
|
||||
getBankList() {
|
||||
req2.bankSelect()
|
||||
.then(resp => {
|
||||
console.log('>>>>>>>>>getBankList', resp.data)
|
||||
this.bankList = resp.data
|
||||
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
bankSelect(val) {
|
||||
console.log('>>>>>>>>>bankSelect', val)
|
||||
this.page.params.bankSid = val
|
||||
},
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'build': // 导出
|
||||
this.doBuild()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.empCardGiftStatisticsList(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
serialNumber: '',
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
|
||||
const tip = '请确认是否删除所选记录?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.brandDelBySids(row.id).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
// 导出
|
||||
doBuild() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
|
||||
req.empCardStatisticsListExport(this.queryParams.params).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '企业卡明细.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -31,18 +31,30 @@
|
||||
oninput="value=value.replace(/[^0-9]/g,'')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">价格:</span>
|
||||
<span class="item_text">单价:</span>
|
||||
<el-input v-model="formobj.price" placeholder="" class="item_input" clearable
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">单位:</span>
|
||||
<el-input v-model="formobj.unitName" placeholder="" class="item_input" clearable />
|
||||
<span class="item_text">标准单位:</span>
|
||||
<el-input v-model="formobj.unitName" placeholder="例如:份" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">备注:</span>
|
||||
<span class="item_text">规格单位:</span>
|
||||
<el-input v-model="formobj.specificationUnit" placeholder="例如:斤/瓶/袋/箱/盒" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">每份数量:</span>
|
||||
<el-input v-model="formobj.weight" placeholder="每份的重量,例如:30" class="item_input" clearable oninput="value=value.replace(/[^0-9]/g,'')" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">标准规格:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="例如:一份30斤" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">商品介绍:</span>
|
||||
<el-input v-model="formobj.content" placeholder="商品介绍" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
<div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
<span class="item_text">图片:</span>
|
||||
@@ -87,7 +99,10 @@
|
||||
barcode: '',
|
||||
price: "",
|
||||
unitName: "",
|
||||
specificationUnit:"",
|
||||
weight:"",
|
||||
remarks: "",
|
||||
content: "",
|
||||
picUrl: "",
|
||||
appContent: ''
|
||||
},
|
||||
@@ -136,8 +151,12 @@
|
||||
barcode: '',
|
||||
price: "",
|
||||
unitName: "",
|
||||
specificationUnit:"",
|
||||
weight:"",
|
||||
remarks: "",
|
||||
picUrl: ""
|
||||
content: "",
|
||||
picUrl: "",
|
||||
appContent: ''
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
@@ -35,9 +35,33 @@
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小程序自选商品" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.useTo"
|
||||
active-text="是"
|
||||
inactive-text="否"
|
||||
active-value="1"
|
||||
inactive-value="2"
|
||||
@change="enableChange1(scope.row.sid,scope.row.useTo)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小程序是否上架" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isAppletGrounding"
|
||||
active-text="上架"
|
||||
inactive-text="下架"
|
||||
active-value="1"
|
||||
inactive-value="2"
|
||||
@change="enableChange2(scope.row.sid,scope.row.isAppletGrounding)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="商品名称" align="center" />
|
||||
<el-table-column label="商品图片" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -57,8 +81,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="code" label="商品编码" align="center" />
|
||||
<el-table-column prop="barcode" label="商品条码" align="center" />
|
||||
<el-table-column prop="price" label="价格" align="center" />
|
||||
<el-table-column prop="unitName" label="单位" align="center" />
|
||||
<el-table-column prop="price" label="单价" align="center" />
|
||||
<el-table-column prop="unitName" label="标准单位" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
@@ -237,6 +261,38 @@
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange1(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateAppletUseTo(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
enableChange2(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
282
src/views/marketingCard/applet.vue
Normal file
282
src/views/marketingCard/applet.vue
Normal file
@@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="小程序礼包列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="礼包名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search"
|
||||
@click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">小程序礼包列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toDetail(scope.row)">详情</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<!-- <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否上架" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isGrounding"
|
||||
active-text="上架"
|
||||
inactive-text="下架"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="enableChange(scope.row.sid,scope.row.isGrounding)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="礼包名称" align="center" />
|
||||
|
||||
<el-table-column label="礼包图片" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="left" trigger="click" width="300">
|
||||
<img :src="scope.row.iconUrl" width="100%" />
|
||||
<img slot="reference" :src="scope.row.iconUrl" :alt="scope.row.iconUrl"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px" />
|
||||
</el-popover>
|
||||
<!-- <span v-for="(item,index) in scope.row.picUrl" :key="index">
|
||||
<el-popover placement="left" trigger="click" width="300">
|
||||
<img :src="item.url" width="100%" />
|
||||
<img slot="reference" :src="item.url" :alt="item.url"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px" />
|
||||
</el-popover>
|
||||
</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dateStart" label="起始日期" align="center" />
|
||||
<el-table-column prop="dateEnd" label="终止日期" align="center" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2|| viewState ==3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
<divInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/marketingCard/marketingCard.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './appletAdd.vue'
|
||||
import divInfo from './appletInfo.vue'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
divInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.appletGiftBagListPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toDetail(row) {
|
||||
this.viewState = 4
|
||||
this.$refs['divInfo'].showAdd(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
|
||||
const tip = '请确认是否删除所选记录?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBag(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateAppletgiftbagState(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
491
src/views/marketingCard/appletAdd.vue
Normal file
491
src/views/marketingCard/appletAdd.vue
Normal file
@@ -0,0 +1,491 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>礼包信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>主体信息</div>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">礼包名称</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.name" placeholder="" class="addinputw" style="width:100%"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">礼包金额</span> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.price}}</span> -->
|
||||
<!-- <el-input v-model="formobj.boundaryPrice" placeholder="" class="addinputw"
|
||||
style="width:100%" clearable
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> -->
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">礼包总价格</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.price}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">优惠后价格</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<!-- <span slot="label">{{formobj.price}}</span> -->
|
||||
<el-input v-model="formobj.preferentialPrice" placeholder="" class="addinputw"
|
||||
style="width:100%" clearable
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">起始日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-date-picker v-model="formobj.dateStart" type="date" style="width:100%"
|
||||
value-format="yyyy-MM-dd" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">终止日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-date-picker v-model="formobj.dateEnd" type="date" style="width:100%"
|
||||
value-format="yyyy-MM-dd" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">备注信息</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw" style="width:100%"
|
||||
type="textarea" :rows="8" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">礼包图片</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<upload style="margin-top: 20px;margin-bottom: 20px;" class="addinputw" ref="uploadImg2"
|
||||
v-model="imgList" :limit="1" @change="backData" bucket="map"
|
||||
:upload-data="{ type: '0001' }" :class="{ hide: hideUploadBtn }"></upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-collapse v-model="activeNames" style="margin-top: 20px;">
|
||||
<el-collapse-item name="1">
|
||||
<template slot="title">
|
||||
商品列表<span class="span" @click.stop="add()">添加</span>
|
||||
</template>
|
||||
<el-table v-loading="listLoading" :data="formobj.goods" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<!-- <el-table-column type="selection" align="center" width="50"/> -->
|
||||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" wid align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="doGoodsDel(scope.row.goodsSid)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="name" align="center" />
|
||||
<el-table-column label="商品数量" prop="goodsNumber" align="center" />
|
||||
<el-table-column label="商品价格" prop="price" align="center" />
|
||||
<el-table-column label="商品单位" prop="unitName" align="center" />
|
||||
</el-table>
|
||||
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
|
||||
<el-dialog title="添加商品" :visible.sync="editDialog" width="30%" @close='handleCancle'>
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>商品名称</td>
|
||||
<td> <!-- @change="changeParentSid" -->
|
||||
<el-select v-model="GiftBagGood.goodsSid" filterable clearable placeholder="请选择"
|
||||
style="width:100%" @change="goodsSelect">
|
||||
<el-option v-for="item in goods" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>商品数量</td>
|
||||
<td>
|
||||
<el-input v-model="GiftBagGood.goodsNumber" style="width:100%"
|
||||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" @input="input"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>商品价格</td>
|
||||
<td>
|
||||
<!-- <span style="width:100%">{{GiftBagGood.price}}</span> -->
|
||||
<el-input v-model="GiftBagGood.price" style="width:100%"
|
||||
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" ></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>商品单位</td>
|
||||
<td>
|
||||
<span style="width:100%">{{GiftBagGood.unitName}}</span>
|
||||
<!-- <el-input v-model="GiftBagGood.unitName" style="width:100%"></el-input> -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="handleCancle">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/marketingCard/marketingCard.js'
|
||||
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
upload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editDialog: false,
|
||||
listLoading: false,
|
||||
activeNames: ['1'],
|
||||
imgList: [],
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: "",
|
||||
name: '',
|
||||
dateStart: '',
|
||||
dateEnd: '',
|
||||
preferentialPrice: "",
|
||||
boundary: "",
|
||||
remarks: "",
|
||||
iconUrl: "",
|
||||
goods: []
|
||||
},
|
||||
GiftBagGood: {
|
||||
goodsSid: "",
|
||||
goodsNumber: "",
|
||||
name: "",
|
||||
unitName: "",
|
||||
price: "",
|
||||
|
||||
},
|
||||
goods: [],
|
||||
hideUploadBtn: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getGoodList()
|
||||
},
|
||||
methods: {
|
||||
doGoodsDel(sid) {
|
||||
console.log("doGoodsDel》》》》", sid)
|
||||
|
||||
this.$confirm("是否确定删除此商品?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const index = this.formobj.goods.findIndex((item) => item.goodsSid === sid)
|
||||
console.log("index》》》》", index)
|
||||
this.formobj.goods.splice(index, 1)
|
||||
})
|
||||
},
|
||||
save() {
|
||||
console.log("save》》》》", this.GiftBagGood)
|
||||
if (!this.GiftBagGood.goodsSid) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'warning',
|
||||
message: '请选择商品'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (!this.GiftBagGood.goodsNumber) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'warning',
|
||||
message: '请输入数量'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
const choose = this.formobj.goods.filter((item) => item.goodsSid == this.GiftBagGood.goodsSid)
|
||||
console.log(">>>>>>>>>addCangku", choose)
|
||||
if (choose.length == 0) {
|
||||
this.formobj.goods.push(this.GiftBagGood)
|
||||
|
||||
this.GiftBagGood = {
|
||||
goodsSid: "",
|
||||
goodsNumber: "",
|
||||
name: "",
|
||||
unitName: "",
|
||||
price: "",
|
||||
|
||||
}
|
||||
this.editDialog = false
|
||||
this.countPrice()
|
||||
|
||||
} else {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'error',
|
||||
message: "请勿重复添加商品!"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
countPrice(){
|
||||
|
||||
let num = 0
|
||||
|
||||
for (var i = 0; i < this.formobj.goods.length; i++) {
|
||||
var item = this.formobj.goods[i]
|
||||
|
||||
num+=item.goodsNumber*item.price
|
||||
|
||||
}
|
||||
|
||||
console.log("num",num);
|
||||
|
||||
this.formobj.price = num.toFixed(2)
|
||||
this.formobj.preferentialPrice = num.toFixed(2)
|
||||
|
||||
},
|
||||
|
||||
handleCancle(){
|
||||
this.GiftBagGood = {
|
||||
goodsSid: "",
|
||||
goodsNumber: "",
|
||||
name: "",
|
||||
unitName: "",
|
||||
price: "",
|
||||
|
||||
}
|
||||
this.editDialog = false
|
||||
},
|
||||
input(val) {
|
||||
console.log("input》》》》", val)
|
||||
this.GiftBagGood.goodsNumber = val
|
||||
},
|
||||
add() {
|
||||
this.editDialog = true
|
||||
|
||||
},
|
||||
getGoodList() {
|
||||
req.getGoods().then(resp => {
|
||||
console.log("getGoods》》》》", resp)
|
||||
this.goods = resp.data
|
||||
|
||||
|
||||
}).catch(() => {})
|
||||
},
|
||||
goodsSelect(val) {
|
||||
console.log("goodsSelect》》》》", val)
|
||||
const choose = this.goods.filter((item) => item.sid === val)
|
||||
this.GiftBagGood.goodsSid = choose[0].sid
|
||||
this.GiftBagGood.name = choose[0].name
|
||||
this.GiftBagGood.unitName = choose[0].unitName
|
||||
this.GiftBagGood.price = choose[0].price
|
||||
|
||||
|
||||
},
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
backData(value) {
|
||||
console.log("backData》》》》", value)
|
||||
console.log("imgList", this.imgList)
|
||||
|
||||
|
||||
if (this.imgList.length > 0) {
|
||||
this.formobj.iconUrl = this.imgList[0].url
|
||||
} else {
|
||||
this.formobj.iconUrl = ""
|
||||
}
|
||||
|
||||
this.hideUploadBtn = this.imgList.length != 0;
|
||||
console.log("this.hideUploadBtn", this.hideUploadBtn)
|
||||
},
|
||||
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
this.submitdisabled = true
|
||||
req.saveAppletGiftBag(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.submitdisabled = false
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
this.submitdisabled = false
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.submitdisabled = false
|
||||
})
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.formobj = {
|
||||
sid: "",
|
||||
name: '',
|
||||
dateStart: '',
|
||||
dateEnd: '',
|
||||
boundaryPrice: "",
|
||||
boundary: "",
|
||||
remarks: "",
|
||||
iconUrl: "",
|
||||
goods: []
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
req.AppletGiftBagInit(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
this.imgList = []
|
||||
if (resp.data.iconUrl != '')
|
||||
this.imgList.push({
|
||||
url: resp.data.iconUrl
|
||||
})
|
||||
this.hideUploadBtn = this.imgList.length != 0;
|
||||
console.log("this.hideUploadBtn", this.hideUploadBtn)
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
this.imgList = []
|
||||
if (resp.data.iconUrl != '')
|
||||
this.imgList.push({
|
||||
url: formobj.iconUrl
|
||||
})
|
||||
this.hideUploadBtn = this.imgList.length != 0;
|
||||
console.log("this.hideUploadBtn", this.hideUploadBtn)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// 隐藏上传组件
|
||||
|
||||
::v-deep .hide {
|
||||
.el-upload--picture-card {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
::v-deep .el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
242
src/views/marketingCard/appletInfo.vue
Normal file
242
src/views/marketingCard/appletInfo.vue
Normal file
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>礼包信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<!-- <el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> -->
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-form ref="dataForm" :model="formobj" label-position="top" label-width="190px" class="formadd">
|
||||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
|
||||
<div>主体信息</div>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">礼包名称</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.name}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">边界金额</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.boundaryPrice}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">起始日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.dateStart}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">终止日期</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.dateEnd}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">发放条件</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.boundary}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label"></span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span></span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">备注信息</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">{{formobj.remarks}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" class="trightb">
|
||||
<el-form-item class="trightb_item">
|
||||
<span slot="label">礼包图片</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="trightb_item">
|
||||
<img :src="formobj.iconUrl" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-collapse v-model="activeNames" style="margin-top: 20px;">
|
||||
<el-collapse-item name="1" title="商品列表">
|
||||
<!-- <template slot="title">
|
||||
商品列表<span class="span" @click.stop="add()">添加</span>
|
||||
</template> -->
|
||||
<el-table v-loading="listLoading" :data="formobj.goods" border style="width: 100%;"
|
||||
:row-style="{height: '40px'}">
|
||||
<!-- <el-table-column type="selection" align="center" width="50"/> -->
|
||||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" />
|
||||
<!-- <el-table-column label="操作" wid align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="doGoodsDel(scope.row.goodsSid)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="商品名称" prop="name" align="center" />
|
||||
<el-table-column label="商品数量" prop="goodsNumber" align="center" />
|
||||
<el-table-column label="商品价格" prop="price" align="center" />
|
||||
<el-table-column label="商品单位" prop="unitName" align="center" />
|
||||
</el-table>
|
||||
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/marketingCard/marketingCard.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listLoading: false,
|
||||
activeNames: ['1'],
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: "",
|
||||
name: '',
|
||||
dateStart: '',
|
||||
dateEnd: '',
|
||||
boundaryPrice: "",
|
||||
boundary: "",
|
||||
remarks: "",
|
||||
iconUrl: "",
|
||||
goods: []
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.formobj = {
|
||||
sid: "",
|
||||
name: '',
|
||||
dateStart: '',
|
||||
dateEnd: '',
|
||||
boundaryPrice: "",
|
||||
boundary: "",
|
||||
remarks: "",
|
||||
iconUrl: "",
|
||||
goods: []
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
indexMethod(index) {
|
||||
return index + 1
|
||||
},
|
||||
showAdd(row) {
|
||||
console.log("showAdd》》》》", row)
|
||||
req.giftBagInit(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
this.imgList = []
|
||||
this.imgList.push({
|
||||
url: resp.data.iconUrl
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
this.imgList = []
|
||||
this.imgList.push({
|
||||
url: formobj.iconUrl
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.trightb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.trightb_item {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.span {
|
||||
margin-left: 50px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/deep/.el-collapse-item__header {
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
text-align: left;
|
||||
color: #ffffff;
|
||||
background-color: #0294d7;
|
||||
}
|
||||
|
||||
/deep/.el-collapse-item__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-tabs v-model="activeName" class="my-tabs" type="card" @tab-click="handleClick" style="margin-top: 20px;">
|
||||
|
||||
<el-tab-pane label="提货卡记录" name="roleList">
|
||||
<el-tab-pane label="个人卡记录" name="roleList">
|
||||
<div class="main-content">
|
||||
<div class="container" v-show="viewState == 1">
|
||||
<div class="tab-header">
|
||||
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="发行提货卡" name="addrole">
|
||||
<el-tab-pane label="发行个人卡" name="addrole">
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '提货卡明细列表(批次号_' + this.recordId + ').xls'
|
||||
const fileName = '个人卡明细列表(批次号_' + this.recordId + ').xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
|
||||
Reference in New Issue
Block a user