Commit eea2486c by 前端

Merge branch 'SAAS+V4.55.0-0730' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.55.0-0730
2 parents e2a91f30 30dd6b76
Showing 51 changed files with 3446 additions and 1104 deletions
...@@ -112,3 +112,9 @@ export function billCancelChange(data) { ...@@ -112,3 +112,9 @@ export function billCancelChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange' data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange'
return request(data, "post") return request(data, "post")
} }
// 对账单待取消内容确认
export function tmplCheckField(data) {
data.method = 'dj.api.reconciliation.template.checkField'
return request(data, "post")
}
...@@ -441,23 +441,30 @@ export default { ...@@ -441,23 +441,30 @@ export default {
v.goodsInfo = {} v.goodsInfo = {}
shopPriceArr.push(v.upgradePrice) shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice v.listShowShopPrice = v.upgradePrice
let specificationTypeSequenceArr = v.specificationTypeSequence?.split(';~;') let specificationTypeSequenceArr =
let specificationValueSequenceArr = v?.specificationData?.split(';~;') v.specificationTypeSequence?.split(";~;")
let specificationValueSequenceArr =
v?.specificationData?.split(";~;")
const suffixMapping = { const suffixMapping = {
1: '年', 1: "年",
2: '(km/万)', 2: "(km/万)",
3: '万' 3: "万"
} }
if (specificationTypeSequenceArr?.length) { if (specificationTypeSequenceArr?.length) {
specificationValueSequenceArr?.forEach((val, index) => { specificationValueSequenceArr?.forEach((val, index) => {
const suffix = suffixMapping[specificationTypeSequenceArr[index]] const suffix =
suffixMapping[specificationTypeSequenceArr[index]]
if (suffix) { if (suffix) {
specificationValueSequenceArr[index] = `${val}${suffix}` specificationValueSequenceArr[
index
] = `${val}${suffix}`
} }
}) })
v.listShowSpecificationData = specificationValueSequenceArr?.join('/') v.listShowSpecificationData =
specificationValueSequenceArr?.join("/")
} else if (v?.specificationData?.includes(";~;")) { } else if (v?.specificationData?.includes(";~;")) {
v.listShowSpecificationData = v?.specificationData?.replace(RegExp(';~;', 'g'), '/') v.listShowSpecificationData =
v?.specificationData?.replace(RegExp(";~;", "g"), "/")
} else { } else {
v.listShowSpecificationData = "-" v.listShowSpecificationData = "-"
} }
...@@ -477,8 +484,10 @@ export default { ...@@ -477,8 +484,10 @@ export default {
val.goodsSpecificationNameList val.goodsSpecificationNameList
v.createdDate = val.createdDate v.createdDate = val.createdDate
v.updatedDate = val.updatedDate v.updatedDate = val.updatedDate
v.goodsInfo.brandMerchantName = val.goodsInfo?.brandMerchantName || '-' v.goodsInfo.brandMerchantName =
v.goodsInfo.supplierName = val.goodsInfo?.supplierName || '-' val.goodsInfo?.brandMerchantName || "-"
v.goodsInfo.supplierName =
val.goodsInfo?.supplierName || "-"
}) })
const minPrice = shopPriceArr.length const minPrice = shopPriceArr.length
? Math.min(...shopPriceArr) ? Math.min(...shopPriceArr)
......
/* /*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-06-19 16:57:57
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-07-01 16:36:04
* @FilePath: \dj-car-life-system\src\router\modules\912_residentManage.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/*
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-01 15:03:31 * @Date: 2024-04-01 15:03:31
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-06-11 11:33:58 * @LastEditTime: 2025-07-01 16:34:27
*/ */
const _import = require("@/libs/util.import." + process.env.NODE_ENV) const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = { export const routerName = {
...@@ -1072,5 +1080,16 @@ export const routerName = { ...@@ -1072,5 +1080,16 @@ export const routerName = {
} }
], ],
component: _import("residentManage/getOutverbalTrickManagement/index") component: _import("residentManage/getOutverbalTrickManagement/index")
},
91222: {
path: "/recordLabelManagement",
name: "recordLabelManagement",
meta: {
title: "录音标签管理",
authId: "91222",
parentId: "912",
cache: false
},
component: _import("residentManage/recordLabelManagement/index")
} }
} }
const _import = require("@/libs/util.import." + process.env.NODE_ENV) const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = { export const routerName = {
914: { 914: {
...@@ -80,7 +79,6 @@ export const routerName = { ...@@ -80,7 +79,6 @@ export const routerName = {
parentId: "91402" parentId: "91402"
} }
] ]
}, },
{ {
...@@ -103,8 +101,7 @@ export const routerName = { ...@@ -103,8 +101,7 @@ export const routerName = {
parentId: "91402" parentId: "91402"
} }
] ]
}
},
], ],
component: _import("pointManagement/pointParticulars") component: _import("pointManagement/pointParticulars")
}, },
...@@ -132,5 +129,5 @@ export const routerName = { ...@@ -132,5 +129,5 @@ export const routerName = {
activePath: "/pointParticulars" activePath: "/pointParticulars"
}, },
component: _import("pointManagement/addDeduction") component: _import("pointManagement/addDeduction")
}, }
} }
...@@ -43,39 +43,6 @@ export const routerName = { ...@@ -43,39 +43,6 @@ export const routerName = {
], ],
component: _import("earlyWarningManager/staff/indexControl") component: _import("earlyWarningManager/staff/indexControl")
}, },
// 91502: {
// path: "/storeWarn",
// name: "storeWarn",
// meta: {
// title: "门店预警管理",
// authId: "91502",
// parentId: "915",
// cache: false
// },
// auth: [
// {
// authId: "9150201",
// parentId: "91502",
// label: "导出",
// category: "Button",
// type: "primary",
// handle: "handleExport"
// },
// {
// authId: "9150202",
// parentId: "91502",
// label: "查看",
// handle: "handleDetail"
// },
// {
// authId: "9150203",
// parentId: "91502",
// label: "处理",
// handle: "handleDeal"
// }
// ],
// component: _import("earlyWarningManager/store/indexControl")
// },
91503: { 91503: {
path: "/shopGuard", path: "/shopGuard",
name: "shopGuard", name: "shopGuard",
...@@ -108,5 +75,5 @@ export const routerName = { ...@@ -108,5 +75,5 @@ export const routerName = {
} }
], ],
component: _import("earlyWarningManager/shopGuard/indexControl") component: _import("earlyWarningManager/shopGuard/indexControl")
}, }
} }
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-04-24 15:36:37
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-24 16:31:47
* @FilePath: \dj-car-life-system\src\router\modules\916_largeModel.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV) const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = { export const routerName = {
916: { 916: {
......
...@@ -23,72 +23,48 @@ export const routerName = { ...@@ -23,72 +23,48 @@ export const routerName = {
{ {
authId: "9190101", authId: "9190101",
parentId: "91901", parentId: "91901",
label: "查看", label: "配置课程",
handle: "handleTaskDetail" handle: "handleConfigureCourse",
}, addRoutePath: [
{ {
authId: "9190102", authId: "91903",
parentId: "91901", name: "配置课程",
label: "启用", parentId: "91901"
handle: "handleOpenOrStop",
ruleObj: {
attr: "status",
rule: {
0: "启用",
1: "停用"
}
} }
]
} }
], ],
component: _import("serviceCentre/longCourse/longCourseCenter") component: _import("serviceCentre/longCourse/longCourseCenter")
},
91902: {
path: "/shortCourse",
name: "shortCourse",
meta: {
title: "短课程配置",
authId: "91902",
parentId: "919",
cache: false
},
auth: [
{
authId: "9190201",
parentId: "91902",
label: "查看",
handle: "handleDetail"
}
],
component: _import("serviceCentre/shortCourse/index")
},
91403: {
path: "/configureCourse",
name: "configureCourse",
meta: {
title: "配置课程",
authId: "91403",
parentId: "91901",
cache: false,
activePath: "/longCourse"
},
component: _import("serviceCentre/longCourse/components/configureCourse")
} }
// 91702: {
// path: "/invoiceQuery",
// name: "invoiceQuery",
// meta: {
// title: "发票查询",
// authId: "91702",
// parentId: "917",
// cache: false
// },
// auth: [
// {
// authId: "9170201",
// parentId: "91702",
// label: "下载电子发票",
// category: "Button",
// type: "primary",
// handle: "handleDownloadInvoice"
// },
// {
// authId: "9170202",
// parentId: "91702",
// label: "打印电子发票",
// category: "Button",
// type: "primary",
// handle: "handlePrintInvoice"
// },
// {
// authId: "9170203",
// parentId: "91702",
// label: "导出",
// category: "Button",
// type: "primary",
// handle: "handleExport"
// },
// {
// authId: "9170204",
// parentId: "91702",
// label: "详情",
// handle: "handleDetail"
// },
// {
// authId: "9170205",
// parentId: "91702",
// label: "查看发票",
// handle: "handleLookInvoice"
// }
// ],
// component: _import("invoiceManage/invoiceQueryList")
// }
} }
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ export default {
}, },
selectableFn(row) { selectableFn(row) {
this.$emit('changeSelect')
return !row.required return !row.required
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<d2-container class="edit-page edit-tmpl"> <d2-container class="edit-page edit-tmpl">
<div style="padding: 20px"> <div style="padding: 20px">
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules"> <glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px" :isBlock="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<AccountTmpl v-if="showTmpl" ref="accountTmpl" slot="accountTmpl" :type="editData.type" :tmplSelectList="tmplSelectList"></AccountTmpl> <AccountTmpl v-if="showTmpl" ref="accountTmpl" slot="accountTmpl" :type="editData.type" :tmplSelectList="tmplSelectList" @changeSelect="changeSelect"></AccountTmpl>
</glsx-combi-form> </glsx-combi-form>
<div class="footer"> <div class="footer">
<el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">提交</el-button> <el-button @click="handleConfirm" type="primary" :loading="$store.state.d2admin.loading.value">提交</el-button>
...@@ -138,6 +138,10 @@ export default { ...@@ -138,6 +138,10 @@ export default {
}) })
}, },
changeSelect() {
this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected())
},
handleConfirm() { handleConfirm() {
this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected()) this.editData.fieldIds = deepClone(this.$refs.accountTmpl.getSelected())
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => { this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
handleInput(rowIdx, attr) { handleInput(rowIdx, attr) {
const val = this.tableData[rowIdx][attr] const val = this.tableData[rowIdx][attr]
const oldVal = this.tableOldData[rowIdx][attr] const oldVal = this.tableOldData[rowIdx][attr]
this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 9, 2) this.tableData[rowIdx][attr] = limitPrice(val, oldVal, 9, 2, '', '', 'priceReg_negative')
this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr] this.tableOldData[rowIdx][attr] = this.tableData[rowIdx][attr]
}, },
handleInputBlur() { handleInputBlur() {
......
...@@ -713,22 +713,22 @@ export default { ...@@ -713,22 +713,22 @@ export default {
validateField(rowIndex, source, field, fieldConfig) { validateField(rowIndex, source, field, fieldConfig) {
const value = this.tableList[rowIndex][source][field] const value = this.tableList[rowIndex][source][field]
const headObj = this.tmplFieldsList.find(i => i.fieldCode == field) // const headObj = this.tmplFieldsList.find(i => i.fieldCode == field)
var key = `${rowIndex}_${source}_${field}` var key = `${rowIndex}_${source}_${field}`
// console.log(rowIndex, source, field, '0000000') // console.log(rowIndex, source, field, fieldConfig, '0000000')
if (this.judgeDisable(rowIndex, source, fieldConfig)) { if (this.judgeDisable(rowIndex, source, fieldConfig)) {
return true return true
} }
if (headObj?.editType === 'selectInput') { if (fieldConfig?.editType === 'selectInput') {
const obj = this.tableList[rowIndex][source] const obj = this.tableList[rowIndex][source]
const selectVal = obj[headObj.editObj.selectField] const selectVal = obj[fieldConfig.editObj.selectField]
const inputVal = obj[headObj.editObj.inputField] const inputVal = obj[fieldConfig.editObj.inputField]
if (selectVal === undefined || selectVal === null || selectVal === '') { if (selectVal === undefined || selectVal === null || selectVal === '') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.selectField}`, '此项为必填项') this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.selectField}`, '此项为必填项')
return false return false
} }
if (inputVal === undefined || inputVal === null || inputVal === '') { if (inputVal === undefined || inputVal === null || inputVal === '') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.inputField}`, '此项为必填项') this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.inputField}`, '此项为必填项')
return false return false
} }
} else if (value === undefined || value === null || value === '') { } else if (value === undefined || value === null || value === '') {
...@@ -736,11 +736,11 @@ export default { ...@@ -736,11 +736,11 @@ export default {
return false return false
} }
if (headObj?.editObj?.rule) { if (fieldConfig?.editObj?.rule) {
let errorTxt = headObj.editObj.rule(value, rowIndex, source, headObj.editType == 'selectInput' ? headObj : field) let errorTxt = fieldConfig.editObj.rule(value, rowIndex, source, fieldConfig.editType == 'selectInput' ? fieldConfig : field)
if (errorTxt) { if (errorTxt) {
if (headObj.editType === 'selectInput') { if (fieldConfig.editType === 'selectInput') {
this.$set(this.validationErrors, `${rowIndex}_${source}_${headObj.editObj.inputField}`, errorTxt) this.$set(this.validationErrors, `${rowIndex}_${source}_${fieldConfig.editObj.inputField}`, errorTxt)
} else { } else {
this.$set(this.validationErrors, key, errorTxt) this.$set(this.validationErrors, key, errorTxt)
} }
...@@ -989,7 +989,7 @@ export default { ...@@ -989,7 +989,7 @@ export default {
/**editable为false,平台方和备注不能编辑 /**editable为false,平台方和备注不能编辑
*/ */
if (value.ORDER.editable == false) { if (value.ORDER.editable == false) {
if (['ORDERplatformMerchantId', 'SUB_ORDERpartnerFeeCalculateCoefficient'].includes(source + fieldConfig.fieldCode)) { if (['ORDERplatformMerchantId', 'ORDERcoverReceiverType'].includes(source + fieldConfig.fieldCode)) {
isDisable = true isDisable = true
} }
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<script> <script>
import AccountTmpl from "../accountTmplManage/components/AccountTmpl" import AccountTmpl from "../accountTmplManage/components/AccountTmpl"
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { tmplCheckField } from '@api/accountManage'
export default { export default {
name: 'TmplDrawer', name: 'TmplDrawer',
components: { components: {
...@@ -43,9 +44,15 @@ export default { ...@@ -43,9 +44,15 @@ export default {
this.$emit('handleClose') this.$emit('handleClose')
}, },
handleConfirm() { handleConfirm() {
const params = {
type: this.type,
fieldIds: deepClone(this.$refs.accountTmpl.getSelected())
}
tmplCheckField(params).then(res => {
this.$emit('handleConfirm', { this.$emit('handleConfirm', {
fieldIds: deepClone(this.$refs.accountTmpl.getSelected()) fieldIds: deepClone(this.$refs.accountTmpl.getSelected())
}) })
})
}, },
}, },
mounted() { }, mounted() { },
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="对账商户:" prop="merchant"> <el-form-item label="对账商户:" prop="merchant">
<el-select v-model="infoForm.merchant" multiple :multiple-limit="1" filterable style="width:400px" @change="handleChangeMerchant"> <el-select v-model="infoForm.merchant" multiple :multiple-limit="multipleLimit" filterable style="width:400px" @change="handleChangeMerchant">
<el-option v-for="item in baseData.merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" /> <el-option v-for="item in baseData.merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -103,6 +103,7 @@ export default { ...@@ -103,6 +103,7 @@ export default {
} }
return { return {
loading: false, loading: false,
multipleLimit: 10,
// 判断是否是模版模式 // 判断是否是模版模式
isTmpl: false, isTmpl: false,
localTmplList: deepClone(localTmplList), localTmplList: deepClone(localTmplList),
...@@ -314,6 +315,8 @@ export default { ...@@ -314,6 +315,8 @@ export default {
judgeTmpl() { judgeTmpl() {
this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4'); this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4');
this.merchantTypeStr = this.typeObj[this.infoForm.merchantType] this.merchantTypeStr = this.typeObj[this.infoForm.merchantType]
this.multipleLimit = (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') ? 1 : 10
this.infoForm.merchant = []
this.resetTmplData() this.resetTmplData()
}, },
...@@ -489,10 +492,11 @@ export default { ...@@ -489,10 +492,11 @@ export default {
return params return params
}, },
// 系统对账 // 系统对账 - 单个商户
handleSystemBill() { handleSystemBill() {
this.$refs.accountForm.validate(valid => { this.$refs.accountForm.validate(valid => {
if (valid) { if (valid) {
if (this.infoForm.merchant.length == 1) {
var params = this.getParams() var params = this.getParams()
params.orderCurrentPage = 1 params.orderCurrentPage = 1
params.orderPageSize = 10 params.orderPageSize = 10
...@@ -501,6 +505,9 @@ export default { ...@@ -501,6 +505,9 @@ export default {
console.log(res, 'res') console.log(res, 'res')
this.$emit('handleBill', { billTmplInfo: res }) this.$emit('handleBill', { billTmplInfo: res })
}) })
} else {
this.$message.warning("仅支持单商户进行系统对账")
}
} }
}) })
}, },
...@@ -508,6 +515,20 @@ export default { ...@@ -508,6 +515,20 @@ export default {
handleAddConfirm() { handleAddConfirm() {
this.$refs.accountForm.validate(valid => { this.$refs.accountForm.validate(valid => {
if (valid) { if (valid) {
if (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') {
if (this.infoForm.merchant.length == 1) {
this.dowloadApi()
} else {
this.$message.warning("仅支持单商户进行系统对账")
}
} else {
this.dowloadApi()
}
}
})
},
dowloadApi() {
var params = this.getParams() var params = this.getParams()
params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async' params.method = 'dj.api.smartcarlife.goodsOrderProfitAllocation.exportAccountStatementForAudit.async'
console.log('params', params) console.log('params', params)
...@@ -524,8 +545,6 @@ export default { ...@@ -524,8 +545,6 @@ export default {
] ]
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleClose() this.handleClose()
}
})
}, },
handleClose() { handleClose() {
......
<template> <template>
<el-dialog title="请选择退款明细" :visible.sync="refundVisible" :before-close="handleClose" <el-dialog
:close-on-click-modal="false" width="70%" class="relateStore"> title="请选择退款明细"
:visible.sync="refundVisible"
:before-close="handleClose"
:close-on-click-modal="false"
width="70%"
class="relateStore"
>
<div> <div>
<el-table ref="seletingTable" :data="tableData" class="table" border @select="handleChange" <el-table
@select-all="handleAll"> ref="seletingTable"
<el-table-column :selectable="selectableFn" type="selection" width="55" align="center" /> :data="tableData"
class="table"
border
@select="handleChange"
@select-all="handleAll"
>
<el-table-column
:selectable="selectableFn"
type="selection"
width="55"
align="center"
/>
<template v-for="item in tableColumn"> <template v-for="item in tableColumn">
<el-table-column :prop="item.prop" :label="item.label" align="center"> <el-table-column :prop="item.prop" :label="item.label" align="center">
<span slot-scope="scope"> <span slot-scope="scope">
{{ scope.row[item.prop] ? item.unit ? item.unit + scope.row[item.prop] : scope.row[item.prop] : "-" }} {{
scope.row[item.prop]
? item.unit
? item.unit + scope.row[item.prop]
: scope.row[item.prop]
: "-"
}}
</span> </span>
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
<div class="total">可选可退总价:<div class="price">¥{{ total }}</div></div> <div class="total">
可选可退总价:
<div class="price">¥{{ total }}</div>
</div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button> <el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="handleConfirm" :disabled="!refundSubOrderCode">下一步</el-button> <el-button
type="primary"
@click="handleConfirm"
:disabled="!refundSubOrderCode"
>下一步</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -25,48 +56,48 @@ ...@@ -25,48 +56,48 @@
<script> <script>
import { goodsSubOrder } from "@api/order" import { goodsSubOrder } from "@api/order"
export default { export default {
name: 'refundDetail', name: "refundDetail",
data() { data() {
return { return {
tableData: [], tableData: [],
tableColumn: [ tableColumn: [
{ {
label: '子订单编码', label: "子订单编码",
prop: 'subOrderCode' prop: "subOrderCode"
}, },
{ {
label: '商品名称', label: "商品名称",
prop: 'goodsName' prop: "goodsName"
}, },
{ {
label: '商品别名', label: "商品别名",
prop: 'goodsAlias' prop: "goodsAlias"
}, },
{ {
label: '商品ID', label: "商品ID",
prop: 'goodsCommodityCode' prop: "goodsCommodityCode"
}, },
{ {
label: '分类', label: "分类",
prop: 'upgradeGoodsTypeName' prop: "upgradeGoodsTypeName"
}, },
{ {
label: '售价', label: "售价",
prop: 'upgradePrice', prop: "upgradePrice",
unit: '¥' unit: "¥"
}, },
{ {
label: '数量/件', label: "数量/件",
prop: 'number' prop: "number"
}, },
{ {
label: '支付金额', label: "支付金额",
prop: 'totalPrice', prop: "totalPrice",
unit: '¥' unit: "¥"
} }
], ],
total: 0, total: 0,
refundSubOrderCode: '', refundSubOrderCode: "",
isAll: false isAll: false
} }
}, },
...@@ -100,27 +131,27 @@ export default { ...@@ -100,27 +131,27 @@ export default {
}, },
handleChange(selection) { handleChange(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length this.isAll = selection.length == this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
handleAll(selection) { handleAll(selection) {
console.log(selection) console.log(selection)
this.isAll = selection.length ==this.tableData.length this.isAll = selection.length == this.tableData.length
this.getParams(selection) this.getParams(selection)
}, },
getParams(selection) { getParams(selection) {
let _total = 0 let _total = 0
let _refundSubOrderCode = [] let _refundSubOrderCode = []
selection.forEach(item => { selection.forEach((item) => {
_total += item.totalPrice _total += item.totalPrice
_refundSubOrderCode.push(item.subOrderCode) _refundSubOrderCode.push(item.subOrderCode)
}) })
this.total = _total this.total = _total
this.refundSubOrderCode = _refundSubOrderCode.join('/') this.refundSubOrderCode = _refundSubOrderCode.join("/")
console.log(this.refundSubOrderCode) console.log(this.refundSubOrderCode)
}, },
handleConfirm() { handleConfirm() {
const {refundSubOrderCode, total, isAll} = this const { refundSubOrderCode, total, isAll } = this
this.$emit("handleConfirm", { this.$emit("handleConfirm", {
total, total,
refundSubOrderCode, refundSubOrderCode,
...@@ -141,7 +172,7 @@ export default { ...@@ -141,7 +172,7 @@ export default {
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
.price { .price {
color: #2A58AD; color: #2a58ad;
margin-left: 10px; margin-left: 10px;
} }
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-17 17:50:41 * @Date: 2024-04-17 17:50:41
* @LastEditors: huyue * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2024-05-07 10:57:45 * @LastEditTime: 2025-07-02 10:43:18
--> -->
<template> <template>
<div> <div>
......
<template> <template>
<div class="layout"> <div class="layout">
<div <div class="tab" ref="tabbox">
class="tab"
ref="tabbox"
>
<div <div
:class="['tab-item', { 'item-active': windowId == -1 }]" :class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1" @click="windowId = -1"
...@@ -19,10 +16,7 @@ ...@@ -19,10 +16,7 @@
:ref="`tab-${index}`" :ref="`tab-${index}`"
> >
{{ i.text }} {{ i.text }}
<div <div class="close" @click.stop="close(index)">
class="close"
@click.stop="close(index)"
>
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
</div> </div>
...@@ -30,10 +24,7 @@ ...@@ -30,10 +24,7 @@
</template> </template>
<template v-if="dropdownList.length"> <template v-if="dropdownList.length">
<div class="arrow-box"> <div class="arrow-box">
<el-dropdown <el-dropdown trigger="click" @command="windowId = $event">
trigger="click"
@command="windowId = $event"
>
<div class="dropdown-link"> <div class="dropdown-link">
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</div> </div>
...@@ -46,10 +37,7 @@ ...@@ -46,10 +37,7 @@
> >
<div class="dropdown-item"> <div class="dropdown-item">
{{ i.text }} {{ i.text }}
<div <div class="close" @click.stop="closeDrop(index)">
class="close"
@click.stop="closeDrop(index)"
>
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
</div> </div>
...@@ -81,7 +69,7 @@ ...@@ -81,7 +69,7 @@
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import clockSalaryIndex from './components/clockSalaryIndex/index' import clockSalaryIndex from './components/clockSalaryIndex/index'
import InStoreManageIndex from "./index" import InStoreManageIndex from "./index"
import staffInfo from "./staffInfo" import staffInfo from "./staffInfo"
...@@ -180,7 +168,7 @@ export default { ...@@ -180,7 +168,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.layout { .layout {
height: 100%; height: 100%;
.tab { .tab {
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form label-width="450px"
:inline="true">
<el-form-item label="销售方名称:">
{{ detailInfo.enterpriseName ? detailInfo.enterpriseName : "-" }}
</el-form-item>
<!-- <el-form-item label="企业联系电话:">
{{ "-" }}
</el-form-item> -->
<el-form-item label="开票金额:">
{{ detailInfo.invoiceAmount ? detailInfo.invoiceAmount : "-" }}
</el-form-item>
<el-form-item label="票通订单号:">
{{ detailInfo.tradeNo ? detailInfo.tradeNo : "-" }}
</el-form-item>
<el-form-item label="生成时间:">
{{ detailInfo.createdDate ? detailInfo.createdDate : "-" }}
</el-form-item>
<el-form-item label="二维码有效期:">
{{ detailInfo.expireDay ? detailInfo.expireDay + '天' : "-" }}
</el-form-item>
</el-form>
<div class="imgCon">
<el-image id="printImage"
:src="detailInfo.invoiceQrCode"
class="imgSize"></el-image>
</div>
<div class="tips">
您可以使用微信或支付宝,扫码开票
</div>
</div>
<div class="footer">
<el-button @click="dialogInnerShow = true"
type="primary">发送邮箱</el-button>
<el-button @click="handlePrint">打印</el-button>
</div>
</div>
<baseDialog :is-show.sync="dialogInnerShow"
:config="dialogInnerConfig.setting"
:dialog-config="dialogInnerConfig.config"
@handleClick="handleSendEmail">
<el-form ref="sendFormRef"
:model="sendForm"
label-width="100px">
<el-form-item prop="email"
label="邮箱"
:rules="[
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
]">
<el-input v-model="sendForm.email"
style="width: 300px;"></el-input>
</el-form-item>
</el-form>
</baseDialog>
</basedialog>
</div>
</template>
<script>
import { getByQrcodeNo, sendEmail } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
export default {
name: "InvoiceCodeDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: true,
btnList: []
},
config: {
title: "查看二维码",
width: "1080px"
}
},
detailInfo: {},
loading: true,
dialogInnerShow: false,
dialogInnerConfig: {
setting: {
showClose: true,
appendToBody: true,
isShowFooter: true,
confirm_name: '发送',
cancel_name: '取消'
},
config: {
title: "发送邮箱",
width: "500px"
}
},
sendForm: {
email: ''
}
}
},
methods: {
getDetail() {
var params = { qrcodeNo: this.paramsObj.qrcodeNo }
getByQrcodeNo(params).then(res => {
this.detailInfo = res
this.loading = false
})
},
handlePrint() {
if (this.detailInfo.invoiceQrCode) {
window.open(this.detailInfo.invoiceQrCode)
}
},
handleSendEmail() {
this.$refs.sendFormRef.validate(valid => {
if (valid) {
var params = deepClone(this.sendForm)
params.qrcodeNo = this.detailInfo.qrcodeNo
sendEmail(params).then(res => {
this.notice.okTips('发送成功')
this.dialogInnerShow = false
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.imgCon {
text-align: center;
.imgSize {
width: 120px;
height: 120px;
}
}
.tips {
text-align: center;
margin-top: 10px;
}
}
.footer {
text-align: center;
margin-top: 50px;
}
}
</style>
<template>
<div class="range">
<div :class="[
' el-date-editor',
'el-range-editor',
'el-input__inner',
'el-date-editor--daterange',
'el-range-editor--small',
pickerVisible ? 'is-active' : ''
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="handleMove"
ref="reference">
<template v-if="infinity">
<el-input-number class="el-range-input hide-btn"
:placeholder="startPlaceholder"
v-model="userInput[0]"
@blur="handleBlur(0)"></el-input-number>
<span class="el-range-separator">至</span>
<el-input-number class="el-range-input hide-btn"
:placeholder="endPlaceholder"
v-model="userInput[1]"
@blur="handleBlur(1)"></el-input-number>
</template>
<template v-else>
<el-input v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur(0)"
@input="handleStartInput"
class="el-range-input"></el-input>
<span class="el-range-separator">至</span>
<el-input v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur(1)"
class="el-range-input"></el-input>
</template>
<i v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"></i>
</div>
<div class="errorTips"
v-if="tipsShow">最大金额需大于最小金额</div>
</div>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
data() {
return {
pickerVisible: false,
showClose: false,
userInput: this.displayValue,
oldVal: {
startInput: '',
endInput: ''
},
tipsShow: false
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String,
infinity: Boolean
},
watch: {
displayValue(val) {
if (val) {
this.userInput = val
if (val.length == 0) {
this.tipsShow = false
}
}
}
},
methods: {
handleStartInput(event) {
this.userInput[0] = limitPrice(event, this.oldVal.startInput, 20, 2)
this.oldVal.startInput = this.userInput[0]
},
handleEndInput(event) {
this.userInput[1] = limitPrice(event, this.oldVal.endInput, 20, 2)
this.oldVal.endInput = this.userInput[1]
},
handleClickIcon(event) {
this.userInput[0] = null
this.userInput[1] = null
this.tipsShow = false
},
valueIsEmpty() {
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
this.$emit("focus", this)
}
},
handleBlur(index) {
this.pickerVisible = false
this.contrastValue()
},
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
}
}
</script>
<style scoped lang="scss">
.range {
.el-range-input {
::v-deep {
input {
border: 0;
margin-top: -2px;
height: 28px;
}
}
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
.hide-btn {
::v-deep {
span {
display: none;
}
input {
padding: 0;
}
}
}
.errorTips {
color: red;
// text-align: center;
font-size: 12px;
}
}
</style>
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<div>
<el-form-item label="可选开票种类:"
class="onLineItem">
{{
detailInfo.invoiceTypeShow ? detailInfo.invoiceTypeShow : "-"
}}
</el-form-item>
</div>
<div>
<el-form-item label="主订单号:"
class="onLineItem">
{{
detailInfo.bizOrderCode ? detailInfo.bizOrderCode : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="开票项目:"
class="halfItem">
{{ detailInfo.itemNames ? detailInfo.itemNames : "-" }}
</el-form-item>
<el-form-item label="待开票金额:"
class="halfItem">
{{ detailInfo.invoiceAmount
? detailInfo.invoiceAmount
: "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="收款人:"
class="halfItem">
{{ detailInfo.casherName ? detailInfo.casherName : "-" }}
</el-form-item>
<el-form-item label="复核人:"
class="halfItem">
{{
detailInfo.reviewerName ? detailInfo.reviewerName : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="可开票张数:"
class="halfItem">
{{ detailInfo.allowInvoiceCount ? detailInfo.allowInvoiceCount : "-" }}
</el-form-item>
<el-form-item label="发票备注:"
class="halfItem">
{{
detailInfo.invoiceRemark ? detailInfo.invoiceRemark : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="发送短信:"
class="halfItem">
{{ "-" }}
</el-form-item>
<el-form-item label="二维码有效期:"
class="halfItem">
{{
detailInfo.expireDay ? detailInfo.expireDay + '天' : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="发送邮件:"
class="halfItem">
{{ detailInfo.email ? detailInfo.email : "-" }}
</el-form-item>
</div>
</el-form>
</div>
</div>
</basedialog>
</div>
</template>
<script>
import { getByQrcodeNo } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
import { invoiceTypeOpt } from '@/common/constants.js'
export default {
name: "InvoiceCodeDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "开票二维码详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
invoiceTypeOpt: deepClone(invoiceTypeOpt)
}
},
methods: {
getDetail() {
var params = { qrcodeNo: this.paramsObj.qrcodeNo }
getByQrcodeNo(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess(info) {
if (info) {
if (info.invoiceType) {
let arr = info.invoiceType.split(",")
console.log('arr', arr)
console.log('this.invoiceTypeOpt', this.invoiceTypeOpt)
arr = arr.map((o) => {
return this.invoiceTypeOpt.find(item => item.confId === o)?.confValue
})
info.invoiceTypeShow = arr.join("/")
}
}
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
}
</style>
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<div class="itemDiv">
<el-form-item label="发票种类:"
class="halfItem">
{{ detailInfo.invoiceTypeShow ? detailInfo.invoiceTypeShow : "-" }}
</el-form-item>
<el-form-item label="作废状态:"
class="halfItem">
{{ detailInfo.invalidFlagShow ? detailInfo.invalidFlagShow : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="购买方名称:"
class="halfItem">
{{ detailInfo.buyerName ? detailInfo.buyerName : "-" }}
</el-form-item>
<el-form-item label="开票人:"
class="halfItem">
{{ detailInfo.drawerName ? detailInfo.drawerName : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="购买方税号:"
class="halfItem">
{{ detailInfo.buyerTaxpayerNum ? detailInfo.buyerTaxpayerNum : "-" }}
</el-form-item>
<el-form-item label="开票类型:"
class="halfItem">
{{ detailInfo.InvoicingShow ? detailInfo.InvoicingShow : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="数电票号码:"
class="halfItem">
{{ detailInfo.electronicInvoiceNo ? detailInfo.electronicInvoiceNo : "-" }}
</el-form-item>
<el-form-item label="开票来源:"
class="halfItem">
{{ detailInfo.createdSourceShow ? detailInfo.createdSourceShow : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="开票日期:"
class="halfItem">
{{ detailInfo.invoiceDate ? detailInfo.invoiceDate : "-" }}
</el-form-item>
<el-form-item label="票通订单号:"
class="halfItem">
{{ detailInfo.tradeNo ? detailInfo.tradeNo : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="不含税金额:"
class="halfItem">
{{ detailInfo.noTaxAmount ? detailInfo.noTaxAmount : "-" }}
</el-form-item>
<el-form-item label="主订单号:"
class="halfItem">
{{ detailInfo.bizOrderCode ? detailInfo.bizOrderCode : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="税额:"
class="halfItem">
{{ detailInfo.taxAmount ? detailInfo.taxAmount : "-" }}
</el-form-item>
<el-form-item label="交易参考号:"
class="halfItem">
{{ detailInfo.bizTradeNo ? detailInfo.bizTradeNo : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="价税合计金额:"
class="halfItem">
{{ detailInfo.amountWithTax ? detailInfo.amountWithTax : "-" }}
</el-form-item>
<el-form-item label="主要项目名称:"
class="halfItem">
{{ detailInfo.itemNames ? detailInfo.itemNames : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="冲红状态:"
class="halfItem">
{{ detailInfo.redFlagShow ? detailInfo.redFlagShow : "-" }}
</el-form-item>
</div>
</el-form>
</div>
</div>
</basedialog>
</div>
</template>
<script>
import { getByInvoiceReqSerialNo } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
import { createdSourceOpt, invoiceTypeOpt, redFlagOpt, invalidFlagOpt, InvoicingOpt } from "@/common/constants.js"
export default {
name: "InvoiceQueryDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "发票详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
invoiceTypeOpt: deepClone(invoiceTypeOpt),
createdSourceOpt: deepClone(createdSourceOpt),
redFlagOpt: deepClone(redFlagOpt),
invalidFlagOpt: deepClone(invalidFlagOpt),
InvoicingOpt: deepClone(InvoicingOpt)
}
},
methods: {
getDetail() {
var params = { invoiceReqSerialNo: this.paramsObj.invoiceReqSerialNo }
getByInvoiceReqSerialNo(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess(info) {
if (info) {
if (info.invoiceKind) {
let arr = info.invoiceKind.split(",")
console.log('arr', arr)
console.log('this.invoiceTypeOpt', this.invoiceTypeOpt)
arr = arr.map((o) => {
return this.invoiceTypeOpt.find(item => item.confId === o)?.confValue
})
info.invoiceTypeShow = arr.join("/")
}
if (info.invalidFlag) {
info.invalidFlagShow = this.invalidFlagOpt.find(item => item.confId === info.invalidFlag)?.confValue
}
if (info.invoiceType) {
info.InvoicingShow = this.InvoicingOpt.find(item => item.confId === info.invoiceType)?.confValue
}
if (info.createdSource) {
info.createdSourceShow = this.createdSourceOpt.find(item => item.confId === info.createdSource)?.confValue
}
if (info.redFlag) {
info.redFlagShow = this.redFlagOpt.find(item => item.confId === info.redFlag)?.confValue
}
}
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
}
</style>
<!-- 配置课程 -->
<template>
<div class="configureCourse">
<div class="left-wrap">
<div class="header">
<img class="staff-icon" src="../../images/staff-icon.png" alt="" />
<div class="title">
员工列表
<div class="num">共7人,已配置1人</div>
</div>
</div>
<div class="staff-list">
<div
v-for="(item, index) in staffList"
:key="item.id"
:class="['staff-item', staffIndex == index ? 'active' : '']"
@click="handleClick(index)"
>
{{ item.name }}
<div class="config" v-if="item.isConfig">已配置</div>
</div>
</div>
</div>
<div class="right-wrap">
<div class="nav-tabs">
<div
:class="['nav-item', activeName == index ? 'active' : '']"
v-for="(item, index) in tabPaneList"
:key="index"
@click="handleTabClick(index)"
>
{{ item.label }}
</div>
</div>
<components :is="tabName"></components>
</div>
</div>
</template>
<script>
import staffDetail from "./staffDetail"
import couseAllocation from "./couseAllocation"
export default {
name: "configureCourse",
components: { staffDetail, couseAllocation },
data() {
return {
staffIndex: 0,
activeName: "0",
tabPaneList: [
{
label: "员工详情"
},
{
label: "课程配置"
}
],
tabName: "staffDetail",
staffList: [
{
name: "王小虎",
isConfig: true,
id: 1
},
{
name: "李小宣",
isConfig: true,
id: 1
},
{
name: "胡明星",
isConfig: true,
id: 1
},
{
name: "郝怡逸",
isConfig: true,
id: 1
}
]
}
},
methods: {
handleClick(index) {
this.staffIndex = index
},
handleTabClick(index) {
this.activeName = index
const arr = {
0: "staffDetail",
1: "couseAllocation"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style lang="scss" scoped>
.configureCourse {
display: flex;
margin: 0 20px;
.left-wrap {
min-width: 200px;
width: 200px;
height: 988px;
background: #ffffff;
margin-right: 16px;
.header {
display: flex;
align-items: flex-start;
margin: 12px 0 8px 13px;
.staff-icon {
width: 16px;
height: 16px;
margin-right: 8px;
margin-top: 3px;
}
.title {
color: #333333;
font-size: 16px;
font-weight: 400;
.num {
color: #999999;
font-size: 12px;
font-weight: 400;
margin-top: 2px;
}
}
}
.staff-list {
height: calc(100% - 62px);
overflow-y: auto;
.staff-item {
color: #666666;
font-size: 16px;
font-weight: 400;
padding: 10px 12px 10px 36px;
position: relative;
.config {
position: absolute;
border-radius: 2px;
border: 1px solid #2cca74;
background: #e9eef7;
padding: 4px 8px;
color: #2cca74;
font-size: 12px;
font-weight: 500;
top: 10px;
right: 12px;
}
}
.active {
color: #2a58ad;
background: #e9eef7;
border-right: 3px solid #2a58ad;
}
}
}
.right-wrap {
width: calc(100% - 216px);
.nav-tabs {
display: flex;
align-items: center;
.nav-item {
width: 112px;
height: 44px;
border-radius: 4px 4px 0 0;
color: #666666;
font-size: 16px;
font-weight: 400;
line-height: 44px;
box-sizing: border-box;
text-align: center;
margin-right: 2px;
border: 1px solid #e5e5e5;
background: #f8f8f8;
}
.active {
color: #2a58ad;
font-size: 16px;
font-weight: 500;
border: 1px solid #e5e5e5;
background: #ffffff;
}
}
// background: #ffffff;
}
}
</style>
<!-- 课程任务配置 -->
<template>
<div class="couse-wrap">
<div class="header">
课程任务配置
<div class="count-down">
<img class="error-circle" src="../../images/error-circle.png" />
倒计时:还剩 2天11时23分57秒 完成本周课程配置
</div>
</div>
<div class="condition">
<div class="couse-tabs">
<div
:class="['couse-tabs-item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in 10"
:key="index"
@click="handleClick(index)"
>
问界
</div>
</div>
<el-button size="small" type="primary" @click="handleCustom"
>自定义配课</el-button
>
</div>
<div class="couse-content">
<div class="content-item" v-for="item in 10" :key="item">
<div class="name">月产值</div>
<div class="value"><30万</div>
<div class="configuration">
<div class="item">
<div>可配置</div>
<div class="number">4家</div>
</div>
<div class="item">
<div>可配置</div>
<div class="number">4家</div>
</div>
</div>
<div class="btns">
<div class="details" @click="handleDetail(item)">详情</div>
<div class="configure-course" @click="handleConfigureCourse(item)">
配置课程
</div>
</div>
</div>
</div>
<custom-couse
:customVisible="customVisible"
v-if="customVisible"
@dialogClose="handleCloseDialog"
></custom-couse>
</div>
</template>
<script>
import customCouse from "./customCouse.vue"
export default {
components: { customCouse },
data() {
return {
activeIndex: 0,
customVisible: false
}
},
methods: {
handleConfigureCourse(item) {
this.$router.push({
name: "configureCourse"
// params: { id: item.id }
})
},
handleDetail(row) {
console.log(1111)
row.activeName = "indicatorInfo"
this.$emit("openWindow", row)
},
handleClick(index) {
console.log(index)
this.activeIndex = index
},
handleCustom() {
this.customVisible = true
},
handleCloseDialog() {
this.customVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.couse-wrap {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
.count-down {
margin-left: 20px;
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
}
.condition {
display: flex;
align-items: center;
margin: 16px 20px;
.couse-tabs {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
padding: 6px 20px;
background: #f2f3f5;
border-radius: 2px;
line-height: 20px;
color: #333333;
font-size: 14px;
font-weight: 500;
margin: 0 8px 8px 0;
cursor: pointer;
}
.active {
color: #2a58ad;
background: #2a58ad26;
}
}
}
.couse-content {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 0 20px;
.content-item {
min-width: 278px;
width: calc((100% / 4) - (16px * 3 / 4));
padding: 20px;
border-radius: 4px;
background: #f8faff;
height: 204px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 16px;
.name {
color: #1d1d1d;
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.value {
color: #1d1d1d;
font-size: 14px;
font-weight: 400;
line-height: 20px;
margin: 4px 0 16px;
}
.configuration {
display: flex;
align-items: center;
margin-bottom: 16px;
.item {
flex: 1;
color: #888888;
font-size: 14px;
font-weight: 400;
.number {
color: #1d1d1d;
font-size: 16px;
font-weight: 400;
line-height: 24px;
margin-top: 4px;
}
}
}
}
.content-item:nth-child(4n) {
margin-right: 0;
}
.btns {
display: flex;
align-items: center;
justify-content: space-between;
color: #2a58ad;
font-size: 14px;
font-weight: 400;
.details {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
border: 1px solid #2a58ad80;
background: #ffffff;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.configure-course {
width: 114px;
height: 32px;
border-radius: 24px;
opacity: 1;
background: #dfe6f3;
line-height: 32px;
text-align: center;
cursor: pointer;
}
}
}
}
</style>
<!-- 自定义配课 -->
<template>
<div class="coustom-dialog">
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleConfirm"
@closeDialog="handleClose"
>
<glsx-combi-form
label-width="150px"
default-width="400px"
:form-obj="coustomForm"
:form-data="coustomFormData"
:form-rules="infoRules"
>
<template slot="condition" slot-scope="scope">
<div class="condition-tabs">
<div
:class="['condition-tab', item.active ? 'active' : '']"
v-for="(item, index) in conditionList"
:key="index"
@click="item.active = !item.active"
>
{{ item.text }}
</div>
</div>
</template>
</glsx-combi-form>
</baseDialog>
</div>
</template>
<script>
export default {
props: {
customVisible: {
type: Boolean,
default: false
}
},
computed: {
visible: {
get() {
return this.customVisible
},
set(newVal) {
this.$emit("dialogClose", {
flag: newVal,
attrName: "customVisible"
})
}
}
},
data() {
return {
dialogConfig: {
title: "自定义配课",
width: "720px"
},
infoRules: {
refundType: [
{
required: true,
message: "请选择退款类型",
trigger: "blur"
}
]
},
coustomForm: {},
coustomFormData: [
{
label: "选择筛选条件",
name: "condition",
addHtml: "condition"
},
{
label: "组合筛选条件:",
name: "condition",
type: "radio",
optionId: "confId",
optionLabel: "confLabel",
optionList: [
{
confLabel: "符合其中一项规则(或)",
confId: 1
},
{
confLabel: "符合已选规则(且)",
confId: 2
}
]
}
],
conditionList: [
{
text: "月产值<30万",
value: 1,
active: true
},
{
text: "客单价<9000元",
value: 2,
active: false
},
{
text: "转化率<30%",
value: 3,
active: false
}
]
}
},
methods: {
handleClose() {
this.visible = false
},
handleConfirm() {
this.visible = false
}
}
}
</script>
<style scoped lang="scss">
.condition-tabs {
display: flex;
align-items: center;
.condition-tab {
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>
<template>
<div :ref="id" class="canvas"></div>
</template>
<script>
import * as echarts from "echarts"
export default {
name: "barChart",
props: {
colors: {
type: Array,
default: () => ["#FFC154", "#FF9671"]
},
xData: {
type: Array,
default: []
},
yData: {
type: Array,
default: []
},
id: {
type: String,
default: ""
}
},
data() {
return {
client: "",
chart: ""
}
},
// created() {
// const { rotate, analysisList } = this
// const obj = {
// rotate,
// analysisList
// }
// this.lineOptions = this.revese ? getBarReverseOptions(obj) : getBarOptions(obj)
// },
watch: {
analysisList: {
handler() {
this.chart.setOption(this.getChartSetOption())
},
deep: true
}
},
mounted() {
this.client = this.$refs[this.id]
this.chart = echarts.init(this.client)
this.chart.setOption(this.getChartSetOption())
window.addEventListener("resize", this.resizeHandler)
},
methods: {
getChartSetOption() {
var options = {
xAxis: {
type: "category",
axisLabel: {
color: "#000000a6",
fontSize: "11px"
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
data: this.xData
},
grid: {
left: "6%",
right: "6%",
top: "8%",
bottom: "4%",
// bottom: obj.rotate ? '4%' : '12%',
containLabel: true
},
yAxis: {
type: "value",
splitLine: {
lineStyle: {
color: "#E7EBEF"
}
},
axisLabel: {
show: false
},
splitNumber: 4
},
series: [
{
type: "bar",
symbol: "circle",
backgroundStyle: {
color: "#6578FF"
},
label: {
position: "top",
show: true,
color: "#999999"
},
barWidth: "35%",
data: this.yData
}
]
}
return options
}
}
}
</script>
<style lang="scss" scoped>
.canvas {
width: 100%;
height: 100%;
}
</style>
<template>
<div :ref="id" class="canvas"></div>
</template>
<script>
// 按需引入 echarts
import * as echarts from "echarts"
export default {
data() {
return {
client: "",
chart: ""
}
},
props: {
colors: {
type: Array,
default: () => ["#FFC154", "#FF9671"]
},
xData: {
type: Array,
default: []
},
yData: {
type: Array,
default: []
},
id: {
type: String,
default: ""
}
},
watch: {
xData: {
handler() {
this.chart.setOption(this.getChartSetOption())
}
},
yData: {
handler() {
this.chart.setOption(this.getChartSetOption())
}
}
},
mounted() {
this.client = this.$refs[this.id]
this.chart = echarts.init(this.client)
this.chart.setOption(this.getChartSetOption())
window.addEventListener("resize", this.resizeHandler)
},
methods: {
resizeHandler() {
if (this.chart) {
this.chart.clear()
setTimeout(() => {
this.chart.setOption(this.getChartSetOption())
this.chart.resize()
}, 1000)
}
},
getChartSetOption() {
var option = {
grid: {
bottom: "12%",
top: "10%",
left: "15%",
right: "20px"
},
tooltip: {
show: true,
trigger: "axis",
triggerOn: "click",
backgroundColor: "rgba(41, 45, 51, 1)",
borderRadius: 15,
borderColor: "rgba(41, 45, 51, 1)",
textStyle: {
// 悬浮框文字样式
color: "#fff",
fontSize: 12
},
formatter: (params) => {
return params[0].value
}
},
xAxis: {
type: "category",
boundaryGap: false,
splitNumber: 8,
axisLine: {
show: false
},
axisTick: {
show: false
},
splitLine: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
interval: 0,
show: true,
color: "#000000a6",
fontSize: "11px"
},
data: this.xData
},
yAxis: {
type: "value",
labelLine: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: "#E7EBEF"
}
},
axisLabel: {
show: false
},
splitLine: {
show: true,
lineStyle: {
color: "#E7EBEF"
}
},
axisTick: {
show: false
}
},
series: [
{
type: "line",
avoidLabelOverlap: false,
label: {
formatter: "{c}%",
position: "inside",
fontSize: 10,
show: true,
color: "#999999"
},
emphasis: {
label: {
show: false
}
},
showSymbol: false,
itemStyle: {
color: "rgba(52, 123, 255, 1)"
},
data: this.yData
}
]
}
return option
}
}
}
</script>
<style scoped lang="scss">
.canvas {
width: 100%;
height: 100%;
}
</style>
<template>
<d2-container class="customer-tags">
<div class="d2-container-content">
<d2-table-header title="门店列表">
<el-button size="small" type="primary" @click="exportTable">
批量配课
</el-button>
</d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
</d2-table>
</div>
</d2-container>
</template>
<script type="text/ecmascript-6">
import { mapActions, mapState } from 'vuex'
import { refundApplyRecordPage } from "@api/refundExamine"
import { Util, deepClone } from "@/common/util"
import {
studyPage,
studyUpdate
} from "@api/contentManager"
import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
export default {
name: "indicatorInfo",
data() {
return {
listOfPenaltiesShow: false,
noDataImg,
searchForm: {
bussinessScene: "",
merchantId: "",
scriptMatching: "",
receptionist: "",
solutionBrowsing: "",
// searchdate: [new Date(), new Date()]
sendStartData: [],
finishStartData: []
},
searchFormSearch: {},
currentItem: {},
getListApi: studyPage,
// 表格参数
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "门店名称",
prop: "title"
},
{
label: "商户号",
prop: "staffName"
// minWidth: 144,
},
{
label: "是否直营",
prop: "staffPhone"
},
{
label: "展业时间",
prop: "createdDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.sendStartTime
// ? Util.dateFormate(cellValue.sendStartTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
},
{
label: "归属业务",
addHtml: 'taskStatus'
},
{
label: "主营品牌",
prop: "finishDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.finishEndTime
// ? Util.dateFormate(cellValue.finishEndTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
},
{
label: "区域运营经理",
prop: "finishDate",
},
{
label: "驻店人数",
prop: "finishDate",
},
{
label: "已配课程人数",
prop: "finishDate",
}
]
},
detailInfo: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
created() { },
mounted() {
// this.getServiceStore()
// this.getStudyPage()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
// 详情
handleDetail(row) {
this.listOfPenaltiesShow = true
this.detailInfo = row
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.sendStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.sendStartData
this.searchFormSearch.sendStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.sendEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
if (this.searchForm?.finishStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.finishStartData
this.searchFormSearch.finishStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.finishEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
delete this.searchFormSearch.sendStartData
delete this.searchFormSearch.finishStartData
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
await this.beforeSearchFn()
// console.log(params)
let params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.study.punish.list.export'
const list = [
...this.dowloadList,
{
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>
<style scoped lang="scss">
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 0;
.noDataImg {
width: 64px;
height: 40px;
}
}
.error-input {
::v-deep.el-input__inner {
border-color: red;
}
}
.tag-item {
display: flex;
align-items: center;
padding: 0 10px;
justify-content: center;
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.more-info {
white-space: nowrap;
color: #2a58ad;
cursor: pointer;
margin-left: 2px;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
.static-box {
display: flex;
gap: 0 16px;
margin-bottom: 12px;
.static-item {
flex: 1;
flex-shrink: 0;
height: 82px;
background: #f8faff;
border-radius: 5px;
box-sizing: border-box;
padding: 16px 20px;
.static-title {
font-size: 14px;
color: #333333;
line-height: 20px;
margin-bottom: 4px;
}
.static-value {
display: flex;
font-weight: 700;
font-size: 24px;
line-height: 30px;
align-items: baseline;
::v-deep.static-unit {
font-weight: 600;
font-size: 14px;
margin: 0 2px;
}
}
}
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.gray {
background-color: #c5c5c5;
}
.orange {
background-color: #fdb757;
}
.blue {
background-color: #2a58ad;
}
}
</style>
<!-- 上周学习复盘 -->
<template>
<div class="week-replay">
<div class="header">
课程任务配置<span class="time">(2025-06-09 至 2025-06-15)</span>
</div>
<div class="improve">
<div
:class="['item', activeIndex == index ? 'active' : '']"
v-for="(item, index) in improveList"
:key="item.id"
@click="handleClick(index)"
>
{{ item.name }}
</div>
</div>
<d2-table
class="couse-table"
ref="recordTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
v-if="show"
>
<div slot="auth-button" slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px; cursor: pointer">
<el-button type="text" @click="handleLookCouse"> 查看课程 </el-button>
</span>
</div>
<!-- 查看课程 -->
</d2-table>
<long-detail-dialog
:longVisible.sync="detailVisible"
v-if="detailVisible"
:params-obj="recordInfo"
@dialogClose="closeDetailDialog"
/>
</div>
</template>
<script>
import { invoicePage } from "@api/invoiceManage"
import longDetailDialog from "./longDetailDialog"
export default {
components: { longDetailDialog },
data() {
return {
detailVisible: false,
recordInfo: "",
show: false,
activeIndex: 0,
searchFormSearch: {},
getListApi: invoicePage,
improveList: [
{
name: "未改善",
id: 1
},
{
name: "已改善",
id: 2
}
],
column: [
{
label: "驻店人员",
prop: "invoiceAmount",
width: "150",
isHide: false
},
{
label: "手机号码",
prop: "phone",
width: "150",
isHide: false
},
{
label: "门店名称",
prop: "itemNames",
width: "300",
isHide: false
},
{
label: "主营品牌",
prop: "merchantBrandName",
width: "300",
isHide: true
},
{
label: "学习任务情况",
prop: "expireStatus",
width: "120px",
isHide: false
},
{
label: "任务完成时间",
prop: "createdDate",
width: "180",
isHide: false
}
],
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
// mutiSelectUniqueKey: 'id',
// mutiSelectName: 'invoiceCode',
listName: "list",
tableOption: { width: "150px" },
tableColumns: []
}
}
},
created() {
this.handleClick(0)
},
methods: {
closeDetailDialog() {
this.detailVisible = !this.detailVisible
this.$refs.recordTable.refreshTable(false, true)
},
handleLookCouse() {
console.log("查看课程")
this.detailVisible = true
},
handleClick(index) {
this.show = false
this.activeIndex = index
if (this.activeIndex == 0) {
this.column[this.findAttrIdx("merchantBrandName")].isHide = true
this.column[this.findAttrIdx("phone")].isHide = false
} else {
this.column[this.findAttrIdx("merchantBrandName")].isHide = false
this.column[this.findAttrIdx("phone")].isHide = true
}
this.filterColumn()
},
filterColumn() {
let arr = this.column.filter((item) => {
return !item.isHide
})
this.tableParams.tableColumns = arr
this.$nextTick(() => {
this.show = true
})
},
findAttrIdx(attrName) {
return this.column.findIndex((item) => item.prop == attrName)
}
}
}
</script>
<style lang="scss" scoped>
.week-replay {
margin-top: 16px;
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
.time {
color: #999999;
font-size: 14px;
font-weight: 400;
margin-left: 8px;
}
}
.improve {
display: flex;
align-items: center;
margin: 16px 20px;
.item {
width: 82px;
height: 32px;
line-height: 32px;
border-radius: 2px;
background: #f2f3f5;
color: #333333;
font-size: 14px;
font-weight: 400;
margin-right: 8px;
text-align: center;
cursor: pointer;
}
.active {
background: #2a58ad26;
color: #2a58ad;
}
}
}
.couse-table {
margin: 0 20px;
}
</style>
<!-- 学习情况 -->
<template>
<div class="learning-situation">
<div class="header">学习情况</div>
</div>
</template>
<script></script>
<style scoped lang="scss">
.learning-situation {
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
}
}
</style>
<!-- 查看课程 -->
<template>
<div class="detail-dialog">
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
@handleClick="handleConfirm"
@closeDialog="handleClose"
>
<div class="item" v-for="(detail, index) in configData" :key="index">
<div class="title">{{ detail.title }}</div>
<div class="detail-content">
<div
class="form_div"
v-if="detail.infoData && detail.infoData.length"
>
<el-form class="edit-sub-block" label-width="110px" :inline="true">
<el-row :gutter="20">
<template v-for="(item, key) in detail.infoData">
<el-col :span="item.col ? item.col : 8" :key="key">
<el-form-item :label="item.title">
<div
v-if="item.className"
:class="[item.className(detailInfo)]"
></div>
{{
item.formatter
? item.formatter(detailInfo)
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
<div v-if="detail.tableParams" style="margin-top: 20px">
<d2-table
:hasNum="detail.hasNum"
ref="recordTable"
:table-params="detail.tableParams"
:tableData="detail.tableData"
:hasPage="false"
>
</d2-table>
</div>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
export default {
data() {
return {
dialogConfig: {
title: "查看课程",
width: "1080px"
},
detailInfo: {
tableData: []
},
configData: [
{
title: "个人信息",
infoData: [
{
title: "姓名:",
key: "employeeName",
formatter(cellValue) {
return cellValue.employeeName
}
},
{
title: "手机号码:",
key: "merchantName"
},
{
title: "门店:",
key: "merchantName"
},
{
title: "上级:",
key: "fileUrl"
},
{
title: "导师:",
key: "carModel"
}
],
hasNum: false,
tableParams: {
tableColumns: [
{
label: "个人产值变化",
prop: "invoiceAmount"
},
{
label: "个人转化率变化",
prop: "invoiceAmount"
},
{
label: "个人客单价变化",
prop: "useStatus"
}
]
}
},
{
title: "课程配置",
hasNum: true,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: "课程名称",
prop: "invoiceAmount"
},
{
label: "学习时长",
prop: "invoiceAmount"
},
{
label: "学习进度",
prop: "useStatus",
formatter: (cellValue) => {
return this.baseData.useStatusOpt.find(
(item) => item.confId === cellValue.useStatus
)?.confValue
},
className: (cellValue) => {
return {
N: "redSpot",
Y: "greenSpot"
}[cellValue.useStatus]
}
},
{
label: "成绩",
prop: "penalty "
},
{
label: "完成时间",
prop: "tradeNo",
width: "200",
formatter: (cellValue) => {
return cellValue.createdDate
? Util.dateFormate(
cellValue.createdDate,
"YYYY-MM-DD HH:mm:ss"
)
: ""
}
}
]
}
}
]
}
},
props: {
longVisible: {
type: Boolean,
default: false
}
},
computed: {
visible: {
get() {
return this.longVisible
},
set(newVal) {
this.$emit("dialogClose", {
flag: newVal,
attrName: "longVisible"
})
}
}
},
methods: {
handleClose() {
this.visible = false
},
handleConfirm() {
this.visible = false
}
}
}
</script>
<style scoped lang="scss">
.detail-dialog {
.item {
margin-bottom: 20px;
.title {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 10px 0;
border-bottom: 1px solid #e5e5e5;
}
.form_div {
color: #333333;
padding: 20px 30px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
}
}
}
</style>
<!-- 月组件 -->
<template>
<div class="week-selector">
<div class="nav-btn left" @click="previousMonth">
<i class="el-icon-arrow-left"></i> 上一月
</div>
<div class="nav-btn current-week" @click="goToCurrentMonth">
<div class="this-week">本月</div>
<div class="week-range">{{ currentMonthRange }}</div>
</div>
<div
:class="['nav-btn', 'right', isDisabled ? 'isDisabled' : '']"
@click="nextMonth"
>
下一月 <i class="el-icon-arrow-right"></i>
</div>
</div>
</template>
<script>
export default {
data() {
return {
monthOffset: 0,
isDisabled: false
}
},
computed: {
currentMonthRange() {
const start = this.getStartOfMonth()
const end = new Date(start)
end.setMonth(start.getMonth(), this.getLastDayOfMonth(start))
this.updateIsDisabled(start)
return `${this.formatDate(start)} - ${this.formatDate(end)}`
}
},
methods: {
getLastDayOfMonth(date) {
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()
},
getStartOfMonth() {
const date = new Date()
date.setMonth(date.getMonth() + this.monthOffset)
date.setDate(1)
return date
},
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, "0")
const day = String(date.getDate()).padStart(2, "0")
return `${year}/${month}/${day}`
},
previousMonth() {
this.monthOffset--
},
nextMonth() {
if (!this.isDisabled) {
this.monthOffset++
}
},
goToCurrentMonth() {
this.monthOffset = 0
},
getCurrentMonthStart() {
const date = new Date()
date.setDate(1)
return date
},
isSameMonth(date1, date2) {
return (
date1.getFullYear() === date2.getFullYear() &&
date1.getMonth() === date2.getMonth()
)
},
updateIsDisabled(date) {
const currentMonthStart = this.getCurrentMonthStart()
const targetMonthStart = this.getStartOfMonth(date)
this.isDisabled = this.isSameMonth(currentMonthStart, targetMonthStart)
console.log(this.isDisabled)
}
}
}
</script>
<style lang="scss" scoped>
.week-selector {
display: flex;
align-items: center;
border: 1px solid #dbdbdb;
border-radius: 4px;
height: 32px;
box-sizing: border-box;
.nav-btn {
width: 70px;
padding: 8px 6px;
color: #1d1d1d;
font-size: 12px;
font-weight: 400;
box-sizing: border-box;
}
.left {
border-right: 1px solid #dbdbdb;
}
.right {
border-left: 1px solid #dbdbdb;
}
.current-week {
width: 224px;
display: flex;
align-items: center;
}
.this-week {
width: 36px;
height: 20px;
border-radius: 2px;
background: #f2f3f5;
color: #2a58ad;
font-size: 12px;
text-align: center;
line-height: 20px;
margin-right: 14px;
}
.week-range {
color: #1d1d1d;
font-size: 14px;
}
.isDisabled {
color: #cccccc;
}
}
</style>
<!-- 业绩状况 -->
<template>
<div class="performance-status">
<div class="header">业绩状况(延保)</div>
<div class="tabs">
<div
:class="{
'tabs-item': true,
'tabs-item-active': index === activeIndex
}"
v-for="(item, index) in timeData"
:key="index"
@click="handleClick(index)"
>
{{ item.text }}
</div>
</div>
<div class="content">
<!-- 产值 -->
<div class="content-item">
<div class="title">个人产值(元)</div>
<echart-bar
class="echart"
id="production"
:xData="xData"
:yData="yData"
></echart-bar>
</div>
<div class="content-item">
<div class="title">转化率(%)</div>
<echart-line
class="echart"
id="production"
:xData="xData"
:yData="yData"
></echart-line>
</div>
<div class="content-item">
<div class="title">客单价(元)</div>
<echart-bar
class="echart"
id="production"
:xData="xData"
:yData="yData"
></echart-bar>
</div>
</div>
</div>
</template>
<script>
import EchartLine from "./echartLine"
import EchartBar from "./echartBar"
export default {
components: {
EchartLine,
EchartBar
},
name: "performanceStatus",
data() {
return {
xData: ["2021-01-01", "2021-01-02", "2021-01-03", "2021-01-04"],
yData: [15600, 24897, 24897, 18350],
activeIndex: 0,
timeData: [
{
text: "近4周",
value: 1
},
{
text: "近4月",
value: 2
}
]
}
},
methods: {
handleClick(index) {
this.activeIndex = index
}
}
}
</script>
<style scoped lang="scss">
.performance-status {
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
}
.tabs {
margin: 12px 0 16px 20px;
display: flex;
align-items: center;
background: #fff;
border-radius: 2px;
.tabs-item {
padding: 6px 20px;
cursor: pointer;
font-size: 12px;
font-weight: 400;
color: #1d1d1d;
border: 1px solid #dbdbdb;
}
.tabs-item-active {
color: #ffffff;
background: #2a58ad;
}
}
.content {
margin: 20px;
display: flex;
height: 238px;
width: 100%;
.content-item {
flex: 1;
.echart {
width: 100%;
height: 100%;;
}
.title {
color: #333333;
font-size: 14px;
font-weight: 400;
margin-bottom: 12px;
}
}
}
}
</style>
<!-- 员工详情 -->
<template>
<div class="staff-detail">
<div class="header">基础信息</div>
<div class="baseInfo">
<div class="form_div" v-if="infoData && infoData.length">
<el-form class="edit-sub-block" label-width="128px" :inline="true">
<el-row :gutter="20">
<template v-for="(item, index) in infoData">
<el-col :span="item.col ? item.col : 8" :key="index">
<el-form-item :label="item.title">
<div
v-if="item.className"
:class="[item.className(detailInfo)]"
></div>
{{
item.formatter
? item.formatter(detailInfo)
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
</div>
<!-- 业绩状况 -->
<performance-status :detailInfo="detailInfo"></performance-status>
<!-- 谈客能力-->
<div class="header">谈客能力</div>
<div class="presentation"></div>
<!-- 学习情况 -->
<learning-situation></learning-situation>
</div>
</template>
<script>
import LearningSituation from "./learningSituation.vue"
import PerformanceStatus from "./performanceStatus.vue"
export default {
components: {
PerformanceStatus,
LearningSituation
},
data() {
return {
detailInfo: {},
infoData: [
{
title: "入职时间:",
key: "employeeName",
formatter(cellValue) {
return cellValue.employeeName
}
},
{
title: "上级:",
key: "fileUrl"
},
{
title: "导师:",
key: "carModel"
},
{
title: "门店:",
key: "merchantName"
},
{
title: "归属业务:",
key: "merchantName"
}
]
}
}
}
</script>
<style lang="scss" scoped>
.staff-detail {
background: #fff;
.header {
color: #111111;
font-size: 16px;
font-weight: 500;
padding: 14px 20px;
border-bottom: 1px solid #e5e5e5;
}
.form_div {
color: #1d1d1d;
padding: 20px 30px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__label {
color: #666666;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 1280px);
word-break: break-all;
}
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
}
}
</style>
<!-- 门店指标 -->
<template>
<div class="store-wrap">
<div v-for="(item, index) in storeList" :key="index" class="store-item">
<div class="name">{{ item.name }}</div>
<div class="value">{{ item.value }}</div>
<div class="link" v-if="item.link">
环比<span>{{ item.link }}</span>
<div class="triangle-up"></div>
</div>
<div class="detail" v-if="item.addHtml" @click="handleDetail(item)">
详情<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
storeList: [
{
name: "门店总数",
value: "100",
addHtml: "store"
},
{
name: "产值(元)",
value: "100",
link: "11%",
trend: () => {
return false
}
},
{
name: "客单价(元)",
value: "100",
link: "11%",
trend: () => {
return false
}
},
{
name: "交车数",
value: "100",
link: "11%",
trend: () => {
return false
}
},
{
name: "触客数",
value: "100",
link: "11%",
trend: () => {
return false
}
},
{
name: "订单数",
value: "100",
link: "11%",
trend: () => {
return false
}
}
]
}
},
methods: {
handleDetail(row) {
console.log(1111)
row.activeName = "storeInfo"
this.$emit("openWindow", row)
}
},
mounted() {}
}
</script>
<style lang="scss" scoped>
.store-wrap {
display: flex;
align-items: center;
flex-wrap: wrap;
.store-item {
width: calc((100% / 3) - (16px * 2 / 3));
min-width: 376px;
height: 124px;
border-radius: 4px;
opacity: 1;
background: #f8faff;
padding: 16px 20px;
margin-bottom: 16px;
box-sizing: border-box;
margin-right: 16px;
.name {
color: #333333;
font-size: 14px;
font-weight: 400;
}
.value {
color: #1d1d1d;
font-size: 32px;
font-weight: 500;
margin: 8px 0;
}
.detail {
color: #2a58ad;
font-size: 14px;
font-weight: 400;
cursor: pointer;
}
.link {
display: flex;
align-items: center;
color: #888888;
font-size: 14px;
font-weight: 400;
span {
color: #eb4e4e;
margin: 0 6px;
}
}
}
.store-item:nth-child(3n) {
margin-right: 0;
}
}
// 向上
.triangle-up {
width: 0;
height: 0;
border-left: 3px solid transparent; /* 左半边透明 */
border-right: 3px solid transparent; /* 右半边透明 */
border-bottom: 6px solid #eb4e4e; /* 底部红色形成三角形 */
}
/* 向下 */
.triangle-down {
width: 0;
height: 0;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
border-top: 6px solid #43cf7c;
}
</style>
<template>
<d2-container class="customer-tags">
<div class="d2-container-content">
<d2-table-header title="门店列表"> </d2-table-header>
<d2-table
ref="table"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
</d2-table>
</div>
</d2-container>
</template>
<script type="text/ecmascript-6">
import { mapActions, mapState } from 'vuex'
import { refundApplyRecordPage } from "@api/refundExamine"
import { Util, deepClone } from "@/common/util"
import {
studyPage,
studyUpdate
} from "@api/contentManager"
import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
export default {
name: "storreInfo",
data() {
return {
listOfPenaltiesShow: false,
noDataImg,
searchForm: {
bussinessScene: "",
merchantId: "",
scriptMatching: "",
receptionist: "",
solutionBrowsing: "",
// searchdate: [new Date(), new Date()]
sendStartData: [],
finishStartData: []
},
searchFormSearch: {},
currentItem: {},
getListApi: studyPage,
// 表格参数
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "门店名称",
prop: "title"
},
{
label: "商户号",
prop: "staffName"
// minWidth: 144,
},
{
label: "是否直营",
prop: "staffPhone"
},
{
label: "展业时间",
prop: "createdDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.sendStartTime
// ? Util.dateFormate(cellValue.sendStartTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
},
{
label: "归属业务",
addHtml: 'taskStatus'
},
{
label: "主营品牌",
prop: "finishDate",
// minWidth: 140
// formatter: (cellValue) => {
// return cellValue.finishEndTime
// ? Util.dateFormate(cellValue.finishEndTime, "YYYY-MM-DD HH:mm:ss")
// : "-"
// }
},
{
label: "区域运营经理",
prop: "finishDate",
},
{
label: "驻店人数",
prop: "finishDate",
},
{
label: "已配课程人数",
prop: "finishDate",
}
]
},
detailInfo: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
created() { },
mounted() {
// this.getServiceStore()
// this.getStudyPage()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
// 详情
handleDetail(row) {
this.listOfPenaltiesShow = true
this.detailInfo = row
},
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchForm?.sendStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.sendStartData
this.searchFormSearch.sendStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.sendEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
if (this.searchForm?.finishStartData?.length) {
let [searchStartDate, searchEndDate] = this.searchForm.finishStartData
this.searchFormSearch.finishStartTime = Util.dateFormate(
searchStartDate,
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.finishEndTime = Util.dateFormate(
searchEndDate, "YYYY-MM-DD") + " 23:59:59"
}
delete this.searchFormSearch.sendStartData
delete this.searchFormSearch.finishStartData
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getStudyPage()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
await this.beforeSearchFn()
// console.log(params)
let params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.study.punish.list.export'
const list = [
...this.dowloadList,
{
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>
<style scoped lang="scss">
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 0;
.noDataImg {
width: 64px;
height: 40px;
}
}
.error-input {
::v-deep.el-input__inner {
border-color: red;
}
}
.tag-item {
display: flex;
align-items: center;
padding: 0 10px;
justify-content: center;
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.more-info {
white-space: nowrap;
color: #2a58ad;
cursor: pointer;
margin-left: 2px;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
.static-box {
display: flex;
gap: 0 16px;
margin-bottom: 12px;
.static-item {
flex: 1;
flex-shrink: 0;
height: 82px;
background: #f8faff;
border-radius: 5px;
box-sizing: border-box;
padding: 16px 20px;
.static-title {
font-size: 14px;
color: #333333;
line-height: 20px;
margin-bottom: 4px;
}
.static-value {
display: flex;
font-weight: 700;
font-size: 24px;
line-height: 30px;
align-items: baseline;
::v-deep.static-unit {
font-weight: 600;
font-size: 14px;
margin: 0 2px;
}
}
}
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.gray {
background-color: #c5c5c5;
}
.orange {
background-color: #fdb757;
}
.blue {
background-color: #2a58ad;
}
}
</style>
<!-- 周组件 -->
<template>
<div class="week-selector">
<div class="nav-btn left" @click="previousWeek">
<i class="el-icon-arrow-left"></i> 上一周
</div>
<div class="nav-btn current-week" @click="goToCurrentWeek">
<div class="this-week">本周</div>
<div class="week-range">{{ currentWeekRange }}</div>
</div>
<div
:class="['nav-btn', 'right', isDisabled ? 'isDisabled' : '']"
@click="nextWeek"
>
下一周 <i class="el-icon-arrow-right"></i>
</div>
</div>
</template>
<script>
export default {
data() {
return {
weekOffset: 0,
isDisabled: false
}
},
computed: {
currentWeekRange() {
const start = this.getStartOfWeek()
const end = new Date(start)
end.setDate(start.getDate() + 6)
this.isWeek(this.formatDate(start))
let timeStr = `${this.formatDate(start)} - ${this.formatDate(end)}`
this.$emit("changeWeek", {
weekOffset: this.weekOffset,
timeStr
})
return timeStr
}
},
mounted() {},
methods: {
getStartOfWeek() {
const date = new Date()
date.setDate(date.getDate() + this.weekOffset * 7)
const day = date.getDay()
const diff = date.getDate() - day + (day === 0 ? -6 : 1)
return new Date(date.setDate(diff))
},
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, "0")
const day = String(date.getDate()).padStart(2, "0")
return `${year}/${month}/${day}`
},
previousWeek() {
this.weekOffset--
},
nextWeek() {
if (!this.isDisabled) {
this.weekOffset++
}
},
goToCurrentWeek() {
this.weekOffset = 0
},
// 获取到周一日期
getMonday() {
const date = new Date()
const day = date.getDay()
const diff = date.getDate() - day + (day === 0 ? -6 : 1)
return new Date(date.setDate(diff))
},
isCurrentWeek(date) {
const currentWeekStart = this.getMonday() // 获取本周的周一
const inputWeekStart = new Date(date)
// 将输入日期调整为所在周的周一
const day = inputWeekStart.getDay()
const diff = inputWeekStart.getDate() - day + (day === 0 ? -6 : 1)
inputWeekStart.setDate(diff)
inputWeekStart.setHours(0, 0, 0, 0)
// 比较两个周一是否相同
return (
currentWeekStart.getFullYear() === inputWeekStart.getFullYear() &&
currentWeekStart.getMonth() === inputWeekStart.getMonth() &&
currentWeekStart.getDate() === inputWeekStart.getDate()
)
},
isWeek(date) {
if (this.isCurrentWeek(date)) {
this.isDisabled = true
} else {
this.isDisabled = false
}
}
}
}
</script>
<style lang="scss" scoped>
.week-selector {
display: flex;
align-items: center;
border: 1px solid #dbdbdb;
border-radius: 4px;
height: 32px;
box-sizing: border-box;
.nav-btn {
width: 70px;
padding: 8px 6px;
color: #1d1d1d;
font-size: 12px;
font-weight: 400;
box-sizing: border-box;
}
.left {
border-right: 1px solid #dbdbdb;
}
.right {
border-left: 1px solid #dbdbdb;
}
.current-week {
width: 224px;
display: flex;
align-items: center;
}
.this-week {
width: 36px;
height: 20px;
border-radius: 2px;
background: #f2f3f5;
color: #2a58ad;
font-size: 12px;
text-align: center;
line-height: 20px;
margin-right: 14px;
}
.week-range {
color: #1d1d1d;
font-size: 14px;
}
.isDisabled {
color: #cccccc;
}
}
</style>
<!--长课程配置 -->
<template>
<div class="long-wrap">
<div class="long-first-section">
<!-- 搜索 -->
<div class="long-wrap-search">
<div class="tabs">
<div
:class="{
'tabs-item': true,
'tabs-item-active': index === activeIndex
}"
v-for="(item, index) in conditionList"
:key="index"
@click="handleClick(index)"
>
{{ item.name }}
</div>
</div>
<week-time-picker @changeWeek="changeWeek"></week-time-picker>
</div>
<div class="analysis-index-wrap">
配课分析指标
<div class="analysis-index-list">
<div
:class="[
'analysis-index-item',
analysisActiveIndex == index ? 'active' : ''
]"
v-for="(analyse, index) in analysisList"
:key="index"
@click="handleAnalysisClick(index)"
>
{{ analyse.name }}{{ analyse.value }}
</div>
</div>
</div>
<!-- 门店指标数据 -->
<store-indicators @openWindow="openWindow"></store-indicators>
</div>
<!-- 课程任务配置 -->
<couse-config @openWindow="openWindow"></couse-config>
<!--上周学习复盘 -->
<last-week-replay></last-week-replay>
</div>
</template>
<script>
import weekTimePicker from "./components/weekTimePicker"
// import monthTimePicker from "./components/monthTimePicker"
import storeIndicators from "./components/storeIndicators"
import couseConfig from "./components/couseConfig"
import lastWeekReplay from "./components/lastWeekReplay"
export default {
components: {
weekTimePicker,
storeIndicators,
couseConfig,
lastWeekReplay
// monthTimePicker
},
data() {
return {
analysisActiveIndex: 0,
activeIndex: 0,
conditionList: [
{
name: "延保",
value: "4"
},
{
name: "权益",
value: "3"
},
{
name: "轻改",
value: "2"
}
],
analysisList: [
{
name: "上周数据",
value: "2025/6/30-2025/7/6"
},
{
name: "当月数据",
value: "2025/7/1-2025/7/31"
}
]
}
},
methods: {
getPreviousWeekMonthToLastSunday(weekOffset) {
const start = this.getStartOfWeek(weekOffset)
// 获取“前一周”的周日
const lastSunday = new Date(start)
lastSunday.setDate(lastSunday.getDate() - 1) // 上周日
// 获取该周所在的月份
const targetMonth = new Date(lastSunday)
const firstDayOfTargetMonth = new Date(
targetMonth.getFullYear(),
targetMonth.getMonth(),
1
)
return `${this.formatDate(firstDayOfTargetMonth)} - ${this.formatDate(
lastSunday
)}`
// return {
// start: this.formatDate(firstDayOfTargetMonth),
// end: this.formatDate(lastSunday)
// }
},
getStartOfWeek(weekOffset) {
const date = new Date()
date.setDate(date.getDate() + weekOffset * 7)
const day = date.getDay()
const diff = date.getDate() - day + (day === 0 ? -6 : 1)
return new Date(date.setDate(diff))
},
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, "0")
const day = String(date.getDate()).padStart(2, "0")
return `${year}/${month}/${day}`
},
changeWeek(data) {
let { weekOffset } = data
let analysisObj = {
0: (weekOffset) => {
const start = this.getStartOfWeek(weekOffset - 1)
const end = new Date(start)
end.setDate(start.getDate() + 6)
return `${this.formatDate(start)} - ${this.formatDate(end)}`
},
1: (weekOffset) => {
return this.getPreviousWeekMonthToLastSunday(weekOffset)
}
}
// analysisActiveIndex 0:上周 1:当月
this.analysisList[0].value = analysisObj[0](weekOffset)
this.analysisList[1].value = analysisObj[1](weekOffset)
},
handleClick(index) {
this.activeIndex = index
},
handleAnalysisClick(index) {
this.analysisActiveIndex = index
},
openWindow(data) {
this.$emit("openWindow", data)
}
}
}
</script>
<style lang="scss" scoped>
.long-wrap {
margin: 0 20px;
height: 82vh;
overflow-y: scroll;
overflow-x: hidden;
.long-first-section {
background: #fff;
padding: 16px 20px;
box-sizing: border-box;
}
.long-wrap-search {
display: flex;
align-items: center;
justify-content: space-between;
.tabs {
display: flex;
align-items: center;
background: #fff;
border: 1px solid #dbdbdb;
border-radius: 2px;
.tabs-item {
padding: 8px 20px;
cursor: pointer;
font-size: 12px;
font-weight: 400;
color: #1d1d1d;
border-right: 1px solid #dbdbdb;
}
.tabs-item-active {
border: 1px solid #185efe;
color: #ffffff;
background: #2a58ad;
}
}
}
.count-down {
display: flex;
align-items: center;
width: 376px;
height: 32px;
border-radius: 2px;
opacity: 1;
background: #f47f131a;
padding: 6px 11px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
font-weight: 400;
margin: 12px 0;
.error-circle {
width: 14px;
height: 14px;
margin-right: 8px;
}
}
.analysis-index-wrap {
display: flex;
align-items: center;
color: #111111;
font-size: 16px;
font-weight: 500;
margin: 16px 0;
.analysis-index-list {
display: flex;
align-items: center;
margin-left: 13px;
.analysis-index-item {
padding: 6px 12px;
color: #1d1d1d;
font-size: 12px;
font-weight: 400;
margin-right: 8px;
border-radius: 0 2px 2px 0;
background: #f2f3f5;
cursor: pointer;
}
.active {
background: #2a58ad26;
color: #2a58ad;
}
}
}
}
</style>
<template> <template>
<div class="longCourse"> <div class="layout">
<div class="invoice-header"> <div class="tab" ref="tabbox">
<el-tabs v-model="activeName" <div
@tab-click="handleClick"> :class="['tab-item', { 'item-active': windowId == -1 }]"
<el-tab-pane v-for="(item, index) in tabPaneList" @click="windowId = -1"
:label="item.label" >
:name="item.name" 长课程配置
:key="index"> </div>
</el-tab-pane> <div
</el-tabs> :class="['tab-item', { 'item-active': windowId == -2 }]"
<components :is="tabName" @click="windowId = -2"
@handleChangeTab="handleChangeTab"></components> >
已配置课程
</div>
<template v-for="(i, index) in tab">
<template>
<div
:key="i.id"
:class="['tab-item', { 'item-active': windowId == i.id }]"
@click="windowId = i.id"
:ref="`tab-${index}`"
>
{{ i.text }}
<div class="close" @click.stop="close(index)">
<i class="el-icon-close"></i>
</div>
</div>
</template>
</template>
<template v-if="dropdownList.length">
<div class="arrow-box">
<el-dropdown trigger="click" @command="windowId = $event">
<div class="dropdown-link">
<i class="el-icon-arrow-down"></i>
</div>
<el-dropdown-menu slot="dropdown">
<template v-for="(i, index) in dropdownList">
<el-dropdown-item
:class="{ 'dropdown-item-active': windowId == i.id }"
:key="i.id"
:command="i.id"
>
<div class="dropdown-item">
{{ i.text }}
<div class="close" @click.stop="closeDrop(index)">
<i class="el-icon-close"></i>
</div>
</div>
</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</div>
<div class="content">
<configure-task
v-show="windowId == -1"
ref="configureTask"
@openWindow="openWindow"
/>
<courseList
v-show="windowId == -2"
ref="configureTask"
@openWindow="openWindow"
/>
<template v-for="i in [...tab, ...dropdownList]">
<component
:ref="`page-${i.id}`"
:key="i.id"
:is="i.component"
v-show="windowId == i.id"
:show="windowId == i.id"
:query-data="i.data"
@backIndex="backIndex"
/>
</template>
</div> </div>
</div> </div>
</template> </template>
<script>
import courseList from "./courseList.vue" <script type="text/ecmascript-6">
// import clockSalaryIndex from './components/clockSalaryIndex/index'
import configureTask from "./configureTask"
import courseList from "./courseList"
import storeInfo from './components/storeInfo.vue'
import indicatorInfo from './components/indicatorInfo.vue'
export default { export default {
name: "LongCourse", name: "",
components: { components: {
courseList configureTask,
courseList,
storeInfo,
indicatorInfo
}, },
data() { data () {
return { return {
activeName: "1", tab: [],
tabPaneList: [ dropdownList: [],
{ windowId: -1,
label: "长课程配置任务", tabboxWidth: 0
name: "1" }
},
// 在beforeDestroy钩子中移除事件监听
beforeDestroy () {
window.removeEventListener('popstate', this.preventBack)
},
// 在你的Vue组件的mounted钩子中添加事件监听
mounted () {
history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack)
if (this.tabboxWidth == 0) this.tabboxWidth = this.$refs.tabbox.offsetWidth
},
methods: {
preventBack () {
if (this.windowId !== -1) {
const [recep] = this.$refs[`page-${this.windowId}`]
if (recep && recep.isQualityVisible) recep.isQualityVisible = false
else this.windowId = -1
history.pushState(null, null, document.URL)
} else this.$router.go(-1)
}, },
{ openWindow (data) {
label: "已配课程状态", console.log(data)
name: "2" const id = data.pageId ? data.pageId : `${data.staffName}_${data.phoneNumber}`
const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id)
let component = data.activeName,
title = data.staffName || '-'
if (data.componentName) component = data.componentName
if (data.title) title = data.title
if (windowItem) {
this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data)
return this.windowId = id
} }
], if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs")
tabName: "configureTask" const item = {
text: title,
data,
id,
component
} }
if (this.dropdownList.length) this.dropdownList.push(item)
else {
this.tab.push(item)
this.checkEl()
}
this.windowId = id
}, },
mounted() { close (index) {
if (this.$route.params.tabPane) { this.tab.splice(index, 1)
this.activeName = this.$route.params.tabPane if (this.dropdownList.length) {
this.tabName = this.$route.params.tabLabel this.tab.push(this.dropdownList[0])
this.closeDrop(0)
} }
this.windowId = -1
this.checkEl()
}, },
watch: {}, closeDrop (index) {
methods: { this.dropdownList.splice(index, 1)
async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList()
}, },
handleClick() { checkEl () {
const arr = { const { tab, tabboxWidth } = this
1: "configureTask", const len = tab.length - 1
2: "courseList" this.$nextTick(() => {
const [el] = this.$refs[`tab-${len}`]
if (el) {
const { offsetWidth, offsetLeft } = el
if (offsetLeft + offsetWidth / 2 > tabboxWidth - 54) {
this.dropdownList.push(tab[len])
this.tab.splice(len, 1)
} }
this.tabName = arr[+this.activeName]
},
handleChangeTab(e) {
if (!e) {
return true
} }
const { activeTab } = e })
this.activeName = activeTab },
this.handleClick()
backIndex () {
this.windowId = -1
this.$refs['inStoreManageIndex']?.handleSearch()
} }
} }
} }
</script> </script>
<style lang="scss" scoped>
.longCourse {
padding: 0 20px;
.invoice-header { <style scoped lang="scss">
::v-deep .el-tabs__header { .layout {
margin: 0; height: 100%;
.tab {
display: flex;
align-items: center;
margin-left: 20px;
width: calc(100% - 54px);
box-sizing: border-box;
&-item {
width: fit-content;
height: 40px;
padding: 0 20px; padding: 0 20px;
background: #fafafa;
border-radius: 4px 4px 0 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #666666;
cursor: pointer;
line-height: 40px;
margin-right: 1px;
flex-shrink: 0;
.close {
border-radius: 100%;
padding: 4px;
margin-left: 4px;
display: flex;
align-items: center;
justify-content: center;
&:hover {
background-color: #666;
.el-icon-close {
color: #fff;
}
}
}
.el-icon-close {
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
color: #666666;
transform: translateY(1px);
}
}
.item-active {
font-weight: 500;
color: #2a58ad;
background: #ffffff;
}
.arrow-box {
width: 32px;
height: 40px;
line-height: 40px;
text-align: center;
background: #fafafa;
cursor: pointer;
flex-shrink: 0;
.el-dropdown {
width: 100%;
}
} }
} }
.content {
position: relative;
width: 100%;
height: calc(100% - 40px);
// overflow-y: scroll;
box-sizing: border-box;
// padding-bottom: 70px;
}
}
::v-deep.dropdown-item {
display: flex;
align-items: center;
justify-content: center;
.close {
border-radius: 100%;
padding: 4px;
margin-left: 4px;
display: flex;
align-items: center;
justify-content: center;
&:hover {
background-color: #666;
.el-icon-close {
color: #fff;
}
}
i {
margin-right: 0;
}
}
.el-icon-close {
font-size: 12px;
color: #666666;
}
}
.dropdown-item-active {
background-color: #eaeef7;
color: #5579bd;
} }
</style> </style>
<template>
<div class="longCourse">
<div class="invoice-header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index"
>
</el-tab-pane>
</el-tabs>
<components :is="tabName" @handleChangeTab="handleChangeTab"></components>
</div>
</div>
</template>
<script>
import courseList from "./courseList.vue"
import configureTask from "./configureTask.vue"
export default {
name: "LongCourse",
components: {
courseList,
configureTask
},
data() {
return {
activeName: "1",
tabPaneList: [
{
label: "长课程配置任务",
name: "1"
},
{
label: "已配课程状态",
name: "2"
}
],
tabName: "configureTask"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
async getBaseData() {
this.baseData.channelTypeList = await this.get(BaseData.channelType)
this.getOptionsList()
},
handleClick() {
const arr = {
1: "configureTask",
2: "courseList"
}
this.tabName = arr[+this.activeName]
},
handleChangeTab(e) {
if (!e) {
return true
}
const { activeTab } = e
this.activeName = activeTab
this.handleClick()
}
}
}
</script>
<style lang="scss" scoped>
.longCourse {
padding: 0 20px;
.invoice-header {
::v-deep .el-tabs {
background: #fff;
}
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!