Commit 70cf1dff by 前端

前店后厂版本功能代码提交

1 parent f8c96dc9
......@@ -57,3 +57,42 @@ export function isexistdata(data) {
params: data
})
}
// 下载历史推送报表
export function downloadPushFile(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/downloadPushFile",
method: RequestMethods.GET,
params: data
})
}
// 推送报表
export function pushMessageAndExcle(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/pushMessageAndExcle",
method: RequestMethods.GET,
params: data
})
}
// 推送记录
export function queryPushRecord(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/queryPushRecord",
method: RequestMethods.GET,
params: data
})
}
// 导入更新
export function importExcel(formData) {
// data.method = `${path}nbcb.acc.detail.excel.import`
// return request(data, "post", ["file"])
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/importExcel",
method: RequestMethods.POST,
data: formData,
transformRequest: [(data) => data] // 关键:直接返回原始数据,不进行 stringify
})
}
......@@ -33,11 +33,15 @@ export function deleteParentMerchant(data) {
return request(data, "post")
}
// 获取园区店列表
// // 获取园区店列表
export function getYqMerchantConfig(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.page`
return request(data, "GET")
}
export function getYqMerchantinfoPage(data) {
data.method = `dj.api.smarcarlife.yqMerchantInfo.page`
return request(data, "GET")
}
// 获取园区店列表-获取园区店配置项
export function GETYQMERCHANTCONFIGDETAIL(data) {
......@@ -120,12 +124,12 @@ export function searchServiceMerchant(data) {
return request(data, "post")
}
/**根据4s店商户号查找员工设备列表 */
/** 根据4s店商户号查找员工设备列表 */
export function getMerchantEmployeeList(data) {
data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo"
return request(data, "post")
}
/**获取阿里云token */
/** 获取阿里云token */
export function getAliOSSToken(data = {}) {
data.method = "dj.api.mindworkplate.badge.getToken"
return request(data, "post")
......@@ -141,3 +145,33 @@ export function setDefaultPaymentChannel(data) {
data.method = "dj.api.serviceMerchant.setDefaultPaymentChannel"
return request(data, "post")
}
/** 园区店上架-详情 */
export function yqMerchantInfoDetail(data) {
data.method = "dj.api.smartcarlife.yqMerchantInfo.detail"
return request(data, "post")
}
/** 园区店上架-责任人 */
export function glskStaffPage(data) {
data.method = "dj.api.smarcarlife.yqMerchantInfo.glsk.staff.page"
return request(data, "post")
}
/** 园区店上架-主体 */
export function serviceMerchantPage(data) {
data.method = "dj.api.smarcarlife.yqMerchantInfo.service.merchant.page"
return request(data, "post")
}
/** 园区店上架-上架信息提交 */
export function yqMerchantInfoCommit(data) {
data.method = "dj.api.smartcarlife.yqMerchantInfo.commit"
return request(data, "post")
}
/** 园区店上架-上架历史记录 */
export function yqMerchantInfoHistory(data) {
data.method = "dj.api.smartcarlife.yqMerchantInfo.history"
return request(data, "post")
}
......@@ -865,7 +865,8 @@ export const downloadReportManage_reportType = [
{
confId: "technicianConstructionOrder",
confValue: "轻改技师施工单月度汇总表"
}
},
{ confId: "yqMerchantGrossProfitReport", confValue: "园区店毛利报表" }
]
// 下载报表 业务类型
......@@ -1480,3 +1481,43 @@ export const scheduling_inviteStatus = [
{ confId: 6, confValue: "已撤销" },
{ confId: 7, confValue: "已支付" }
]
// 园区店管理-上架-费用类别计算方式
export const severSelectOptions = [
{
expenseCategoryCalculateType: 1,
label: "按收入比例"
},
{
expenseCategoryCalculateType: 2,
label: "按毛利比例"
},
{
expenseCategoryCalculateType: 3,
label: "按固定金额"
},
{
expenseCategoryCalculateType: 4,
label: "按固定金额*购买数量"
},
{
expenseCategoryCalculateType: 5,
label: "按园区店总金额比例"
},
{
expenseCategoryCalculateType: 6,
label: "按园区店毛利(不扣除产品成本)比例"
},
{
expenseCategoryCalculateType: 7,
label: "按园区店毛利比例"
},
{
expenseCategoryCalculateType: 8,
label: "按(收入-自定义其他费用)比例"
},
{
expenseCategoryCalculateType: 9,
label: "按(收入-其他费用)比例"
}
]
......@@ -305,6 +305,32 @@ export const routerName = {
parentId: "90608",
label: "场景入口",
handle: "handleSceneEntry"
},
{
authId: "9060805",
parentId: "90608",
label: "上架",
handle: "handleLaunch",
addRoutePath: [
{
authId: "906080501",
name: "上架",
parentId: "90608"
}
]
},
{
authId: "9060806",
parentId: "90608",
label: "上架记录",
handle: "handleLaunchRecord",
addRoutePath: [
{
authId: "906080601",
name: "上架记录",
parentId: "90608"
}
]
}
],
component: _import("systemConfig/yqStoreManage/yqStoreManage")
......@@ -321,6 +347,30 @@ export const routerName = {
},
component: _import("systemConfig/yqStoreConfig")
},
906080501: {
path: "/editLaunch",
name: "editLaunch",
meta: {
title: "上架",
authId: "906080501",
parentId: "90608",
cache: false,
activePath: "/editLaunch"
},
component: _import("systemConfig/yqStoreManage/editLaunch")
},
906080601: {
path: "/launchRecord",
name: "launchRecord",
meta: {
title: "上架记录",
authId: "906080601",
parentId: "90608",
cache: false,
activePath: "/launchRecord"
},
component: _import("systemConfig/yqStoreManage/launchRecord")
},
90610: {
path: "/accountList_new",
......@@ -1339,6 +1389,18 @@ export const routerName = {
parentId: "90630",
label: "自定义周期",
handle: "handleCustomize"
},
{
authId: "9063004",
parentId: "90630",
label: "导入更新",
handle: "handleImport"
},
{
authId: "9063005",
parentId: "90630",
label: "推送",
handle: "handlePush"
}
],
component: _import("systemConfig/downloadReportManage/index")
......
......@@ -928,6 +928,7 @@ export default {
// 上传文件,转码为base64
importFile(e) {
console.log('e', e)
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div class="form_div">
<d2-table ref="recordTable"
:has-page="false"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="downloadContent"
slot-scope="scope">
<el-button type="text"
@click="handleDownload(scope.scope)">下载</el-button>
</div>
</d2-table>
</div>
</baseDialog>
</div>
</template>
<script>
import {
queryPushRecord,
downloadPushFile
} from "@api/downloadReportManage"
import { Util, deepClone, downLoadFile } from "@/common/util"
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "PushRecordDialog",
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("dialogClose", { flag: val })
}
}
},
mounted() {
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "推送记录",
width: "1080px"
}
},
options: [],
loading: true,
searchForm: {},
searchFormSearch: {},
getListApi: queryPushRecord,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "推送人",
prop: "pusher"
},
{
label: '推送时间',
prop: 'pushtime'
},
{
label: "推送内容",
addHtml: "downloadContent"
}
]
},
actionOpt: deepClone(actionOpt)
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchForm.key = this.paramsObj.key
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
handleDownload(row) {
var params = {
key: row.key
}
downloadPushFile(params).then((res) => {
downLoadFile(res.list[0].url)
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.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;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 350px;
}
.div-optShow {
margin-bottom: 20px;
width: 1040px;
border-radius: 4px;
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
.div-optShow-title {
color: #333333;
font-size: 16px;
font-weight: 600;
margin: 16px 0 8px 20px;
}
.div-optShow-content {
margin: 0 20px 20px 20px;
color: #333333;
font-size: 14px;
.contentSpan {
padding: 0 5px;
line-height: 30px;
color: #eb4e4e;
}
}
}
}
</style>
......@@ -33,6 +33,12 @@
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="pushNumHtml"
slot-scope="scope">
<template v-if="scope.scope.push_num == '-'">{{ scope.scope.push_num }}</template>
<template v-else><el-button type="text"
@click="handlePushRecord(scope.scope)">{{ scope.scope.push_num }}</el-button></template>
</div>
<div slot="auth-button"
slot-scope="scope"
v-if="scope.scope.status != -1">
......@@ -53,6 +59,18 @@
<auth-button :data="scope.scope"
:show-btn-ids="['9063003']" />
</span>
<!-- 导入更新 -->
<span style="margin-right: 10px;"
v-if="scope.scope.report_type.includes('园区店毛利报表')">
<auth-button :data="scope.scope"
:show-btn-ids="['9063004']" />
</span>
<!-- 推送 -->
<span style="margin-right: 10px;"
v-if="scope.scope.report_type.includes('园区店毛利报表')">
<auth-button :data="scope.scope"
:show-btn-ids="['9063005']" />
</span>
</div>
<div v-else>
<span class="list-span">正在生成中</span>
......@@ -65,6 +83,76 @@
v-if="dateVisible"
:params-obj="recordInfo"
@dialogClose="closeDateDialog" />
<!-- 推送记录 -->
<pushRecordDialog :visible.sync="pushVisible"
v-if="pushVisible"
:params-obj="recordInfo"
@dialogClose="closePushDialog" />
<!-- 导入更新 -->
<d2-dialog title="上架导入"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept=".xlsx,.xls"
@change="importFile($event)">
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<el-dialog title="提示"
:visible.sync="dialogVisible"
:show-close="false"
:close-on-click-modal="false"
width="30%">
<div class="dialog-content"
v-if="updateStatus == ''">
<div>
<img src="./images/loadingGIF.gif">
</div>
<div class="dialog-tips-big">正在处理中</div>
<div class="dialog-tips-small">
说明:系统正在加急导入中,请耐心等待;导入过程中,请不要退出当前操作,否则将导致本次提交无效。
</div>
</div>
<div class="dialog-content"
v-else-if="updateStatus == true && failNum == 0">
<div class="dialog-tips-big">处理成功,可返回列表查看</div>
</div>
<div class="dialog-content"
v-else-if="updateStatus == true && failNum > 0">
<div class="dialog-tips-big">
{{ errMsg }}
</div>
</div>
<span slot="footer"
class="dialog-footer">
<!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
<el-button type="primary"
@click="gotoList"
v-if="updateStatus == true">确定</el-button>
</span>
</el-dialog>
</d2-container>
</div>
</template>
......@@ -78,13 +166,17 @@ import {
import {
queryAllExcel,
reportExport_download,
rebuild
rebuild,
pushMessageAndExcle,
importExcel
} from "@api/downloadReportManage"
import dateChooseDialog from "./components/dateChooseDialog"
import pushRecordDialog from "./components/pushRecordDialog"
export default {
name: "DownloadReportList",
components: {
dateChooseDialog
dateChooseDialog,
pushRecordDialog
},
data() {
return {
......@@ -139,30 +231,22 @@ export default {
{
label: "报表类型",
prop: "report_type"
// formatter: (cellValue) => {
// return downloadReportManage_reportType.find(el => el.confId == cellValue.report_type)?.confValue
// }
},
{
label: "业务类型",
prop: "business_type"
// formatter: (cellValue) => {
// return downloadReportManage_businessType.find(el => el.confId == cellValue.business_type)?.confValue
// }
},
{
label: "统计周期",
prop: "statperiod"
// formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue
// }
},
{
label: "创建时间",
prop: "created_date"
// formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue
// }
},
{
label: "推送次数",
addHtml: "pushNumHtml"
}
]
},
......@@ -175,7 +259,19 @@ export default {
)
},
dateVisible: false,
recordInfo: {}
recordInfo: {},
fileVisible: false,
fileForm: {},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
dialogVisible: false,
updateStatus: "",
updatePercentage: 0,
succNum: 0,
failNum: 0,
errMsg: '',
pushVisible: false
}
},
computed: {
......@@ -293,11 +389,112 @@ export default {
closeDateDialog() {
this.dateVisible = !this.dateVisible
// this.$refs.recordTable.refreshTable(false, true)
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, "fileName", e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
// const imgFile = event.target.result
// const arrBase64 = imgFile.split(",")
this.$set(
this.fileForm,
"fileInfo",
e.target.files[0]
)
document.getElementById("fileUpload").value = ""
}
} else {
this.notice.errorTips("上传文件不可超过10M")
}
},
handleImport(row) {
this.recordInfo = row
this.fileForm = {
fileName: ''
}
this.fileVisible = !this.fileVisible
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
this.dialogVisible = true
// this.updateStatus = true
// this.succNum = 2
// const params = {
// key: this.recordInfo.key,
// file: this.fileForm.fileInfo
// }
const formData = new FormData()
formData.append("file", this.fileForm.fileInfo)
formData.append("key", this.recordInfo.key)
// 调试:打印内容
for (const [key, value] of formData.entries()) {
console.log(key, value)
}
importExcel(formData).then((res) => {
console.log(res, 'res')
this.updateStatus = true
if (res.errId == '-7') {
this.failNum = 1
this.errMsg = res.message
}
})
}
})
},
gotoList() {
this.fileVisible = !this.fileVisible
this.dialogVisible = !this.dialogVisible
this.$refs.recordTable.refreshTable()
},
// 推送
handlePush(row) {
this.$confirm(
"系统将自动按照推送当前报表至相关的负责人及群聊中,是否确认推送?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
}
)
.then(() => {
var params = {
accountName: this.userInfo.loginAccount.loginAccout,
key: row.key
}
pushMessageAndExcle(params).then((res) => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
})
.catch((err) => {
console.log(err)
})
},
handlePushRecord(row) {
this.recordInfo = row
this.pushVisible = !this.pushVisible
},
closePushDialog() {
this.pushVisible = !this.pushVisible
}
}
}
</script>
<style scoped>
<style lang="scss" scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
......@@ -315,4 +512,46 @@ export default {
font-size: 14px;
color: #999999;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.dialog-content {
text-align: center;
.dialog-tips-big {
font-size: 16px;
color: #333333;
margin-bottom: 20px;
}
.dialog-tips-small {
font-size: 12px;
color: #666666;
}
.iconSize {
width: 20px;
height: 20px;
}
}
</style>
<style lang="scss">
.downloadReportManage {
.el-table__header-wrapper .el-checkbox {
display: none;
}
.el-table__body-wrapper .el-checkbox {
display: none;
}
}
</style>
<template>
<d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载"
@closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<d2-dialog title="收款二维码"
:is-visible="qRcodeVisible"
class="qRcodeDailog"
width="750px"
btn-ok-label="全部下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="channelBox">
<span>支付渠道: </span>
<el-select v-model="paymentChannelId" placeholder="请选择" class="elSelect">
<el-option v-for="item in paymentChannelList" :key="item.paymentChannelId" :label="item.paymentChannelName"
:value="item.paymentChannelId">
<el-select v-model="paymentChannelId"
placeholder="请选择"
class="elSelect">
<el-option v-for="item in paymentChannelList"
:key="item.paymentChannelId"
:label="item.paymentChannelName"
:value="item.paymentChannelId">
</el-option>
</el-select>
<el-button type="primary" @click="savaAll">保存并重新生成</el-button>
<el-button type="primary"
@click="savaAll">保存并重新生成</el-button>
</div>
<div class="qrcon">
<div class="wxcon">
<div class="codeDiv" id="wxview">
<img style="width:100%;height:100%" src="./images/code3.png">
<div class="codeDiv"
id="wxview">
<img style="width:100%;height:100%"
src="./images/code3.png">
<!-- v-if="qrCodeURL" <div class="imgDiv"> -->
<img v-if="qrCodeURL" class="qrImg" crossorigin="anonymous" :src="qrCodeURL">
<img v-if="qrCodeURL"
class="qrImg"
crossorigin="anonymous"
:src="qrCodeURL">
<!-- crossorigin="anonymous" -->
<div v-if="!qrCodeURL" class="el-icon-loading loadingIcon" />
<div v-if="!qrCodeURL"
class="el-icon-loading loadingIcon" />
<!-- </div> -->
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
<el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
</div>
<div class="alicon">
<div class="codeDiv" id="aliview">
<img style="width:100%;height:100%" src="./images/alipay.png">
<div class="codeDiv"
id="aliview">
<img style="width:100%;height:100%"
src="./images/alipay.png">
<!-- <img v-if="aliqrCodeURL"
class="qrImg imgs"
:src="aliqrCodeURL"
crossorigin="anonymous"> -->
<div id="qrcodeDiv" class="qrImg" />
<div id="qrcodeDiv"
class="qrImg" />
<!-- -->
<!-- :src="aliqrCodeURL"> -->
<div v-if="!aliqrCodeURL" class="el-icon-loading loadingIcon" />
<div v-if="!aliqrCodeURL"
class="el-icon-loading loadingIcon" />
<!-- </div> -->
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
<el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
</el-button>
</div>
</div>
......@@ -105,7 +127,7 @@ export default {
savaAll() {
setDefaultPaymentChannel({
paymentChannelId: this.paymentChannelId,
merchantId: this.info.yqMerchantId
merchantId: this.info.merchantId
})
this.createQrcodeImage()
this.alipayQrcode()
......@@ -153,7 +175,7 @@ export default {
// oParams.appId = this.paymentChannelId == '8881A96B22B84A348263EE4F314A2A23' ? 'wx06d1198e751435d1' : 'wx3d2ee7f8bda398cc'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}&paymentChannelId=${this.paymentChannelId}`
oParams.scene = `merchantId=${this.info.merchantId}&merchantName=${this.info.yqMerchantName}&paymentChannelId=${this.paymentChannelId}`
createWeappQrcode(oParams).then(res => {
this.qrCodeURL = res
......@@ -210,7 +232,7 @@ export default {
alipayQrcode() {
// const that = this
// pay 支付渠道
const shareUrl = `${baseConfig.alipayPath}?M=${this.info.yqMerchantId}&MN=${this.info.yqMerchantName}&P=${this.paymentChannelId}`
const shareUrl = `${baseConfig.alipayPath}?M=${this.info.merchantId}&MN=${this.info.yqMerchantName}&P=${this.paymentChannelId}`
console.log(baseConfig.alipayPath)
console.log(shareUrl)
setTimeout(() => {
......@@ -243,7 +265,7 @@ export default {
// const params = {
// path: baseConfig.alipayPath,
// yqMerchantId: this.info.yqMerchantId,
// yqMerchantId: this.info.merchantId ,
// yqMerchantName: this.info.yqMerchantName
// }
......
......@@ -7,8 +7,12 @@
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="scene-box">
<div class="scene-item" v-for="(item, index) in sceneList" :key="index">
<img class="scene-image" :src="`https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_${item.sceneType}.png`" alt="">
<div class="scene-item"
v-for="(item, index) in sceneList"
:key="index">
<img class="scene-image"
:src="`https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_${item.sceneType}.png`"
alt="">
<div class="item-text">
<div class="text-name">{{ item.sceneName }}</div>
<div class="text-tips">{{ item.sceneDesc }}</div>
......@@ -76,7 +80,7 @@ export default {
mounted() {
// 获取当前园区店开通的场景入口
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.yqMerchantId }).then(res => {
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.merchantId }).then(res => {
res?.forEach(val => {
this.sceneList.map(v => {
if (v.sceneType === val.scene && val.sceneOpenFlag === 0) {
......@@ -94,7 +98,7 @@ export default {
const arr = []
this.sceneList.forEach(v => {
arr.push({
merchantId: this.info.yqMerchantId,
merchantId: this.info.merchantId,
sceneOpenFlag: v.isOpen === 'Y' ? 0 : 1,
scene: v.sceneType
})
......@@ -112,40 +116,40 @@ export default {
}
</script>
<style lang="scss" scoped>
.scene-box{
.scene-box {
display: flex;
flex-wrap: wrap;
gap: 15px;
.scene-item{
.scene-item {
display: flex;
align-items: center;
width: 343px;
background: #F4F5FA;
background: #f4f5fa;
border-radius: 12px;
padding: 16px;
box-sizing: border-box;
.scene-image{
.scene-image {
width: 64px;
height: 64px;
margin-right: 12px;
}
.item-text{
.text-name{
.item-text {
.text-name {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.text-tips{
.text-tips {
margin-top: 5px;
font-size: 12px;
color: #9B9B9E;
color: #9b9b9e;
font-weight: 400;
}
}
.switch-box{
.switch-box {
flex-grow: 1;
text-align: right;
.switch-text{
.switch-text {
margin-top: 5px;
font-size: 12px;
color: #2a58ad;
......@@ -162,7 +166,6 @@ export default {
::v-deep .el-switch__label--right {
z-index: 1;
right: 20px;
}
/*关闭时文字位置设置*/
::v-deep .el-switch__label--left {
......@@ -171,16 +174,16 @@ export default {
}
::v-deep .el-switch__label--left.is-active {
display: block;
span{
span {
font-size: 12px;
color: #999999;
}
}
::v-deep .el-switch__label--right.is-active {
display: block;
span{
span {
font-size: 12px;
color: #FFFFFF;
color: #ffffff;
}
}
</style>
......@@ -7,8 +7,8 @@
@confirmDialog="handleAddConfirm">
<!-- btnOkLabel="下载二维码" -->
<div class="dialogContainer">
<p class="merchantName">{{ merchantInfo.yqMerchantName }}</p>
<p class="merchantId">{{ merchantInfo.yqMerchantId }}</p>
<p class="merchantName">{{ merchantInfo.merchantName }}</p>
<p class="merchantId">{{ merchantInfo.merchantId }}</p>
<el-form :model="formData"
:rules="rules"
ref="elForm">
......@@ -148,7 +148,7 @@ export default {
methods: {
yqMerchantConfigDetail() {
// let parmas = this.merchantInfo.merchantId
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.yqMerchantId }).then((result) => {
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.merchantId }).then((result) => {
console.log(result)
const { workWechatQrcode, qrcodeType } = result
this.imgUrl = workWechatQrcode
......@@ -167,7 +167,7 @@ export default {
// return
if (valid) {
const params = {
yqMerchantId: this.merchantInfo.yqMerchantId,
yqMerchantId: this.merchantInfo.merchantId,
...this.formData
}
const result = await serviceMerchantRelateQrcode(params)
......
<!-- 服务商管理 -->
<template>
<d2-container class="service-manage">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
label-width="100px"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
......@@ -17,23 +25,34 @@
<span slot="left">园区店服务商关联列表</span>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="serviceStoreTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope">
<d2-table ref="serviceStoreTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope">
</auth-button>
</d2-table>
<qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible"
@dialogClose="dialogClose" />
<qrcode-dialog :q-rcode-visible="qRcodeVisible"
:info="recordInfo"
v-if="qRcodeVisible"
@dialogClose="dialogClose" />
</div>
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog" v-if="QRcodeDialog" :merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible" :info="recordInfo" v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose" />
<wxQRcodeDialog :q-rcode-visible.sync="QRcodeDialog"
v-if="QRcodeDialog"
:merchant-info="recordInfo" />
<scene-entry-dialog :scene-entry-visible="sceneEntryVisible"
:info="recordInfo"
v-if="sceneEntryVisible"
@dialogClose="sceneDialogClose" />
</d2-container>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { getYqMerchantConfig } from '@api/serviceManage'
import { getYqMerchantinfoPage } from '@api/serviceManage'
import { mapActions } from 'vuex'
import { BaseData, manageTypeList } from '@/common/constants.js'
import qrcodeDialog from './qRcodeDialog'
......@@ -47,12 +66,13 @@ export default {
merchantNameKeyWord: '',
merchantIdKeyWord: '',
yqMerchantName: '',
accountName: ''
accountName: '',
yqCode: ''
},
showFormData: [
{
label: '园区店号',
name: 'yqMerchantId',
name: 'merchantId',
type: 'input',
placeholder: '请输入园区店号',
isClear: true,
......@@ -71,7 +91,7 @@ export default {
// },
{
label: '园区店名',
name: 'yqMerchantName',
name: 'merchantName',
type: 'input',
placeholder: '请输入园区店名',
isClear: true,
......@@ -84,10 +104,18 @@ export default {
placeholder: '请输入登录账户',
isClear: true,
keyFn: this.keyDowmGetList
},
{
label: '园区店编码',
name: 'yqCode',
type: 'input',
isClear: true,
maxlength: '50',
keyFn: this.keyDowmGetList
}
],
maxLength: 10,
getListApi: getYqMerchantConfig,
getListApi: getYqMerchantinfoPage,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -96,16 +124,12 @@ export default {
tableColumns: [
{
label: '园区店名称',
prop: 'yqMerchantName'
prop: 'merchantName'
},
{
label: '园区店编码',
prop: 'yqCode'
},
// {
// label: '类型',
// prop: 'merchantType',
// formatter: (cellValue) => {
// // return this.baseData.merchantTypeList.find(item => item.confId === cellValue.merchantType) ? this.baseData.merchantTypeList.find(item => item.confId === cellValue.merchantType).confLabel : ''
// return this.baseData.merchantTypeOpts[cellValue.merchantType]
// }
// },
{
label: '模式',
prop: '',
......@@ -127,7 +151,7 @@ export default {
},
{
label: '园区店号',
prop: 'yqMerchantId'
prop: 'merchantId'
},
{
label: '登录账户',
......@@ -237,7 +261,8 @@ export default {
handleReset() {
this.searchForm = {
merchantNameKeyWord: '',
merchantIdKeyWord: ''
merchantIdKeyWord: '',
yqCode: ''
}
this.$refs.serviceStoreTable.refreshTable()
},
......@@ -246,7 +271,7 @@ export default {
handleDetail(row) {
this.$router.push({
name: 'yqStoreDetail',
query: { yqMerchantId: row.yqMerchantId }
query: { yqMerchantId: row.merchantId }
})
},
......@@ -287,6 +312,22 @@ export default {
sceneDialogClose() {
this.sceneEntryVisible = !this.sceneEntryVisible
},
// 上架
handleLaunch(row) {
this.$router.push({
name: 'editLaunch',
query: { id: row.id }
})
},
// 上架记录
handleLaunchRecord(row) {
this.$router.push({
name: 'launchRecord',
query: { merchantId: row.merchantId }
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!