Commit b4d8f333 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !97
2 parents 69e628c3 f1b5ec7a
Showing 171 changed files with 1293 additions and 726 deletions
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"], presets: ['@vue/cli-plugin-babel/preset'],
plugins: [ plugins: [
[ [
"component", 'component',
{ {
libraryName: "element-ui", libraryName: 'element-ui',
styleLibraryName: "theme-chalk" styleLibraryName: 'theme-chalk'
} }
] ]
] ]
}; }
...@@ -15,9 +15,12 @@ ...@@ -15,9 +15,12 @@
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.7", "glsx-components": "^1.3.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2" "vuedraggable": "^2.24.3",
"vuex": "^3.1.2",
"wangeditor": "^4.7.12"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
...@@ -3,7 +3,7 @@ import { http } from '@/main' ...@@ -3,7 +3,7 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
const getCenterListApi = params => { const getCenterListApi = params => {
// params.method = `${defaultPath}goods.list` // params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.card.merchant.record.get` params.method = `scrm.api.equity.card.merchant.record.get`
return http({ return http({
...@@ -14,7 +14,7 @@ const getCenterListApi = params => { ...@@ -14,7 +14,7 @@ const getCenterListApi = params => {
}) })
} }
const getMoreMerchant = params => { const getMoreMerchant = params => {
// params.method = `${defaultPath}goods.list` // params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.third.get` params.method = `scrm.api.equity.third.get`
return http({ return http({
...@@ -37,7 +37,6 @@ const getCardContent = params => { ...@@ -37,7 +37,6 @@ const getCardContent = params => {
}) })
} }
const updateCardContent = params => { const updateCardContent = params => {
params.method = `scrm.api.equity.card.class.update` params.method = `scrm.api.equity.card.class.update`
return http({ return http({
...@@ -48,8 +47,8 @@ const updateCardContent = params => { ...@@ -48,8 +47,8 @@ const updateCardContent = params => {
}) })
} }
const memberExportApi = params =>{ const memberExportApi = params => {
params.method=`scrm.api.equity.card.merchant.record.export` params.method = `scrm.api.equity.card.merchant.record.export`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'GET', method: 'GET',
...@@ -57,4 +56,14 @@ const memberExportApi = params =>{ ...@@ -57,4 +56,14 @@ const memberExportApi = params =>{
sign: true sign: true
}) })
} }
export { getCenterListApi,getMoreMerchant ,updateCardContent,getCardContent,memberExportApi}
\ No newline at end of file \ No newline at end of file
const getQrUrl = params => {
params.method = 'scrm.api.equity.card.class.generate.try.url'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
returnAll: true
})
}
export { getCenterListApi, getMoreMerchant, updateCardContent, getCardContent, memberExportApi, getQrUrl }
...@@ -75,7 +75,7 @@ const getClassifyListApi = params => { ...@@ -75,7 +75,7 @@ const getClassifyListApi = params => {
} }
const pictureUpload = params => { const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload" params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({ return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload', url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST', method: 'POST',
......
...@@ -151,5 +151,4 @@ const getAllGoodsApi = params => { ...@@ -151,5 +151,4 @@ const getAllGoodsApi = params => {
}) })
} }
export default { getMerchantListApi, couponExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi } export default { getMerchantListApi, couponExportApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
...@@ -45,7 +45,6 @@ const detail = params => { ...@@ -45,7 +45,6 @@ const detail = params => {
}) })
} }
const listDepartmentTree = params => { const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree' params.method = 'entmicro.api.department.listDepartmentTree'
return http({ return http({
......
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
let session = 'scrm-base-e11bd247-ac78-4f0b-a509-1c9a4e2ed48e-rop'
const getListApi = params => {
params.method = 'marketing.api.moment.page'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//根据id查询朋友圈任务详情数据
const momentDetail = params => {
params.method = 'marketing.api.moment.detail'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈任务详情 员工列表
const momentStaff = params => {
params.method = 'marketing.api.moment.staff.list'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈任务详情 员工列表
const momentStaffCustomers = params => {
params.method = 'marketing.api.moment.staff.customers'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈任务详情统计数据
const momentStatistic = params => {
params.method = 'marketing.api.moment.detail.statistic'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈任务 - 筛选客户数
const momentCount = params => {
params.method = 'marketing.api.moment.detail.customer.filter.count'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈任务数据保存接口
const momentInsert = params => {
params.method = 'marketing.api.moment.insert'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//朋友圈任务列表提醒
const momentListRemindOperate = params => {
params.method = 'marketing.api.moment.listRemindOperate'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//根据id提醒用户
const momentRemindUser = params => {
params.method = 'marketing.api.moment.remindUser'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//根据id提醒用户
const momentCancel = params => {
params.method = 'marketing.api.moment.created.cancel'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
momentDetail,
momentRemindUser,
momentListRemindOperate,
momentInsert,
momentCount,
momentStatistic,
momentStaff,
momentStaffCustomers,
getListApi,
momentCancel
}
...@@ -71,7 +71,7 @@ const exportGiftInfoApi = params => { ...@@ -71,7 +71,7 @@ const exportGiftInfoApi = params => {
url: 'rop-scrm-coupon/router', url: 'rop-scrm-coupon/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
}) })
} }
...@@ -97,4 +97,15 @@ const insertGiftApi = params => { ...@@ -97,4 +97,15 @@ const insertGiftApi = params => {
}) })
} }
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi } const templateModal = params => {
params.method = 'scrm.api.coupon.directional.gift.approve.template.detail'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal }
...@@ -39,5 +39,4 @@ const merchantStatistical = params => { ...@@ -39,5 +39,4 @@ const merchantStatistical = params => {
}) })
} }
export default { timePeriodStatistics, couponStatistical, equityStatistical, merchantStatistical } export default { timePeriodStatistics, couponStatistical, equityStatistical, merchantStatistical }
import { http, http_merchant } from '@/main'
const defaultPath = 'marketing.api.material.'
//获取素材组列表
const getMaterialList = params => {
params.method = `${defaultPath}group.list`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//删除素材组列表
const deleteMaterialList = params => {
params.method = `${defaultPath}group.delete`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
//素材组详情
const materialGroupDetail = params => {
params.method = `${defaultPath}group.detail`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材组创建
const addMaterialGroup = params => {
params.method = `${defaultPath}group.insert`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材组编辑
const editMaterialGroup = params => {
params.method = `${defaultPath}group.update`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
//素材删除
const materialDelete = params => {
params.method = `${defaultPath}delete`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 获取业务类型
const getListEntBusinessType = (params = {}) => {
params.method = 'entmicro.api.staff.listEntBusinessType'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//素材详情
const materialDetail = params => {
params.method = `${defaultPath}detail`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材列表
const materialList = params => {
params.method = `${defaultPath}page`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材创建
const materialInsert = params => {
params.method = `${defaultPath}insert`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材编辑
const materialEdit = params => {
params.method = `${defaultPath}update`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 素材详情阅读人员明细
const readDetailPage = params => {
params.method = `${defaultPath}customerReadDetailPage`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
// 素材详情数据概览
const dataOverview = params => {
params.method = `${defaultPath}dataOverview`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
// 素材详情阅读人员明细
const sendDetailPage = params => {
params.method = `${defaultPath}employeeSendDetailPage`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
const findAllDictData = params => {
params.method = 'merchants.api.menu.findAllDictData'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMaterialList,
deleteMaterialList,
materialGroupDetail,
addMaterialGroup,
materialDelete,
materialDetail,
materialList,
materialEdit,
materialInsert,
editMaterialGroup,
readDetailPage,
dataOverview,
sendDetailPage,
findAllDictData,
getListEntBusinessType
}
...@@ -97,4 +97,14 @@ const getGoodsCommentListApi = params => { ...@@ -97,4 +97,14 @@ const getGoodsCommentListApi = params => {
}) })
} }
export default { getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi, getGoodsCommentListApi }
\ No newline at end of file \ No newline at end of file
const getBusinessTypeByIdApi = params => {
params.method = 'scrm.api.shopmall.goods.getBusinessTypeById'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getBusinessTypeByIdApi, getListApi, getProShareApi, topProApi, updateStatusProApi, deleteTakeProApi, getProInfoApi, insertOrUpdateProApi, updateTakeProApi, getGoodsCommentListApi }
...@@ -33,17 +33,17 @@ const verificationExportApi = params => { ...@@ -33,17 +33,17 @@ const verificationExportApi = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
// const auditGoodApi = params => { // const auditGoodApi = params => {
// params.method = `${defaultPath}audit.goods` // params.method = `${defaultPath}audit.goods`
// return http({ // return http({
// url: 'rop-scrm-live/router', // url: 'rop-scrm-live/router',
// method: 'POST', // method: 'POST',
// data: params, // data: params,
// sign: true, // sign: true,
// returnAll: true // returnAll: true
// }) // })
// } // }
// const getGoodInfoApi = params => { // const getGoodInfoApi = params => {
// params.method = `${defaultPath}get.good.by.id` // params.method = `${defaultPath}get.good.by.id`
......
...@@ -83,5 +83,4 @@ const getSharedApi = params => { ...@@ -83,5 +83,4 @@ const getSharedApi = params => {
}) })
} }
export default { getActivityPageApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi } export default { getActivityPageApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi }
...@@ -52,7 +52,6 @@ const createService = params => { ...@@ -52,7 +52,6 @@ const createService = params => {
data: params, data: params,
sign: true, sign: true,
returnAll: true returnAll: true
}) })
} }
//编辑、查看 //编辑、查看
...@@ -62,8 +61,7 @@ const detailService = params => { ...@@ -62,8 +61,7 @@ const detailService = params => {
url: 'rop-scrm-coupon/router', url: 'rop-scrm-coupon/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
}) })
} }
//修改 //修改
...@@ -76,7 +74,6 @@ const updateService = params => { ...@@ -76,7 +74,6 @@ const updateService = params => {
data: params, data: params,
sign: true, sign: true,
returnAll: true returnAll: true
}) })
} }
......
...@@ -3,7 +3,7 @@ import { http } from '@/main' ...@@ -3,7 +3,7 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
const getSetMealListApi = params => { const getSetMealListApi = params => {
// params.method = `${defaultPath}goods.list` // params.method = `${defaultPath}goods.list`
params.method = `scrm.api.equity.package.info.list.with.page` params.method = `scrm.api.equity.package.info.list.with.page`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
...@@ -19,11 +19,11 @@ const deleteSetMeal = params => { ...@@ -19,11 +19,11 @@ const deleteSetMeal = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
const getSetmealService = params=>{ const getSetmealService = params => {
params.method = `scrm.api.coupon.list.merchant` params.method = `scrm.api.coupon.list.merchant`
return http({ return http({
url: 'rop-scrm-coupon/router', url: 'rop-scrm-coupon/router',
...@@ -33,14 +33,14 @@ const getSetmealService = params=>{ ...@@ -33,14 +33,14 @@ const getSetmealService = params=>{
}) })
} }
//获取编辑详情的接口 //获取编辑详情的接口
const getServiceInfo = params=>{ const getServiceInfo = params => {
params.method = `scrm.api.equity.package.info.select` params.method = `scrm.api.equity.package.info.select`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//创建套餐的接口 //创建套餐的接口
...@@ -51,7 +51,7 @@ const createSetMeal = params => { ...@@ -51,7 +51,7 @@ const createSetMeal = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
const updateSetMeal = params => { const updateSetMeal = params => {
...@@ -61,7 +61,7 @@ const updateSetMeal = params => { ...@@ -61,7 +61,7 @@ const updateSetMeal = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//不知道啥作用,老接口有调 //不知道啥作用,老接口有调
...@@ -72,7 +72,7 @@ const configSetMeal = params => { ...@@ -72,7 +72,7 @@ const configSetMeal = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
...@@ -85,7 +85,7 @@ const upDownPackage = params => { ...@@ -85,7 +85,7 @@ const upDownPackage = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
export { getSetMealListApi,deleteSetMeal,getSetmealService,getServiceInfo,createSetMeal,upDownPackage,updateSetMeal,configSetMeal }
\ No newline at end of file \ No newline at end of file
export { getSetMealListApi, deleteSetMeal, getSetmealService, getServiceInfo, createSetMeal, upDownPackage, updateSetMeal, configSetMeal }
import { http } from '@/main'
// 获取客户列表
const getCustomerListApi = params => {
params.method = 'entmicro.api.customer.page'
params.source = 'scrm-home'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 标签获取客户列表
const getCustomerByTagListApi = params => {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
params.source = 'scrm-home'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getSopInfoListApi = params => {
params.method = 'scrm.api.sop.sopInfo.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop基本信息
const getSopBaseInfoApi = params => {
params.method = 'scrm.api.sop.sopInfo.getBaseBySopId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
//sop分析-触达率-筛选框
const getEventListApi = params => {
params.method = 'scrm.api.sop.sopEvent.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop分析-触达率列表
const getSopCustomerStatisticsListApi = params => {
params.method = 'scrm.api.sop.sopCustomer.listStatisticsWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop分析-员工完成率列表
const getSopStaffTaskListApi = params => {
params.method = 'scrm.api.sop.staffTaskStatistics.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 校验当前商户的企微群发任务情况
const getTaskStatusApi = params => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop营销事件次数分析
const parseEventCountApi = params => {
params.method = 'scrm.api.sop.sopEvent.parseEventCount'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除sop事件
const deleteSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.delete'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 结束sop事件
const endSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.updateEndStatus'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 事件进行中,修改sop事件列表
// const insertOrUpdateSopEventApi = params => {
// params.method = 'scrm.api.sop.sopEvent.insertOrUpdate'
// return http({
// url: 'rop-scrm-sop/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// 事件进行中,批量编辑sop
const batchEditSopEventApi = params => {
params.method = 'scrm.api.sop.sopEvent.batchEdit'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 新增或者事件未开始,新增/修改sop
const insertOrUpdateSopApi = params => {
params.method = 'scrm.api.sop.sopInfo.insertOrUpdate'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getSopInfoDetailApi = params => {
params.method = 'scrm.api.sop.sopInfo.getDetailBySopId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 朋友圈模板
const getMomentListApi = params => {
params.method = 'marketing.api.moment.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerListApi, getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
...@@ -99,6 +99,10 @@ html { ...@@ -99,6 +99,10 @@ html {
color: #eb4e4e; color: #eb4e4e;
} }
.marketing .red-txt {
color: #eb4e4e;
}
.marketing .wechat-container { .marketing .wechat-container {
width: 290px; width: 290px;
margin-left: 32px; margin-left: 32px;
...@@ -117,6 +121,9 @@ html { ...@@ -117,6 +121,9 @@ html {
.marketing .edit-container { .marketing .edit-container {
margin-bottom: 84px; margin-bottom: 84px;
} }
.marketing .approval-container {
margin-bottom: 10px;
}
.marketing .edit-form-container { .marketing .edit-form-container {
margin-top: 20px; margin-top: 20px;
...@@ -172,6 +179,10 @@ html { ...@@ -172,6 +179,10 @@ html {
height: 120px; height: 120px;
} }
.marketing .w-320 {
width: 320px;
}
.marketing .m-t-8 { .marketing .m-t-8 {
margin-top: 8px; margin-top: 8px;
} }
...@@ -196,6 +207,10 @@ html { ...@@ -196,6 +207,10 @@ html {
margin-bottom: 60px; margin-bottom: 60px;
} }
.marketing .m-r-10 {
margin-right: 10px;
}
.marketing .m-r-20 { .marketing .m-r-20 {
margin-right: 20px; margin-right: 20px;
} }
...@@ -226,6 +241,10 @@ html { ...@@ -226,6 +241,10 @@ html {
background-color: #999999; background-color: #999999;
} }
.marketing .txt-blue {
color: #5850ff;
}
.marketing .txt-grey { .marketing .txt-grey {
color: #999999; color: #999999;
} }
...@@ -245,6 +264,10 @@ html { ...@@ -245,6 +264,10 @@ html {
color: #999999; color: #999999;
} }
.marketing .p-relative {
position: relative;
}
.marketing .footer { .marketing .footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
...@@ -271,6 +294,12 @@ html { ...@@ -271,6 +294,12 @@ html {
flex-wrap: wrap; flex-wrap: wrap;
} }
.marketing .flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.marketing .flex-grow { .marketing .flex-grow {
flex: 1; flex: 1;
} }
......
...@@ -97,7 +97,7 @@ const afterSaleStatusList = [ ...@@ -97,7 +97,7 @@ const afterSaleStatusList = [
{ confId: '4', confName: '待确认' }, { confId: '4', confName: '待确认' },
{ confId: '5', confName: '退款中' }, { confId: '5', confName: '退款中' },
{ confId: '6', confName: '已退款' }, { confId: '6', confName: '已退款' },
{ confId: '7', confName: '退款失败' }, { confId: '7', confName: '退款失败' }
] ]
const orderSourceList = [ const orderSourceList = [
...@@ -125,9 +125,10 @@ const statusList = [ ...@@ -125,9 +125,10 @@ const statusList = [
confId: 2, confId: 2,
confName: '已失效' confName: '已失效'
} }
] ]
//会员订单类型字典 //会员订单类型字典
const orderTypesList = [{ const orderTypesList = [
{
confId: 1, confId: 1,
confName: '套餐' confName: '套餐'
}, },
...@@ -161,9 +162,10 @@ const orderStatusList = [ ...@@ -161,9 +162,10 @@ const orderStatusList = [
{ {
confId: 6, confId: 6,
confName: '已退款' confName: '已退款'
}, }
] ]
const serviceStatusList = [{ const serviceStatusList = [
{
confId: 1, confId: 1,
confName: '未生效' confName: '未生效'
}, },
...@@ -177,7 +179,8 @@ const serviceStatusList = [{ ...@@ -177,7 +179,8 @@ const serviceStatusList = [{
} }
] ]
const memberTypeList = [{ const memberTypeList = [
{
confId: 1, confId: 1,
confName: '正式会员' confName: '正式会员'
}, },
...@@ -186,7 +189,8 @@ const memberTypeList = [{ ...@@ -186,7 +189,8 @@ const memberTypeList = [{
confName: '试用会员' confName: '试用会员'
} }
] ]
const stateList = [{ const stateList = [
{
confId: 0, confId: 0,
confName: '待上架' confName: '待上架'
}, },
...@@ -197,22 +201,7 @@ const stateList = [{ ...@@ -197,22 +201,7 @@ const stateList = [{
{ {
confId: 2, confId: 2,
confName: '已下架' confName: '已下架'
}, }
] ]
export {
limitPrice,
getExplorer,
exportFn,
aToExport,
orderManageStatusList,
afterSaleStatusList,
orderSourceList,
deliveryTypeList,
statusList,
serviceStatusList,
memberTypeList,
stateList,
orderTypesList,
orderStatusList
}
\ No newline at end of file \ No newline at end of file
export { limitPrice, getExplorer, exportFn, aToExport, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList }
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span> <span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)"> <el-input :placeholder="item.placeholder || '请输入' + item.label" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span> <span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span> <span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input> </el-input>
...@@ -48,16 +48,16 @@ ...@@ -48,16 +48,16 @@
</template> --> </template> -->
<!-- 选择框 --> <!-- 选择框 -->
<div v-else-if="item.type === 'select'"> <div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="'请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)"> <el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option> <el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select> </el-select>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
<!-- radio --> <!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange"> <el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio> <el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group> </el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker> <el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
<template v-else-if="item.type === 'upload'"> <template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }"> <div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
}, },
formObj: { formObj: {
type: Object, type: Object,
default: () => { } default: () => {}
}, },
hasTitle: { hasTitle: {
type: Boolean, type: Boolean,
...@@ -169,16 +169,16 @@ export default { ...@@ -169,16 +169,16 @@ export default {
}, },
formRules: { formRules: {
type: Object, type: Object,
default: () => { } default: () => {}
}, },
// 搜索+输入框/搜索组合组件,搜索栏绑值 // 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: { searchSelectObj: {
type: Object, type: Object,
default: () => { } default: () => {}
} }
}, },
mounted() { }, mounted() {},
methods: { methods: {
// 选择框-添加其他属性 // 选择框-添加其他属性
......
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog <el-dialog :title="title" :top="top" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width">
:title="title"
:top="top"
:visible.sync="isVisible"
:show-close="showClose"
:before-close="handleClose"
:close-on-click-modal="false"
:modal-append-to-body="false"
:width="width"
>
<el-scrollbar v-if="hasScroll"> <el-scrollbar v-if="hasScroll">
<span slot="title"> <span slot="title">
<span class="main-title">{{ title }}</span> <span class="main-title">{{ title }}</span>
...@@ -32,24 +23,9 @@ ...@@ -32,24 +23,9 @@
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
<el-button <el-button :type="typeName" v-if="!noClose" :size="btnSize" @click="handleClose">{{ btnCloseLabel }}</el-button>
:type="typeName" <el-button type="default" v-if="!noCancel" :size="btnSize" @click="handleClose">{{ btnCancelLabel }}</el-button>
v-if="!noClose" <el-button type="primary" v-if="!noBtnOk" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
:size="btnSize"
@click="handleClose"
>{{btnCloseLabel}}</el-button>
<el-button
type="default"
v-if="!noCancel"
:size="btnSize"
@click="handleClose"
>{{ btnCancelLabel }}</el-button>
<el-button
type="primary"
v-if="!noBtnOk"
:size="btnSize"
@click="handleConfirm"
>{{ btnOkLabel }}</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
</div> </div>
</el-dialog> </el-dialog>
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column> <el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column>
<el-table-column prop="merchantName" label="商户名称" align="center"> <el-table-column prop="merchantName" label="商户名称" align="center"></el-table-column>
</el-table-column>
</el-table> </el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination small background @current-change="handleCurrentChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</el-col> </el-col>
...@@ -87,7 +86,7 @@ export default { ...@@ -87,7 +86,7 @@ export default {
mounted() { mounted() {
this.selectedData = this.storeSelected this.selectedData = this.storeSelected
this.selectedData.forEach(item => { this.selectedData.forEach(item => {
item.merchantNo = item.merchantId ? (item.merchantId + '') : item.merchantNo item.merchantNo = item.merchantId ? item.merchantId + '' : item.merchantNo
}) })
this.getSelectingList() this.getSelectingList()
}, },
......
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<template> <template>
<glsx-dialog <glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" :btnOkLabel="productList.length ? '确定' : '创建商品'" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose" v-loading="loading">
class="muti-pro"
title="选择商品"
:isVisible.sync="isMutiSelectVisible"
:btnOkLabel="productList.length ? '确定' : '创建商品'"
width="70%"
@confirmDialog="handleMutiSelectConfirm"
@closeDialog="handleMutiSelectClose"
v-loading="loading"
>
<div class="noproDiv" v-show="!productList.length && fnCallBack"> <div class="noproDiv" v-show="!productList.length && fnCallBack">
<img src="@/assets/noPro.png" /> <img src="@/assets/noPro.png" />
<p class="noproP">系统暂无已创建的商品</p> <p class="noproP">系统暂无已创建的商品</p>
</div> </div>
<div v-show="productList.length"> <div v-show="productList.length">
<slot name="search"></slot> <slot name="search"></slot>
<GLTable <GLTable v-loading="loading" ref="mutiProRef" :tableData="productList" :hasPage="false" :noDataImg="url" :tableParams="tableParams" @refreshTable="getList">
v-loading="loading"
ref="mutiProRef"
:tableData="productList"
:hasPage="false"
:noDataImg="url"
:tableParams="tableParams"
@refreshTable="getList"
>
<span slot="goodsImage" slot-scope="scope"> <span slot="goodsImage" slot-scope="scope">
<img class="m-t-10 img-60" :src="scope.scope.goodsImage" /> <img class="m-t-10 img-60" :src="scope.scope.goodsImage" />
</span> </span>
......
<!-- 选择商品弹窗 --> <!-- 选择商品弹窗 -->
<template> <template>
<glsx-dialog <glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" :btnOkLabel="productList.length ? '确定' : '创建商品'" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose" :noClose="false" :noCancel="true" :showClose="true">
class="muti-pro"
title="选择商品"
:isVisible.sync="isMutiSelectVisible"
:btnOkLabel="productList.length ? '确定' : '创建商品'"
width="70%"
@confirmDialog="handleMutiSelectConfirm"
@closeDialog="handleMutiSelectClose"
:noClose="false"
:noCancel="true"
:showClose="true"
>
<div style="max-height:60vh"> <div style="max-height:60vh">
<div class="noproDiv" v-if="!productList.length && fnCallBack"> <div class="noproDiv" v-if="!productList.length && fnCallBack">
<img src="@/assets/noPro.png" /> <img src="@/assets/noPro.png" />
...@@ -20,26 +9,14 @@ ...@@ -20,26 +9,14 @@
<div v-if="productList.length"> <div v-if="productList.length">
<el-form :inline="true" :model="searchProForm"> <el-form :inline="true" :model="searchProForm">
<el-form-item label="商品名称:"> <el-form-item label="商品名称:">
<el-input <el-input :size="size" v-model="searchProForm.name" placeholder="请输入商品名称" maxlength="20" clearable></el-input>
:size="size"
v-model="searchProForm.name"
placeholder="请输入商品名称"
maxlength="20"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button :size="size" type="primary" @click="handleConfigSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleConfigSearch">查询</el-button>
<el-button :size="size" @click="handleConfigReset">重置</el-button> <el-button :size="size" @click="handleConfigReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<GLTable <GLTable ref="mutiProRef" :tableData="productList" :hasPage="false" :tableParams="tableParams" @refreshTable="getList">
ref="mutiProRef"
:tableData="productList"
:hasPage="false"
:tableParams="tableParams"
@refreshTable="getList"
>
<span slot="goodsImage" slot-scope="scope"> <span slot="goodsImage" slot-scope="scope">
<img class="m-t-10 img-60" :src="scope.scope.goodsImage" /> <img class="m-t-10 img-60" :src="scope.scope.goodsImage" />
</span> </span>
...@@ -172,7 +149,7 @@ export default { ...@@ -172,7 +149,7 @@ export default {
} }
}, },
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
if(!this.productList.length) { if (!this.productList.length) {
var params = { var params = {
addOrEdit: 1, addOrEdit: 1,
groupOrStore: this.userInfo.accountLevel == 4 ? 2 : 1, groupOrStore: this.userInfo.accountLevel == 4 ? 2 : 1,
......
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
}) })
}, },
handleSingleSelectConfirm() { handleSingleSelectConfirm() {
if(!this.productList.length) { if (!this.productList.length) {
var params = { var params = {
addOrEdit: 1, addOrEdit: 1,
groupOrStore: this.userInfo.accountLevel == 4 ? 2 : 1, groupOrStore: this.userInfo.accountLevel == 4 ? 2 : 1,
......
<template> <template>
<div class="table-tooltip"> <div class="table-tooltip">
<el-popover <el-popover placement="top" width="200" trigger="hover" :content="content">
placement="top" <el-button slot="reference" icon="el-icon-warning" circle></el-button>
width="200"
trigger="hover"
:content="content"
>
<el-button
slot="reference"
icon="el-icon-warning"
circle
></el-button>
</el-popover> </el-popover>
</div> </div>
</template> </template>
...@@ -23,9 +14,8 @@ export default { ...@@ -23,9 +14,8 @@ export default {
type: String, type: String,
default: '' default: ''
} }
}, }
} }
</script> </script>
<style scope> <style scope>
......
...@@ -28,6 +28,12 @@ module.exports = { ...@@ -28,6 +28,12 @@ module.exports = {
// 返回数据类型 // 返回数据类型
responseType: 'json' responseType: 'json'
}, },
request2: {
timeout: 180000,
baseURL: 'http://ismv.branch.glsx.com.cn',
responseType: 'json',
withCredentials: true
},
sign: { sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0', v: '1.0.0',
...@@ -35,6 +41,5 @@ module.exports = { ...@@ -35,6 +41,5 @@ module.exports = {
source: '' source: ''
}, },
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b', secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static' cdn: 'https://www.xxx.cn/static'
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function(isEnv = true) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
...@@ -20,6 +20,7 @@ export const fetchConfig = function (isEnv = true) { ...@@ -20,6 +20,7 @@ export const fetchConfig = function (isEnv = true) {
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -22,3 +22,4 @@ export { bootstrap, mount, unmount } from '@/setup' ...@@ -22,3 +22,4 @@ export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params) export const http2 = params => Vue.prototype.$http2(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__; __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__
} }
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([
{
name: 'default', name: 'default',
path: '/', path: '/',
redirect: { name: 'home' } redirect: { name: 'home' }
...@@ -224,6 +225,77 @@ const staticRoutes = Object.freeze([{ ...@@ -224,6 +225,77 @@ const staticRoutes = Object.freeze([{
path: '/giftBag/editGift', path: '/giftBag/editGift',
component: resolve => require([`@/views/giftBag/editGift.vue`], resolve), component: resolve => require([`@/views/giftBag/editGift.vue`], resolve),
meta: {} meta: {}
},
{
name: 'sopIndex',
path: '/sop/index',
component: resolve => require([`@/views/sop/index.vue`], resolve),
meta: {}
},
{
name: 'sopList',
path: '/sop/sopList',
component: resolve => require([`@/views/sop/sopList.vue`], resolve),
meta: {}
},
{
name: 'editSop',
path: '/sop/editSop',
component: resolve => require([`@/views/sop/editSop.vue`], resolve),
meta: {}
},
{
name: 'sopAnalysisList',
path: '/sop/sopAnalysisList',
component: resolve => require([`@/views/sop/sopAnalysisList.vue`], resolve),
meta: {}
},
{
name: 'materialList',
path: '/material/index',
component: resolve => require([`@/views/material/index.vue`], resolve),
meta: {}
},
{
name: 'addMaterial',
path: '/material/addMaterial',
component: resolve => require([`@/views/material/addMaterial.vue`], resolve),
meta: {}
},
{
name: 'materialDetail',
path: '/material/materialDetail',
component: resolve => require([`@/views/material/materialDetail.vue`], resolve),
meta: {}
},
{
name: 'addMaterial',
path: '/material/addMaterial',
component: resolve => require([`@/views/material/addMaterial.vue`], resolve)
},
{
name: 'friendGroup',
path: '/friendGroup/index',
component: resolve => require([`@/views/friendGroup/index.vue`], resolve),
meta: {}
},
{
name: 'friendGroupAdd',
path: '/friendGroup/friendGroupAdd',
component: resolve => require([`@/views/friendGroup/friendGroupAdd.vue`], resolve),
meta: {}
},
{
name: 'friendGroupDetail',
path: '/friendGroup/friendGroupDetail/:id',
component: resolve => require([`@/views/friendGroup/friendGroupDetail.vue`], resolve),
meta: {}
},
{
name: 'materialDetail',
path: '/material/materialDetail',
component: resolve => require([`@/views/material/materialDetail.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -10,4 +10,3 @@ ...@@ -10,4 +10,3 @@
import { bootstrap, mount, unmount } from './qiankun' import { bootstrap, mount, unmount } from './qiankun'
import { start } from './single' import { start } from './single'
export { bootstrap, mount, unmount, start } export { bootstrap, mount, unmount, start }
import Vue from 'vue' import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js' import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import '@/assets/css/public.scss' import '@/assets/css/public.scss'
...@@ -13,8 +13,9 @@ let router = null ...@@ -13,8 +13,9 @@ let router = null
let instance = null let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common } = await fetchConfig() const { response, request, request2, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(false)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -23,7 +24,8 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -23,7 +24,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
...@@ -49,4 +51,3 @@ function subscribe({ messenger }) { ...@@ -49,4 +51,3 @@ function subscribe({ messenger }) {
console.log(`监听到子应用${v.from}发来消息:`, v) console.log(`监听到子应用${v.from}发来消息:`, v)
}) })
} }
...@@ -13,6 +13,6 @@ const emoji = [ ...@@ -13,6 +13,6 @@ const emoji = [
['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'], ['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'],
['磕头', '回头', '跳绳', '投降', '挥手', '激动', '街舞', '左太极'], ['磕头', '回头', '跳绳', '投降', '挥手', '激动', '街舞', '左太极'],
['右太极', '嘿哈', '捂脸', '奸笑', '机智', '皱眉', '耶', '社会社会'], ['右太极', '嘿哈', '捂脸', '奸笑', '机智', '皱眉', '耶', '社会社会'],
['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹'], ['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹']
] ]
export default emoji export default emoji
export function debounce(func, wait= 200){ export function debounce(func, wait = 200) {
let timeout; let timeout
return function(event){ return function(event) {
clearTimeout(timeout) clearTimeout(timeout)
timeout = setTimeout(()=>{ timeout = setTimeout(() => {
func.call(this, event) func.call(this, event)
},wait) }, wait)
}
} }
}
export function dateFormat (dateTime, format = 'YYYY-MM-DD HH:mm') { export function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') {
const date = new Date(dateTime) const date = new Date(dateTime)
const config = { const config = {
YYYY: date.getFullYear(), YYYY: date.getFullYear(),
...@@ -22,4 +22,4 @@ export function dateFormat (dateTime, format = 'YYYY-MM-DD HH:mm') { ...@@ -22,4 +22,4 @@ export function dateFormat (dateTime, format = 'YYYY-MM-DD HH:mm') {
format = format.replace(key, config[key]) format = format.replace(key, config[key])
} }
return format return format
}
\ No newline at end of file \ No newline at end of file
}
import { Message } from 'element-ui' import { Message } from 'element-ui'
let util = {} let util = {}
util.cloneText = function (message) { util.cloneText = function(message) {
let input = document.createElement('input') let input = document.createElement('input')
input.value = message input.value = message
document.body.appendChild(input) document.body.appendChild(input)
...@@ -9,95 +9,95 @@ util.cloneText = function (message) { ...@@ -9,95 +9,95 @@ util.cloneText = function (message) {
document.body.removeChild(input) document.body.removeChild(input)
Message.success('复制成功') Message.success('复制成功')
} }
util.getBeforeDate = function (sign = '-') { util.getBeforeDate = function(sign = '-') {
let day = new Date(); let day = new Date()
let month = day.getMonth() + 1; let month = day.getMonth() + 1
let date = day.getDate(); let date = day.getDate()
if (month < 10) month = '0' + month; if (month < 10) month = '0' + month
if (date < 10) date = '0' + date; if (date < 10) date = '0' + date
var s = day.getFullYear() + sign + month + sign + date; var s = day.getFullYear() + sign + month + sign + date
return s; return s
} }
util.getBeforeMonth = function (days) { util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1; let month = new Date().getMonth() + 1
let year = new Date().getFullYear(); let year = new Date().getFullYear()
let arr = new Array(); let arr = new Array()
for (let i = 0; i < days; i++) { for (let i = 0; i < days; i++) {
if (month <= 0) { if (month <= 0) {
year = year - 1; year = year - 1
month = month + 12; month = month + 12
} }
if (month < 10) month = '0' + month; if (month < 10) month = '0' + month
arr[i] = year + '年' + month + '月' arr[i] = year + '年' + month + '月'
month-- month--
} }
return arr; return arr
} }
/** /**
* 格式化时间 * 格式化时间
* @param {Array} time * @param {Array} time
*/ */
util.formatTime = function (time) { util.formatTime = function(time) {
return { return {
startTime: time ? time[0] + ' ' + '00:00:00' : '', startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : '' endTime: time ? time[1] + ' ' + '23:59:59' : ''
} }
} }
util.tringToDate = function (dateStr, separator) { util.tringToDate = function(dateStr, separator) {
if (!separator) { if (!separator) {
separator = "-"; separator = '-'
} }
var dateArr = dateStr.split(separator); var dateArr = dateStr.split(separator)
var year = parseInt(dateArr[0]); var year = parseInt(dateArr[0])
var month; var month
//处理月份为04这样的情况 //处理月份为04这样的情况
if (dateArr[1].indexOf("0") == 0) { if (dateArr[1].indexOf('0') == 0) {
month = parseInt(dateArr[1].substring(1)); month = parseInt(dateArr[1].substring(1))
} else { } else {
month = parseInt(dateArr[1]); month = parseInt(dateArr[1])
} }
var day = parseInt(dateArr[2]); var day = parseInt(dateArr[2])
var date = new Date(year, month - 1, day); var date = new Date(year, month - 1, day)
return date; return date
} }
util.getDay = function (num, str = '-') { util.getDay = function(num, str = '-') {
var today = new Date(); var today = new Date()
var nowTime = today.getTime(); var nowTime = today.getTime()
var ms = 24 * 3600 * 1000 * num; var ms = 24 * 3600 * 1000 * num
today.setTime(parseInt(nowTime + ms)); today.setTime(parseInt(nowTime + ms))
var oYear = today.getFullYear(); var oYear = today.getFullYear()
var oMoth = (today.getMonth() + 1).toString(); var oMoth = (today.getMonth() + 1).toString()
if (oMoth.length <= 1) oMoth = '0' + oMoth; if (oMoth.length <= 1) oMoth = '0' + oMoth
var oDay = today.getDate().toString(); var oDay = today.getDate().toString()
if (oDay.length <= 1) oDay = '0' + oDay; if (oDay.length <= 1) oDay = '0' + oDay
return oYear + str + oMoth + str + oDay; return oYear + str + oMoth + str + oDay
} }
util.openUrl = function (url) { util.openUrl = function(url) {
const link = document.createElement('a') const link = document.createElement('a')
link.href = url link.href = url
link.target = '_blank' link.target = '_blank'
link.rel = 'opener' link.rel = 'opener'
link.click() link.click()
} }
util.downloadIamge = function (imgsrc, name = new Date().getTime()) { util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名 //下载图片地址和图片名
var image = new Image(); var image = new Image()
// 解决跨域 Canvas 污染问题 // 解决跨域 Canvas 污染问题
image.setAttribute("crossOrigin", "anonymous"); image.setAttribute('crossOrigin', 'anonymous')
image.onload = function () { image.onload = function() {
var canvas = document.createElement("canvas"); var canvas = document.createElement('canvas')
canvas.width = image.width; canvas.width = image.width
canvas.height = image.height; canvas.height = image.height
var context = canvas.getContext("2d"); var context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height); context.drawImage(image, 0, 0, image.width, image.height)
var url = canvas.toDataURL("image/png"); //得到图片的base64编码数据 var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
var a = document.createElement("a"); // 生成一个a元素 var a = document.createElement('a') // 生成一个a元素
var event = new MouseEvent("click"); // 创建一个单击事件 var event = new MouseEvent('click') // 创建一个单击事件
a.download = name || "photo"; // 设置图片名称 a.download = name || 'photo' // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性 a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件 a.dispatchEvent(event) // 触发a的单击事件
}; }
image.src = imgsrc; image.src = imgsrc
} }
export default util export default util
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from "@/assets/empty.png" import url from '@/assets/empty.png'
export default { export default {
name: 'classifyList', name: 'classifyList',
data() { data() {
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
// addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id) // addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id)
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
$title:encodeURI(addOrEdit == 1 ? '新建分类' : '编辑分类') $title: encodeURI(addOrEdit == 1 ? '新建分类' : '编辑分类')
} }
addOrEdit != 1 && (params.id = row.id) addOrEdit != 1 && (params.id = row.id)
this.$router.push({ this.$router.push({
......
...@@ -34,15 +34,25 @@ ...@@ -34,15 +34,25 @@
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio> <el-radio v-model="editForm.useChannel" label="2" :disabled="apear != 'couponAdd'">到店核销</el-radio>
</template> </template>
<template slot="directionalFlagHtml"> <template slot="directionalFlagHtml">
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">否</el-radio> <div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">是</el-radio> <el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div v-if="editForm.useChannel != 1">
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template> </template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio> <el-radio v-model="editForm.effectiveType" label="3" :disabled="apear != 'couponAdd'">无有效期</el-radio>
<br /> <br />
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block"> <el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker> <el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOption" :default-time="defaultTime" :format="format" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays">
...@@ -112,6 +122,8 @@ export default { ...@@ -112,6 +122,8 @@ export default {
name: 'editCashCoupon', name: 'editCashCoupon',
data() { data() {
return { return {
defaultTime: ['00:00:00', '23:59:59'], // 选择日期后的默认时间
format: 'yyyy-MM-dd HH:mm:ss', // 日期显示格式
showSubmit: true, showSubmit: true,
userDisable: false, userDisable: false,
size: 'small', size: 'small',
...@@ -237,13 +249,6 @@ export default { ...@@ -237,13 +249,6 @@ export default {
// index:4 // index:4
}, },
{ {
label: '定向礼包专用',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '适用商品', label: '适用商品',
name: 'goods', name: 'goods',
addHtml: 'goodsHtml', addHtml: 'goodsHtml',
...@@ -271,6 +276,13 @@ export default { ...@@ -271,6 +276,13 @@ export default {
// index:9 // index:9
}, },
{ {
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '使用说明', label: '使用说明',
name: 'useDescription', name: 'useDescription',
addHtml: 'useDescriptionHtml' addHtml: 'useDescriptionHtml'
...@@ -305,9 +317,12 @@ export default { ...@@ -305,9 +317,12 @@ export default {
this.apear = 'couponEdit' this.apear = 'couponEdit'
this.title = '编辑' this.title = '编辑'
} }
this.editFormData[0].isDisabled = true const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
this.editFormData[1].isDisabled = true const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
this.editFormData[9].isDisabled = true const anticipatedCostIdx = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
this.editFormData[couponNameIndex].isDisabled = true
this.editFormData[anticipatedCostIdx].isDisabled = true
this.editFormData[stockIndex].isDisabled = true
this.userDisable = true this.userDisable = true
} else { } else {
this.apear = 'couponAdd' this.apear = 'couponAdd'
...@@ -339,7 +354,8 @@ export default { ...@@ -339,7 +354,8 @@ export default {
}, },
'editForm.effectiveTime'(newValue, oldValue) { 'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) { if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true) // this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else { } else {
this.couponTime = '' this.couponTime = ''
} }
...@@ -352,15 +368,17 @@ export default { ...@@ -352,15 +368,17 @@ export default {
'editForm.useChannel'(newValue, oldValue) { 'editForm.useChannel'(newValue, oldValue) {
let goodHtmlIndex = this.editFormData.findIndex(item => item.name == 'goods') let goodHtmlIndex = this.editFormData.findIndex(item => item.name == 'goods')
let proTableIndex = this.editFormData.findIndex(item => item.addHtml == 'proTable') let proTableIndex = this.editFormData.findIndex(item => item.addHtml == 'proTable')
this.editFormData[goodHtmlIndex].isHide = newValue != 1
if (this.routeInfo.addOrEdit != 3) {
this.editForm.directionalFlag = '1'
}
if (newValue == 1) { if (newValue == 1) {
this.editFormData[goodHtmlIndex].isHide = false
if (this.editForm.goodsRefList.length) { if (this.editForm.goodsRefList.length) {
this.editFormData[proTableIndex].isHide = false this.editFormData[proTableIndex].isHide = false
} }
} else { } else {
this.editForm.useBarriers = '1' this.editForm.useBarriers = '1'
this.editForm.full = '' this.editForm.full = ''
this.editFormData[goodHtmlIndex].isHide = true
this.editFormData[proTableIndex].isHide = true this.editFormData[proTableIndex].isHide = true
} }
}, },
...@@ -413,6 +431,13 @@ export default { ...@@ -413,6 +431,13 @@ export default {
}, },
methods: { methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if (oDateOne < timeStamp) {
this.editForm.effectiveTime = []
}
},
// 编辑按钮 // 编辑按钮
editMessage() { editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost') let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
...@@ -596,8 +621,8 @@ export default { ...@@ -596,8 +621,8 @@ export default {
//时间段 //时间段
const d = form.effectiveTime const d = form.effectiveTime
if (d && d.length > 0) { if (d && d.length > 0) {
obj.effectiveStartTime = d[0] + ' 00:00:00' obj.effectiveStartTime = d[0]
obj.effectiveEndTime = d[1] + ' 23:59:59' obj.effectiveEndTime = d[1]
} }
} }
...@@ -663,7 +688,7 @@ export default { ...@@ -663,7 +688,7 @@ export default {
} }
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
...@@ -842,4 +867,10 @@ export default { ...@@ -842,4 +867,10 @@ export default {
word-break: break-word; word-break: break-word;
overflow: auto; overflow: auto;
} }
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
</style> </style>
...@@ -49,10 +49,24 @@ ...@@ -49,10 +49,24 @@
</div> </div>
<p class="edit-title">{{ title }}折扣劵</p> <p class="edit-title">{{ title }}折扣劵</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block"> <el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker> <el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays">
...@@ -85,6 +99,8 @@ export default { ...@@ -85,6 +99,8 @@ export default {
name: 'editDiscountCoupon', name: 'editDiscountCoupon',
data() { data() {
return { return {
defaultTime: ['00:00:00', '23:59:59'], // 选择日期后的默认时间
format: 'yyyy-MM-dd HH:mm:ss', // 日期显示格式
showSubmit: true, showSubmit: true,
userDisable: false, userDisable: false,
size: 'small', size: 'small',
...@@ -127,7 +143,8 @@ export default { ...@@ -127,7 +143,8 @@ export default {
effectiveType: '2', effectiveType: '2',
effectiveTime: [], effectiveTime: [],
effectiveDays: '', effectiveDays: '',
anticipatedCost: '' anticipatedCost: '',
directionalFlag: '1'
}, },
editRule: { editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }], anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
...@@ -161,6 +178,13 @@ export default { ...@@ -161,6 +178,13 @@ export default {
append: '张' append: '张'
}, },
{ {
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期', label: '有效期',
name: 'effectiveType', name: 'effectiveType',
addHtml: 'effectiveHtml' addHtml: 'effectiveHtml'
...@@ -192,15 +216,19 @@ export default { ...@@ -192,15 +216,19 @@ export default {
this.apear = 'couponSee' this.apear = 'couponSee'
this.showSubmit = false this.showSubmit = false
this.title = '查看' this.title = '查看'
this.editFormData[5].isHide = false const editHtmlIndex = this.editFormData.findIndex(val => val.addHtml == 'editHtml')
this.editFormData[editHtmlIndex].isHide = false
} else if (addOrEdit == 2) { } else if (addOrEdit == 2) {
this.apear = 'couponEdit' this.apear = 'couponEdit'
this.title = '编辑' this.title = '编辑'
} }
this.isDisabled = true this.isDisabled = true
this.editFormData[0].isDisabled = this.isDisabled const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
this.editFormData[1].isDisabled = this.isDisabled const anticipatedCostIndex = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
this.editFormData[2].isDisabled = this.isDisabled const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
this.editFormData[couponNameIndex].isDisabled = this.isDisabled
this.editFormData[anticipatedCostIndex].isDisabled = this.isDisabled
this.editFormData[stockIndex].isDisabled = this.isDisabled
this.userDisable = true this.userDisable = true
} else { } else {
this.apear = 'couponAdd' this.apear = 'couponAdd'
...@@ -227,7 +255,8 @@ export default { ...@@ -227,7 +255,8 @@ export default {
}, },
'editForm.effectiveTime'(newValue, oldValue) { 'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) { if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true) // this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else { } else {
this.couponTime = '' this.couponTime = ''
} }
...@@ -242,6 +271,11 @@ export default { ...@@ -242,6 +271,11 @@ export default {
}, },
methods: { methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if (oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮 // 编辑按钮
editMessage() { editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost') let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
...@@ -257,6 +291,7 @@ export default { ...@@ -257,6 +291,7 @@ export default {
getInfo() { getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res) this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + '' this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2) this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期 //有效期
...@@ -309,8 +344,8 @@ export default { ...@@ -309,8 +344,8 @@ export default {
//时间段 //时间段
const d = form.effectiveTime const d = form.effectiveTime
if (d && d.length > 0) { if (d && d.length > 0) {
obj.effectiveStartTime = d[0] + ' 00:00:00' obj.effectiveStartTime = d[0]
obj.effectiveEndTime = d[1] + ' 23:59:59' obj.effectiveEndTime = d[1]
} }
} }
...@@ -323,6 +358,8 @@ export default { ...@@ -323,6 +358,8 @@ export default {
} }
//使用描述 //使用描述
obj.useDescription = form.useDescription obj.useDescription = form.useDescription
//是否定制礼包专用
obj.directionalFlag = form.directionalFlag
//预估成本 //预估成本
obj.anticipatedCost = form.anticipatedCost * 100 obj.anticipatedCost = form.anticipatedCost * 100
return obj return obj
...@@ -341,7 +378,7 @@ export default { ...@@ -341,7 +378,7 @@ export default {
} }
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
...@@ -624,4 +661,13 @@ export default { ...@@ -624,4 +661,13 @@ export default {
word-break: break-word; word-break: break-word;
overflow: auto; overflow: auto;
} }
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
.glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important;
}
</style> </style>
...@@ -28,10 +28,24 @@ ...@@ -28,10 +28,24 @@
</div> </div>
<p class="edit-title">{{ title }}兑换券</p> <p class="edit-title">{{ title }}兑换券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="directionalFlagHtml">
<div>
<el-radio v-model="editForm.directionalFlag" label="1" :disabled="apear != 'couponAdd'">所有客户可用</el-radio>
<span class="promptCopy">创建成功后立即生效,所有小程序用户均可领用</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="2" :disabled="apear != 'couponAdd'">定向礼包专用</el-radio>
<span class="promptCopy">企微员工通过企微工作台定向礼包发送给客户</span>
</div>
<div>
<el-radio v-model="editForm.directionalFlag" label="3" :disabled="apear != 'couponAdd'">关联商品可用</el-radio>
<span class="promptCopy">关联商品,用户支付成功后才能进行核销使用</span>
</div>
</template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block"> <el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'">
<el-date-picker v-model="editForm.effectiveTime" type="daterange" style="width: 295px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker> <el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays">
...@@ -64,6 +78,8 @@ export default { ...@@ -64,6 +78,8 @@ export default {
name: 'editDiscountCoupon', name: 'editDiscountCoupon',
data() { data() {
return { return {
defaultTime: ['00:00:00', '23:59:59'], // 选择日期后的默认时间
format: 'yyyy-MM-dd HH:mm:ss', // 日期显示格式
showSubmit: true, showSubmit: true,
userDisable: false, userDisable: false,
size: 'small', size: 'small',
...@@ -106,7 +122,8 @@ export default { ...@@ -106,7 +122,8 @@ export default {
effectiveType: '2', effectiveType: '2',
effectiveTime: [], effectiveTime: [],
effectiveDays: '', effectiveDays: '',
anticipatedCost: '' anticipatedCost: '',
directionalFlag: '1'
}, },
editRule: { editRule: {
anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }], anticipatedCost: [{ required: true, message: '请输入预估成本', trigger: 'change' }],
...@@ -140,6 +157,13 @@ export default { ...@@ -140,6 +157,13 @@ export default {
append: '张' append: '张'
}, },
{ {
label: '使用规则',
name: 'directionalFlag',
addHtml: 'directionalFlagHtml',
isHide: false
// index:5
},
{
label: '有效期', label: '有效期',
name: 'effectiveType', name: 'effectiveType',
addHtml: 'effectiveHtml' addHtml: 'effectiveHtml'
...@@ -169,7 +193,8 @@ export default { ...@@ -169,7 +193,8 @@ export default {
if (id) { if (id) {
if (addOrEdit == 3) { if (addOrEdit == 3) {
this.apear = 'couponSee' this.apear = 'couponSee'
this.editFormData[5].isHide = false const editHtmlIndex = this.editFormData.findIndex(val => val.addHtml == 'editHtml')
this.editFormData[editHtmlIndex].isHide = false
this.showSubmit = false this.showSubmit = false
this.title = '查看' this.title = '查看'
} else if (addOrEdit == 2) { } else if (addOrEdit == 2) {
...@@ -177,8 +202,12 @@ export default { ...@@ -177,8 +202,12 @@ export default {
this.title = '编辑' this.title = '编辑'
} }
this.isDisabled = true this.isDisabled = true
this.editFormData[0].isDisabled = this.isDisabled const couponNameIndex = this.editFormData.findIndex(val => val.name == 'couponName')
this.editFormData[1].isDisabled = this.isDisabled const anticipatedCostIndex = this.editFormData.findIndex(val => val.name == 'anticipatedCost')
const stockIndex = this.editFormData.findIndex(val => val.name == 'stock')
this.editFormData[couponNameIndex].isDisabled = this.isDisabled
this.editFormData[anticipatedCostIndex].isDisabled = this.isDisabled
this.editFormData[stockIndex].isDisabled = this.isDisabled
this.userDisable = true this.userDisable = true
} else { } else {
this.apear = 'couponAdd' this.apear = 'couponAdd'
...@@ -205,7 +234,8 @@ export default { ...@@ -205,7 +234,8 @@ export default {
}, },
'editForm.effectiveTime'(newValue, oldValue) { 'editForm.effectiveTime'(newValue, oldValue) {
if (newValue && newValue.length == 2) { if (newValue && newValue.length == 2) {
this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true) // this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this.couponTime = newValue[0] + ' ~ ' + newValue[1]
} else { } else {
this.couponTime = '' this.couponTime = ''
} }
...@@ -220,6 +250,11 @@ export default { ...@@ -220,6 +250,11 @@ export default {
}, },
methods: { methods: {
haveChange() {
let oDateOne = new Date(this.editForm.effectiveTime[0]).getTime()
let timeStamp = new Date().getTime()
if (oDateOne < timeStamp) this.editForm.effectiveTime = []
},
// 编辑按钮 // 编辑按钮
editMessage() { editMessage() {
let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost') let anticipatedCostIndex = this.editFormData.findIndex(item => item.name == 'anticipatedCost')
...@@ -235,6 +270,7 @@ export default { ...@@ -235,6 +270,7 @@ export default {
getInfo() { getInfo() {
this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => { this.$apis.couponManage.getCouponDetailApi({ couponId: this.routeInfo.id }).then(res => {
this.editForm = this.$common.utils.deepClone(res) this.editForm = this.$common.utils.deepClone(res)
this.editForm.directionalFlag = this.editForm.directionalFlag + ''
this.editForm.effectiveType = this.editForm.effectiveType + '' this.editForm.effectiveType = this.editForm.effectiveType + ''
this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2) this.editForm.anticipatedCost = (this.editForm.anticipatedCost / 100).toFixed(2)
//有效期 //有效期
...@@ -287,8 +323,8 @@ export default { ...@@ -287,8 +323,8 @@ export default {
//时间段 //时间段
const d = form.effectiveTime const d = form.effectiveTime
if (d && d.length > 0) { if (d && d.length > 0) {
obj.effectiveStartTime = d[0] + ' 00:00:00' obj.effectiveStartTime = d[0]
obj.effectiveEndTime = d[1] + ' 23:59:59' obj.effectiveEndTime = d[1]
} }
} }
...@@ -301,6 +337,8 @@ export default { ...@@ -301,6 +337,8 @@ export default {
} }
//使用描述 //使用描述
obj.useDescription = form.useDescription obj.useDescription = form.useDescription
//是否定制礼包专用
obj.directionalFlag = form.directionalFlag
//预估成本 //预估成本
obj.anticipatedCost = form.anticipatedCost * 100 obj.anticipatedCost = form.anticipatedCost * 100
return obj return obj
...@@ -319,7 +357,7 @@ export default { ...@@ -319,7 +357,7 @@ export default {
} }
this.$apis.couponManage[method](params).then(res => { this.$apis.couponManage[method](params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
...@@ -498,4 +536,13 @@ export default { ...@@ -498,4 +536,13 @@ export default {
word-break: break-word; word-break: break-word;
overflow: auto; overflow: auto;
} }
.promptCopy {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
margin-left: -10px;
}
.glsx-combi-form .el-form-item--small.el-form-item {
margin-top: 0px !important;
}
</style> </style>
...@@ -105,6 +105,15 @@ export default { ...@@ -105,6 +105,15 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'statusList' optionsName: 'statusList'
},
{
label: '使用规则',
name: 'directionalFlag',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'directionalFlagList'
} }
], ],
// 表格 // 表格
...@@ -161,6 +170,14 @@ export default { ...@@ -161,6 +170,14 @@ export default {
} }
}, },
{ {
label: '使用规则',
name: 'directionalFlag',
width: '150px',
formatter: cellValue => {
return this.baseData.directionalFlagList.find(item => item.confId == cellValue.directionalFlag).confName
}
},
{
label: '优惠券状态', label: '优惠券状态',
name: 'status', name: 'status',
width: '100px', width: '100px',
...@@ -190,6 +207,20 @@ export default { ...@@ -190,6 +207,20 @@ export default {
// confName: '会员服务' // confName: '会员服务'
// } // }
], ],
directionalFlagList: [
{
confId: '1',
confName: '所有客户可用'
},
{
confId: '2',
confName: '定向礼包专用'
},
{
confId: '3',
confName: '关联商品可用'
}
],
statusList: [ statusList: [
{ {
confId: '1', confId: '1',
......
...@@ -74,7 +74,8 @@ export default { ...@@ -74,7 +74,8 @@ export default {
useB: '', useB: '',
// 表格 // 表格
searchForm: { searchForm: {
phone: '' phone: '',
wechatUserFlag: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
// 搜索 // 搜索
...@@ -84,6 +85,15 @@ export default { ...@@ -84,6 +85,15 @@ export default {
name: 'phone', name: 'phone',
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
},
{
label: '是否加企微',
name: 'wechatUserFlag',
type: 'select',
optionList: [],
optionId: 'statusId',
optionLabel: 'statusName',
optionsName: 'wechatUserFlagList'
} }
], ],
// 表格 // 表格
...@@ -101,6 +111,13 @@ export default { ...@@ -101,6 +111,13 @@ export default {
prop: 'userName' prop: 'userName'
}, },
{ {
label: '是否加入企微',
prop: 'wechatUserFlag',
formatter: cellValue => {
return this.baseData.wechatUserFlagList.find(item => item.statusId == cellValue.wechatUserFlag).statusName
}
},
{
label: '优惠券状态', label: '优惠券状态',
prop: 'userStatus', prop: 'userStatus',
formatter: cellValue => { formatter: cellValue => {
...@@ -135,6 +152,16 @@ export default { ...@@ -135,6 +152,16 @@ export default {
confId: '3', confId: '3',
confName: '已过期' confName: '已过期'
} }
],
wechatUserFlagList: [
{
statusId: '2',
statusName: '是'
},
{
statusId: '1',
statusName: '否'
}
] ]
}, },
exportLoading: false exportLoading: false
...@@ -260,7 +287,8 @@ export default { ...@@ -260,7 +287,8 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
phone: '' phone: '',
wechatUserFlag: ''
} }
this.handleSearch() this.handleSearch()
}, },
......
...@@ -386,6 +386,7 @@ export default { ...@@ -386,6 +386,7 @@ export default {
} }
} else { } else {
this.attachmentText = '请输入群发内容' this.attachmentText = '请输入群发内容'
return
} }
this.$refs.groupForm.validate(v => { this.$refs.groupForm.validate(v => {
if (v) { if (v) {
......
...@@ -6,20 +6,9 @@ ...@@ -6,20 +6,9 @@
<div class="title">基础信息</div> <div class="title">基础信息</div>
<div class="info-box"> <div class="info-box">
<div class="info-content"> <div class="info-content">
<el-form <el-form :model="basicForm" class="basic-form" :rules="basicRules" ref="basicForm" label-width="120px">
:model="basicForm"
class="basic-form"
:rules="basicRules"
ref="basicForm"
label-width="120px"
>
<el-form-item label="群发名称" prop="massName"> <el-form-item label="群发名称" prop="massName">
<el-input <el-input v-model="basicForm.massName" :size="size" placeholder="群发名称仅内部可见" maxlength="10"></el-input>
v-model="basicForm.massName"
:size="size"
placeholder="群发名称仅内部可见"
maxlength="10"
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userList"> <el-form-item prop="userList">
<label slot="label" class="required">选择群主</label> <label slot="label" class="required">选择群主</label>
...@@ -28,20 +17,9 @@ ...@@ -28,20 +17,9 @@
全部账号 全部账号
</el-button> </el-button>
<!-- <span>已选择{{ basicForm.userList ? basicForm.userList.length : 0 }}人</!--> <!-- <span>已选择{{ basicForm.userList ? basicForm.userList.length : 0 }}人</!-->
<div <div class="sale-select" v-show="basicForm.userList && basicForm.userList.length != 0">
class="sale-select"
v-show="basicForm.userList && basicForm.userList.length != 0"
>
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag <el-tag effect="plain" type="info" v-for="(tag, idx) in basicForm.userList" :key="idx" closable :disable-transitions="false" @close="remove(tag, idx)">
effect="plain"
type="info"
v-for="(tag, idx) in basicForm.userList"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag, idx)"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
...@@ -56,13 +34,8 @@ ...@@ -56,13 +34,8 @@
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">群发内容</label> <label slot="label" class="required">群发内容</label>
<WelcomeWords <WelcomeWords ref="welcome" :form="'customerGroup'" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
ref="welcome" <div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div>
:form="'customerGroup'"
:btnList="btnList"
:eventBus="eventBus"
></WelcomeWords>
<div v-show="attachmentShow" class="el-form-item__error">{{attachmentText}}</div>
</el-form-item> </el-form-item>
<el-form-item label="发送时间" prop="sendType"> <el-form-item label="发送时间" prop="sendType">
<el-radio-group v-model="basicForm.sendType"> <el-radio-group v-model="basicForm.sendType">
...@@ -70,22 +43,9 @@ ...@@ -70,22 +43,9 @@
<el-radio :label="2">定时发送</el-radio> <el-radio :label="2">定时发送</el-radio>
</el-radio-group> </el-radio-group>
<div v-show="basicForm.sendType == 2" class="date-picker"> <div v-show="basicForm.sendType == 2" class="date-picker">
<el-date-picker <el-date-picker v-model="basicForm.sendTime" size="small" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :picker-options="dateOptions" @change="changeValue"></el-date-picker>
v-model="basicForm.sendTime" -
size="small" <el-time-picker v-model="basicForm.sendDate" size="small" value-format="HH:mm:ss" placeholder="选择时间" :picker-options="timeOptions"></el-time-picker>
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
:picker-options="dateOptions"
@change="changeValue"
></el-date-picker>-
<el-time-picker
v-model="basicForm.sendDate"
size="small"
value-format="HH:mm:ss"
placeholder="选择时间"
:picker-options="timeOptions"
></el-time-picker>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -107,13 +67,7 @@ ...@@ -107,13 +67,7 @@
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button> <el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> </div>
<glsx-dialog <glsx-dialog :title="'选择群主'" :width="'1142px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
:title="'选择群主'"
:width="'1142px'"
:isVisible="membersVisible"
@confirmDialog="handleConfirm"
@closeDialog="membersVisible = !membersVisible"
>
<SelectLord ref="membersForm" islord="true" v-if="membersVisible" :selectData="selectData"></SelectLord> <SelectLord ref="membersForm" islord="true" v-if="membersVisible" :selectData="selectData"></SelectLord>
</glsx-dialog> </glsx-dialog>
</div> </div>
...@@ -334,6 +288,7 @@ export default { ...@@ -334,6 +288,7 @@ export default {
} }
} else { } else {
this.attachmentText = '请输入群发内容' this.attachmentText = '请输入群发内容'
return
} }
this.$refs.groupForm.validate(v => { this.$refs.groupForm.validate(v => {
if (v) { if (v) {
...@@ -347,7 +302,7 @@ export default { ...@@ -347,7 +302,7 @@ export default {
if (item.attType == 1) { if (item.attType == 1) {
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '') const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) { const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -399,9 +354,7 @@ export default { ...@@ -399,9 +354,7 @@ export default {
const date = new Date(v).getTime() const date = new Date(v).getTime()
if (date < Date.now()) { if (date < Date.now()) {
this.timeOptions = { this.timeOptions = {
selectableRange: `${dayjs() selectableRange: `${dayjs().add(1, 'm').format('HH:mm')}:00 - 23:59:59`
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
} }
} else { } else {
this.timeOptions = { this.timeOptions = {
......
...@@ -195,7 +195,11 @@ export default { ...@@ -195,7 +195,11 @@ export default {
}) })
}, },
merchantOpen() { merchantOpen() {
this.$apis.customerTransform.merchantOpen({ merchantId: this.$globalState.session.merchantId }).then(res => { let channel = null
if (location.host == 'scrm.cgacar.com') {
channel = 2
}
this.$apis.customerTransform.merchantOpen({ merchantId: this.$globalState.session.merchantId, channel }).then(res => {
this.openFlag = res.openFlag this.openFlag = res.openFlag
}) })
}, },
......
...@@ -2,12 +2,7 @@ ...@@ -2,12 +2,7 @@
<div> <div>
<div class="emotion-box" :style="{ height: height + 'px' }"> <div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i"> <div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion <emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
class="emotion-item"
v-for="(item, i) in line"
:key="i"
@click.native="clickHandler(item)"
>{{ item }}</emotion>
</div> </div>
</div> </div>
</div> </div>
......
<template> <template>
<div class="square-main"> <div class="square-main">
<el-dialog <el-dialog title="选择模板" :visible.sync="dialogVisible" width="1142px" :before-close="handleClose" :close-on-click-modal="false">
title="选择模板"
:visible.sync="dialogVisible"
width="1142px"
:before-close="handleClose"
:close-on-click-modal="false"
>
<div class="model-panel"> <div class="model-panel">
<el-form :inline="true" class="message-form" :model="searchForm" ref="searchForm"> <el-form :inline="true" class="message-form" :model="searchForm" ref="searchForm">
<el-form-item label="模板标题"> <el-form-item label="模板标题">
...@@ -14,12 +8,7 @@ ...@@ -14,12 +8,7 @@
</el-form-item> </el-form-item>
<el-form-item label="创建者"> <el-form-item label="创建者">
<el-select v-model="searchForm.createdBy" :size="size" placeholder="全部"> <el-select v-model="searchForm.createdBy" :size="size" placeholder="全部">
<el-option <el-option v-for="item in createdList" :key="item.id" :label="item.createdName" :value="item.createdBy"></el-option>
v-for="item in createdList"
:key="item.id"
:label="item.createdName"
:value="item.createdBy"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -47,16 +36,11 @@ ...@@ -47,16 +36,11 @@
<div class="model-title-h2">{{ item.content }}</div> <div class="model-title-h2">{{ item.content }}</div>
</div> </div>
<div class="model-item-content"> <div class="model-item-content">
<div class="model-content">创建人:{{item.createdName}}</div> <div class="model-content">创建人:{{ item.createdName }}</div>
<div class="model-content">创建日期:{{ item.createdTime }}</div> <div class="model-content">创建日期:{{ item.createdTime }}</div>
</div> </div>
<div class="model-item-btn"> <div class="model-item-btn">
<el-button <el-button v-if="item.createdBy == userId" type="text" :size="size" @click="editModel(item.id)">编辑</el-button>
v-if="item.createdBy == userId"
type="text"
:size="size"
@click="editModel(item.id)"
>编辑</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -64,53 +48,20 @@ ...@@ -64,53 +48,20 @@
<img src="@/assets/empty.png" /> <img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div> <div class="empty-item">暂无数据</div>
</div> </div>
<el-pagination <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="tableTotal" :layout="layout"></el-pagination>
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="tableTotal"
:layout="layout"
></el-pagination>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button> <el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="selectModelItem">复制文本</el-button> <el-button size="small" type="primary" @click="selectModelItem">复制文本</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog :title="modelTitle" :visible.sync="createVisible" width="547px" :before-close="handleCreateClose" :close-on-click-modal="false">
:title="modelTitle" <el-form :model="templateForm" :rules="templateRules" ref="templateForm" label-width="100px" class="templateForm">
:visible.sync="createVisible"
width="547px"
:before-close="handleCreateClose"
:close-on-click-modal="false"
>
<el-form
:model="templateForm"
:rules="templateRules"
ref="templateForm"
label-width="100px"
class="templateForm"
>
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input <el-input v-model="templateForm.title" maxlength="10" show-word-limit placeholder="输入10个字以内的标题,如活动促销"></el-input>
v-model="templateForm.title"
maxlength="10"
show-word-limit
placeholder="输入10个字以内的标题,如活动促销"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="内容说明" prop="content"> <el-form-item label="内容说明" prop="content">
<el-input <el-input type="textarea" v-model="templateForm.content" maxlength="600" :rows="7" show-word-limit placeholder="输入不超过600字内的文字说明"></el-input>
type="textarea"
v-model="templateForm.content"
maxlength="600"
:rows="7"
show-word-limit
placeholder="输入不超过600字内的文字说明"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="template-footer"> <div class="template-footer">
......
...@@ -10,25 +10,10 @@ ...@@ -10,25 +10,10 @@
<template v-else-if="item.attType == 7"> <template v-else-if="item.attType == 7">
<div class="preview-activity"> <div class="preview-activity">
<!-- <img class="applet-logo" src="@/assets/guestCustom/applet-logo.png" alt /> --> <!-- <img class="applet-logo" src="@/assets/guestCustom/applet-logo.png" alt /> -->
<div class="activity-name">{{item.attContent.marketingName}}</div> <div class="activity-name">{{ item.attContent.marketingName }}</div>
<img <img v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6" class="activity-logo" src="@/assets/guestCustom/activity-logo.png" alt />
v-if="item.attContent.marketingType != 5 && item.attContent.marketingType != 6" <img v-if="item.attContent.marketingType == 5" class="activity-logo" src="@/assets/guestCustom/activity-spike.png" alt />
class="activity-logo" <img v-if="item.attContent.marketingType == 6" class="activity-logo" src="@/assets/guestCustom/activity-service.png" alt />
src="@/assets/guestCustom/activity-logo.png"
alt
/>
<img
v-if="item.attContent.marketingType == 5"
class="activity-logo"
src="@/assets/guestCustom/activity-spike.png"
alt
/>
<img
v-if="item.attContent.marketingType == 6"
class="activity-logo"
src="@/assets/guestCustom/activity-service.png"
alt
/>
<div class="activity-footer"> <div class="activity-footer">
<img src="@/assets/guestCustom/applet-footer.png" alt /> <img src="@/assets/guestCustom/applet-footer.png" alt />
</div> </div>
......
...@@ -2,18 +2,14 @@ ...@@ -2,18 +2,14 @@
<div class="select-emp-panel"> <div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel"> <div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div> <div class="popper-arrow"></div>
<div class="emp-scroll-panel" :style="{ <div
class="emp-scroll-panel"
:style="{
height: treeHeight + 'px' height: treeHeight + 'px'
}"> }"
>
<div class="tree-title">所在门店/部门</div> <div class="tree-title">所在门店/部门</div>
<el-tree <el-tree v-loading="loading" :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
v-loading="loading"
:data="listTree"
:expand-on-click-node="false"
highlight-current
:props="defaultProps"
@node-click="handleNodeClick"
></el-tree>
</div> </div>
</div> </div>
<el-col <el-col
...@@ -22,15 +18,7 @@ ...@@ -22,15 +18,7 @@
height: treeHeight + 20 + 'px' height: treeHeight + 20 + 'px'
}" }"
> >
<GLTable <GLTable v-loading="loading" ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable>
v-loading="loading"
ref="saleTable"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
@selectionTable="selectionTable"
></GLTable>
</el-col> </el-col>
</div> </div>
</template> </template>
......
...@@ -161,6 +161,8 @@ export default { ...@@ -161,6 +161,8 @@ export default {
}) })
console.log(this.labelTreeRets) console.log(this.labelTreeRets)
} else { } else {
const labelTreeRets = utils.deepClone(this.labelTreeRets)
console.log(labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelType: item.labelType, labelType: item.labelType,
...@@ -172,6 +174,16 @@ export default { ...@@ -172,6 +174,16 @@ export default {
checkAll: false checkAll: false
} }
}) })
console.log(labelTreeRets)
labelTreeRets.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
let labelId = item.tagChecked ? item.tagChecked.id : ''
let index = tag.labelList.findIndex(iem => iem.id == labelId)
tag.tagChecked = tag.labelList[index]
}
})
})
} }
}) })
}, },
...@@ -297,7 +309,7 @@ export default { ...@@ -297,7 +309,7 @@ export default {
margin: 8px 0; margin: 8px 0;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
/deep/.el-radio__inner{ /deep/.el-radio__inner {
box-shadow: none !important; box-shadow: none !important;
} }
/deep/.el-radio__label { /deep/.el-radio__label {
......
...@@ -8,42 +8,13 @@ ...@@ -8,42 +8,13 @@
<div class="member-content"> <div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent> <el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="所在门店/部门" style="margin-bottom: 0;"> <el-form-item label="所在门店/部门" style="margin-bottom: 0;">
<el-popover <el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
ref="popover" <el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
placement="bottom" <el-input v-model="searchForm.department" slot="reference" :size="size" readonly placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
width="215"
trigger="click"
v-model="popoverVisible"
@show="onShowPopover"
@hide="onHidePopover"
>
<el-tree
class="select-tree"
:data="treeData"
:props="defaultProps"
default-expand-all
@node-click="handleNodeClick"
></el-tree>
<el-input
v-model="searchForm.department"
slot="reference"
:size="size"
readonly
placeholder="请选择所在门店/部门"
:class="{ 'rotate': popoverVisible }"
suffix-icon="el-icon-arrow-down"
@keyup.enter.native="search"
></el-input>
</el-popover> </el-popover>
</el-form-item> </el-form-item>
<el-form-item label="姓名" style="margin-bottom: 0;"> <el-form-item label="姓名" style="margin-bottom: 0;">
<el-input <el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
:size="size"
v-model.trim="searchForm.name"
@keyup.enter.native="search"
clearable
placeholder="请输入姓名搜索"
></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item> <!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox> <el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
...@@ -53,20 +24,10 @@ ...@@ -53,20 +24,10 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="table-content" style="max-height: 456px;"> <div class="table-content" style="max-height: 456px;">
<GLTable <GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick">
v-loading="loading"
ref="empTable"
:tableData="tableEmpData"
:tableParams="tableParams"
:hasNum="false"
:hasPage="false"
:noDataImg="url"
@selectionTable="selectionTable"
@row-click="rowClick"
>
<div slot="staffName" slot-scope="scope"> <div slot="staffName" slot-scope="scope">
<span>{{scope.scope.staffName}}</span> <span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{scope.scope.staffTitle}}</span> <span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -77,17 +38,10 @@ ...@@ -77,17 +38,10 @@
</div> </div>
<div class="member-right"> <div class="member-right">
<div class="member-title">已选</div> <div class="member-title">已选</div>
<div class="member-name">成员名称({{innerTags.length}}项)</div> <div class="member-name">成员名称({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper"> <div class="input-tag-wrapper">
<div class="tag-box"> <div class="tag-box">
<el-tag <el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
v-for="(tag, idx) in innerTags"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="remove(tag)"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
......
...@@ -5,26 +5,12 @@ ...@@ -5,26 +5,12 @@
<div class="sale-select"> <div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput"> <div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<div class="tag-box"> <div class="tag-box">
<el-tag <el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
v-for="(tag, idx) in innerTags"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="remove(tag)"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
</div> </div>
<el-input <el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none" @keyup.enter.native="searchEmp"></el-input>
size="small"
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
@keyup.enter.native="searchEmp"
></el-input>
</div> </div>
<div> <div>
<el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button> <el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button>
...@@ -32,12 +18,7 @@ ...@@ -32,12 +18,7 @@
</div> </div>
<div> <div>
<div class="select-sale-panel"> <div class="select-sale-panel">
<select-emp <select-emp :selectData="selectData" :islord="islord" @selectTable="selectTable" ref="selectEmpTabel"></select-emp>
:selectData="selectData"
:islord="islord"
@selectTable="selectTable"
ref="selectEmpTabel"
></select-emp>
<div class="popper__arrow"></div> <div class="popper__arrow"></div>
</div> </div>
</div> </div>
......
<!-- 树形搜索 --> <!-- 树形搜索 -->
<template> <template>
<div> <div>
<el-popover <el-popover ref="popover" placement="bottom-start" trigger="click" v-model="popoverVisible" :disabled="targetItem.isDisabled" @show="onShowPopover" @hide="onHidePopover">
ref="popover" <el-tree ref="tree" class="select-tree" highlight-current default-expand-all node-key="id" :expand-on-click-node="isExpand" :style="`min-width: ${treeWidth}`" :data="treeData" :current-node-key="form[targetItem.name]" :props="defaultProps" :filter-node-method="handleFilterNode" @current-change="handleNodeClick"></el-tree>
placement="bottom-start" <el-input slot="reference" ref="input" v-model="form[targetItem.nameLabel]" clearable :disabled="targetItem.isDisabled" :style="`width: ${width}px`" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" :placeholder="'请选择' + targetItem.label" @change="handleClear"></el-input>
trigger="click"
v-model="popoverVisible"
:disabled="targetItem.isDisabled"
@show="onShowPopover"
@hide="onHidePopover"
>
<el-tree
ref="tree"
class="select-tree"
highlight-current
default-expand-all
node-key="id"
:expand-on-click-node="isExpand"
:style="`min-width: ${treeWidth}`"
:data="treeData"
:current-node-key="form[targetItem.name]"
:props="defaultProps"
:filter-node-method="handleFilterNode"
@current-change="handleNodeClick"
></el-tree>
<el-input
slot="reference"
ref="input"
v-model="form[targetItem.nameLabel]"
clearable
:disabled="targetItem.isDisabled"
:style="`width: ${width}px`"
:class="{ 'rotate': popoverVisible }"
suffix-icon="el-icon-arrow-down"
:placeholder="'请选择' + targetItem.label"
@change="handleClear"
></el-input>
</el-popover> </el-popover>
</div> </div>
</template> </template>
......
<template> <template>
<div class="w-textarea" ref="wTextarea"> <div class="w-textarea" ref="wTextarea">
<div <div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @click="inputClick($event)" @focus="onFocus" @blur="onBlur" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div>
contenteditable="true"
class="w-textarea_input"
ref="wTextareaContent"
:id="contentId"
@click="inputClick($event)"
@focus="onFocus"
@blur="onBlur"
@keydown.delete="handleDelete($event)"
@input="handleInput($event.target)"
></div>
<!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength"> <!-- <div class="w-textarea_tools" v-if="tools.length > 0 || maxlength">
<button <button
class="w-textarea_tools__item" class="w-textarea_tools__item"
......
...@@ -45,40 +45,13 @@ ...@@ -45,40 +45,13 @@
<div class="btn-group"> <div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id"> <div class="add-btn" v-for="item in btnList" :key="item.id">
<!-- <i class="el-icon-circle-plus-outline"></i> --> <!-- <i class="el-icon-circle-plus-outline"></i> -->
<img <img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
:src="require(`@/assets/guestCustom/add-${item.type}.png`)"
alt
v-if="item.id == 1"
@click="selectEmotion"
/>
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" v-else alt /> <img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span> <span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span> <span v-else>{{ item.name }}</span>
<input <input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
v-if="item.type == 'img'" <input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
type="file" <el-link v-else-if="item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="welcome-input upload-img"
:accept="item.accept || 'image/png, image/jpeg, image/jpg'"
@change="e => handleImgChange(e, item)"
/>
<input
v-else-if="item.type == 'video'"
type="file"
style="opacity: 0"
:id="item.name + 'file'"
ref="file"
class="welcome-input"
:accept="item.accept || 'video/*'"
@change="e => handleVideoChange(e, item)"
/>
<el-link
v-else-if="item.type == 'nickname' || item.type == 'acivity'"
style="opacity: 0"
@click="handleFun(item.funName)"
>{{ item.name }}</el-link>
</div> </div>
</div> </div>
</div> </div>
...@@ -287,7 +260,7 @@ export default { ...@@ -287,7 +260,7 @@ export default {
}) })
} }
} else { } else {
this.previewList.splice(0) this.previewList.shift(0)
} }
}, },
selectActivity(val) { selectActivity(val) {
...@@ -350,7 +323,7 @@ export default { ...@@ -350,7 +323,7 @@ export default {
} }
} }
}, },
changeInput: utils.debounce(function() { changeInput: utils.debounce(function () {
var allNodes = document.getElementById('editor').childNodes var allNodes = document.getElementById('editor').childNodes
var str = '' var str = ''
allNodes.forEach(item => { allNodes.forEach(item => {
...@@ -368,7 +341,7 @@ export default { ...@@ -368,7 +341,7 @@ export default {
this.eventBus.$emit('update', this.previewList) this.eventBus.$emit('update', this.previewList)
const obj = val.find(item => item.attType == 1) const obj = val.find(item => item.attType == 1)
let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>') let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function(res) { const htm = attContent.replace(/\[[\u4E00-\u9FA56]{1,4}]/gi, function (res) {
let word = res.replace(/\[|\]/gi, '') let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity) const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1 let index = parseInt(list.indexOf(word)) + 1
......
...@@ -10,21 +10,9 @@ ...@@ -10,21 +10,9 @@
</div> </div>
</glsx-combi-form> </glsx-combi-form>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable <GLTable style="margin-top: 20px;" ref="table" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :hasPage="false" :pageConf="pageConf">
style="margin-top: 20px;"
ref="table"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:hasPage="false"
:pageConf="pageConf"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button <el-button type="text" :disabled="scope.scope.status == 1 || (scope.scope.status == 0 && scope.scope.remindStatus == 1)" @click="remind(scope.scope)">提醒发送</el-button>
type="text"
:disabled="scope.scope.status == 1 || (scope.scope.status == 0 && scope.scope.remindStatus == 1)"
@click="remind(scope.scope)"
>提醒发送</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
......
...@@ -5,12 +5,7 @@ ...@@ -5,12 +5,7 @@
<div class="detail-modular"> <div class="detail-modular">
<div class="title">员工详情</div> <div class="title">员工详情</div>
<div class="detail-info"> <div class="detail-info">
<el-menu <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
:default-active="activeIndex"
class="el-menu-demo"
mode="horizontal"
@select="handleSelect"
>
<el-menu-item index>全部</el-menu-item> <el-menu-item index>全部</el-menu-item>
<el-menu-item index="1">已发送员工</el-menu-item> <el-menu-item index="1">已发送员工</el-menu-item>
<el-menu-item index="0">未发送员工</el-menu-item> <el-menu-item index="0">未发送员工</el-menu-item>
...@@ -19,24 +14,14 @@ ...@@ -19,24 +14,14 @@
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div> <div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div v-if="employeelist.length != 0" class="info-list"> <div v-if="employeelist.length != 0" class="info-list">
<div class="info-item" v-for="(item, index) in employeelist" :key="item.id"> <div class="info-item" v-for="(item, index) in employeelist" :key="item.id">
<img <img class="info-avatar" :src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')" alt />
class="info-avatar"
:src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')"
alt
/>
<div class="info-content"> <div class="info-content">
<div class="info-text"> <div class="info-text">
<div class="info-name"> <div class="info-name">
{{ item.staffName }} {{ item.staffName }}
<span :class="[item.status == 0 ? 'unsend' : 'send']"> <span :class="[item.status == 0 ? 'unsend' : 'send']">
{{ item.status == 0 ? '未发送' : item.status == 1 ? '已发送' : '发送失败' }} {{ item.status == 0 ? '未发送' : item.status == 1 ? '已发送' : '发送失败' }}
<el-popover <el-popover v-show="item.status != 0 && item.status != 1" placement="top-start" title="失败原因:" width="400" trigger="hover">
v-show="item.status != 0 && item.status != 1"
placement="top-start"
title="失败原因:"
width="400"
trigger="hover"
>
<p>1.若插入活动发送失败,可能为企微未绑定活动小程序,请绑定后再尝试。</p> <p>1.若插入活动发送失败,可能为企微未绑定活动小程序,请绑定后再尝试。</p>
<p>2.可能为客户开启消息免打扰,消息发送失败。</p> <p>2.可能为客户开启消息免打扰,消息发送失败。</p>
<p>3.可能为群发次数达到上限,上限次数为每个客户/客户群每天仅可接收1条群发消息。</p> <p>3.可能为群发次数达到上限,上限次数为每个客户/客户群每天仅可接收1条群发消息。</p>
...@@ -48,13 +33,7 @@ ...@@ -48,13 +33,7 @@
</div> </div>
<div class="info-right"> <div class="info-right">
<div v-if="item.status != 0 || item.remindStatus == 1">已提醒</div> <div v-if="item.status != 0 || item.remindStatus == 1">已提醒</div>
<el-button <el-button v-if="item.status == 0" :disabled="item.remindStatus == 1 || isDisabled" size="mini" type="primary" @click="remind(item, index)">提醒</el-button>
v-if="item.status == 0"
:disabled="item.remindStatus == 1 || isDisabled"
size="mini"
type="primary"
@click="remind(item, index)"
>提醒</el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -68,12 +47,7 @@ ...@@ -68,12 +47,7 @@
<div class="detail-modular"> <div class="detail-modular">
<div class="title">客户详情</div> <div class="title">客户详情</div>
<div class="detail-info"> <div class="detail-info">
<el-menu <el-menu :default-active="customIndex" class="el-menu-demo" mode="horizontal" @select="handleCustomSelect">
:default-active="customIndex"
class="el-menu-demo"
mode="horizontal"
@select="handleCustomSelect"
>
<el-menu-item index>全部</el-menu-item> <el-menu-item index>全部</el-menu-item>
<el-menu-item index="1">已送达客户</el-menu-item> <el-menu-item index="1">已送达客户</el-menu-item>
<el-menu-item index="0">未送达客户</el-menu-item> <el-menu-item index="0">未送达客户</el-menu-item>
...@@ -82,24 +56,14 @@ ...@@ -82,24 +56,14 @@
<div class="detail-total">共 {{ customerlist.length || 0 }} 人</div> <div class="detail-total">共 {{ customerlist.length || 0 }} 人</div>
<div v-if="customerlist.length != 0" class="info-list"> <div v-if="customerlist.length != 0" class="info-list">
<div class="info-item" v-for="item in customerlist" :key="item.id"> <div class="info-item" v-for="item in customerlist" :key="item.id">
<img <img class="info-avatar" :src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')" alt />
class="info-avatar"
:src="item.avatar ? item.avatar : require('@/assets/guestCustom/default-avatar.png')"
alt
/>
<div class="info-content info-custom"> <div class="info-content info-custom">
<div class="info-text"> <div class="info-text">
<div class="info-name"> <div class="info-name">
{{ item.customerName }} {{ item.customerName }}
<div class="customer-table" :class="[item.status == 0 ? 'unsend' : 'send']"> <div class="customer-table" :class="[item.status == 0 ? 'unsend' : 'send']">
{{ item.status == 0 ? '未送达' : item.status == 1 ? '已送达' : '送达失败' }} {{ item.status == 0 ? '未送达' : item.status == 1 ? '已送达' : '送达失败' }}
<el-popover <el-popover v-show="item.status != 0 && item.status != 1" placement="top-start" title="失败原因:" width="400" trigger="hover">
v-show="item.status != 0 && item.status != 1"
placement="top-start"
title="失败原因:"
width="400"
trigger="hover"
>
<p>1.若插入活动发送失败,可能为企微未绑定活动小程序,请绑定后再尝试。</p> <p>1.若插入活动发送失败,可能为企微未绑定活动小程序,请绑定后再尝试。</p>
<p>2.可能为客户开启消息免打扰,消息发送失败。</p> <p>2.可能为客户开启消息免打扰,消息发送失败。</p>
<p>3.可能为群发次数达到上限,上限次数为每个客户/客户群每天仅可接收1条群发消息。</p> <p>3.可能为群发次数达到上限,上限次数为每个客户/客户群每天仅可接收1条群发消息。</p>
...@@ -109,7 +73,7 @@ ...@@ -109,7 +73,7 @@
</div> </div>
</div> </div>
<div class="info-right"> <div class="info-right">
<div>通过 {{item.staffName}}发送</div> <div>通过 {{ item.staffName }}发送</div>
</div> </div>
</div> </div>
</div> </div>
......
<template> <template>
<div class="send-assistant"> <div class="send-assistant">
<div class="menu-sub"> <div class="menu-sub">
<div <div class="menu-sub-item" :class="[activeIndex == '1' ? 'active' : '']" @click="switchMenu(1)">客户群发</div>
class="menu-sub-item" <div class="menu-sub-item" :class="[activeIndex == '2' ? 'active' : '']" @click="switchMenu(2)">客户群群发</div>
:class="[activeIndex == '1' ? 'active' : '']"
@click="switchMenu(1)"
>客户群发</div>
<div
class="menu-sub-item"
:class="[activeIndex == '2' ? 'active' : '']"
@click="switchMenu(2)"
>客户群群发</div>
</div> </div>
<div v-if="activeIndex == 1" class="container"> <div v-if="activeIndex == 1" class="container">
<div class="container-header"> <div class="container-header">
...@@ -20,42 +12,23 @@ ...@@ -20,42 +12,23 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="btnClick('create', 1)" @click="btnClick('create', 1)"
>新建群发</el-button>--> >新建群发</el-button>-->
<GLButton <GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton>
type="primary"
:size="size"
icon="el-icon-plus"
fn="新建客户群发"
@click="btnClick('create', 1)"
>新建群发</GLButton>
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div> <div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable <GLTable :key="key" ref="customer" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf">
:key="key"
ref="customer"
:getListApi="customerList"
:tableParams="gueastTableParams"
:pageConf="gueastPageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope"> <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.attachmentList" :key="index"> <span v-for="(i, index) in scope.scope.attachmentList" :key="index">
[共{{scope.scope.attachmentList.length}}条] [共{{ scope.scope.attachmentList.length }}条]
<span v-show="i.attType == 1">{{i.attContent}}</span> <span v-show="i.attType == 1">{{ i.attContent }}</span>
<span v-show="i.attType == 2 || i.attType == 3">[{{ATT_TYPE[i.attType]}}]</span> <span v-show="i.attType == 2 || i.attType == 3">[{{ ATT_TYPE[i.attType] }}]</span>
<span v-show="i.attType == 4 || i.attType == 5">[{{ATT_TYPE[i.attType]}}]</span> <span v-show="i.attType == 4 || i.attType == 5">[{{ ATT_TYPE[i.attType] }}]</span>
</span> </span>
</div> </div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<span <span v-if="scope.scope.status == -1 || scope.scope.status == 2" style="color: #EB4E4E;">创建失败</span>
v-if="scope.scope.status == -1 || scope.scope.status == 2"
style="color: #EB4E4E;"
>创建失败</span>
<span v-else> <span v-else>
<el-button <el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1) || new Date(scope.scope.sendTime) > new Date()" @click="btnClick('remind', 1, scope.scope)">提醒发送</el-button>
type="text"
:disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1) || new Date(scope.scope.sendTime) > new Date()"
@click="btnClick('remind', 1, scope.scope)"
>提醒发送</el-button>
<GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton> <GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button> --> <!-- <el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button> -->
</span> </span>
...@@ -71,39 +44,23 @@ ...@@ -71,39 +44,23 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="btnClick('create', 2)" @click="btnClick('create', 2)"
>新建群发</el-button>--> >新建群发</el-button>-->
<GLButton <GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton>
type="primary"
:size="size"
fn="新建客户群群发"
icon="el-icon-plus"
@click="btnClick('create', 2)"
>新建群发</GLButton>
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div> <div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable <GLTable :key="groupKey" ref="customerGroup" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf">
:key="groupKey"
ref="customerGroup"
:getListApi="customerGroupList"
:tableParams="gueastGroupTableParams"
:pageConf="gueastPageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope"> <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.attachmentList" :key="index"> <span v-for="(i, index) in scope.scope.attachmentList" :key="index">
[共{{scope.scope.attachmentList.length}}条] [共{{ scope.scope.attachmentList.length }}条]
<span v-show="i.attType == 1">{{i.attContent}}</span> <span v-show="i.attType == 1">{{ i.attContent }}</span>
<span v-show="i.attType == 2 || i.attType == 3">[{{ATT_TYPE[i.attType]}}]</span> <span v-show="i.attType == 2 || i.attType == 3">[{{ ATT_TYPE[i.attType] }}]</span>
<span v-show="i.attType == 4 || i.attType == 5">[{{ATT_TYPE[i.attType]}}]</span> <span v-show="i.attType == 4 || i.attType == 5">[{{ ATT_TYPE[i.attType] }}]</span>
</span> </span>
</div> </div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<span v-if="scope.scope.status == -1" style="color: #EB4E4E;">创建失败</span> <span v-if="scope.scope.status == -1" style="color: #EB4E4E;">创建失败</span>
<span v-else> <span v-else>
<el-button <el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)" @click="btnClick('remind', 2, scope.scope)">提醒发送</el-button>
type="text"
:disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)"
@click="btnClick('remind', 2, scope.scope)"
>提醒发送</el-button>
<GLButton type="text" fn="客户群群发详情" @click="btnClick('detail', 2, scope.scope)">详情</GLButton> <GLButton type="text" fn="客户群群发详情" @click="btnClick('detail', 2, scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> --> <!-- <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> -->
</span> </span>
......
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '@/utils/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
<!-- 查看产品 - 评价信息 -->
<template>
<div class="comment-detail container edit-container">
<div style="padding: 20px">
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="starLevel" slot-scope="scope">
<img v-for="(item, index) in scope.scope.starLevel" :key="index" class="icon-star" src="@/assets/icon-star.png" />
</div>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<span v-if="!scope.scope.imgUrls">-</span>
<img v-else class="img-60" :src="scope.scope.imgUrls[0]" @click="handleImgLook(scope.scope.imgUrls)" />
</div>
</GLTable>
<el-dialog v-if="isImgVisible" title="查看" :visible.sync="isImgVisible" :close-on-click-modal="false">
<div class="dialog-look">
<span v-for="(item, index) in dialogObj.imgUrls" :key="index">
<el-image style="width: 200px; height: 200px; margin-right: 10px" :src="item" :preview-src-list="[item]"></el-image>
</span>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
goodsId: ''
},
isImgVisible: false,
// imgUrls: [],,
dialogObj: {
imgUrls: [],
uploadType: 'img'
},
// 表格
getListApi: this.$apis.proManage.getGoodsCommentListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '评价用户名称',
prop: 'customerName'
},
{
label: '评价时间',
prop: 'createdDateStr'
},
{
label: '评价星级',
prop: 'starLevel',
addHtml: 'starLevel'
},
{
label: '评价内容',
prop: 'commentContent',
line: 3
},
{
label: '图片',
prop: 'goodsImage',
addHtml: 'goodsImage'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
props: {
goodsId: {
type: Object,
default: () => {}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.goodsId = this.goodsId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
},
handleImgLook(imgUrls) {
this.isImgVisible = !this.isImgVisible
this.dialogObj = {
imgUrls: imgUrls,
uploadType: 'img'
}
}
}
}
</script>
<style></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!