Commit a412882c by wangzhihui

大版本接口联调

1 parent c435647d
...@@ -531,7 +531,7 @@ export function getRecordTagList(data) { ...@@ -531,7 +531,7 @@ export function getRecordTagList(data) {
return request(data, "post") return request(data, "post")
} }
// 查询质检列表|侧边栏 // 查询质检列表|侧边栏
export function getQualityList(data) { export function getQualityList(data) {
data.method = `${path2}reception.findCheckResultByBatchId` data.method = `${path2}reception.findCheckResultByBatchId`
return request(data, "post") return request(data, "post")
...@@ -571,3 +571,14 @@ export function checkProductDefineAPI(data) { ...@@ -571,3 +571,14 @@ export function checkProductDefineAPI(data) {
data.method = `${path2}merchantPerformanceProductDefine.deleteValid` data.method = `${path2}merchantPerformanceProductDefine.deleteValid`
return request(data, "post") return request(data, "post")
} }
// 查询录音标签列表
export function receptionTagPage(data) {
data.method = `dj.api.smartcarlife.reception.receptionTagPage`
return request(data, "post")
}
// 导出录音标签列表
export function receptionTagPageExport(data) {
data.method = `dj.api.smartcarlife.reception.receptionTagPageExport`
return request(data, "post")
}
...@@ -283,24 +283,31 @@ export function personalConfigImport(data) { ...@@ -283,24 +283,31 @@ export function personalConfigImport(data) {
// 批量设置运营人员 // 批量设置运营人员
export function shopBatchSet(data) { export function shopBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.shopOperation.setting.batch' data.method =
"dj.api.smartcarlife.serviceMerchant.shopOperation.setting.batch"
return request(data, "post") return request(data, "post")
} }
// 批量设置展业场景 // 批量设置展业场景
export function busiBatchSet(data) { export function busiBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch' data.method = "dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch"
return request(data, "post") return request(data, "post")
} }
// 查询地图行政区域省市区三级结构 // 查询地图行政区域省市区三级结构
export function getDistrictDetail(data) { export function getDistrictDetail(data) {
data.method = 'dj.api.smartcarlife.map.districts.details' data.method = "dj.api.smartcarlife.map.districts.details"
return request(data) return request(data)
} }
// 获取嘀加设置的服务商 // 获取嘀加设置的服务商
export function getMerService(data) { export function getMerService(data) {
data.method = 'dj.smartcarlife.api.merchant.dj.serviceList' data.method = "dj.smartcarlife.api.merchant.dj.serviceList"
return request(data)
}
//日报填写标识修改
export function updateDailyReportFlag(data) {
data.method = "dj.api.smartcarlife.serviceMerchant.dailyReportFillFlag.update"
return request(data) return request(data)
} }
...@@ -317,7 +317,10 @@ $prefix: d2; ...@@ -317,7 +317,10 @@ $prefix: d2;
max-height: 200px !important; max-height: 200px !important;
overflow-y: scroll; overflow-y: scroll;
} }
.el-tooltip__popper.tools-gltip {
width: 238px !important;
height: 95px !important;
}
.el-tooltip__popper.is-light { .el-tooltip__popper.is-light {
width: 177px; width: 177px;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08) !important; box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08) !important;
......
...@@ -1334,3 +1334,8 @@ export const transferStatusOpt = [ ...@@ -1334,3 +1334,8 @@ export const transferStatusOpt = [
{ confId: 1, confValue: "推送付款单" }, { confId: 1, confValue: "推送付款单" },
{ confId: 2, confValue: "重推付款单" } { confId: 2, confValue: "重推付款单" }
] ]
export const label_businessOpt = [
{ confId: 2, confValue: "轻改" },
{ confId: 3, confValue: "权益" },
{ confId: 1, confValue: "延保" }
]
import { baseConfig } from "@/main"
const OSS = require("ali-oss") const OSS = require("ali-oss")
export default { class GlOssApi {
constructor(params = {}) {
this.baseConfig = params.baseConfig
}
/** /**
* 阿里云oss sdk文件上传 dir 上传到的文件位置 * 分片上传大文件到阿里云OSS(带断点续传和重试机制)
* @param {*} file 文件流 * @param {*} file 文件流(大文件)
* @param {*} successCallback 成功回调 * @param {*} successCallback 成功回调
* @param {*} errCallBack 失败回调 * @param {*} errCallBack 失败回调
* @param {*} bucketName 阿里云桶名(可以指定多个桶名) * @param {*} bucketName 桶名(可选)
* @param {*} dir 上传文件夹路径 譬如images * @param {*} dir 上传目录(可选)
* @param {*} partSize 分片大小(单位 KB,默认500KB)
* @param {*} maxRetries 最大重试次数(默认3次)
*/ */
multipartUpload(
bucketUpload(
file, file,
successCallback = new Function(), successCallback = new Function(),
errCallBack = new Function(), errCallBack = new Function(),
bucketName = "zzl-filerepostorypublic", bucketName = "zzl-filerepostorypublic",
dir = "image" dir = "image",
partSize = 500, // 默认分片大小为500KB
maxRetries = 3 // 最大重试次数
) { ) {
const fileName = file.name // 先获取上传要的资料签名 const { baseConfig } = this
// 实例化一个上传客户端 if (!baseConfig) errCallBack(new Error("初始化缺少baseConfig配置"))
const fileName = file.name
const client = new OSS({ const client = new OSS({
// yourRegion填写Bucket所在地域。Region填写为oss-cn-hangzhou。
// region: "oss-cn-beijing", //我的存储是北京,可根据具体配置自行修改
// region: "oss-cn-shanghai",
// 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。)(后台接口返回)
accessKeyId: baseConfig.alyOss.accessKeyId, accessKeyId: baseConfig.alyOss.accessKeyId,
accessKeySecret: baseConfig.alyOss.accessKeySecret, accessKeySecret: baseConfig.alyOss.accessKeySecret,
// 从STS服务获取的安全令牌(SecurityToken)。
// stsToken: obj.securityToken,
// 填写Bucket名称。
bucket: baseConfig.alyOss.bucket, bucket: baseConfig.alyOss.bucket,
endpoint: baseConfig.alyOss.endpoint endpoint: baseConfig.alyOss.endpoint
}) })
if (partSize < 100) {
try { console.error("分片大小不能小于100KB")
// 为保证唯一性,可以通过uuid将文件名替换 errCallBack(new Error("分片大小不能小于100KB"))
// let uuid = uuidv4() + fileName.substring(fileName.lastIndexOf('.'))if (dir.substring(dir.length - 1, 1) !== '/') { return
}
// 确保目录以斜杠结尾
if (!dir.endsWith("/")) {
dir += "/" dir += "/"
const result = client.put(dir + fileName, file) }
result const key = dir + fileName
.then((res) => { let retryCount = 0
console.log(res, "返回文件名和文件地址") let currentCheckpoint = null
const uploadWithRetry = async () => {
client
.multipartUpload(key, file, {
partSize: partSize * 1024, // 转换为字节
checkpoint: currentCheckpoint, // 使用上次的断点信息
progress: function (p, checkpoint) {
currentCheckpoint = checkpoint
console.log(`上传进度: ${p * 100}%`)
}
})
.then(async (result) => {
const size = const size =
file.size > 1000000 file.size > 1000000
? parseFloat(file.size / 1000000).toFixed(2) + "M" ? parseFloat(file.size / 1000000).toFixed(2) + "M"
: parseFloat(file.size / 1000).toFixed(2) + "KB" : parseFloat(file.size / 1000).toFixed(2) + "KB"
console.log(result, 111111111)
let [aliyunAddress] = result.res.requestUrls
console.log(aliyunAddress, "aliyunAddress")
const sourceImage = aliyunAddress
const targetImage = "exampledir/dest.png"
await processImage(
"image/quality,Q_50",
bucketName,
result.name,
targetImage
)
successCallback({ successCallback({
attachment: fileName, attachment: fileName,
aliyunAddress: res.url, aliyunAddress: decodeURIComponent(aliyunAddress).split("?")[0],
size: size size: size
}) })
}) })
.catch((err) => { .catch((err) => {
errCallBack(err) console.error("分片上传失败", err)
if (retryCount < maxRetries) {
retryCount++
console.log(`第${retryCount}次重试上传...`)
setTimeout(() => {
uploadWithRetry()
}, 3000) // 3秒后重试
} else {
errCallBack(err)
}
}) })
} catch (e) {
console.log(e)
} }
const processImage = async (
processStr,
targetBucket,
sourceImage,
targetImage
) => {
const result = await client.processObjectSave(
sourceImage,
targetImage,
processStr,
targetBucket
)
console.log(result.res, "99999")
}
uploadWithRetry() // 启动上传流程
} }
} }
export default GlOssApi
...@@ -621,7 +621,8 @@ import { limitPrice } from "@/common/format" ...@@ -621,7 +621,8 @@ import { limitPrice } from "@/common/format"
import { applicableModelTypeList, BaseData } from "@/common/constants.js" import { applicableModelTypeList, BaseData } from "@/common/constants.js"
import { mapActions, mapMutations } from "vuex" import { mapActions, mapMutations } from "vuex"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import GlOssApi from "glsk-oss-jssdk" // import GlOssApi from "glsk-oss-jssdk"
import GlOssApi from "@/common/oss.js"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info` const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default { export default {
name: "ProductForm", name: "ProductForm",
......
...@@ -2,21 +2,31 @@ ...@@ -2,21 +2,31 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44 * @Date: 2025-02-24 21:48:44
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-02-27 17:02:40 * @LastEditTime: 2025-07-10 18:45:37
* @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue * @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<!-- 编辑 - 运营确认 --> <!-- 编辑 - 运营确认 -->
<template> <template>
<d2-container class="edit-contract" v-loading="isLoadingGoodsCategoryConfiguration || isLoad"> <d2-container
class="edit-contract"
v-loading="isLoadingGoodsCategoryConfiguration || isLoad"
>
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info> <base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<multilateralShopMerchant ref="multilateralShopMerchant" :merchants-list="merchantEditData" <multilateralShopMerchant
@addMerchant="handleAddMerchant"></multilateralShopMerchant> ref="multilateralShopMerchant"
:merchants-list="merchantEditData"
@addMerchant="handleAddMerchant"
></multilateralShopMerchant>
<!-- 流量方信息 - 新增 - 新增商户 --> <!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant v-if="addMerVisible" :add-mer-visible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant> <add-merchant
v-if="addMerVisible"
:add-mer-visible="addMerVisible"
@handleClose="handleAddMerchant"
></add-merchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
<goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info> <goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -86,7 +96,6 @@ export default { ...@@ -86,7 +96,6 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters("goodsInfoData", { ...mapGetters("goodsInfoData", {
isLoadingGoodsCategoryConfiguration: "isLoadingGoodsCategoryConfiguration" isLoadingGoodsCategoryConfiguration: "isLoadingGoodsCategoryConfiguration"
...@@ -139,7 +148,7 @@ export default { ...@@ -139,7 +148,7 @@ export default {
// this.merchantEditData.push(res.createBusinessApproveMerchant) // this.merchantEditData.push(res.createBusinessApproveMerchant)
// } // }
this.merchantEditData = res.createBusinessApproveMerchantList || [] this.merchantEditData = res.createBusinessApproveMerchantList || []
console.log(this.merchantEditData, ' this.merchantEditData') console.log(this.merchantEditData, " this.merchantEditData")
this.SET_DATA({ this.SET_DATA({
name: "shelfUpdateMerchant", name: "shelfUpdateMerchant",
data: { data: {
...@@ -156,7 +165,8 @@ export default { ...@@ -156,7 +165,8 @@ export default {
// 返回测算数据 // 返回测算数据
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit() const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit() const merchantSubmitResult =
await this.$refs.multilateralShopMerchant.submit()
if ( if (
!merchantSubmitResult || !merchantSubmitResult ||
!divisionSubmitResult || !divisionSubmitResult ||
...@@ -181,10 +191,11 @@ export default { ...@@ -181,10 +191,11 @@ export default {
if (confirmType == "save") { if (confirmType == "save") {
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit() const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit() const merchantSubmitResult =
await this.$refs.multilateralShopMerchant.submit()
const goodsInfoSubmitResult = await this.$refs.goodsInfo.submit() const goodsInfoSubmitResult = await this.$refs.goodsInfo.submit()
// return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult) // return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult)
console.log(merchantSubmitResult, 'merchantSubmitResult') console.log(merchantSubmitResult, "merchantSubmitResult")
if ( if (
!merchantSubmitResult || !merchantSubmitResult ||
!divisionSubmitResult || !divisionSubmitResult ||
......
...@@ -30,38 +30,30 @@ ...@@ -30,38 +30,30 @@
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<template slot="fileUrl" slot-scope="scope"> <template slot="recordingUrl" slot-scope="scope">
<div <div
class="audio" class="audio"
@click="play(scope.scope.fileUrl)" @click="play(scope.scope.recordingUrl)"
v-if="scope.scope.fileUrl" v-if="scope.scope.recordingUrl"
> >
{{ scope.scope.fileUrl }} {{ scope.scope.recordingUrl }}
</div> </div>
</template> </template>
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9121801']" />
</span>
</div>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { import { receptionTagPage, receptionTagPageExport } from "@/api/resident.js"
getBrandList, import { listShop4sByRef } from "@api/merchant"
findAllLevelList, import { getBrandList } from "@/api/scene.js"
getSceneData, import { label_businessOpt } from "@/common/constants.js"
sceneExport
} from "@/api/scene.js"
import { outputValue_businessOpt } from "@/common/constants.js"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
export default { export default {
data() { data() {
return { return {
getListApi: getSceneData, getListApi: receptionTagPage,
tableParams: { tableParams: {
listName: "list", listName: "list",
tableOption: { tableOption: {
...@@ -70,27 +62,26 @@ export default { ...@@ -70,27 +62,26 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "驻店名称", label: "驻店名称",
prop: "yqMerchantName" prop: "staffName"
}, },
{ {
label: "门店名称", label: "门店名称",
prop: "storeBrand" prop: "merchantName"
}, },
{ {
label: "品牌", label: "品牌",
prop: "storeBrand" prop: "oneCarBrand"
}, },
{ {
label: "录音链接", label: "录音链接",
// prop: "fileUrl" addHtml: "recordingUrl",
addHtml: "fileUrl",
width: "150px" width: "150px"
}, },
{ {
label: "质检日期", label: "质检日期",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.createdDate return cellValue.checkDate
? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD") ? Util.dateFormate(cellValue.checkDate, "YYYY-MM-DD")
: "-" : "-"
} }
}, },
...@@ -102,7 +93,9 @@ export default { ...@@ -102,7 +93,9 @@ export default {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter(row) { formatter(row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType] let result = { 1: "延保", 2: "轻改", 3: "权益" }[
row.bussinessType
]
return result || "-" return result || "-"
} }
}, },
...@@ -118,77 +111,61 @@ export default { ...@@ -118,77 +111,61 @@ export default {
}, },
{ {
label: "身份介绍", label: "身份介绍",
prop: "startTime" prop: "sfjs"
}, },
{ {
label: "服务意识", label: "服务意识",
prop: "startTime" prop: "fwys"
}, },
{ {
label: "话题介入", label: "话题介入",
prop: "startTime" prop: "htjr"
}, },
{ {
label: "需求分析", label: "需求分析",
prop: "startTime" prop: "sqfx"
}, },
{ {
label: "专业知识", label: "专业知识",
prop: "startTime" prop: "zyzs"
}, },
{ {
label: "场景塑造", label: "场景塑造",
prop: "startTime" prop: "cjsz"
}, },
{ {
label: "案例展示", label: "案例展示",
prop: "startTime" prop: "alzs"
}, },
{ {
label: "攻防能力", label: "攻防能力",
prop: "startTime" prop: "gfnl"
}, },
{ {
label: "攻防能力", label: "逼单能力",
prop: "startTime" prop: "bdnl"
} }
] ]
}, },
props: {
value: "code",
label: "directoryName",
children: "sceneMarketLevelTwoList"
},
searchFormSearch: {}, searchFormSearch: {},
searchForm: { searchForm: {
businessCodeArr: [], orderFinishFlag: true,
storeName: "", staffName: "",
reportDate: [], merchantId: "",
storeBrandId: "", checkType: "",
createdBy: "" checkStart: [],
carBrandId: ""
}, },
showFormData: [ showFormData: [
{ {
label: "驻店名称", label: "驻店名称",
name: "storeName", name: "staffName",
type: "input", type: "input",
isClear: true isClear: true
}, },
// {
// label: "主营品牌",
// name: "storeBrandId",
// type: "select",
// // multiple: true,
// isClear: true,
// optionList: [],
// optionId: "id",
// optionLabel: "label",
// optionsName: "brandList"
// },
{ {
label: "业务场景", label: "业务场景",
name: "businessType", name: "checkType",
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
...@@ -198,15 +175,17 @@ export default { ...@@ -198,15 +175,17 @@ export default {
}, },
{ {
label: "门店", label: "门店",
name: "storeName", name: "merchantId",
type: "input", type: "select",
isClear: true optionList: [],
optionId: "merchantId",
optionLabel: "merchantName",
optionsName: "storeIdList"
}, },
{ {
label: "品牌", label: "品牌",
name: "storeBrandId", name: "carBrandId",
type: "select", type: "select",
// multiple: true,
isClear: true, isClear: true,
collapseTags: true, collapseTags: true,
optionList: [], optionList: [],
...@@ -217,7 +196,7 @@ export default { ...@@ -217,7 +196,7 @@ export default {
{ {
label: "质检时间", label: "质检时间",
name: "reportDate", name: "checkStart",
type: "datePicker", type: "datePicker",
isClear: false, isClear: false,
pickerOptions: "rangePickerOptions_30day2" pickerOptions: "rangePickerOptions_30day2"
...@@ -234,7 +213,7 @@ export default { ...@@ -234,7 +213,7 @@ export default {
} }
], ],
baseData: { baseData: {
businessTypeOpt: deepClone(outputValue_businessOpt), businessTypeOpt: deepClone(label_businessOpt),
receptionStatusOpt: [ receptionStatusOpt: [
{ {
confId: 0, confId: 0,
...@@ -245,7 +224,8 @@ export default { ...@@ -245,7 +224,8 @@ export default {
confValue: "未成交" confValue: "未成交"
} }
], ],
brandList: [] brandList: [],
storeIdList: []
} }
} }
}, },
...@@ -266,23 +246,18 @@ export default { ...@@ -266,23 +246,18 @@ export default {
console.log(this.searchForm) console.log(this.searchForm)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.businessCode = if (this.searchForm?.checkStart?.length) {
this.searchFormSearch.businessCodeArr.length > 1 let [startDate, endDate] = this.searchForm.checkStart
? this.searchFormSearch.businessCodeArr[1] this.searchFormSearch.checkStartTime = Util.dateFormate(
: ""
if (this.searchForm?.reportDate?.length) {
let [startDate, endDate] = this.searchForm.reportDate
this.searchFormSearch.startDate = Util.dateFormate(
startDate, startDate,
"YYYY-MM-DD" "YYYY-MM-DD"
) )
this.searchFormSearch.endDate = Util.dateFormate( this.searchFormSearch.checkEndTime = Util.dateFormate(
endDate, endDate,
"YYYY-MM-DD" "YYYY-MM-DD"
) )
} }
delete this.searchFormSearch.reportDate delete this.searchFormSearch.checkStart
delete this.searchFormSearch.businessCodeArr
resolve() resolve()
}) })
}, },
...@@ -297,7 +272,7 @@ export default { ...@@ -297,7 +272,7 @@ export default {
async exportTable() { async exportTable() {
try { try {
await this.beforeSearchFn() await this.beforeSearchFn()
const res = await sceneExport({ const res = await receptionTagPageExport({
...this.searchFormSearch ...this.searchFormSearch
}) })
if (res) window.open(res) if (res) window.open(res)
...@@ -307,7 +282,7 @@ export default { ...@@ -307,7 +282,7 @@ export default {
}, },
initSelect() { initSelect() {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误 // 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getBrandList()]) Promise.allSettled([this.getBrandList(), this.getServiceStore()])
.then((results) => { .then((results) => {
// 检查每个任务的结果 // 检查每个任务的结果
results.forEach((result, index) => { results.forEach((result, index) => {
...@@ -324,11 +299,11 @@ export default { ...@@ -324,11 +299,11 @@ export default {
}) })
}, },
getBusinessTypeList() { getServiceStore() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
findAllLevelList({}) listShop4sByRef({})
.then((res) => { .then((res) => {
this.baseData.businessTypeList = res this.baseData.storeIdList = res || []
resolve(res) // 返回结果以便主流程感知 resolve(res) // 返回结果以便主流程感知
}) })
.catch((err) => { .catch((err) => {
......
<template>
<div class="container">
<div class="left">
<div class="title-type">
<div
:class="['type', titleActiveIndex == index ? 'active' : '']"
v-for="(item, index) in titleTypeList"
:key="index"
@click="handleClick(index)"
>
{{ item.title }}
</div>
</div>
<div class="content gl-form-page">
<el-form :inline="true" :model="cousrFrom" class="form-inline">
<el-form-item>
<el-input
prefix-icon="el-icon-search"
v-model="cousrFrom.user"
placeholder="课程/标签搜索"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="search" size="small"
>查询</el-button
>
<el-button @click="resetForm" size="small">重置</el-button>
</el-form-item>
</el-form>
<el-checkbox-group v-model="checkedCities">
<el-checkbox v-for="city in cityOptions" :label="city" :key="city">
<div class="title">问界延保+安心包套餐培训视频(含考核)</div>
<el-tooltip
effect="light"
placement="top"
popper-class="tools-gltip"
>
<div slot="content" class="process-info">
<div>学习进度:<span>已完成</span></div>
<div>考核成绩:<span>80分</span></div>
<div>完成时间:<span>2025-06-30 16:30:05</span></div>
</div>
<div class="status orange">已完成</div>
</el-tooltip>
</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div class="right">
<div class="title-type">
<div class="select">已选课程</div>
<div class="time">共3节 75min</div>
</div>
<div class="reminder">
<img
class="error-circle"
src="../../images/error-circle.png"
/>提示:总课程时长建议< 60 min
</div>
<div class="select-list">
<div class="select-item" v-for="i in 20">
<div class="item-content">
问界销售异议处理问界销售异议处理问界销售异议处理-质量异议(含考核)<span
class="item-time"
>25min</span
>
</div>
<div class="del">删除</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "allocation",
data() {
return {
cousrFrom: {
user: ""
},
checkedCities: [],
titleActiveIndex: 0,
titleTypeList: [{ title: "推荐课程" }, { title: "自选课程" }],
cityOptions: ["上海", "北京", "广州", "深圳"]
}
},
methods: {
handleClick(index) {
this.titleActiveIndex = index
},
resetForm() {},
search() {}
}
}
</script>
<style scoped lang="scss">
.container {
display: flex;
align-content: center;
.left {
width: 383px;
height: 468px;
border: 1px solid #e5e5e5;
}
.right,
.left {
width: 383px;
height: 468px;
border: 1px solid #e5e5e5;
}
.right {
margin-left: 20px;
.title-type {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
box-sizing: border-box;
padding: 10px 16px;
border-bottom: 1px solid #e5e5e5;
background: #f5f6fa;
.select {
color: #333333;
font-size: 14px;
}
.time {
color: #666666;
font-size: 14px;
}
}
.reminder {
height: 32px;
display: flex;
align-items: center;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
background: #fef4e8;
border-bottom: 1px solid #e5e5e5;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.select-list {
height: 365px;
overflow-y: auto;
overflow-x: hidden;
.select-item {
display: flex;
align-items: center;
border-bottom: 1px solid #e5e5e5;
.item-content {
color: #333333;
font-size: 14px;
line-height: 20px;
padding: 14px 16px;
white-space: wrap;
border-right: 1px solid #e5e5e5;
}
.item-time {
font-size: 12px;
color: #666666;
}
.del {
padding: 14px 18px;
color: #2a58ad;
font-size: 14px;
white-space: nowrap;
}
}
}
}
.left {
.title-type {
display: flex;
align-items: center;
height: 40px;
padding: 0px 16px;
border-bottom: 1px solid #e5e5e5;
background: #f5f6fa;
.type {
padding: 10px;
line-height: 20px;
color: #666666;
font-size: 14px;
margin-right: 10px;
cursor: pointer;
}
.active {
color: #2a58ad;
border-bottom: 2px solid #2a58ad;
}
}
.content {
padding: 16px 7px 16px 16px;
}
}
.gl-form-page {
.form-inline {
margin-bottom: 16px;
}
.el-form-item__content {
height: 32px;
}
.el-form .el-button {
width: 52px;
height: 32px;
}
::v-deep {
.el-checkbox-group {
height: 365px;
overflow-y: auto;
overflow-x: hidden;
}
.el-checkbox {
margin-right: 0px;
display: flex;
align-items: center;
margin-bottom: 16px;
}
.el-checkbox__label {
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
.title {
width: 268px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.status {
padding: 2px 8px;
font-size: 12px;
font-weight: 500;
border-radius: 2px;
}
.orange {
color: #f59619;
border: 1px solid #f59619;
}
.green {
color: #2cca74;
border: 1px solid #2cca74;
}
}
}
}
}
.tools-gltip {
width: 238px !important;
height: 95px !important;
background: #fff;
.process-info {
width: 238px;
height: 94px;
color: #666666;
font-size: 14px;
div {
margin-bottom: 8px;
span {
color: #333333;
}
}
}
}
</style>
<!-- 配置课程 --> <!-- 配置课程 -->
<template> <template>
<div class="configureCourse"> <div class="configureCourse-wrap">
<div class="left-wrap"> <div class="configureCourse">
<div class="header"> <div class="left-wrap">
<img class="staff-icon" src="../../images/staff-icon.png" alt="" /> <div class="header">
<div class="title"> <img class="staff-icon" src="../../images/staff-icon.png" alt="" />
员工列表 <div class="title">
<div class="num">共7人,已配置1人</div> 员工列表
<div class="num">共7人,已配置1人</div>
</div>
</div> </div>
</div> <div class="staff-list">
<div class="staff-list"> <div
<div v-for="(item, index) in staffList"
v-for="(item, index) in staffList" :key="item.id"
:key="item.id" :class="['staff-item', staffIndex == index ? 'active' : '']"
:class="['staff-item', staffIndex == index ? 'active' : '']" @click="handleClick(index)"
@click="handleClick(index)" >
> {{ item.name }}
{{ item.name }} <div class="config" v-if="item.isConfig">已配置</div>
<div class="config" v-if="item.isConfig">已配置</div> </div>
</div> </div>
</div> </div>
</div> <div class="right-wrap">
<div class="right-wrap"> <div class="nav-tabs">
<div class="nav-tabs"> <div
<div :class="['nav-item', activeName == index ? 'active' : '']"
:class="['nav-item', activeName == index ? 'active' : '']" v-for="(item, index) in tabPaneList"
v-for="(item, index) in tabPaneList" :key="index"
:key="index" @click="handleTabClick(index)"
@click="handleTabClick(index)" >
> {{ item.label }}
{{ item.label }} </div>
</div> </div>
<components :is="tabName"></components>
</div> </div>
<components :is="tabName"></components>
</div> </div>
<div class="end-configuration">结束配置</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -54,7 +57,7 @@ export default { ...@@ -54,7 +57,7 @@ export default {
label: "课程配置" label: "课程配置"
} }
], ],
tabName: "staffDetail", tabName: "couseAllocation",
staffList: [ staffList: [
{ {
name: "王小虎", name: "王小虎",
...@@ -96,12 +99,15 @@ export default { ...@@ -96,12 +99,15 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.configureCourse { .configureCourse {
height: calc(100vh - 190px);
display: flex; display: flex;
margin: 0 20px; margin: 0 20px;
margin-bottom: 16px;
.left-wrap { .left-wrap {
min-width: 200px; min-width: 200px;
width: 200px; width: 200px;
height: 988px; height: 100%;
min-height: 760px;
background: #ffffff; background: #ffffff;
margin-right: 16px; margin-right: 16px;
.header { .header {
...@@ -156,7 +162,10 @@ export default { ...@@ -156,7 +162,10 @@ export default {
} }
} }
.right-wrap { .right-wrap {
min-height: 760px;
width: calc(100% - 216px); width: calc(100% - 216px);
min-width: 984px;
overflow-x: auto;
.nav-tabs { .nav-tabs {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -185,4 +194,16 @@ export default { ...@@ -185,4 +194,16 @@ export default {
// background: #ffffff; // background: #ffffff;
} }
} }
.end-configuration {
width: 120px;
height: 36px;
border-radius: 4px;
background: #2a58ad;
color: #ffffff;
font-size: 16px;
font-weight: 400;
text-align: center;
line-height: 36px;
margin: 0 auto;
}
</style> </style>
<!-- 课程配置 --> <!-- 课程配置 -->
<template>
<div class="couseAllocation">
<div class="header">AI导师建议</div>
<div class="ai-suggest">
驻店销售个人产值持续提升,但转化率连续两周低于标准,反映驻店人员接待能力明显下降。主要原因包括:新车型上市,驻店销售对新车谈客技巧掌握不足;谈客过程中身份介绍、场景塑造、案例展示及逼单等核心能力存在短板。
建议: ① 紧急配置新车型销售专项课程,强化产品知识与谈客话术; ②
针对薄弱能力开展分组实战演练,结合真实案例进行情景模拟训练,提升谈客转化率。
</div>
<div class="header">课程配置</div>
<div class="allocation">
<glsx-combi-form
isBlock="true"
class="form-container"
ref="formRef"
label-width="138px"
default-width="400px"
:form-ref="handleFormRef"
:form-obj="allocationForm"
:form-data="allocationFormData"
:form-rules="formRules"
>
<div slot="allocationHtml" slot-scope="scope">
<curricula-variable></curricula-variable>
</div>
</glsx-combi-form>
</div>
<div class="foot-btns">
<div class="btn reset">重置</div>
<div class="btn multiple" @click="handleMultiple">多人配置</div>
<div class="btn submit">提交本员工配置</div>
</div>
<multipleDialog
:multipleVisible="multipleVisible"
v-if="multipleVisible"
@dialogClose="handleCloseDialog"
></multipleDialog>
</div>
</template>
<script>
import curriculaVariable from "./allocation"
import multipleDialog from "./multiple"
export default {
components: {
curriculaVariable,
multipleDialog
},
data() {
return {
multipleVisible: false,
allocationForm: {
type: 1,
followNotes: "",
title: "",
studyTime: "1"
},
handleFormRef: "handleFormRef",
formRules: {
type: [
{ required: true, message: "请选择业务场景", trigger: "change" }
],
studyTime: [
{ required: true, message: "请选择业务场景", trigger: "change" }
],
title: [{ required: true, message: "请输入标题", trigger: "blur" }]
},
allocationFormData: [
{
label: "学习完成时间:",
name: "studyTime",
type: "radio",
optionList: [
{
confLabel: "本周内",
confId: 1
}
],
optionId: "confId",
optionLabel: "confLabel"
},
{
label: "处罚方式:",
name: "type",
type: "radio",
optionList: [
{
confLabel: "不处罚",
confId: 1
},
{
confLabel: "限制录单",
confId: 2
}
],
optionId: "confId",
optionLabel: "confLabel",
handleRadioChange: (val) => {
this.tmplSelectList = []
setTimeout(() => {
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate(
"fieldIds"
)
}, 800)
}
},
{
label: "配置课程:",
type: "slot",
addHtml: "allocationHtml"
},
{
label: "学习任务标题:",
name: "title",
type: "input"
}
]
}
},
methods: {
handleMultiple() {
this.multipleVisible = true
},
handleCloseDialog() {
this.multipleVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couseAllocation {
background: #fff;
height: calc(100% - 45px);
overflow-y: auto;
overflow-x: hidden;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 8px 20px;
border-bottom: 1px solid #e5e5e5;
}
.ai-suggest {
margin: 20px 40px;
padding: 12px 20px;
background: #f5f6fa;
border-radius: 2px;
}
.allocation {
background: #fff;
padding: 20px 20px 0;
}
.foot-btns {
display: flex;
align-items: center;
margin: 0 auto;
justify-content: center;
padding: 20px 0;
.btn {
padding: 6px 28px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
}
.reset {
background: #e8e8e8;
color: #666666;
}
.multiple {
background: #dfe6f3;
color: #2a58ad;
margin: 0 16px;
}
.submit {
background: #2a58ad;
color: #ffffff;
}
}
}
</style>
...@@ -24,17 +24,17 @@ ...@@ -24,17 +24,17 @@
> >
</div> </div>
<div class="couse-content"> <div class="couse-content">
<div class="content-item" v-for="item in 10" :key="item"> <div class="content-item" v-for="item in couseData" :key="item">
<div class="name">月产值</div> <div class="name">{{ item.title }}</div>
<div class="value"><30万</div> <div class="value">{{ item.rate }}</div>
<div class="configuration"> <div class="configuration">
<div class="item"> <div class="item">
<div>可配置</div> <div>可配置</div>
<div class="number">4家</div> <div class="number">{{ item.configNum }}家</div>
</div> </div>
<div class="item"> <div class="item">
<div>可配置</div> <div>已配置</div>
<div class="number">4家</div> <div class="number">{{ item.readyNum }}家</div>
</div> </div>
</div> </div>
<div class="btns"> <div class="btns">
...@@ -59,7 +59,16 @@ export default { ...@@ -59,7 +59,16 @@ export default {
data() { data() {
return { return {
activeIndex: 0, activeIndex: 0,
customVisible: false customVisible: false,
couseData: [
{
title: "月产值",
rate: "<30万",
configNum: 3,
readyNum: 4,
id: 1
}
]
} }
}, },
methods: { methods: {
...@@ -72,6 +81,7 @@ export default { ...@@ -72,6 +81,7 @@ export default {
handleDetail(row) { handleDetail(row) {
console.log(1111) console.log(1111)
row.activeName = "indicatorInfo" row.activeName = "indicatorInfo"
row.pageId = row.id
this.$emit("openWindow", row) this.$emit("openWindow", row)
}, },
handleClick(index) { handleClick(index) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<d2-container class="customer-tags"> <d2-container class="customer-tags">
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header title="门店列表"> <d2-table-header title="门店列表">
<el-button size="small" type="primary" @click="exportTable"> <el-button size="small" type="primary" @click="handleBatch">
批量配课 批量配课
</el-button> </el-button>
</d2-table-header> </d2-table-header>
...@@ -49,7 +49,10 @@ export default { ...@@ -49,7 +49,10 @@ export default {
getListApi: studyPage, getListApi: studyPage,
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
mutiSelectUniqueKey: "id",
mutiSelectName: "indicatorIndex",
tableOption: { tableOption: {
width: "100" width: "100"
}, },
...@@ -160,60 +163,14 @@ export default { ...@@ -160,60 +163,14 @@ export default {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch() this.handleSearch()
}, },
async exportTable() { handleBatch() {
await this.beforeSearchFn() let selectedData = []
// console.log(params)
let params = this.searchFormSearch if (this.$refs.table.mutiSelectArr.indicatorIndex) {
params.method = 'dj.api.smartcarlife.study.punish.list.export' selectedData = this.$refs.table.mutiSelectArr.indicatorIndex
const list = [ }
...this.dowloadList, console.log(selectedData)
{
name: '处罚名单',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
// try {
// await this.beforeSearchFn()
// const res = await studyExport({
// ...this.searchFormSearch
// })
// console.log(res)
// if (res) window.open(res)
// } catch (error) {
// if (error) this.$message.error(error)
// }
}, },
// getServiceStore() {
// listShop4sByRef({}).then((res) => {
// res ||= []
// this.showFormData.forEach((item, index) => {
// if (item.type === "select" && item.name == "merchantId") {
// this.$set(this.showFormData[index], "optionList", [
// {
// merchantName: "全部",
// merchantId: ""
// },
// ...res
// ])
// }
// })
// })
// },
// async getStudyPage() {
// try {
// await this.beforeSearchFn()
// const res = await studyPage({
// ...this.searchFormSearch
// })
// console.log(res)
// this.staticData = res || {}
// } catch (error) {
// if (error) this.$message.error(error)
// }
// },
} }
} }
</script> </script>
......
<!-- 多人配置 -->
<template>
<div class="multiple-dialog">
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleConfirm"
@closeDialog="handleClose"
>
<glsx-combi-form
label-width="160px"
default-width="400px"
:form-obj="multipleForm"
:form-data="multipleFormData"
:form-rules="infoRules"
>
<template slot="multiple" slot-scope="scope">
<el-checkbox v-model="checkAll" @change="handleCheckAllChange"
>全选</el-checkbox
>
<div class="staff-list">
<div
:class="['staff-item', item.active ? 'active' : '']"
v-for="(item, index) in staffList"
:key="index"
@click="item.active = !item.active"
>
{{ item.text }}
</div>
</div>
</template>
</glsx-combi-form>
</baseDialog>
</div>
</template>
<script>
export default {
props: {
multipleVisible: {
type: Boolean,
default: false
}
},
computed: {
visible: {
get() {
return this.multipleVisible
},
set(newVal) {
this.$emit("dialogClose", {
flag: newVal,
attrName: "multipleVisible"
})
}
}
},
data() {
return {
dialogConfig: {
title: "多人配置",
width: "720px"
},
checkAll: true,
infoRules: {
refundType: [
{
required: true,
message: "请选择退款类型",
trigger: "blur"
}
]
},
multipleForm: {},
multipleFormData: [
{
label: "本次课程配置同步给:",
name: "multiple",
addHtml: "multiple"
}
],
staffList: [
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
},
{
text: "杨婷瑶",
value: 1,
active: true
},
{
text: "魏小敏",
value: 2,
active: false
},
{
text: "侯裕",
value: 3,
active: false
}
]
}
},
methods: {
handleCheckAllChange() {
this.staffList.forEach((item) => {
item.active = this.checkAll
})
},
handleClose() {
this.visible = false
},
handleConfirm() {
this.visible = false
}
}
}
</script>
<style scoped lang="scss">
.staff-list {
display: flex;
align-items: center;
margin-top: 5px;
flex-wrap: wrap;
width: 480px;
.staff-item {
padding: 6px 12px;
border-radius: 2px;
color: #333333;
font-size: 14px;
font-weight: 400;
background: #f2f3f5;
margin-right: 8px;
margin-bottom: 8px;
box-sizing: border-box;
line-height: 20px;
}
.active {
color: #2a58ad;
font-weight: 500;
background: #2a58ad26;
}
}
</style>
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
color: #111111; color: #111111;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
padding: 14px 20px; padding: 8px 20px;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
.tabs { .tabs {
......
...@@ -134,11 +134,14 @@ export default { ...@@ -134,11 +134,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.staff-detail { .staff-detail {
background: #fff; background: #fff;
overflow-y: auto;
overflow-x: hidden;
height: calc(100% - 45px);
.header { .header {
color: #111111; color: #111111;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
padding: 14px 20px; padding: 8px 20px;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
.form_div { .form_div {
......
...@@ -22,7 +22,8 @@ export default { ...@@ -22,7 +22,8 @@ export default {
{ {
name: "门店总数", name: "门店总数",
value: "100", value: "100",
addHtml: "store" addHtml: "store",
id: 2
}, },
{ {
name: "产值(元)", name: "产值(元)",
...@@ -30,7 +31,8 @@ export default { ...@@ -30,7 +31,8 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
} },
id: 3
}, },
{ {
name: "客单价(元)", name: "客单价(元)",
...@@ -38,7 +40,8 @@ export default { ...@@ -38,7 +40,8 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
} },
id: 4
}, },
{ {
name: "交车数", name: "交车数",
...@@ -46,7 +49,8 @@ export default { ...@@ -46,7 +49,8 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
} },
id: 5
}, },
{ {
name: "触客数", name: "触客数",
...@@ -54,7 +58,8 @@ export default { ...@@ -54,7 +58,8 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
} },
id: 6
}, },
{ {
name: "订单数", name: "订单数",
...@@ -62,7 +67,8 @@ export default { ...@@ -62,7 +67,8 @@ export default {
link: "11%", link: "11%",
trend: () => { trend: () => {
return false return false
} },
id: 6
} }
] ]
} }
...@@ -71,6 +77,7 @@ export default { ...@@ -71,6 +77,7 @@ export default {
handleDetail(row) { handleDetail(row) {
console.log(1111) console.log(1111)
row.activeName = "storeInfo" row.activeName = "storeInfo"
row.pageId = row.id
this.$emit("openWindow", row) this.$emit("openWindow", row)
} }
}, },
......
...@@ -150,6 +150,7 @@ export default { ...@@ -150,6 +150,7 @@ export default {
this.analysisActiveIndex = index this.analysisActiveIndex = index
}, },
openWindow(data) { openWindow(data) {
console.log(data)
this.$emit("openWindow", data) this.$emit("openWindow", data)
} }
} }
......
...@@ -125,6 +125,7 @@ export default { ...@@ -125,6 +125,7 @@ export default {
console.log(data) console.log(data)
const id = data.pageId ? data.pageId : `${data.staffName}_${data.phoneNumber}` const id = data.pageId ? data.pageId : `${data.staffName}_${data.phoneNumber}`
const windowList = [...this.tab, ...this.dropdownList] const windowList = [...this.tab, ...this.dropdownList]
console.log(windowList)
const windowItem = windowList.find((e) => e.id == id) const windowItem = windowList.find((e) => e.id == id)
let component = data.activeName, let component = data.activeName,
title = data.staffName || '-' title = data.staffName || '-'
......
...@@ -156,12 +156,22 @@ ...@@ -156,12 +156,22 @@
</div> </div>
</template> </template>
<template slot="dailyReport" slot-scope="scope"> <template slot="dailyReport" slot-scope="scope">
<el-switch <div class="daily-report">
:value="scope.scope.dailyReport" 1.1日报
active-value="Y" <el-switch
inactive-value="N" :value="scope.scope.boutiqueDailyReportFillFlag"
@change="handleDailyReport(scope.scope)" active-value="Y"
></el-switch> inactive-value="N"
@change="handleDailyReport(scope.scope, 1)"
></el-switch>
2.1日报
<el-switch
:value="scope.scope.boutiqueDailyReportFillFlag"
active-value="Y"
inactive-value="N"
@change="handleDailyReport(scope.scope, 0)"
></el-switch>
</div>
</template> </template>
<auth-button <auth-button
slot="auth-button" slot="auth-button"
...@@ -342,7 +352,8 @@ import { ...@@ -342,7 +352,8 @@ import {
shopBatchSet, shopBatchSet,
busiBatchSet, busiBatchSet,
getDistrictDetail, getDistrictDetail,
getMerService getMerService,
updateDailyReportFlag
} from "@/api/shopConfig.js" } from "@/api/shopConfig.js"
import { import {
merchantOutputValueTargetExport, merchantOutputValueTargetExport,
...@@ -608,7 +619,8 @@ export default { ...@@ -608,7 +619,8 @@ export default {
{ {
label: "日报填写", label: "日报填写",
prop: "dailyReport", prop: "dailyReport",
addHtml: "dailyReport" addHtml: "dailyReport",
width: "200px"
}, },
{ {
label: "下级商户", label: "下级商户",
...@@ -1028,7 +1040,14 @@ export default { ...@@ -1028,7 +1040,14 @@ export default {
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
...mapMutations("d2admin/user", ["setUpdateRefesh"]), ...mapMutations("d2admin/user", ["setUpdateRefesh"]),
//日报填写 //日报填写
handleDailyReport(val) { handleDailyReport(row, sceneType) {
console.log(row)
let dailyReportFillFlag =
row[
sceneType == 1
? "boutiqueDailyReportFillFlag"
: "quotationDailyReportFillFlag"
]
this.$confirm( this.$confirm(
"切换日报填写开关会影响驻店是否需要填日报才能提单!", "切换日报填写开关会影响驻店是否需要填日报才能提单!",
"提示", "提示",
...@@ -1038,10 +1057,24 @@ export default { ...@@ -1038,10 +1057,24 @@ export default {
} }
) )
.then(() => { .then(() => {
// verification({ orderCode: row.orderCode }).then((res) => { updateDailyReportFlag({
// this.notice.okTips() merchantId: row.merchantId,
// this.handleSearch() sceneType,
// }) dailyReportFillFlag: !dailyReportFillFlag
}).then((res) => {
row[
sceneType == 1
? "boutiqueDailyReportFillFlag"
: "quotationDailyReportFillFlag"
] =
!row[
sceneType == 1
? "boutiqueDailyReportFillFlag"
: "quotationDailyReportFillFlag"
]
this.notice.okTips()
this.handleSearch()
})
}) })
.catch(() => {}) .catch(() => {})
}, },
...@@ -1780,4 +1813,9 @@ export default { ...@@ -1780,4 +1813,9 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.daily-report {
display: flex;
align-items: center;
justify-content: space-between;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!