Commit f8c96dc9 by 前端

Merge branch 'SAAS+V4.56.0-0908' into 'develop'

上线合并

See merge request !486
2 parents ef1c8555 efb52e6a
Showing 89 changed files with 3527 additions and 427 deletions
{
"name": "dj-car-life-system",
"version": "0.1.0",
"private": true,
"scripts": {
"备注": "去掉nomock配置命令",
"serve": "vue-cli-service serve",
"start": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"build": "vue-cli-service build --no-module",
"build:nomock": "vue-cli-service build --mode nomock",
"lint": "vue-cli-service lint --fix",
"test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit",
"report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report"
},
"dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.17.12",
"@babel/plugin-proposal-optional-chaining": "7.13.12",
"@sentry/browser": "^7.12.1",
"@sentry/integrations": "^7.12.1",
"@sentry/tracing": "^7.3.0",
"@sentry/vue": "^7.3.0",
"@sentry/webpack-plugin": "^1.18.9",
"ali-oss": "^6.22.0",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"bignumber.js": "^9.1.1",
"core-js": "^3.8.3",
"dayjs": "^1.8.12",
"default-passive-events": "^2.0.0",
"echarts": "^5.3.2",
"element-ui": "2.13.2",
"eslint-plugin-standard": "^5.0.0",
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.5",
"glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2",
"html2canvas": "^1.4.1",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"jspdf": "^2.5.1",
"lowdb": "^1.0.0",
"nprogress": "^0.2.0",
"number-precision": "^1.6.0",
"print-js": "^1.6.0",
"qrcodejs2": "^0.0.2",
"qs": "^6.8.0",
"rfdc": "^1.3.0",
"screenfull": "^4.2.0",
"sha1": "^1.1.1",
"sortablejs": "^1.15.6",
"speed-measure-webpack-plugin": "^1.5.0",
"svg-sprite-loader": "^6.0.11",
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-lazyload": "^1.2.3",
"vue-router": "3.0.5",
"vuedraggable": "^2.24.3",
"vuex": "^3.0.1",
"wangeditor": "4.7.15",
"webpack-theme-color-replacer": "^1.4.2",
"webpack5-svg-sprite-loader": "^5.1.1",
"xlsx": "^0.16.9",
"yarn": "^1.22.19"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@kazupon/vue-i18n-loader": "^0.4.1",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-unit-jest": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/eslint-config-standard": "^6.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.0.0",
"jest": "^27.1.0",
"md5": "^2.3.0",
"postcss-preset-env": "^7.7.2",
"postcss-px-to-viewport": "^1.1.1",
"sass": "~1.62.0",
"sass-loader": "^7.3.1",
"script-loader": "^0.7.2",
"vue-template-compiler": "^2.5.21",
"webpack": "^5.74.0"
}
}
{
"name": "dj-car-life-system",
"version": "0.1.0",
"private": true,
"scripts": {
"备注": "去掉nomock配置命令",
"serve": "vue-cli-service serve",
"start": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && npm run serve",
"build": "vue-cli-service build --no-module",
"build:nomock": "vue-cli-service build --mode nomock",
"lint": "vue-cli-service lint --fix",
"test:unit": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service test:unit",
"report": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --report"
},
"dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.17.12",
"@babel/plugin-proposal-optional-chaining": "7.13.12",
"@sentry/browser": "^7.12.1",
"@sentry/integrations": "^7.12.1",
"@sentry/tracing": "^7.3.0",
"@sentry/vue": "^7.3.0",
"@sentry/webpack-plugin": "^1.18.9",
"ali-oss": "^6.22.0",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"bignumber.js": "^9.1.1",
"core-js": "^3.8.3",
"dayjs": "^1.8.12",
"default-passive-events": "^2.0.0",
"echarts": "^5.3.2",
"element-ui": "2.13.2",
"eslint-plugin-standard": "^5.0.0",
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.6",
"glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2",
"html2canvas": "^1.4.1",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"jspdf": "^2.5.1",
"lowdb": "^1.0.0",
"nprogress": "^0.2.0",
"number-precision": "^1.6.0",
"print-js": "^1.6.0",
"qrcodejs2": "^0.0.2",
"qs": "^6.8.0",
"rfdc": "^1.3.0",
"screenfull": "^4.2.0",
"sha1": "^1.1.1",
"sortablejs": "^1.15.6",
"speed-measure-webpack-plugin": "^1.5.0",
"svg-sprite-loader": "^6.0.11",
"ua-parser-js": "^0.7.19",
"vue": "^2.6.10",
"vue-lazyload": "^1.2.3",
"vue-router": "3.0.5",
"vuedraggable": "^2.24.3",
"vuex": "^3.0.1",
"wangeditor": "4.7.15",
"webpack-theme-color-replacer": "^1.4.2",
"webpack5-svg-sprite-loader": "^5.1.1",
"xlsx": "^0.16.9",
"yarn": "^1.22.19"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@kazupon/vue-i18n-loader": "^0.4.1",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-unit-jest": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/eslint-config-standard": "^6.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"@vue/vue2-jest": "^27.0.0-alpha.3",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.0.0",
"jest": "^27.1.0",
"md5": "^2.3.0",
"postcss-preset-env": "^7.7.2",
"postcss-px-to-viewport": "^1.1.1",
"sass": "~1.62.0",
"sass-loader": "^7.3.1",
"script-loader": "^0.7.2",
"vue-template-compiler": "^2.5.21",
"webpack": "^5.74.0"
}
}
......@@ -58,77 +58,103 @@ export function billCompute(data) {
// 对账单测算-分页
export function billComputePage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.computeByIncr.json'
// data.method = 'dj.api.smartcarlife.reconciliationBill.computeByIncr.json'
data.method =
"dj.api.smartcarlife.reconciliationBill.computeByIncr.filter.json"
return request(data, "post")
}
// 对账单编辑
export function editBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.updateByJson'
data.method = "dj.api.smartcarlife.reconciliationBill.updateByJson"
return request(data, "post")
}
// 对账单编辑-分页
export function editBillPage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.updateByIncrByJson'
data.method = "dj.api.smartcarlife.reconciliationBill.updateByIncrByJson"
return request(data, "post")
}
export function billDetail(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.detail'
data.method = "dj.api.smartcarlife.reconciliationBill.detail"
return request(data, "post")
}
// 对账单详情-分页
export function billDetailPage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.detail.withOrderPage'
data.method = "dj.api.smartcarlife.reconciliationBill.detail.withOrderPage"
return request(data, "post")
}
// 根据服务商商户号分页获取4S店列表
export function getShopList(data) {
data.method = 'dj.api.scenemerchantref.queryShopRefByPartnerShopPage'
data.method = "dj.api.scenemerchantref.queryShopRefByPartnerShopPage"
return request(data)
}
// 对账单确认
export function billConfirm(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.confirm'
data.method = "dj.api.smartcarlife.reconciliationBill.confirm"
return request(data, "post")
}
// 对账单取消
export function billCancel(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancel'
data.method = "dj.api.smartcarlife.reconciliationBill.cancel"
return request(data, "post")
}
// 对账单待确认内容确认
export function billConfirmChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.confirmChange'
data.method = "dj.api.smartcarlife.reconciliationBill.confirmChange"
return request(data, "post")
}
// 对账单待取消内容确认
export function billCancelChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange'
data.method = "dj.api.smartcarlife.reconciliationBill.cancelChange"
return request(data, "post")
}
// 对账单待取消内容确认
export function tmplCheckField(data) {
data.method = 'dj.api.reconciliation.template.checkField'
data.method = "dj.api.reconciliation.template.checkField"
return request(data, "post")
}
// 生成应付单
export function createPaymentBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.jd.payment.bill'
data.method = "dj.api.smartcarlife.reconciliationBill.jd.payment.bill"
return request(data, "post")
}
// 生成应付单
export function createReceiptBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.jd.receipt'
data.method = "dj.api.smartcarlife.reconciliationBill.jd.receipt"
return request(data, "post")
}
// 根据4s店获取服务商列表
export function getServiceByShopList(data) {
data.method = "dj.api.scenemerchantref.queryServiceRefByShop"
return request(data, "post")
}
// 生成服务商对账单
export function createServiceBill(data) {
data.method = "dj.api.smartcarlife.reconciliationBill.partner.generate"
return request(data, "post")
}
// 获取退款订单-4s订单分页
export function getRefundOrderPage(data) {
data.method = "dj.api.smartcarlife.ordermanage.shop.merchant.order"
return request(data, "post")
}
// 合并门店退款订单到对账单
export function mergeRefundOrder(data) {
data.method = "dj.api.smartcarlife.reconciliationBill.merge.refund.order"
return request(data, "post")
}
......
......@@ -102,3 +102,62 @@ export function groundingImport(data) {
data.method = `${path}merchantGoodsInfo.import`
return request(data, "post", ["file"])
}
// 采购上架 添加/修改记录
export function purchaseGoodsInfoInsertOrUpdate(data) {
data.method = `${path}purchaseGoodsInfo.insertOrUpdate`
return request(data, "post", ["file"])
}
// 删除记录
export function purchaseGoodsInfoDeleteById(data) {
data.method = `${path}purchaseGoodsInfo.deleteById`
return request(data, "post")
}
// 导出列表(异步)
export function purchaseGoodsInfoExportAsync(data) {
data.method = `${path}purchaseGoodsInfo.export.async`
return request(data, "post")
}
// 根据ID查询详细信息
export function purchaseGoodsInfoGetById(data) {
data.method = `${path}purchaseGoodsInfo.getById`
return request(data, "post")
}
// 采购上架导入
export function purchaseGoodsInfoImport(data) {
data.method = `${path}purchaseGoodsInfo.import`
return request(data, "post", ["file"])
}
// 分页查询上架管理记录
export function purchaseGoodsInfoPage(data) {
data.method = `${path}purchaseGoodsInfo.page`
return request(data, "post")
}
// 采购上架导入模版
export function purchaseGoodsInfoTemplateExport(data) {
data.method = `${path}purchaseGoodsInfo.template.export`
return request(data, "post")
}
// 批量下架操作
export function purchaseGoodsInfoUpdateBatchOffShelf(data) {
data.method = `${path}purchaseGoodsInfo.updateBatchOffShelf`
return request(data, "post")
}
// 批量审核
export function purchaseGoodsInfoUpdateBatchWaitAudit(data) {
data.method = `${path}purchaseGoodsInfo.updateBatchWaitAudit`
return request(data, "post")
}
// 上下架操作
export function purchaseGoodsInfoUpdateStatus(data) {
data.method = `${path}purchaseGoodsInfo.updateStatus`
return request(data, "post")
}
......@@ -107,6 +107,12 @@ export function insertOrUpdatePrivacyAgreement(data) {
return request(data, "post")
}
// 技师查询
export function getRoleTechnician(data) {
data.method = `${path2}roleTechnician.list`
return request(data, "post")
}
// 获取支付渠道列表
export function paymentChannelList(data) {
data.method = `${path2}paymentChannel.list`
......
import request from './request'
import request from "./request"
const path = 'dj.api.inviteRecord.'
const path = "dj.api.inviteRecord."
const pathInviteRecord = "dj.api.smartcarlife.inviteRecord."
const pathDj = "dj.api.smartcarlife."
// 待预约、已预约总数查询
export function getTotalCount(data) {
......@@ -13,3 +15,63 @@ export function getList(data) {
data.method = `${path}search`
return request(data)
}
// 预约记录列表查询
export function queryInviteRecord(data) {
data.method = `${pathInviteRecord}query`
return request(data)
}
// 预约记录总数查询
export function inviteRecordCount(data) {
data.method = `${pathInviteRecord}count`
return request(data)
}
// 门店下拉列表查询
export function getInviteMerchant(data) {
data.method = `${pathInviteRecord}merchant.page`
return request(data)
}
// 查询1.1场景登录权限下园区店信息
export function yqMerchantPage(data) {
data.method = `dj.api.sceneMerchantRef.shopMerchant.LoginPermissionYqMerchant.page`
return request(data)
}
// 工位设置查询
export function inviteStationSetGet(data) {
data.method = `${pathDj}inviteStationSet.get`
return request(data)
}
// 获取指定商户指定日期范围的邀约统计
export function inviteStatMerchantList(data) {
data.method = `dj.api.smartcarlife.inviteStat.merchant.list`
return request(data)
}
// 工位设置修改
export function inviteStationSetUpdate(data) {
data.method = `${pathDj}inviteStationSet.update`
return request(data)
}
// 修改备注
export function followRecordUpdate(data) {
data.method = `${pathInviteRecord}followRecord.update`
return request(data)
}
// 修改预约时间
export function dateUpdate(data) {
data.method = `${pathInviteRecord}invite.dateUpdate`
return request(data)
}
// 取消预约
export function cancelInvite(data) {
data.method = `${pathInviteRecord}cancelInvite`
return request(data)
}
......@@ -2,6 +2,7 @@ import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.smartcarlife.api.vpt.invoiceIssueQrcode."
const path2 = "dj.smartcarlife.api.vpt.invoiceInfo."
const path3 = "dj.smartcarlife.api.vpt.invoice.rule."
// 查询订单开票项目
export function getInvoiceIssueItems(data) {
......@@ -65,12 +66,50 @@ export function mergePdf(data) {
// 发票冲红
export function invoiceRed(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red'
data.method = "dj.smartcarlife.api.vpt.invoiceInfo.red"
return request(data, RequestMethods.POST)
}
// 冲红管理列表
export function getInvoiceRedList(data) {
data.method = 'dj.smartcarlife.api.vpt.invoiceInfo.red.page'
data.method = "dj.smartcarlife.api.vpt.invoiceInfo.red.page"
return request(data)
}
/** 发票切换规则配置管理start */
// 新增规则
export function createRule(data) {
data.method = `${path3}create`
return request(data)
}
// 删除规则
export function deleteRule(data) {
data.method = `${path3}delete`
return request(data)
}
// 查询规则详情
export function getByIdForRule(data) {
data.method = `${path3}getById`
return request(data)
}
// 查询配置日志列表
export function getLogsForRule(data) {
data.method = `${path3}getLogs`
return request(data)
}
// 分页查询切换规则
export function getRulePage(data) {
data.method = `${path3}page`
return request(data)
}
// 更新规则
export function updateRule(data) {
data.method = `${path3}update`
return request(data)
}
// 查询开票主体下拉项
export function getSaleCompany(data) {
data.method = `${path3}saleCompany`
return request(data)
}
/** 发票切换规则配置管理end */
......@@ -175,6 +175,24 @@ export function modifyRemark(data) {
/** 标记订单子订单详情查询 */
export function goodsSubOrder(data) {
data.method = 'dj.api.smartcarlife.goodsOrder.goodsSubOrder.list'
data.method = "dj.api.smartcarlife.goodsOrder.goodsSubOrder.list"
return request(data, "post")
}
\ No newline at end of file
}
/** 接车单、交车单上传记录保存 */
export function carUploadRecordAdd(data) {
data.method = `${path2}carUploadRecord.add`
return request(data, "post")
}
/** 接车单、交车单上传记录删除 */
export function carUploadRecordDelete(data) {
data.method = `${path2}carUploadRecord.delete`
return request(data, "post")
}
/** 上传的接车单、交车单下载次数增加 */
export function downloadNumAdd(data) {
data.method = `${path2}carUploadRecord.downloadNum.add`
return request(data, "post")
}
......@@ -136,3 +136,9 @@ export function stockReduceRecordCount(data) {
data.method = `${path}MerchantGoodsStockReduceRecord.count`
return request(data, RequestMethods.POST)
}
// 出库记录关联技师
export function technicianUpdate(data) {
data.method = `${path}MerchantGoodsStockReduceRecord.technician.update`
return request(data, RequestMethods.POST)
}
......@@ -1010,6 +1010,13 @@ export const businessOptShowText = {
3: "权益",
4: "延保"
}
// 预警管理 所属业务 显示文字
export const orderBusinessType = {
0: "轻改",
1: "权益",
2: "延保",
"-1": "其他"
}
// 预警管理 优先级
export const priorityOpt = [
......@@ -1446,9 +1453,30 @@ export const long_businessOpt = [
{ confId: "3", confValue: "权益" },
{ confId: "2", confValue: "轻改" }
]
export const isActiveOpt = [
{ confId: "Y", confValue: "生效" },
{ confId: "N", confValue: "不生效" }
]
export const actionOpt = [
{ confId: "create", confValue: "创建" },
{ confId: "update", confValue: "更新" },
{ confId: "enable", confValue: "生效" },
{ confId: "disable", confValue: "不生效" }
]
// 应收应付 - 推送金蝶状态
export const pushStatusOpt = [
{ confId: 0, confValue: "未推送" },
{ confId: 1, confValue: "成功" },
{ confId: 2, confValue: "失败" }
]
// 商品库-发卷宝-预约排班-预约状态
export const scheduling_inviteStatus = [
{ confId: 1, confValue: "待预约" },
{ confId: 2, confValue: "已预约" },
{ confId: 3, confValue: "取消预约" },
{ confId: 4, confValue: "已施工" },
{ confId: 5, confValue: "超时未到店" },
{ confId: 6, confValue: "已撤销" },
{ confId: 7, confValue: "已支付" }
]
<!-- 通用表单弹窗组件 -->
<template>
<d2-dialog :title="dialogConfig.title" :is-visible="selectVisible" class="privacyDailog" :width="dialogWidth" :btn-ok-label="dialogConfig.okText" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<glsx-combi-form class="edit-form-container" ref="editFormRef" :label-width="labelWidth" :default-width="defaultWidth" :is-block="isBlock" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
</glsx-combi-form>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'GlskFormDialog',
data() {
return {
isBlock: true,
editChildRef: 'editChildRef'
}
},
props: {
dialogWidth: {
type: String,
default: '480px'
},
labelWidth: {
type: String,
default: '100px'
},
defaultWidth: {
type: String,
default: '314px'
},
dialogConfig: {
type: Object,
default: () => {
return {
title: '提示',
okText: '确定'
}
}
},
selectVisible: {
type: Boolean,
default: false
},
formRules: {
type: Object,
default: () => ({})
},
editData: {
type: Object,
default: () => ({})
},
editFormData: {
type: Array,
default: () => []
},
baseData: {
type: Object,
default: () => ({})
}
},
mounted() {
this.getOptionsList('editFormData', false)
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (['select', 'radio'].includes(item.type) && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid) => {
if (valid) {
this.$emit('handleConfirm', this.editData)
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style>
.privacyDailog .el-dialog {
min-width: 700px;
}
</style>
import Vue from "vue"
import d2Container from "./d2-container"
import authButton from "./d2-auth/d2-auth-btn.js"
// 注意 有些组件使用异步加载会有影响
Vue.component("D2Container", d2Container)
Vue.component("D2Icon", () => import("./d2-icon"))
Vue.component("D2ElIcon", () => import("./d2-el-icon"))
Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue"))
Vue.component("D2TableHeader", () => import("./d2-table-header/index.vue"))
Vue.component("D2Table", () => import("./d2-table/index.vue"))
Vue.component("D2Dialog", () => import("./d2-dialog/index.vue"))
Vue.component("D2Form", () => import("./d2-form/index.vue"))
Vue.component("D2Search", () => import("./d2-search/index.vue"))
Vue.component("RelateStoreDialog", () =>
import("./d2-form/relateStoreDialog.vue")
)
Vue.component("BaseDialog", () => import("./baseDialog/index.vue"))
Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue"))
Vue.component("GLDialog", () => import("./GLDialog/index.vue"))
// Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton)
import Vue from "vue"
import d2Container from "./d2-container"
import authButton from "./d2-auth/d2-auth-btn.js"
// 注意 有些组件使用异步加载会有影响
Vue.component("D2Container", d2Container)
Vue.component("D2Icon", () => import("./d2-icon"))
Vue.component("D2ElIcon", () => import("./d2-el-icon"))
Vue.component("D2IconSvg", () => import("./d2-icon-svg/index.vue"))
Vue.component("D2TableHeader", () => import("./d2-table-header/index.vue"))
Vue.component("D2Table", () => import("./d2-table/index.vue"))
Vue.component("D2Dialog", () => import("./d2-dialog/index.vue"))
Vue.component("D2Form", () => import("./d2-form/index.vue"))
Vue.component("D2Search", () => import("./d2-search/index.vue"))
Vue.component("RelateStoreDialog", () =>
import("./d2-form/relateStoreDialog.vue")
)
Vue.component("BaseDialog", () => import("./baseDialog/index.vue"))
Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue"))
Vue.component("GLDialog", () => import("./GLDialog/index.vue"))
Vue.component("GlskFormDialog", () => import("./glsk-form-dialog/index.vue"))
// Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton)
......@@ -292,9 +292,30 @@ export const routerName = {
label: "导出",
category: "Button",
handle: "handleExport"
},
{
authId: "9030606",
parentId: "90306",
label: "工位设置",
category: "Button",
type: "primary",
handle: "handleSet"
},
{
authId: "9030607",
parentId: "90306",
label: "预约时间",
handle: "handleReservation"
},
{
authId: "9030608",
parentId: "90306",
label: "备注",
handle: "handleRamrk"
}
],
component: _import("goods/coupons")
// component: _import("goods/coupons")
component: _import("goods/coupons/indexControl")
},
90312: {
path: "/packageManage",
......@@ -556,5 +577,142 @@ export const routerName = {
activePath: "/shelfManage"
},
component: _import("goods/shelfManage/editMultilateralContract")
},
90314: {
path: "/purchaseOnShelves",
name: "purchaseOnShelves",
meta: {
title: "采购上架",
authId: "90314",
parentId: "903",
cache: false
},
auth: [
{
authId: "9031401",
parentId: "90314",
label: "新增上架",
category: "Button",
type: "primary",
handle: "handleAdd",
addRoutePath: [
{
authId: "90315",
name: "上架编辑",
parentId: "90314"
}
]
},
{
authId: "9031402",
parentId: "90314",
label: "导出",
category: "Button",
handle: "handleExport"
},
{
authId: "9031403",
parentId: "90314",
label: "批量审核",
category: "Button",
type: "primary",
handle: "handleBatchReview"
},
{
authId: "9031404",
parentId: "90314",
label: "删除",
handle: "handleDel"
},
{
authId: "9031405",
parentId: "90314",
label: "上架",
handle: "handleUpOrDown",
ruleObj: {
attr: "status",
rule: {
0: "上架",
1: "下架"
}
}
},
{
authId: "9031406",
parentId: "90314",
label: "查看",
handle: "handleView",
addRoutePath: [
{
authId: "90316",
name: "查看上架",
parentId: "90314"
}
]
},
{
authId: "9031407",
parentId: "90314",
label: "编辑",
handle: "handleEdit",
addRoutePath: [
{
authId: "90315",
name: "上架编辑",
parentId: "90314"
}
]
},
{
authId: "9031408",
parentId: "90314",
label: "批量下架",
category: "Button",
handle: "handleBatchOffShelf"
},
{
authId: "9031411",
parentId: "90314",
label: "批量导入",
category: "Button",
type: "primary",
handle: "handleBatchImport"
}
],
component: _import("goods/purchaseOnShelves/index")
},
90315: {
path: "/purchaseOnShelvesEditGrounding",
name: "purchaseOnShelvesEditGrounding",
meta: {
title: "上架编辑",
authId: "90315",
parentId: "90314",
// cache: false,
sideHidden: true,
activePath: "/purchaseOnShelves"
},
component: _import("goods/purchaseOnShelves/editGrounding")
},
90316: {
path: "/purchaseOnShelvesGroundingDetail",
name: "purchaseOnShelvesGroundingDetail",
meta: {
title: "查看上架",
authId: "90316",
parentId: "90314",
// cache: false,
sideHidden: true,
activePath: "/purchaseOnShelves"
},
auth: [
{
authId: "9031601",
parentId: "90316",
label: "审核",
handle: "handleView"
}
],
component: _import("goods/purchaseOnShelves/groundingDetail")
}
}
......@@ -521,6 +521,12 @@ export const routerName = {
parentId: "90511",
label: "转账记录",
handle: "handleTransferRecord"
},
{
authId: "9051114",
parentId: "90511",
label: "服务商对账单",
handle: "handleCreateServiceBill"
}
],
component: _import("financeManage/accountStateManage/index")
......
......@@ -89,6 +89,12 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9080302",
parentId: "90803",
label: "关联技师",
handle: "correlationTechnician"
}
],
component: _import("stockManage/outbound/outboundList")
......
......@@ -144,5 +144,53 @@ export const routerName = {
}
],
component: _import("invoiceManage/invoiceRedManage")
},
91704: {
path: "/ruleChangeSet",
name: "ruleChangeSet",
meta: {
title: "切换规则配置",
authId: "91704",
parentId: "917",
cache: false
},
auth: [
{
authId: "9170401",
parentId: "91704",
label: "新增规则",
icon: "plus",
category: "Button",
type: "primary",
handle: "handleAdd"
},
{
authId: "9170402",
parentId: "91704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9170403",
parentId: "91704",
label: "详情",
handle: "handleDetail"
},
{
authId: "9170404",
parentId: "91704",
label: "修改",
handle: "handleEdit"
},
{
authId: "9170405",
parentId: "91704",
label: "删除",
handle: "handleDelete"
}
],
component: _import("invoiceManage/ruleChangeSet")
}
}
......@@ -34,13 +34,13 @@
<auth-button :data="scope.scope" :show-btn-ids="['9051105']" />
</span>
<!-- 确认变更 - 待确认 -->
<span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<!-- <span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051103']" />
</span>
</span> -->
<!-- 取消变更 - 待确认 -->
<span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<!-- <span v-if="scope.scope.reconciliationBillStatus == '2'" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051104']" />
</span>
</span> -->
<!-- 查看 - 已对账 -->
<span v-if="scope.scope.reconciliationBillStatus == '3'" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051106']" />
......@@ -49,6 +49,10 @@
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051107']" />
</span>
<!-- 服务商对账单 - 已对账 && 流量方对账单 && 未生成过服务商对账单 -->
<span v-if="scope.scope.reconciliationBillStatus == '3' && scope.scope.billType == '1' && !scope.scope.hasPartnerBill" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9051114']" />
</span>
<!-- 生成应收单 -->
<span style="margin-right: 10px;" v-if="((!scope.scope.receivableBillIds) || (scope.scope.receivableBillIds.length == 0)) && scope.scope.reconciliationBillStatus == '3' && scope.scope.billType == '1'">
<auth-button :data="scope.scope" :show-btn-ids="['9051108']" />
......@@ -84,6 +88,9 @@
<edit-transfer v-if="editTransferVisible" :editTransferVisible="editTransferVisible" :info="merchantInfo" @handleConfirm="handleEditTransferConfirm" @dialogClose="handleEditTransferVisible"></edit-transfer>
<record-transfer v-if="recordTransferVisible" :recordTransferVisible="recordTransferVisible" :info="merchantInfo" @handleConfirm="handleTransferRecordConfirm" @dialogClose="handleTransferRecordVisible"></record-transfer>
<edit-pay-receive v-if="payReceiveVisible" :payReceiveVisible="payReceiveVisible" :info="info" @handleConfirm="handleEditConfirm" @dialogClose="handleEditVisible"></edit-pay-receive>
<glsk-form-dialog v-if="billSplitVisible" :selectVisible="billSplitVisible" :dialogConfig="billSplitDialogConfig" label-width="200px" :formRules="billSplitRules" :editData="billSplitEditData" :editFormData="billSplitEditFormData" :baseData="baseData" @handleClose="splitDialogVisible" @handleConfirm="handleSplitConfirm"></glsk-form-dialog>
<CreateServiceDialog :account-visible="accountVisible" v-if="accountVisible" :scene="7" :editForm="serviceInfo" @custTmpl="handleCustTmpl" @handleConfirm="handleServiceConfirm" @accountClose="createServiceVisible" />
<tmpl-drawer v-if="tmplDrawerVisible" :tmplDrawerVisible="tmplDrawerVisible" :type="tmplInfo.type" :tmplSelectList="tmplInfo.tmplSelectList" @handleConfirm="handleCustConfirm" @handleClose="handleCustVisible"></tmpl-drawer>
</div>
</template>
......@@ -99,8 +106,10 @@ import SelectMerDialog from "../components/SelectMerDialog"
import EditTransfer from "../components/EditTransfer"
import RecordTransfer from "../components/RecordTransfer"
import EditPayReceive from "../components/EditPayReceive"
import CreateServiceDialog from "../components/CreateServiceDialog"
import tmplDrawer from "../components/TmplDrawer"
export default {
name: 'accountStateManage',
name: 'AccountStateManage',
components: {
ChangeDetailDialog,
SystemBillDialog,
......@@ -108,7 +117,9 @@ export default {
SelectMerDialog,
EditTransfer,
RecordTransfer,
EditPayReceive
EditPayReceive,
CreateServiceDialog,
tmplDrawer
},
data() {
return {
......@@ -149,13 +160,11 @@ export default {
name: 'accountDate',
type: 'datePicker',
isClear: true
// pickerOptions: 'rangePickerOptions'
}, {
label: '创建时间',
name: 'createdDate',
type: 'datePicker',
isClear: true
// pickerOptions: 'rangePickerOptions'
}, {
label: '状态',
name: 'reconciliationBillStatus',
......@@ -255,10 +264,44 @@ export default {
baseData: {
billStatusList: billStatusList,
tmplTypeList: tmplTypeList,
sceneTypeList: sceneTypeList
sceneTypeList: sceneTypeList,
splitBillList: [{
confId: true,
confLabel: '拆分'
}, {
confId: false,
confLabel: '不拆分'
}]
},
billVisible: false,
billTmplInfo: []
billTmplInfo: [],
// 确认对账-拆分
billSplitVisible: false,
billSplitDialogConfig: {
title: '确认对账',
okText: '确定'
},
billSplitRules: {
splitBill: [{ required: true, message: '请选择是否拆分对账单', trigger: 'blur' }],
},
billSplitEditData: {},
billSplitEditFormData: [{
name: 'splitBill',
label: '是否按支付类型拆分对账单',
type: 'radio',
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'splitBillList',
optionList: [],
handleRadioChange: () => { }
}],
accountVisible: false,
serviceInfo: {},
tmplDrawerVisible: false,
tmplInfo: {
type: '',
tmplSelectList: [],
}
}
},
mounted() {
......@@ -354,29 +397,53 @@ export default {
handleEdit(row) {
const params = {
id: row.id,
orderCurrentPage: 1,
orderPageSize: 10
// orderCurrentPage: 1,
// orderPageSize: 10,
overwriteFiledJson: true
}
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
this.handleBillVisible()
})
},
splitDialogVisible() {
this.billSplitVisible = !this.billSplitVisible
},
handleSplitConfirm() {
this.splitDialogVisible()
this.billApiConfirm(this.billSplitEditData)
},
handleBillConfirm(row) {
this.$confirm('是否确认对账?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const params = { id: row.id }
billConfirm(params).then(res => {
this.$message.success("操作成功")
this.handleReset()
})
// 流量方对账单 - 是否拆分弹窗
if (row.billType == '1') {
this.billSplitEditData = {
...row,
splitBill: false
}
this.splitDialogVisible()
} else {
this.billApiConfirm(row)
}
}).catch(() => { })
},
billApiConfirm(row) {
const params = { id: row.id }
if (row.billType == '1') {
params.splitBill = row.splitBill
}
billConfirm(params).then(res => {
this.$message.success("操作成功")
this.handleReset()
})
},
handleCancel(row) {
this.$confirm('是否取消对账?', '提示', {
confirmButtonText: '确定',
......@@ -449,8 +516,9 @@ export default {
handleDetail(row) {
const params = {
id: row.id,
orderCurrentPage: 1,
orderPageSize: 10
// orderCurrentPage: 1,
// orderPageSize: 10,
overwriteFiledJson: false
}
billDetailPage(params).then(res => {
this.billTmplInfo = deepClone(res)
......@@ -458,6 +526,43 @@ export default {
})
},
createServiceVisible() {
this.accountVisible = !this.accountVisible
},
// 服务商对账单
handleCreateServiceBill(row) {
this.serviceInfo = {
id: row.id,
sceneType: row.sceneType,
shopMerchantId: row.shopMerchantId
}
this.createServiceVisible()
},
handleServiceConfirm(obj) {
this.billTmplInfo = deepClone(obj.billTmplInfo)
this.createServiceVisible()
this.handleBillVisible()
},
handleCustVisible() {
this.tmplDrawerVisible = !this.tmplDrawerVisible
},
// 自定义模版字段
handleCustTmpl(val) {
console.log(val, 'val---')
this.tmplInfo.type = val.tmplType
this.tmplInfo.tmplSelectList = val.tmplSelectList || []
this.handleCustVisible()
},
handleCustConfirm(obj) {
this.handleCustVisible()
this.$EventBus.$emit('changeFieldIds', { fieldIds: obj.fieldIds })
},
// 生成应收
handleCreateReceiveBill(row) {
const params = {
......
......@@ -17,20 +17,28 @@
</div>
<!-- 普通文本显示 -->
<div v-else>
<span v-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
<div v-if="subItem.fieldCode == 'orderCode' && scope.row.ORDER.sourceType != 1" class="refund-txt">退</div>
<span v-if="subItem.fieldCode == 'tradeNo'" :class="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length ? 'txt-blue': '' ">
<el-image v-if="scope.row.ORDER.payVoucherList && scope.row.ORDER.payVoucherList.length" style="width: 20px; height: 20px" :src="scope.row.ORDER.payVoucherList[0].payVoucher" :preview-src-list="srcList" @click="handleReviewImg(scope.row)"></el-image>
{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
<span v-else-if="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] === 0">0</span>
<span v-else>{{ scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '-' }}</span>
</div>
</div>
</el-table-column>
</el-table-column>
</el-table>
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-size="page.pageSize" :total="page.total" :page-sizes="[10, 20, 30, 40]" layout="sizes,total,->,prev,pager,next,jumper">
</el-pagination>
<!-- <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNum" :page-size="page.pageSize" :total="page.total" :page-sizes="[10, 20, 30, 40]" layout="sizes,total,->,prev,pager,next,jumper">
</el-pagination> -->
<DynamicAddTable v-if="billTypeStr == 'traffic'" ref="dynamicReceiveAdd" :configObj="{'title': '应收'}" :receivableAdjustments="receivableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<DynamicAddTable ref="dynamicAdd" :adjustments="payableAdjustments" @handleInputBlur="billCompute" :isEdit="isEdit"></DynamicAddTable>
<div class="total-box">
<div>订单总数:{{ totalOrderCount }}</div>
<div>总产值:{{ totalAmount }}</div>
<div v-if="billTypeStr == 'traffic'">应收总额:{{ totalReceivable }}元</div>
<div>应付总额:{{ totalPayable }}元</div>
<div>线上分账总额:{{ totalSplitPaidAmount }}</div>
<div>线下已付总额:{{ totalOfflinePaidAmount }}</div>
<div v-if="billTypeStr == 'traffic'">线下对账总额:{{ totalOfflineReconciliation }}元</div>
</div>
</d2-dialog>
......@@ -242,8 +250,12 @@ export default {
"coverReceiverType"
],
serviceEditList: ["partnerFeeCalculateType,partnerFeeCalculateValue", "partnerFeeCalculateCoefficient", "coverReceiverType"],
totalAmount: 0,
totalOrderCount: 0,
totalReceivable: 0,
totalPayable: 0,
totalSplitPaidAmount: 0,
totalOfflinePaidAmount: 0,
totalOfflineReconciliation: 0,
changeFieldCodeList: [{
old: 'platformMerchantName',
......@@ -350,7 +362,8 @@ export default {
suffix: '元'
}]
},
defaultWidth: '180px'
defaultWidth: '180px',
srcList: []
}
},
mounted() {
......@@ -366,8 +379,12 @@ export default {
this.originalOrderList = this.billTmplInfo?.orderPage?.list || []
this.orderId = this.billTmplInfo.id
this.sceneType = this.billTmplInfo.sceneType
this.totalAmount = this.billTmplInfo.totalAmount
this.totalOrderCount = this.billTmplInfo.totalOrderCount
this.totalReceivable = this.billTmplInfo.totalReceivable
this.totalPayable = this.billTmplInfo.totalPayable
this.totalSplitPaidAmount = this.billTmplInfo.totalSplitPaidAmount
this.totalOfflinePaidAmount = this.billTmplInfo.totalOfflinePaidAmount
this.totalOfflineReconciliation = this.billTmplInfo.totalOfflineReconciliation
this.page.pageNum = this.billTmplInfo?.orderPage?.pageNum || 1
this.page.pageSize = this.billTmplInfo?.orderPage?.pageSize || 10
......@@ -543,6 +560,13 @@ export default {
this.modifyDelete(orderCode)
},
handleReviewImg(row) {
this.srcList = []
row.ORDER.payVoucherList.forEach(item => {
this.srcList.push(item.payVoucher)
})
},
billCompute() {
this.loading = true
const dynamicForm = {
......@@ -557,8 +581,12 @@ export default {
// console.log(dynamicForm, 'dynamicForm')
billComputePage({ json: JSON.stringify(dynamicForm) }).then(res => {
this.originalOrderList = res.orderPage?.list || []
this.totalAmount = res.totalAmount
this.totalOrderCount = res.totalOrderCount
this.totalReceivable = res.totalReceivable
this.totalPayable = res.totalPayable
this.totalPayable = res.totalPayable
this.totalSplitPaidAmount = res.totalSplitPaidAmount
this.totalOfflineReconciliation = res.totalOfflineReconciliation
this.orderTotalStat = res.orderTotalStat
this.page.pageNum = res.orderPage?.pageNum || 1
......@@ -603,6 +631,20 @@ export default {
}
}
.refund-txt {
display: inline-block;
box-sizing: border-box;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 8px;
padding: 2px;
border-radius: 3px;
color: #ffffff;
margin: 0 8px 0 20px;
background: linear-gradient(#ff8496 0%, #ff4e61 100%);
}
.select-input-container {
position: relative;
......@@ -655,6 +697,13 @@ export default {
padding: 14px;
text-align: center;
}
.total-box {
display: flex;
flex-wrap: wrap;
div {
flex: 1;
}
}
.batch-box {
margin: 10px 36px;
}
......@@ -663,4 +712,8 @@ export default {
font-size: 14px;
margin: 8px 0;
}
.txt-blue {
cursor: pointer;
color: #2a58ad;
}
</style>
......@@ -14,10 +14,10 @@ export const billStatusList = [
confId: "1",
confLabel: "待对账"
},
{
confId: "2",
confLabel: "待确认"
},
// {
// confId: "2",
// confLabel: "待确认"
// },
{
confId: "3",
confLabel: "已对账"
......
<!-- 下载对账单 -->
<template>
<d2-dialog title="下载对账单" :is-visible="accountVisible" class="accountDailog" width="688px" btn-ok-label="下载" @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<el-button v-if="isTmpl" slot="btn-start" type="primary" @click="handleSystemBill">系统对账</el-button>
<!-- <el-button v-if="isTmpl" slot="btn-start" type="primary" @click="handleSystemBill">系统对账</el-button> -->
<el-form ref="accountForm" :model="infoForm" :rules="formRules" label-width="120px" v-loading="loading">
<el-form-item label="商户类型:" prop="merchantType">
<el-radio-group v-model="infoForm.merchantType" @change="changeType">
......@@ -18,9 +18,6 @@
</el-form-item>
<el-form-item v-if="infoForm.merchantType == '7'" label="账单类型:" prop="reportType">
<el-radio-group v-model="infoForm.reportType" @change="judgeTmpl">
<el-radio label="4">
服务商对账单
</el-radio>
<el-radio label="1">
普通对账单
</el-radio>
......@@ -54,10 +51,12 @@
<el-option v-for="item in baseData.reconStatusList" :key="item.confId" :label="item.confLabel" :value="item.confId" />
</el-select>
</el-form-item>
<el-form-item label="支付方式:" prop="payeeType">
<el-select v-model="infoForm.payeeType" style="width:400px">
<el-option v-for="item in baseData.payeeTypeList" :key="item.confId" :label="item.confLabel" :value="item.confId" />
</el-select>
<el-form-item v-if="isTmpl" label="套餐合并" prop="packageMerge">
<el-radio-group v-model="infoForm.packageMerge">
<el-radio v-for="(item, index) in baseData.packageMergeList" :label="item.confId" :key="index">
{{ item.confLabel }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="isTmpl" label="对账模版:" prop="templateId">
<el-select v-model="infoForm.templateId" style="width:400px" @change="handleTmplChange">
......@@ -152,7 +151,7 @@ export default {
reportType: '1',
shopMerchantId: '',
reconciliationStatus: 'all',
payeeType: 'all',
packageMerge: false,
templateId: '',
fieldsJson: '',
fieldsTxt: ''
......@@ -176,7 +175,7 @@ export default {
{ required: true, trigger: 'change', validator: validateLonlat }
],
reconciliationStatus: [{ required: true, message: '请选择对账状态', trigger: 'change' }],
payeeType: [{ required: true, message: '请选择支付方式', trigger: 'change' }],
packageMerge: [{ required: true, message: '请选择套餐合并', trigger: 'change' }],
templateId: [{ required: false, message: '请选择对账模式', trigger: 'change' }],
fieldsJson: [{ required: false, message: '请选择对账字段', trigger: 'change' }],
},
......@@ -193,16 +192,23 @@ export default {
confId: '2',
confLabel: '已对账'
}],
payeeTypeList: [{
confId: 'all',
confLabel: '全部'
}, {
confId: '0',
confLabel: '嘀加收款'
packageMergeList: [{
confId: true,
confLabel: '是'
}, {
confId: '1',
confLabel: '门店收款'
confId: false,
confLabel: '否'
}],
// payeeTypeList: [{
// confId: 'all',
// confLabel: '全部'
// }, {
// confId: '0',
// confLabel: '嘀加收款'
// }, {
// confId: '1',
// confLabel: '门店收款'
// }],
merchantList: [],
// 流量方对账单
trafficTemplateList: [],
......@@ -313,21 +319,21 @@ export default {
* 园区店 - 6 - 否
*/
judgeTmpl() {
this.isTmpl = this.infoForm.merchantType == '2' || (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4');
this.isTmpl = this.infoForm.merchantType == '2'
this.merchantTypeStr = this.typeObj[this.infoForm.merchantType]
this.multipleLimit = (this.infoForm.merchantType == '7' && this.infoForm.reportType == '4') ? 1 : 10
this.infoForm.merchant = []
this.resetTmplData()
},
resetTmplData() {
this.infoForm.shopMerchantId = ''
this.infoForm.packageMerge = false
this.infoForm.templateId = ''
this.infoForm.fieldsJson = ''
this.infoForm.fieldsTxt = ''
this.infoForm.tmplType = ''
this.tmplSelectList = []
const ruleAttrList = ['templateId', 'fieldsJson']
const ruleAttrList = ['packageMerge', 'templateId', 'fieldsJson']
ruleAttrList.forEach(item => {
this.formRules[item][0].required = this.isTmpl
})
......@@ -480,12 +486,13 @@ export default {
params.sceneType = this.scene
// 对账状态
infoForm.reconciliationStatus == 'all' ? '' : (params.reconciliationStatus = infoForm.reconciliationStatus)
infoForm.payeeType == 'all' ? '' : (params.payeeType = infoForm.payeeType)
// infoForm.payeeType == 'all' ? '' : (params.payeeType = infoForm.payeeType)
if (infoForm.shopMerchantId) {
params.shopMerchantId = infoForm.shopMerchantId
params.shopMerchantName = this.baseData.shopMerchantList.find(item => item.merchantId == infoForm.shopMerchantId)?.merchantName
}
if (this.isTmpl) {
params.packageMerge = infoForm.packageMerge
params.templateId = infoForm.templateId == 'all' ? '' : infoForm.templateId
params.fieldsJson = infoForm.fieldsJson
}
......@@ -515,15 +522,7 @@ export default {
handleAddConfirm() {
this.$refs.accountForm.validate(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()
}
this.dowloadApi()
}
})
},
......
<template>
<d2-dialog :title="title"
:is-visible.sync="selectGoodsVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleSelectGoodsConfirm"
@closeDialog="handleSelectGoodsClose"
class="selectGoods">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
<d2-dialog :title="title" :is-visible.sync="selectGoodsVisible" width="70%" btn-ok-label="确定"
@confirmDialog="handleSelectGoodsConfirm" @closeDialog="handleSelectGoodsClose" class="selectGoods">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
:form-data="showFormData">
<template slot="commodityCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入商品ID"
v-model.trim="searchForm['commodityCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'commodityCode')" />
<el-input :style="{ width: '100%' }" placeholder="请输入商品ID" v-model.trim="searchForm['commodityCode']"
:clearable="true" :maxlength="50" @input="event => searchInput(event, 'commodityCode')" />
</template>
<template slot="type">
<el-input :style="{ width: '100%'}"
placeholder="请输入商品编码"
v-model.trim="searchForm['type']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'type')" />
<el-input :style="{ width: '100%' }" placeholder="请输入商品编码" v-model.trim="searchForm['type']" :clearable="true"
:maxlength="50" @input="event => searchInput(event, 'type')" />
</template>
<template slot="thirdPartyCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入第三方编码"
v-model.trim="searchForm['thirdPartyCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'thirdPartyCode')" />
<el-input :style="{ width: '100%' }" placeholder="请输入第三方编码" v-model.trim="searchForm['thirdPartyCode']"
:clearable="true" :maxlength="50" @input="event => searchInput(event, 'thirdPartyCode')" />
</template>
<template slot="baseGoodsCommodityCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入系列ID"
v-model.trim="searchForm['baseGoodsCommodityCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'baseGoodsCommodityCode')" />
<el-input :style="{ width: '100%' }" placeholder="请输入系列ID" v-model.trim="searchForm['baseGoodsCommodityCode']"
:clearable="true" :maxlength="50" @input="event => searchInput(event, 'baseGoodsCommodityCode')" />
</template>
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList"
style="width: 100%;"
v-model="tempGoodsType"
:placeholder="'请选择'"
filterable
@change="selectAddAttr($event)"
clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
<el-cascader :options="baseData.productTypeList" style="width: 100%;" v-model="tempGoodsType"
:placeholder="'请选择'" filterable @change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
</el-button>
</div>
<d2-table ref="groundingIndexTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="select_btn"
slot-scope="scope">
<el-radio v-model="selectedRowId"
:label="scope.scope.id"
:disabled="packageSelectIds && packageSelectIds.includes(scope.scope.id)">{{ '' }}</el-radio>
<d2-table ref="groundingIndexTable" :has-num="false" :search-form="searchForm" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="select_btn" slot-scope="scope">
<el-radio v-model="selectedRowId" :label="scope.scope.id"
:disabled="packageSelectIds && packageSelectIds.includes(scope.scope.id)">{{ '' }}</el-radio>
</template>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.carTypeConfigList && scope.scope.carTypeConfigList.length" placement="top">
<div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.carTypeConfigList" :key="index">{{ item.seriesName }}</div>
</div>
<div>{{ scope.scope.carTypeConfigList | formatCar }}</div>
</el-tooltip>
<div v-else>-</div>
</template>
</d2-table>
</d2-dialog>
......@@ -102,6 +73,15 @@ export default {
default: () => []
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.seriesName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
data() {
return {
getListApi: getUpgradeProductList,
......@@ -217,9 +197,11 @@ export default {
}, {
label: '适用车型',
prop: '',
formatter: (cellValue) => {
return cellValue?.carTypeConfigList?.length ? cellValue.carTypeConfigList.map(item => item.seriesName).join('/') : '-'
}
addHtml: 'carName',
width: 200
// formatter: (cellValue) => {
// return cellValue?.carTypeConfigList?.length ? cellValue.carTypeConfigList.map(item => item.seriesName).join('/') : '-'
// }
}, {
label: '所属系列',
prop: 'goodsName',
......@@ -316,6 +298,11 @@ export default {
}
</script>
<style lang="scss" scoped>
.car-type-list {
max-height: 300px;
overflow-y: scroll;
}
.show-search {
::v-deep .d2-search-block {
padding: 0;
......
......@@ -51,8 +51,6 @@
import storeList from './storeList'
import couponsDetail from './couponsDetail'
import editCouponsDialog from './editCouponsDialog'
// import { exportListApi, exportDetailListApi } from '@api/coupons'
// import { asyncExportExcel } from '@api/sys.base'
import { getDistinctColum } from '@api/coupons'
import { Util, deepClone } from '@/common/util'
import { BaseData, inviteStatusList } from '@/common/constants.js'
......@@ -320,5 +318,8 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.coupons {
margin-top: 40px;
}
</style>
<template>
<div class="staffWarn">
<div class="header"
slot="header">
<el-tabs v-model="activeName">
<el-tab-pane label="发劵宝"
name="coupons" />
<el-tab-pane label="预约排班"
name="scheduling" />
</el-tabs>
<div>
<coupons v-if="activeName === 'coupons'" />
<scheduling v-if="activeName === 'scheduling'" />
</div>
</div>
</div>
</template>
<script>
import coupons from './index'
import scheduling from './scheduling'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'coupons',
recordInfo: {}
}
},
components: {
coupons,
scheduling
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.staffWarn {
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
<!-- 备注 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="dialogShow"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form class="edit-form-container"
ref="formRef"
label-width="120px"
default-width="350px"
:form-ref="rejectRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { followRecordUpdate } from '@api/invitation'
import { deepClone } from '@/common/util'
export default {
name: 'RemarkDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
infoForm: {
remark: ''
},
dialogConfig: {
title: '备注',
width: '600px'
},
rejectRef: 'rejectRef',
formRules: {
// remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
editFormData: [{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 15,
inputType: 'textarea',
showLimit: true,
rows: 4
}],
baseData: {
}
}
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal })
}
}
},
mounted() {
console.log('paramsObj', this.paramsObj)
this.infoForm.remark = deepClone(this.paramsObj.remark)
},
methods: {
handleAddConfirm() {
this.$refs.formRef.$refs[this.rejectRef].validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.inviteFollowRecordId = this.paramsObj.inviteFollowRecordId
followRecordUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin-top: 20px;
}
</style>
<template>
<div>
<baseDialog :is-show.sync="dialogShow" :dialog-config="dialogConfig.config" @handleClick="handleAddConfirm"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv">
<div class="tipsText">
{{ paramsObj.customer.customerName + ' | ' + paramsObj.customer.customerPhone }}
</div>
</div>
<el-form label-width="100px" :model="infoForm" ref="editRef" :rules="formRules">
<el-form-item label="预约时间:" required>
<el-col :span="10">
<el-form-item prop="dateTime">
<el-date-picker v-model="infoForm.dateTime" :clearable="false" type="date" class="default-width"
placeholder="选择日期" value-format="yyyy-MM-dd" @change="inviteStatMerchantList(true)"
:picker-options="datePickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="1"></el-col>
<el-col :span="13">
<el-form-item prop="times">
<el-select v-model="infoForm.times" filterable placeholder="请选择" class="default-width">
<el-option v-for="(item, key) in timesOpt" :key="key" :label="item.confValue" :value="item.confId"
:disabled="item.disabled">
</el-option>
</el-select>
<el-button type="text" size="small" class="timesSle" v-if="paramsObj.inviteDate"
@click="cancelInvite">取消预约</el-button>
</el-form-item>
</el-col>
</el-form-item>
</el-form>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { inviteStatMerchantList, dateUpdate, cancelInvite } from '@api/invitation'
import { Util, deepClone } from "@/common/util"
export default {
name: "ReservationDialog",
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() {
this.loading = false
console.log('this.paramsObj', this.paramsObj)
this.inviteDatePush()
},
data() {
// var validateDateTime = {
// validator: (rule, value, callback) => {
// if (!value) {
// return callback(new Error(`请选择日期`))
// }
// const times = this.infoForm.times
// if (!times) {
// return callback(new Error(`请选择时间段`))
// }
// callback() // 验证通过
// },
// trigger: "change"
// }
return {
dialogConfig: {
config: {
title: "预约时间",
width: "600px"
}
},
infoForm: {
dateTime: '',
times: ''
},
editChildRef: 'editChildRef',
formRules: {
// dateTime: [validateDateTime]
dateTime: [
{ required: true, message: '请选择日期', trigger: 'change' }
],
times: [
{ required: true, message: '请选择时间段', trigger: 'change' }
]
},
datePickerOptions: {
disabledDate: (time) => {
const today = new Date()
// 设置时间到当天的开始 (00:00:00.000),避免时分秒影响比较
today.setHours(0, 0, 0, 0)
// 计算一个月后的日期 (今天 + 30天)
const oneMonthLater = new Date(today)
oneMonthLater.setDate(today.getDate() + 30) // 粗略按30天算一个月
// 或者更精确地处理月份 (考虑不同月份天数差异)
// oneMonthLater.setMonth(today.getMonth() + 1);
// 禁用规则:
// 1. 禁用早于今天(包含今天00:00:00之前)的日期
// 2. 禁用晚于一个月后(包含一个月后23:59:59之后)的日期
return time.getTime() < today.getTime() || time.getTime() > oneMonthLater.getTime()
}
},
loading: true,
baseData: {
technicianList: []
},
timesOpt: [
{ confId: "09:00", confValue: "09:00", disabled: false },
{ confId: "10:30", confValue: "10:30", disabled: false },
{ confId: "13:00", confValue: "13:00", disabled: false },
{ confId: "14:30", confValue: "14:30", disabled: false },
{ confId: "16:00", confValue: "16:00", disabled: false }
]
}
},
methods: {
inviteDatePush() {
if (this.paramsObj.inviteDate) {
const dateTimeStr = Util.dateFormate(this.paramsObj.inviteDate, 'YYYY-MM-DD HH:mm:ss')
// 截取年月日(空格前)
this.infoForm.dateTime = dateTimeStr.split(' ')[0]
// 截取时分(去掉秒)
this.infoForm.times = dateTimeStr.split(' ')[1].substring(0, 5) // "09:00"
this.inviteStatMerchantList(false)
}
},
inviteStatMerchantList(flag) {
if (flag) {
this.infoForm.times = ''
}
var params = {}
params.merchantId = this.paramsObj.yqMerchantId
params.startDate = this.infoForm.dateTime
params.endDate = this.infoForm.dateTime
console.log('params', params)
inviteStatMerchantList(params).then((res) => {
const saturdayFlag = res[0].saturdayFlag
const sundayFlag = res[0].sundayFlag
const timeStats = res[0].timeStats
const day = new Date(this.infoForm.dateTime).getDay()
if (saturdayFlag === 'N' && day === 6) {
this.$message.warning('工位设置不允许周六施工,请选择其他时间')
this.infoForm.dateTime = ''
return
} else if (sundayFlag === 'N' && day === 0) {
this.$message.warning('工位设置不允许周日施工,请选择其他时间')
this.infoForm.dateTime = ''
return
}
timeStats.forEach(item => {
this.timesOpt.forEach(optItem => {
if (item.inviteTime === optItem.confValue) {
if (item.inviteNum < item.maxNum) {
optItem.disabled = false
} else {
optItem.disabled = true
}
}
})
})
console.log('this.timesOpt', this.timesOpt)
})
},
handleAddConfirm() {
this.$refs.editRef.validate((valid) => {
if (valid) {
var params = deepClone(this.infoForm)
params.id = this.paramsObj.id
params.inviteType = this.paramsObj.customerCoupon.couponType
params.inviteDateStr = params.dateTime + ' ' + params.times + ':00'
delete params.dateTime
delete params.times
const targetTime = new Date(params.inviteDateStr).getTime() // 转为时间戳
const now = new Date().getTime() // 当前时间戳
if (targetTime < now) {
this.$message.warning('预约时间不能选择已过去的时间')
return
}
dateUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}
})
},
cancelInvite() {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
var params = {}
params.id = this.paramsObj.id
cancelInvite(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}).catch(err => {
console.log(err)
})
}
}
}
</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;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
color: #333333;
.tipsDiv {
height: 28px;
margin-bottom: 20px;
.tipsText {
padding-left: 20px;
font-size: 14px;
}
}
}
.default-width {
width: 170px;
}
.timesSle {
padding-left: 10px;
}
}
</style>
<!-- 发券宝 - 店里列表 -->
<template>
<div class="coupons">
<d2-table ref="couponsTable" :has-num="false" :base-data="baseData" :sort-obj="sortObj"
:search-form="searchFormSearch" :head-search-form="searchForm" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn" @handleTableHeadChange="handleTableHeadChange">
<template slot="auth-button" slot-scope="scope">
<auth-button :data="scope.scope" />
<d2-table ref="couponsTable"
:has-num="false"
:base-data="baseData"
:sort-obj="sortObj"
:search-form="searchFormSearch"
:head-search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@handleTableHeadChange="handleTableHeadChange">
<template slot="auth-button"
slot-scope="scope">
<auth-button :show-btn-ids="['9030602', '9030603', '9030604']"
:data="scope.scope" />
</template>
</d2-table>
<edit-coupons-dialog :coupons-visible="couponsVisible" :coupon-info="couponInfo" @couponClose="couponClose" />
<edit-coupons-dialog :coupons-visible="couponsVisible"
:coupon-info="couponInfo"
@couponClose="couponClose" />
</div>
</template>
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
@handleClick="handleAddConfirm"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form label-width="200px"
:model="infoForm"
ref="editRef"
:rules="formRules"
:inline="true">
<el-form-item label="选择园区店:"
prop="yqMerchantId">
<el-select v-model="infoForm.yqMerchantId"
filterable
placeholder="请选择"
class="default-width"
@change="inviteStationSetGet">
<el-option v-for="(item, key) in baseData.yqMerchantList"
:key="key"
:label="item.yqMerchantName"
:value="item.yqMerchantId">
</el-option>
</el-select>
</el-form-item>
<div v-for="(item, key) in infoForm.workItem"
:key="key">
<el-form-item :label="item.label"
:prop="'workItem.' + key + '.maxCount'"
:rules="formRules.maxCount">
<el-input-number v-model="item.maxCount"
placeholder="输入数值"
:precision="0"
:step="1"
:min="0"
:max="10000"
class="numInput"></el-input-number>
<span class="unit">个</span>
</el-form-item>
</div>
<el-form-item label="周六施工">
<el-switch v-model="infoForm.saturdayFlag"
active-value="Y"
inactive-value="N">
</el-switch>
</el-form-item>
<el-form-item label="周日施工">
<el-switch v-model="infoForm.sundayFlag"
active-value="Y"
inactive-value="N">
</el-switch>
</el-form-item>
</el-form>
<div class="tipsDiv">
<div class="tipsText">
设置门店每日每个时段可接待的客户人数,
施工时段以1个半小时为准,请合理安排施工进度
</div>
</div>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import { deepClone } from "@/common/util"
import { inviteStationSetGet, inviteStationSetUpdate, yqMerchantPage } from '@api/invitation'
export default {
name: "WorkSetDialog",
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() {
this.yqMerchantPage()
},
data() {
return {
dialogConfig: {
config: {
title: "工位设置",
width: "600px"
}
},
infoForm: {
yqMerchantId: '',
workItem: [{
label: '上午 09:00-10:30',
startTime: '09:00',
endTime: '10:30',
maxCount: 0
},
{
label: '上午 10:30-12:00',
startTime: '10:30',
endTime: '12:00',
maxCount: 0
},
{
label: '下午 13:00-14:30',
startTime: '13:00',
endTime: '14:30',
maxCount: 0
},
{
label: '下午 14:30-16:00',
startTime: '14:30',
endTime: '16:00',
maxCount: 0
},
{
label: '下午 16:00-17:30',
startTime: '16:00',
endTime: '17:30',
maxCount: 0
}
],
saturdayFlag: 'N',
sundayFlag: 'N'
},
editChildRef: 'editChildRef',
formRules: {
yqMerchantId: [
{ required: true, message: "请选择园区店", trigger: "change" }
],
maxCount: [
{ required: true, message: '请输入最大数量', trigger: 'blur' }
]
},
loading: true,
baseData: {
yqMerchantList: []
}
}
},
methods: {
inviteStationSetGet(yqMerchantId) {
inviteStationSetGet({ yqMerchantId: yqMerchantId }).then((res) => {
console.log('res', res)
if (res && res.length > 0) {
res.forEach(item => {
this.infoForm.workItem.forEach(workItem => {
if (item.startTime === workItem.startTime && item.endTime === workItem.endTime) {
workItem.maxCount = item.maxCount
}
})
this.infoForm.saturdayFlag = item.saturdayFlag
this.infoForm.sundayFlag = item.sundayFlag
})
} else {
this.resetData() // 如果返回数据为空,则重置数据
}
})
},
resetData() {
this.infoForm.saturdayFlag = 'N'
this.infoForm.sundayFlag = 'N'
this.infoForm.workItem.forEach(item => {
item.maxCount = 0
})
},
yqMerchantPage() {
yqMerchantPage({ currentPage: 1, pageSize: 99999 }).then((res) => {
this.baseData.yqMerchantList = res.list
this.loading = false
})
},
handleAddConfirm() {
this.$refs.editRef.validate((valid) => {
if (valid) {
var params = deepClone(this.infoForm)
params.setList = params.workItem.map(item => {
const obj = {
startTime: item.startTime,
endTime: item.endTime,
maxCount: item.maxCount,
saturdayFlag: params.saturdayFlag,
sundayFlag: params.sundayFlag
}
return obj
})
delete params.workItem
delete params.saturdayFlag
delete params.sundayFlag
console.log('params', params)
inviteStationSetUpdate(params).then(res => {
this.notice.okTips('操作成功')
this.dialogShow = true
})
}
})
}
}
}
</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;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
color: #333333;
.tipsDiv {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
// flex-direction: column;
// background: #f47f131a;
height: 28px;
margin-bottom: 25px;
.tipsText {
display: flex;
align-items: center; /* 垂直居中 */
// font-weight: 500;
font-size: 13px;
color: #888888;
}
.imgCla {
margin-right: 8px;
width: 20px;
height: 20px;
}
}
.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: 33%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
.busi-info {
box-sizing: border-box;
width: 890px;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 6px 0;
color: #333333;
font-size: 14px;
margin-bottom: 14px;
.info-row {
height: 20px;
line-height: 20px;
margin-bottom: 16px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-item {
display: inline-block;
width: 50%;
height: 20px;
line-height: 20px;
margin-bottom: 6px;
.item-label {
display: inline-block;
width: 150px;
color: #666666;
text-align: right;
}
}
}
}
.receiptBtn {
margin-left: 20px;
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 300px;
}
.numInput {
width: 150px;
}
.unit {
padding-left: 10px;
}
}
</style>
<template>
<d2-dialog title="批量复制"
:is-visible.sync="batchCopyVisible"
width="600px"
btn-ok-label="确定"
@confirmDialog="handleBatchCopyConfirm"
@closeDialog="handleBatchCopyClose"
class="relateStore">
<el-form label-width="120px" :rules="rules" :model="selectData" ref="batchCopyForm">
<el-form-item label="业务场景:">
<el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input>
</el-form-item>
<el-form-item label="复制门店:" prop="selectMerchantObj">
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword multiple collapse-tags
placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable>
<el-option v-for="subItem in storeData" :key="subItem.merchantId"
:label="subItem.merchantName" :value="subItem" />
</el-select>
</el-form-item>
</el-form>
<div class="tips">
说明:批量复制至新门店后,系统自动按操作商品,自动更新补充商品对应的上架门店
</div>
</d2-dialog>
</template>
<script>
import { getList, getAccountMerchantList } from '@/api/merchant'
import { sceneList } from '@/common/constants.js'
export default {
name: 'RelateStoreDialog',
data() {
return {
storeData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20,
searchMerchantName: '',
sceneList,
selectData: {},
rules: { selectMerchantObj: [{ required: true, message: '请选择复制门店', trigger: 'blur' }] }
}
},
directives: {
'el-select-loadmore': {
bind(el, binding) {
setTimeout(() => {
const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}, 100)
}
}
},
props: {
batchCopyVisible: {
type: Boolean,
default: false
},
selectedScene: {
type: Number
}
},
mounted() {
this.getList()
},
methods: {
getList() {
const storeApi = [1, 2, 3].includes(this.selectedScene) ? getList : getAccountMerchantList // 会员权益/积分商城场景 上架门店是账户中心所有门店
storeApi({
// merchantIdName: ![1, 2, 3].includes(this.selectedScene) ? this.searchMerchantName : '',
merchantName: this.searchMerchantName,
currentPage: this.currentPage,
pageSize: this.pageSize,
scene: this.selectedScene
}).then(res => {
res?.list?.forEach(val => { // 账户中心门店返回商户号字段是merchantNo
if (val.merchantNo) val.merchantId = val.merchantNo
})
this.storeData = this.storeData.concat(res.list)
})
},
// 获取上架门店
remoteMethod(query) {
this.searchMerchantName = query
this.currentPage = 1
this.storeData = []
this.getList() // 请求接口
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
if (this.searchMerchantName) {
this.searchMerchantName = ''
this.currentPage = 1
this.storeData = []
this.getList()
}
}
},
// 获取更多上架门店
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages
return
}
this.getList()
}, 10)
},
handleBatchCopyConfirm() {
this.$refs.batchCopyForm.validate((valid) => {
if (valid) {
this.$emit('handleBatchCopyConfirm', this.selectData?.selectMerchantObj)
}
})
},
handleBatchCopyClose() {
this.$emit('handleBatchCopyClose')
}
}
}
</script>
<style lang="scss">
.tips{
font-size: 14px;
color: #999;
}
</style>
<!-- 关联门店弹窗 -->
<template>
<d2-dialog :title="title" :is-visible.sync="relateStoreVisible" width="70%" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="merchantName" label="商户名称" align="center">
</el-table-column>
<el-table-column prop="merchantId" label="商户号" align="center">
</el-table-column>
<el-table-column prop="yqMerchantName" label="商户类型" align="center">
<template slot-scope="scope">
<span>{{merchantClassifyList.find(item => item.confId == scope.row.merchantType).confLabel}}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="yqMerchantName" label="服务对接" align="center">
</el-table-column>
<el-table-column prop="yqMerchantId" label="服务对接商户号" align="center">
</el-table-column> -->
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<el-table class="tableBox table" :data="selectedData" border height="464px">
<el-table-column prop="merchantName" label="商户名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span>
</template>
</el-table-column>
<el-table-column prop="merchantId" label="商户号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantId }}</span>
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
</d2-dialog>
</template>
<script>
import { merchantClassifyList } from '@/common/constants.js'
export default {
name: "RelateStoreDialog",
data() {
return {
merchantClassifyList,
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20
}
},
props: {
title: {
type: String,
default: "上架商户"
},
relateStoreVisible: {
type: Boolean,
default: false
},
storeApi: {
type: Function,
default: () => { }
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => { }
},
selectedScene: {
type: Number
}
},
mounted() {
this.selectedData = this.storeSelected
this.getSelectingList()
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.merchantId)
this.selectingData.forEach((item) => {
exitIds.includes(item.merchantId) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
const _storeSearchForm = this.storeSearchForm
// 会员权益/积分商城获取账户中心所有门店 接口不同 接口新增查询参数merchantName 不需单独处理
// if ([0, 4].includes(this.selectedScene)) {
// // 会员权益,积分商城场景查询门店名称参数
// _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件
// }
this.storeApi({
...this.storeSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize,
merchantTypeList: [6, 7, 8]
}).then((res) => {
res?.list?.forEach((val) => {
// 账户中心门店返回商户号字段是merchantNo
if (val.merchantNo) val.merchantId = Number(val.merchantNo)
val?.sceneList?.forEach((subVal) => {
if (subVal.scene == this.selectedScene) {
val.yqMerchantId = subVal?.yqMerchant?.merchantId || "-"
val.yqMerchantName = subVal?.yqMerchant?.merchantName || "-"
}
})
})
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.merchantId === row.merchantId
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.merchantId !== row.merchantId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.merchantId === item.merchantId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(
(item) => item.merchantId !== row.merchantId
)
const obj = this.selectingData.find((v) => v.merchantId == row.merchantId)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
handleRelateStoreClose() {
this.$emit("handleRelateStoreClose")
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
<template>
<div class="store-table">
<el-table :data="merchantGoodsRefList" style="width: 100%" :header-row-style="headerRowStyle"
header-cell-class-name="header-cell-class-name" border>
<el-table-column align="center" width="60px" label="序号" type="index" />
<el-table-column prop="merchantName" label="商户名称" align="center" />
<el-table-column prop="merchantId" label="商户号" align="center" />
<el-table-column prop="yqMerchantName" label="商户类型" align="center">
<template slot-scope="scope">
<span>{{merchantClassifyList.find(item => item.confId == scope.row.merchantType).confLabel}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" v-if="!isDetail" width="90">
<template slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { merchantClassifyList } from '@/common/constants.js'
export default {
name: 'RelateProTable',
props: {
merchantGoodsRefList: {
type: Array,
default: () => { }
},
isDetail: {
type: Boolean,
default: false
}
},
data() {
return {
merchantClassifyList
}
},
methods: {
handleDelete(item) {
this.$emit('handleDelete', item)
},
headerRowStyle() {
return {
height: '40px',
background: '#F2F4F7'
}
}
}
}
</script>
<style lang="scss" scoped>
.store-table {
margin-top: 15px;
}
::v-deep .header-cell-class-name {
height: 30px;
background: #F2F4F7;
}
::v-deep .el-table th {
padding: 0;
}
::v-deep .el-table__body-wrapper tr td {
padding: 8px 0 !important;
}
</style>
export const productList = [{
confId: 1,
confName: '基础产品'
}, {
confId: 2,
confName: '升级产品'
}]
export const baseSupplyModeList = [{
confId: 1,
confName: '嘀加'
}, {
confId: 2,
confName: '门店'
}]
// 太阳膜升级产品供货模式
export const upgradeSupplyModeList = [{
confId: 1,
confName: '嘀加'
}, {
confId: 3,
confName: '门店套码+嘀加'
}, {
confId: 4,
confName: '门店回收原厂+嘀加'
}, {
confId: 5,
confName: '服务商自采+嘀加'
}]
// 1.3场景 升级产品供货模式
export const crowdUpgradeSupplyModeList = [{
confId: 1,
confName: '嘀加'
}, {
confId: 2,
confName: '门店'
}]
// 套餐上架商品信息form表单
export const packageGoodsForm = [{
name: 'upgradeGoodsId',
label: '上架商品',
isRequired: true,
type: 'searchSelect',
optionList: [],
isClear: false,
optionId: 'confId',
optionNameLabel: 'confNameValue',
optionTypeNameLabel: 'confTypeNameValue',
width: '432px'
}, {
type: 'incidBox',
key: 'goodsType',
detailInfo: [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
label: '所属分类',
value: 'tempGoodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, {
name: 'position',
label: '上架部位',
type: 'radio',
radioGroupList: []
}, {
name: 'goodsAlias',
label: '商品别名',
type: 'input',
maxlength: 50,
width: '432px'
}, {
name: 'warrantyType',
label: '质保卡类型',
type: 'select',
isClear: false,
optionList: [{
confId: 0,
confName: '质保卡'
}, {
confId: 1,
confName: '质保权益卡'
}],
optionId: 'confId',
optionLabel: 'confName',
width: '432px'
}, {
name: 'upgradeSupplyMode',
label: '升级/产品供货模式',
type: 'radio',
index: 2,
radioGroupList: []
}, {
name: 'sellPrice',
label: '售价',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'minSellPrice',
label: '最低售价',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'upgradeProductCost',
label: '产品、升级成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'recoveryCost',
label: '回收成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'virtualAccountCost',
label: '虚拟对账成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'djCost',
label: '嘀加成本',
type: 'input',
width: '432px',
unit: true,
isDisabled: false,
handleInput: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}]
// 套餐查看详情form
export const packageGoodsDetail = [
{
name: 'upgradeGoodsName',
label: '上架商品',
type: 'incidBox',
key: 'goodsType',
detailInfo: [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
label: '所属分类',
value: 'tempGoodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, {
name: 'positionStr',
label: '上架部位'
}, {
name: 'goodsAlias',
label: '商品别名'
}, {
name: 'warrantyTypeStr',
label: '质保卡类型'
}, {
name: 'upgradeSupplyModeStr',
label: '升级产品供货模式'
}, {
name: 'sellPrice',
label: '售价',
unit: true
}, {
name: 'minSellPrice',
label: '最低售价',
unit: true
}, {
name: 'upgradeProductCost',
label: '产品、升级成本',
unit: true
}, {
name: 'recoveryCost',
label: '回收成本',
unit: true
}, {
name: 'virtualAccountCost',
label: '虚拟对账成本',
unit: true
}, {
name: 'djCost',
label: '嘀加成本',
unit: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
}
]
......@@ -66,9 +66,7 @@
}}</el-form-item>
</div>
<template v-for="(item, index) in financialObj.goodsTypeGroupRules[
editableTabsValue - 1
].expenseCategoryRules">
<template v-for="(item, index) in filteredExpenseCategoryRules">
<el-form-item :key="index" :label="item.expenseCategoryName">
<span>{{
getExpenseCategoryCalculateType(
......@@ -82,7 +80,9 @@
</div>
<tableAccount ref="tableAccount" :merchant-distribution-rules="financialObj.goodsTypeGroupRules[editableTabsValue - 1]
.merchantDistributionRules
" :table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
"
:owningMerchantDistributionRules="financialObj.goodsTypeGroupRules[editableTabsValue - 1].owningMerchantDistributionRules"
:table-select-options="tableSelectOptions" :classification-obj-select="tableClassificationObjSelect" />
</el-tab-pane>
</el-tabs>
</div>
......@@ -198,6 +198,14 @@ export default {
return [platformSideobj, merchantSideobj, serviceObj]
}
},
filteredExpenseCategoryRules() {
const allowedIds = [1, 2, 3, 701]
return this.financialObj.goodsTypeGroupRules[
this.editableTabsValue - 1
].expenseCategoryRules.filter(item =>
allowedIds.includes(item.expenseCategoryId)
)
}
},
watch: {
......@@ -312,7 +320,7 @@ export default {
console.log("this.settleTimeObj: ", this.settleTimeObj)
},
getExpenseCategoryCalculateType(value, num) {
if (!value || num == null) {
if (!value || value == 7 || num == null) {
return "-"
}
// console.log('num: ', num)
......
......@@ -74,7 +74,7 @@ export default {
},
methods: {
getExpenseCategoryCalculateType(value, num, name) {
if (!value || num == null) {
if (!value || value == 7 || num == null) {
return "-"
}
......
......@@ -146,13 +146,13 @@
| filterComputedData
}}
</el-form-item>
<el-form-item label="流量方分润:">
<el-form-item label="流量方收入:">
{{
$$(formData.createBusinessProduct, "trafficShareProfit")
| filterComputedData
}}
</el-form-item>
<el-form-item label="服务商分润:">
<el-form-item label="服务商收入:">
{{
$$(formData.createBusinessProduct, "serviceProviderProfit")
| filterComputedData
......
......@@ -87,13 +87,13 @@
| filterComputedData
}}
</el-form-item>
<el-form-item label="流量方分润:">
<el-form-item label="流量方收入:">
{{
$$(packageForm.createBusinessProduct, "trafficShareProfit")
| filterComputedData
}}
</el-form-item>
<el-form-item label="服务商分润:">
<el-form-item label="服务商收入:">
{{
$$(packageForm.createBusinessProduct, "serviceProviderProfit")
| filterComputedData
......
<!-- 2 - 分账金额设置 -->
<template>
<div class="division-rule">
<p class="edit-sub-title">
费用归属设置 (用于定义费用的业务归属)
</p>
<el-form class="formSty" ref="divisionRuleRef" :model="form2" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
<tr class="tableHeader">
<td>分账对象/分账类目</td>
<!-- <td>平台方分账金额</td> -->
<td v-for="(item, index) in radioList2" :key="index">
{{ item.applicationObjectName || item.expenseCategoryName }}
</td>
</tr>
<tr>
<td class="merchantNameTd p-b-20" v-if="!tableSelectOptionsId">
<p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
{{ item | filterMerchantType }}
</p>
</td>
<td class="merchantNameTd p-b-20" v-if="tableSelectOptionsId">
<p :title="item.merchantName" v-for="(item, index) in tableSelectOptions" :key="index">
{{ item.merchantName }}
</p>
</td>
<td class="p-b-20" v-for="(item, index) in radioList2" :key="index + 'radioList'">
<div class="line-td is-required el-form-item--medium wrap">
<p v-for="(el, index) in tableSelectOptions" :key="index" class="el-radio-group">
<span v-if="!tableSelectOptionsId" :class="[
'el-radio__input',
form2['id' + item.expenseCategoryId] == el.merchantId
? 'is-checked'
: ''
]">
<span class="el-radio__inner"></span>
</span>
<span v-if="tableSelectOptionsId" :class="[
'el-radio__input',
form2['id' + item.expenseCategoryId] == el.targetMerchantType
? 'is-checked'
: ''
]">
<span class="el-radio__inner"></span>
</span>
</p>
</div>
</td>
</tr>
</table>
</el-form-item>
</el-form>
<p class="edit-sub-title">
实际分账设置 (用于定义费用的实际分账归属)
</p>
<el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
......@@ -67,6 +120,12 @@ export default {
return []
}
},
owningMerchantDistributionRules: {
type: Array,
default: () => {
return []
}
},
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: {
......@@ -92,6 +151,9 @@ export default {
form: {
// settleTimeType: 1
},
form2: {
// settleTimeType: 1
},
platformSideLabel: 0,
merchantAccountInfo: {},
partnerSettleAccountModel: "",
......@@ -131,7 +193,7 @@ export default {
const obj = this.classificationObjSelect
let list = [],
arr = [],
arrIdx = [1, 2, 302, 701, 4]
arrIdx = [1, 2, 701, 4]
for (const key in obj) {
obj[key].map((item) => {
if (
......@@ -150,6 +212,29 @@ export default {
// console.log("list", arr)
return arr
},
radioList2: function () {
const obj = this.classificationObjSelect
let list = []
let arr = []
const arrIdx = [1, 2, 701, 4]
for (const key in obj) {
obj[key].map((item) => {
if (
arrIdx.includes(item.id) ||
arrIdx.includes(item.expenseCategoryId)
) {
list.push(item)
}
})
}
arr = list.filter((item) => {
return (
arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId)
)
})
// console.log('list', arr)
return arr
},
tableSelectOptionsId() {
return this.tableSelectOptions.some(item => item.merchantId == 1)
}
......@@ -158,6 +243,7 @@ export default {
classificationObjSelect: {
handler() {
this.initList()
this.initList2()
},
deep: true,
immediate: true
......@@ -165,6 +251,7 @@ export default {
merchantDistributionRules: {
handler() {
this.initList()
this.initList2()
},
deep: true
// immediate: true
......@@ -185,7 +272,6 @@ export default {
// console.log(this.merchantDistributionRules)
const obj = this.classificationObjSelect
// 多商户处理
const form = {}
if (this.tableSelectOptionsId) {
for (const key in obj) {
......@@ -220,6 +306,57 @@ export default {
this.form = form
// console.log(this.form, "this.form")
},
initList2() {
// console.log('initList')
// this.merchantDistributionRules
// console.log(this.merchantDistributionRules)
const obj = this.classificationObjSelect
const form = {}
// console.log('obj', obj)
// 判断是不是多商户的,是改一下结构绑定
if (this.tableSelectOptionsId) {
for (const key in obj) {
obj[key].map((item) => {
// 数字转字符串
const name = "id" + item.expenseCategoryId
// console.log(name, item.id || item.expenseCategoryId, 'item.id')
// 做回显用数据
const findObj = this.owningMerchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId
})
form[name] = findObj?.targetMerchantType || ""
})
}
} else {
for (const key in obj) {
obj[key].map((item) => {
// 数字转字符串
const name = "id" + item.expenseCategoryId
// console.log(name, item.id || item.expenseCategoryId, 'item.id')
// 做回显用数据
const findObj = this.owningMerchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId
})
// console.log('findObj', findObj)
// if (findObj?.targetMerchantType == 3 && tableSelectOptionsId) {
// this.copyMerchantInfo = findObj
// }
// 还要跟存在现在的选项里面
// console.log(name)
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId })
// console.log(optIndex, 'optIndex')
// form[name] = parseInt(findObj?.merchantId) || ""
// console.log(findObj, tableSelectOptionsId)
// console.log(findObj.targetMerchantType == 3 && tableSelectOptionsId)
form[name] = findObj?.merchantId || ""
})
}
}
// 判断id是否有在选项里面 没有就去掉
this.form2 = form
console.log(this.form2, 'this.form2')
},
changFormList() {
console.log(this.form, "this.form")
// 判断id是否有在选项里面 没有就去掉
......
......@@ -216,7 +216,7 @@ export default {
merchantLevelList: [],
PlatformLevelList: [
{
merchantId: "-1",
merchantId: -1,
showMerchantName: "嘀加智慧云",
merchantName: "嘀加智慧云",
userType: 1
......
......@@ -151,13 +151,13 @@
| filterComputedData
}}
</el-form-item>
<el-form-item label="流量方分润:">
<el-form-item label="流量方收入:">
{{
$$(formData.createBusinessProduct, "trafficShareProfit")
| filterComputedData
}}
</el-form-item>
<el-form-item label="服务商分润:">
<el-form-item label="服务商收入:">
{{
$$(formData.createBusinessProduct, "serviceProviderProfit")
| filterComputedData
......
......@@ -87,13 +87,13 @@
| filterComputedData
}}
</el-form-item>
<el-form-item label="流量方分润:">
<el-form-item label="流量方收入:">
{{
$$(packageForm.createBusinessProduct, "trafficShareProfit")
| filterComputedData
}}
</el-form-item>
<el-form-item label="服务商分润:">
<el-form-item label="服务商收入:">
{{
$$(packageForm.createBusinessProduct, "serviceProviderProfit")
| filterComputedData
......
<!-- 2 - 分账金额设置 -->
<template>
<div class="division-rule">
<p class="edit-sub-title">
费用归属设置 (用于定义费用的业务归属)
</p>
<el-form class="formSty" ref="divisionRuleRef2" :model="form2" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
<tr class="tableHeader">
<td>分账对象/分账类目</td>
<!-- <td>平台方分账金额</td> -->
<td v-for="(item, index) in radioList2" :key="index">
{{ item.applicationObjectName || item.expenseCategoryName }}
</td>
</tr>
<tr>
<td class="merchantNameTd p-b-20">
<p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
{{ item | filterMerchantType }}
</p>
</td>
<td class="p-b-20" v-for="(item, index) in radioList2" :key="index + 'radioList'">
<el-form-item label-width="0" :prop="`id${item.expenseCategoryId}`" :rules="[
{
required: true,
message: `请选择${item.applicationObjectName}`,
trigger: 'change'
}
]">
<el-radio-group v-model="form2['id' + item.expenseCategoryId]" @change="
(e) => handleClearValid2(e, 'id' + item.expenseCategoryId)
">
<el-radio v-for="(el, index2) in tableSelectOptions" :key="index2" :label="el.merchantId" />
</el-radio-group>
</el-form-item>
</td>
</tr>
</table>
</el-form-item>
</el-form>
<p class="edit-sub-title">
实际分账设置 (用于定义费用的实际分账归属)
</p>
<el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
......@@ -28,7 +69,7 @@
<el-radio-group v-model="form['id' + item.expenseCategoryId]" @change="
(e) => handleClearValid(e, 'id' + item.expenseCategoryId)
">
<el-radio v-for="(el, index) in tableSelectOptions" :key="index" :label="+el.merchantId" />
<el-radio v-for="(el, index2) in tableSelectOptions" :key="index2" :label="el.merchantId" />
</el-radio-group>
</el-form-item>
</td>
......@@ -40,7 +81,6 @@
</template>
<script>
import { mapGetters } from "vuex"
// import { userType } from '@/common/constants'
export default {
name: "TableAccount",
......@@ -56,6 +96,12 @@ export default {
return []
}
},
owningMerchantDistributionRules: {
type: Array,
default: () => {
return []
}
},
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: {
......@@ -82,6 +128,9 @@ export default {
form: {
// settleTimeType: 1
},
form2: {
// settleTimeType: 1
},
platformSideLabel: 0,
merchantAccountInfo: {},
partnerSettleAccountModel: "",
......@@ -139,15 +188,36 @@ export default {
})
// console.log('list', arr)
return arr
},
radioList2: function () {
const obj = this.classificationObjSelect
let list = []
let arr = []
const arrIdx = [1, 2, 302, 701, 4]
for (const key in obj) {
obj[key].map((item) => {
if (
arrIdx.includes(item.id) ||
arrIdx.includes(item.expenseCategoryId)
) {
list.push(item)
}
})
}
arr = list.filter((item) => {
return (
arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId)
)
})
// console.log('list', arr)
return arr
}
// ...mapGetters("goodsInfoData", {
// shelfType: "shelfType"
// })
},
watch: {
classificationObjSelect: {
handler() {
this.initList()
this.initList2()
},
deep: true,
immediate: true
......@@ -155,6 +225,7 @@ export default {
merchantDistributionRules: {
handler() {
this.initList()
this.initList2()
},
deep: true
// immediate: true
......@@ -207,6 +278,43 @@ export default {
this.form = form
console.log(this.form, 'this.form')
},
initList2() {
// console.log('initList')
// this.merchantDistributionRules
// console.log(this.merchantDistributionRules)
const obj = this.classificationObjSelect
const tableSelectOptionsId = this.tableSelectOptions.some(item => item.merchantId == 1)
const form = {}
// console.log('obj', obj)
// 判断是不是多商户的,是改一下结构绑定
for (const key in obj) {
obj[key].map((item) => {
// 数字转字符串
const name = "id" + item.expenseCategoryId
// console.log(name, item.id || item.expenseCategoryId, 'item.id')
// 做回显用数据
const findObj = this.owningMerchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId
})
// console.log('findObj', findObj)
// if (findObj?.targetMerchantType == 3 && tableSelectOptionsId) {
// this.copyMerchantInfo = findObj
// }
// 还要跟存在现在的选项里面
// console.log(name)
// const optIndex = this.tableSelectOptions.findIndex((opt) => { return opt.merchantId == findObj?.merchantId })
// console.log(optIndex, 'optIndex')
// form[name] = parseInt(findObj?.merchantId) || ""
// console.log(findObj, tableSelectOptionsId)
// console.log(findObj.targetMerchantType == 3 && tableSelectOptionsId)
form[name] = findObj?.merchantId || ""
})
}
// 判断id是否有在选项里面 没有就去掉
this.form2 = form
console.log(this.form, 'this.form')
},
changFormList() {
// console.log(this.form,'this.form')
// 判断id是否有在选项里面 没有就去掉
......@@ -216,6 +324,85 @@ export default {
return opt.merchantId == element
}) == -1 && (this.form[key] = "")
}
for (const key in this.form2) {
const element = this.form2[key]
this.tableSelectOptions.findIndex((opt) => {
return opt.merchantId == element
}) == -1 && (this.form2[key] = "")
}
this.$forceUpdate()
},
handleClearValid2(e, validField) {
this.$forceUpdate()
// this.handleConfirm()
// console.log('validField', validField)
this.$refs.divisionRuleRef2.clearValidate(validField)
},
handleConfirm2() {
// console.log(this.merchantInfo)
return new Promise((resolve, reject) => {
this.$refs.divisionRuleRef2.validate((valid) => {
if (valid) {
// this.form
const merchantDistributionRules = this.radioList2.reduce(
(prev, next) => {
const id = this.form2["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
// (item) => item.merchantId == id
(item) => (item.merchantId == id) || (item.targetMerchantType == 3 && item.targetMerchantLevel == id)
)
// console.log(merchantObj, 'merchantObj')
if (merchantObj?.merchantId == 1) {
merchantObj.merchantId = this.copyMerchantInfo.merchantId
merchantObj.merchantName = this.copyMerchantInfo.merchantName
}
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
},
[]
)
resolve(merchantDistributionRules)
} else {
resolve(false)
}
})
})
},
getTableAccountParams2() {
const merchantDistributionRules = this.radioList2.reduce((prev, next) => {
const id = this.form2["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
// (item) => item.merchantId == id
// (item) => (item.merchantId == id) || item.targetMerchantLevel == id
(item) => (item.merchantId == id) || (item.targetMerchantType == 3 && item.targetMerchantLevel == id)
)
if (merchantObj?.merchantId == 1) {
merchantObj.merchantId = this.copyMerchantInfo.merchantId
merchantObj.merchantName = this.copyMerchantInfo.merchantName
}
console.log(merchantObj, 'merchantObj')
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
}, [])
return merchantDistributionRules
},
handleClearValid(e, validField) {
this.$forceUpdate()
......
<!-- 2 - 分账金额设置 -->
<template>
<div class="division-rule">
<p class="edit-sub-title">
费用归属设置 (用于定义费用的业务归属)
</p>
<el-form class="formSty" ref="divisionRuleRef2" :model="form2" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
<tr class="tableHeader">
<td>分账对象/分账类目</td>
<!-- <td>平台方分账金额</td> -->
<td v-for="(item, index) in radioList2" :key="index">
{{ item.applicationObjectName || item.expenseCategoryName }}
</td>
</tr>
<tr>
<td class="merchantNameTd p-b-20">
<p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
{{ item | filterMerchantType }}
</p>
</td>
<td class="p-b-20" v-for="(item, index) in radioList2" :key="index + 'radioList'">
<el-form-item label-width="0" :prop="`id${item.expenseCategoryId}`" :rules="[
{
required: true,
message: `请选择${item.applicationObjectName}`,
trigger: 'change'
}
]">
<el-radio-group v-model="form2['id' + item.expenseCategoryId]" @change="
(e) => handleClearValid2(e, 'id' + item.expenseCategoryId)
">
<el-radio v-for="(el, index) in tableSelectOptions" :key="index" :label="+el.targetMerchantType" />
</el-radio-group>
</el-form-item>
</td>
</tr>
</table>
</el-form-item>
</el-form>
<p class="edit-sub-title">
实际分账设置 (用于定义费用的实际分账归属)
</p>
<el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
......@@ -40,8 +81,6 @@
</template>
<script>
import { mapGetters } from "vuex"
// import { userType } from '@/common/constants'
export default {
name: "TableAccount",
props: {
......@@ -56,7 +95,12 @@ export default {
return []
}
},
owningMerchantDistributionRules: {
type: Array,
default: () => {
return []
}
},
// 分账对象选项 1:平台方 2:服务商 3:流量方 4:子商户
tableSelectOptions: {
type: Array,
......@@ -72,8 +116,6 @@ export default {
3: "流量方",
4: "平台方"
}
const type = val.targetMerchantType
// ${name[type]}:
return ` ${val.merchantName}`
}
},
......@@ -83,6 +125,9 @@ export default {
form: {
// settleTimeType: 1
},
form2: {
// settleTimeType: 1
},
platformSideLabel: 0,
merchantAccountInfo: {},
partnerSettleAccountModel: "",
......@@ -134,7 +179,30 @@ export default {
})
// console.log('list', arr)
return arr
}
},
radioList2: function () {
const obj = this.classificationObjSelect
let list = []
let arr = []
const arrIdx = [1, 2, 302, 701, 4]
for (const key in obj) {
obj[key].map((item) => {
if (
arrIdx.includes(item.id) ||
arrIdx.includes(item.expenseCategoryId)
) {
list.push(item)
}
})
}
arr = list.filter((item) => {
return (
arrIdx.includes(item.id) || arrIdx.includes(item.expenseCategoryId)
)
})
// console.log('list', arr)
return arr
},
// ...mapGetters("goodsInfoData", {
// shelfType: "shelfType"
// })
......@@ -143,6 +211,7 @@ export default {
classificationObjSelect: {
handler() {
this.initList()
this.initList2()
},
deep: true,
immediate: true
......@@ -150,6 +219,7 @@ export default {
merchantDistributionRules: {
handler() {
this.initList()
this.initList2()
},
deep: true
// immediate: true
......@@ -187,6 +257,30 @@ export default {
this.form = form
// console.log(this.form,'this.form')
},
initList2() {
// console.log('initList')
// this.merchantDistributionRules
// console.log(this.merchantDistributionRules)
const obj = this.classificationObjSelect
const form = {}
// console.log('obj', obj)
// 判断是不是多商户的,是改一下结构绑定
for (const key in obj) {
obj[key].map((item) => {
// 数字转字符串
const name = "id" + item.expenseCategoryId
// console.log(name, item.id || item.expenseCategoryId, 'item.id')
// 做回显用数据
const findObj = this.owningMerchantDistributionRules.find((el) => {
return el.expenseCategoryId == item.expenseCategoryId
})
form[name] = findObj?.targetMerchantType || ""
})
}
// 判断id是否有在选项里面 没有就去掉
this.form2 = form
console.log(this.form, 'this.form')
},
changFormList() {
// console.log(this.form,'this.form')
// 判断id是否有在选项里面 没有就去掉
......@@ -197,6 +291,78 @@ export default {
}) == -1 && (this.form[key] = "")
}
},
handleClearValid2(e, validField) {
this.$forceUpdate()
// this.handleConfirm()
// console.log('validField', validField)
this.$refs.divisionRuleRef2.clearValidate(validField)
},
handleConfirm2() {
// console.log(this.merchantInfo)
return new Promise((resolve, reject) => {
this.$refs.divisionRuleRef2.validate((valid) => {
if (valid) {
// this.form
const merchantDistributionRules = this.radioList2.reduce(
(prev, next) => {
const id = this.form2["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
// (item) => item.merchantId == id
(item) => item.targetMerchantType == id
)
// console.log(merchantObj, 'merchantObj')
// if (merchantObj?.merchantId == 1) {
// merchantObj.merchantId = this.copyMerchantInfo.merchantId
// merchantObj.merchantName = this.copyMerchantInfo.merchantName
// }
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
},
[]
)
resolve(merchantDistributionRules)
} else {
resolve(false)
}
})
})
},
getTableAccountParams2() {
const merchantDistributionRules = this.radioList2.reduce((prev, next) => {
const id = this.form2["id" + next.expenseCategoryId]
// console.log(id)
const merchantObj = this.tableSelectOptions.find(
// (item) => item.merchantId == id
// (item) => (item.merchantId == id) || item.targetMerchantLevel == id
(item) => item.targetMerchantType == id
)
// if (merchantObj?.merchantId == 1) {
// merchantObj.merchantId = this.copyMerchantInfo.merchantId
// merchantObj.merchantName = this.copyMerchantInfo.merchantName
// }
console.log(merchantObj, 'merchantObj')
next = {
...next,
expenseCategoryId: next.expenseCategoryId,
...merchantObj
}
// console.log(next, 'next')
// const name = 'id' + next.id
// prev[name] = this.form[name]
prev.push(next)
return prev
}, [])
return merchantDistributionRules
},
handleClearValid(e, validField) {
this.$forceUpdate()
// this.handleConfirm()
......
......@@ -132,17 +132,19 @@ export default {
contrastValue() {
const val = this.userInput
if (Array.isArray(val)) {
if(val[0] == '-') {
if (val[0] == '-') {
val[0] = null
}
if(val[1] == '-') {
if (val[1] == '-') {
val[1] = null
}
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
if (val[0] && val[1]) {
if (+val[0] > +val[1]) {
val[1] = null
this.tipsShow = true
} else {
this.tipsShow = false
}
}
}
}
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="imgCon">
<img src="../images/step.png"
class="imgSize">
</div>
<div class="form_div">
<el-form class="edit-sub-block"
label-width="160px"
:inline="true">
<div class="itemDiv">
<el-form-item label="开票主体:"
class="halfItem">
{{ infoForm.invoiceSubjectName ? infoForm.invoiceSubjectName : "-" }}
</el-form-item>
<el-form-item label="月开票总额上限/元:"
class="halfItem">
{{ infoForm.monthlyLimit ? infoForm.monthlyLimit : "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="切换主体:"
class="halfItem">
{{ infoForm.switchSubjectName ? infoForm.switchSubjectName : "-" }}
</el-form-item>
<el-form-item label="预警通知邮箱:"
class="halfItem"
:title="infoForm.warningEmails">
{{ infoForm.warningEmails ? (infoForm.warningEmails.length > 30 ? (infoForm.warningEmails.slice(0, 30) + '...') : infoForm.warningEmails) : '' }}
</el-form-item>
</div>
</el-form>
<div class="div-optShow">
<div class="div-optShow-title">操作结果</div>
<div class="div-optShow-content">
当前开票主体<span class="contentSpan">{{ infoForm.invoiceSubjectName }}</span>,
月开票额上限达到<span class="contentSpan">{{ infoForm.monthlyLimitShow }}</span>元时,
切换开票主体为<span class="contentSpan">{{ infoForm.switchSubjectName }}</span>,
并邮件通知<span class="contentSpan">{{ infoForm.warningEmailsShow }}</span>
</div>
</div>
<div>
<el-form label-width="160px"
:model="infoForm"
:inline="true">
<el-form-item label="规则生效状态:">
<el-switch v-model="infoForm.isActive"
active-value="Y"
inactive-value="N"
disabled>
</el-switch>
</el-form-item>
</el-form>
</div>
<div v-if="paramsObj">
<div class="div-title">操作日志</div>
<div class="d2-container-content">
<d2-table ref="recordTable"
:has-page="false"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
</d2-table>
</div>
</div>
</div>
</div>
</baseDialog>
</div>
</template>
<script>
import {
getSaleCompany,
getByIdForRule,
getLogsForRule
} from "@api/invoiceManage"
import { Util, deepClone } from "@/common/util"
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "EditRuleDialog",
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() {
this.getSaleCompany()
if (this.paramsObj) {
this.getByIdForRule()
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "规则详情",
width: "1080px"
}
},
infoForm: {
invoiceSubjectCode: '',
invoiceSubjectName: '__________',
switchSubjectCode: '',
switchSubjectName: '__________',
monthlyLimit: '',
warningEmails: '',
monthlyLimitShow: '__________',
warningEmailsShow: '__________',
isActive: 'Y'
},
options: [],
loading: true,
searchForm: {},
searchFormSearch: {},
getListApi: getLogsForRule,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "操作项",
prop: "action",
formatter: (cellValue) => {
return this.actionOpt.find(item => item.confId === cellValue.action)?.confValue
}
},
{
label: '操作时间',
prop: 'actionTime',
formatter: (cellValue) => {
return cellValue.actionTime ? Util.dateFormate(cellValue.actionTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: "操作人",
prop: "actionBy"
}
]
},
actionOpt: deepClone(actionOpt)
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchForm.id = this.paramsObj.id
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getByIdForRule() {
getByIdForRule({ id: this.paramsObj.id }).then((res) => {
this.infoForm = res
this.infoForm.monthlyLimitShow = deepClone(this.infoForm.monthlyLimit)
this.infoForm.warningEmailsShow = deepClone(this.infoForm.warningEmails)
this.loading = false
})
},
getSaleCompany() {
getSaleCompany({}).then((res) => {
this.options = res
})
}
}
}
</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>
......@@ -14,7 +14,7 @@
<div slot="invoiceAmountHtml">
<input-range start-placeholder="最小金额"
end-placeholder="最大金额"
regRuleStr="priceReg_negative_input"
reg-rule-str="priceReg_negative_input"
:display-value="searchForm.invoiceAmount"></input-range>
</div>
</d2-search>
......@@ -39,17 +39,22 @@
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170204']" />
</span>
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9170205']" />
</span>
<span style="margin-right: 10px" v-if="['NOT_RED','RED_FAIL'].includes(scope.scope.redFlag) && scope.scope.invoiceType == '1'">
<auth-button :data="scope.scope" :show-btn-ids="['9170206']" />
</span>
</div>
<div slot="auth-button"
slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope"
:show-btn-ids="['9170204']" />
</span>
<span style="margin-right: 10px">
<auth-button :data="scope.scope"
:show-btn-ids="['9170205']" />
</span>
<span style="margin-right: 10px"
v-if="['NOT_RED','RED_FAIL'].includes(scope.scope.redFlag) && scope.scope.invoiceType == '1'">
<auth-button :data="scope.scope"
:show-btn-ids="['9170206']" />
</span>
</div>
</d2-table>
</div>
</d2-container>
......@@ -59,7 +64,10 @@
:params-obj="recordInfo"
@dialogClose="closeDetailDialog" />
<!-- 冲红 -->
<RedDialog :redVisible="redVisible" v-if="redVisible" :redInfo="redInfo" @handleRedClose="handleRedClose"></RedDialog>
<RedDialog :red-visible="redVisible"
v-if="redVisible"
:red-info="redInfo"
@handleRedClose="handleRedClose"></RedDialog>
</div>
</template>
......@@ -100,7 +108,8 @@ export default {
bizTradeNo: '',
buyerTaxpayerNum: '',
invoiceAmount: [],
invoiceType: ''
invoiceType: '',
taxpayerChineseName: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -196,6 +205,12 @@ export default {
optionId: "confId",
optionLabel: "confValue",
optionsName: "InvoicingOpt"
}, {
label: '销售方名称',
name: 'taxpayerChineseName',
type: 'input',
maxlength: '50',
isClear: true
}],
getListApi: invoiceInfoPage,
tableParams: {
......@@ -224,6 +239,10 @@ export default {
prop: 'buyerTaxpayerNum',
width: '200px'
}, {
label: '销售方名称',
prop: 'taxpayerChineseName',
width: '200px'
}, {
label: '数电票号码',
prop: 'electronicInvoiceNo',
width: '200px'
......@@ -401,7 +420,8 @@ export default {
bizTradeNo: '',
buyerTaxpayerNum: '',
invoiceAmount: [],
invoiceType: ''
invoiceType: '',
taxpayerChineseName: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
......
......@@ -173,6 +173,14 @@ export default {
{
confId: "撤销抵扣",
confLabel: "撤销抵扣"
},
{
confId: "购物兑换",
confLabel: "购物兑换"
},
{
confId: "售后返还",
confLabel: "售后返还"
}
]
},
......@@ -230,7 +238,7 @@ export default {
},
created() {
this.staffId = this.$route.query.staffId
},
methods: {
//新增抵扣
......@@ -372,7 +380,7 @@ export default {
confId: "错单抵扣",
confLabel: "错单抵扣"
}
]
]
}
this.getOptionsList()
})
......@@ -433,4 +441,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -12,28 +12,45 @@
<span class="phone">电话:<span class="label">{{ detailInfo.contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="address-info"
v-if="detailInfo.purchaseOrderRemark">
<span class="address">备注:<span class="label">{{ detailInfo.purchaseOrderRemark }}</span></span>
</div>
<div class="address-info" v-if="detailInfo.purchaseOrderRemark">
<span class="address">备注:<span class="label">{{ detailInfo.purchaseOrderRemark }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage"
@refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<div slot="nowPurNum" slot-scope="scope">
<div
v-if="detailInfo.tableData[scope.index].purchaseNumber == detailInfo.tableData[scope.index].goodsNumber">
{{ detailInfo.tableData[scope.index].shipper || '未分配' }}</div>
<div
v-else-if="detailInfo.tableData[scope.index].shipper && detailInfo.tableData[scope.index].purchaseNumber != 0">
{{ detailInfo.tableData[scope.index].shipper }}</div>
<div
v-else-if="detailInfo.tableData[scope.index].purchaseNumber != 0 && !detailInfo.tableData[scope.index].shipper">
未分配</div>
<el-select v-else v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable>
<el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid">
</el-option>
</el-select>
<span v-if="scope.scope.refundStatus != 'Y'">
<div
v-if="detailInfo.tableData[scope.index].purchaseNumber == detailInfo.tableData[scope.index].goodsNumber">
{{ detailInfo.tableData[scope.index].shipper || '未分配' }}</div>
<div
v-else-if="detailInfo.tableData[scope.index].shipper && detailInfo.tableData[scope.index].purchaseNumber != 0">
{{ detailInfo.tableData[scope.index].shipper }}</div>
<div
v-else-if="detailInfo.tableData[scope.index].purchaseNumber != 0 && !detailInfo.tableData[scope.index].shipper">
未分配</div>
<el-select v-else v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable>
<el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid">
</el-option>
</el-select>
</span>
<span v-else>--</span>
</div>
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
<span>{{ scope.scope.upgradeGoodsName }}</span>
</div>
</template>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>-</div>
</template>
</d2-table>
</div>
<div class="footer">
......@@ -110,6 +127,7 @@ export default {
tableColumns: [
{
label: '商品名称',
addHtml: 'upgradeGoodsName',
prop: 'upgradeGoodsName'
},
{
......@@ -120,7 +138,11 @@ export default {
{
label: '规格',
prop: 'specificationData'
},
{
label: '适用车型',
addHtml: 'carName',
width: 200,
},
{
label: '系列',
......@@ -163,6 +185,11 @@ export default {
label: '发货方',
prop: '',
addHtml: 'nowPurNum'
},
{
label: '备注',
prop: 'remark',
width: 150
}
]
},
......@@ -170,6 +197,15 @@ export default {
detailInfo: {}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.carTypeName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
mounted() {
this.getStaffList()
},
......@@ -234,6 +270,11 @@ export default {
</script>
<style lang="scss" scoped>
.car-type-list {
max-height: 300px;
overflow-y: scroll;
}
.addressTitle {
display: flex;
align-items: center;
......@@ -252,6 +293,13 @@ export default {
}
}
.return {
width: 15px;
height: 14px;
margin-right: 2px;
vertical-align: middle;
}
.address-info {
display: flex;
box-sizing: border-box;
......
<!-- 审核 -->
<template>
<baseDialog
:dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm"
>
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" class="accountDailog"
@handleClick="handleAddConfirm">
<div class="reject-dialog">
<glsx-combi-form
class="edit-form-container"
ref="editFormRef"
label-width="150px"
default-width="350px"
:form-ref="editChildRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules"
></glsx-combi-form>
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="150px" default-width="350px"
:form-ref="editChildRef" :form-obj="infoForm" :form-data="editFormData"
:form-rules="formRules"></glsx-combi-form>
<span :style="{ 'margin-left': '150px' }">{{ txtObj[fromPage] }}</span>
</div>
</baseDialog>
......@@ -115,6 +104,10 @@ export default {
this.getOptionsList("editFormData", false)
})
}
if (this.paramsObj?.sendOutMerchantId) {
this.infoForm.sendOutMerchantId = deepClone(this.paramsObj?.sendOutMerchantId)
}
},
methods: {
......@@ -135,7 +128,7 @@ export default {
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -158,7 +151,7 @@ export default {
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -218,9 +211,11 @@ export default {
color: #999999;
}
}
.edit-form-container {
::v-deep .el-textarea {
width: 432px !important;
.el-textarea__inner {
height: 70px !important;
font-family: auto;
......
<!-- 发货单详情弹窗 -->
<template>
<div>
<baseDialog title="详细信息"
:is-show.sync="detailVisible"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
width="1050px"
:no-cancel="true"
btn-ok-label="关闭"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<baseDialog title="详细信息" :is-show.sync="detailVisible" :config="dialogConfig.setting"
:dialog-config="dialogConfig.config" width="1050px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="stockMonthDailog">
<div class="addressTitle">
<img src="../images/addressIcon.webp"
alt=""
class="icon">
<img src="../images/addressIcon.webp" alt="" class="icon">
<span class="title">{{ recordInfo.merchantName }}</span>
</div>
<div class="address-info"
v-if="detailInfo[0]">
<div class="address-info" v-if="detailInfo[0]">
<span class="name">收货人:<span class="label">{{ detailInfo[0].contactName }}</span></span>
<span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span>
<span class="address">收货地址:<span
class="label">{{ detailInfo[0].contactAddress }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span>
</div>
<div class="address-info"
v-if="detailInfo[0].purchaseOrderRemark">
<span class="address">备注:<span class="label">{{ detailInfo[0].purchaseOrderRemark }}</span></span>
</div>
<div v-for="(itemList, index) in detailInfo"
:key="index">
<div class="address-info" v-if="detailInfo[0]">
<span class="address">备注:<span class="label">{{ detailInfo[0].purchaseOrderRemark }}</span></span>
</div>
<div v-for="(itemList, index) in detailInfo" :key="index">
<div class="detail-info">
<div>
发货单号:
......@@ -44,22 +32,15 @@
<span>{{ itemList.deliveryDate }}</span>
</div>
</div>
<d2-table ref="recordTable"
:table-data="itemList.deliveryDetailList"
:table-params="tableParams"
:has-page="false">
<span slot="deliveryCard"
slot-scope="scope">
<template
v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1">
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams"
:has-page="false">
<span slot="deliveryCard" slot-scope="scope">
<template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>+{{ scope.scope.deliveryCardList.length }} </span>
<el-button mini
type="text"
@click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button>
<el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button>
</template>
<template
v-else-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length == 1">
<template v-else-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length == 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>{{ scope.scope.deliveryCardList[0] }}</span>
<!-- <el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button> -->
......@@ -70,20 +51,11 @@
</div>
</div>
</baseDialog>
<baseDialog title="查看发货卡号"
:config="carDialogConfig.setting"
:dialog-config="carDialogConfig.config"
:is-show.sync="handleDeliveryCardVisible"
width="500px"
:no-cancel="true"
btn-ok-label="关闭"
@closeDialog="handleDeliveryCardVisible = false"
@confirmDialog="handleDeliveryCardVisible = false">
<d2-table class="deliveryCardCon"
ref="recordTable"
:table-data="deliveryCardList"
:table-params="innerParams"
:has-page="false">
<baseDialog title="查看发货卡号" :config="carDialogConfig.setting" :dialog-config="carDialogConfig.config"
:is-show.sync="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="handleDeliveryCardVisible = false" @confirmDialog="handleDeliveryCardVisible = false">
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="deliveryCardList" :table-params="innerParams"
:has-page="false">
</d2-table>
</baseDialog>
</div>
......@@ -279,7 +251,7 @@ export default {
font-size: 14px;
color: #666666;
> span {
>span {
margin-right: 20px;
margin-bottom: 10px;
}
......
<template>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
@closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon">
......@@ -11,25 +11,27 @@
<span class="phone">电话:<span class="label">{{ detailInfo.contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div>
<div class="address-info"
v-if="detailInfo.purchaseOrderRemark">
<div class="address-info" v-if="detailInfo.purchaseOrderRemark">
<span class="address">备注:<span class="label">{{ detailInfo.purchaseOrderRemark }}</span></span>
</div>
<div class="address-info"
v-if="detailInfo.terminateDeliveryInstruction">
<div class="address-info" v-if="detailInfo.terminateDeliveryInstruction">
<span class="address">结束发货说明:<span class="label">{{ detailInfo.terminateDeliveryInstruction }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable"
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
<span>{{ scope.scope.upgradeGoodsName }}</span>
</div>
</template>
<template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
{{ scope.scope.filmRollList[0] }}
</div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
<el-popover placement="top"
width="200"
trigger="hover">
<el-popover placement="top" width="200" trigger="hover">
<div class="film-roll-box">
<div class="title">膜卷号</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex">
......@@ -46,6 +48,15 @@
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
</div>
</template>
<template slot="carName" slot-scope="scope">
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">{{ item.carTypeName }}</div>
</div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip>
<div v-else>-</div>
</template>
</d2-table>
</div>
<div class="examine-record" v-if="detailInfo.auditDetaiList && !paramsObj.factoryType">
......@@ -60,12 +71,13 @@
</span>
<span class="span-txt-two">审核人:{{ item.reviewedBy }}</span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span>
<span v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right">
<el-button type="text">
{{ item.remark ? (item.remark.length > 15 ? (item.remark.slice(0, 15) + '...') : item.remark) : '' }}
</el-button>
</el-tooltip>
<span v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark"
placement="right">
<el-button type="text">
{{ item.remark ? (item.remark.length > 15 ? (item.remark.slice(0, 15) + '...') : item.remark) : '' }}
</el-button>
</el-tooltip>
</span>
<span class="span-txt-two" v-if="[4, 6, 7].includes(item.status)">驳回原因:{{ item.rejectCause }}</span>
</div>
......@@ -115,12 +127,22 @@ export default {
}
}
},
filters: {
formatCar(list) {
console.log(list, 'list')
let str = list.map(item => {
return item.carTypeName
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
},
mounted() {
this.dynamicParams()
// this.getDetail()
},
data() {
return {
baseConfig,
dialogConfig: {
setting: {
showClose: true,
......@@ -139,6 +161,7 @@ export default {
tableColumns: [
{
label: '商品名称',
addHtml: 'upgradeGoodsName',
prop: 'upgradeGoodsName'
},
{
......@@ -149,7 +172,11 @@ export default {
{
label: '规格',
prop: 'specificationData'
},
{
label: '适用车型',
addHtml: 'carName',
width: 200
},
{
label: '系列',
......@@ -183,10 +210,17 @@ export default {
formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice
}
},
{
label: '备注',
prop: 'remark',
width: 150
}
]
},
detailInfo: {},
detailInfo: {
purchaseOrderRemark: '',
},
examineStatusClass: {
2: 'greenSp',
4: 'redSp',
......@@ -280,6 +314,18 @@ export default {
</script>
<style lang="scss" scoped>
.car-type-list {
max-height: 300px;
overflow-y: scroll;
}
.return {
width: 15px;
height: 14px;
margin-right: 2px;
vertical-align: middle;
}
.addressTitle {
display: flex;
align-items: center;
......@@ -325,10 +371,11 @@ export default {
}
}
.film-roll-box{
.film-roll-box {
font-size: 12px;
color: #666666;
.title{
.title {
font-weight: 500;
color: #3A3A3A;
margin-bottom: 8px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!