dynamicDailyReport.js 2.68 KB
import api from '~/utils/request/request.js'

function dailyReportWeeklyList(data) {
	return api.post('dj.api.smartcarlife.dailyReport.weekly.list', data)
}

function dynamicDailyReportSave(data) {
	return api.post('dj.api.smartcarlife.dailyReport.dynamic.save', data, [], undefined, 'dj', false)
}

function dynamicDailyReportDraftSave(data) {
	return api.post('dj.api.smartcarlife.dailyReport.dynamic.draft.save', data, [], undefined, 'dj', false)
}

/**
 * 门店日报数据上报(推送经营统计到消息群)
 * @param {Object} data dailyReportRecordId
 * @returns {Promise}
 */
function dynamicDailyReportDataPush(data) {
	return api.post(
		'dj.api.smartcarlife.dailyReport.dynamic.data.push',
		data,
		[],
		undefined,
		'dj',
		false
	)
}

function dailyReportDetailGet(data) {
	return api.get('dj.api.smartcarlife.dailyReport.detail.get', data, [], undefined, 'dj', false)
}

function dailyReportMonthlyPendingCountGet(data) {
	return api.post(
		// 'dj.api.smartcarlife.dailyReport.monthly.pending.count',
		'dj.api.smartcarlife.dailyReport.monthly.pending.get',
		data,
		[],
		undefined,
		'dj',
		false
	)
}

function getUserScene(data) {
	return api.post(
		'dj.api.smartcarlife.scene.config.getUserScene',
		data,
		[],
		undefined,
		'dj',
		false
	)
}

function findSceneByMerchantIdAndSceneType(data) {
	return api.post(
		'dj.api.scenemerchantref.findByMerchantIdAndSceneType',
		data,
		[],
		undefined,
		'dj',
		false
	)
}

function staffDailyReportCarBrand(data) {
	return api.post('dj.api.smartcarlife.staff.daily.report.car.brand', data)
}

function dailyReportDiscussionStaffList(data) {
	return api.post(
		'dj.api.smartcarlife.dailyReport.discussion.staff.list',
		data,
		[],
		undefined,
		'dj',
		false
	)
}

/**
 * 统计客户今日计划到店数
 * @param {Object} data merchantId、advanceUserId、inviteDate(可空,默认当日)
 * @returns {Promise} dj.api.smartcarlife.customer.todayPlanStore.count
 */
function customerTodayPlanStoreCount(data) {
	return api.post('dj.api.smartcarlife.customer.todayPlanStore.count', data)
}

/**
 * 查询客户今日计划到店列表
 * @param {Object} data merchantId、advanceUserId、inviteDate
 * @returns {Promise} dj.api.smartcarlife.customer.todayPlanStore.list
 */
function customerTodayPlanStoreList(data) {
	return api.post('dj.api.smartcarlife.customer.todayPlanStore.list', data)
}

module.exports = {
	dailyReportWeeklyList,
	dynamicDailyReportSave,
	dynamicDailyReportDraftSave,
	dynamicDailyReportDataPush,
	dailyReportDetailGet,
	dailyReportMonthlyPendingCountGet,
	getUserScene,
	findSceneByMerchantIdAndSceneType,
	staffDailyReportCarBrand,
	dailyReportDiscussionStaffList,
	customerTodayPlanStoreCount,
	customerTodayPlanStoreList
}