Commit 61603ec0 by zhangxw

四月份版本需求提交

1 parent 48808a50
Showing 50 changed files with 1189 additions and 295 deletions
......@@ -91,3 +91,9 @@ export function batchSetValidMinSellPrice(data) {
data.method = `${path}merchantGoodsInfo.updateBatchValidMinSellPrice`
return request(data, "post")
}
// 批量导入
export function groundingImport(data) {
data.method = `${path}merchantGoodsInfo.import`
return request(data, 'post', ["file"])
}
......@@ -24,3 +24,9 @@ export function getProductServiceItems(data) {
data.method = `${path}vd.item.queryServiceItemsGradeConfig`
return request(data, 'post')
}
// 批量导入
export function productImport(data) {
data.method = `${path}productManager.import`
return request(data, 'post', ["file"])
}
......@@ -245,7 +245,21 @@ export const routerName = {
parentId: "90307",
label: "删除",
handle: "handleDelete"
}
},
{
authId: "9030707",
parentId: "90307",
label: "批量导入",
category: "Button",
type: "primary",
handle: "handleBatchImport"
},
{
authId: "9030708",
parentId: "90307",
label: "查看",
handle: "handleCommodityDetail"
},
],
component: _import("goods/productManage/list")
},
......@@ -367,6 +381,14 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleBatchCheckPrice"
},
{
authId: "9030911",
parentId: "90309",
label: "批量导入",
category: "Button",
type: "primary",
handle: "handleBatchImport"
}
],
component: _import("goods/grounding/index")
......
......@@ -20,15 +20,15 @@ export const routerName = {
cache: false
},
auth: [
// {
// authId: '9050103',
// parentId: '90501',
// label: '下载对账单',
// icon: 'download',
// category: 'Button',
// type: 'primary',
// handle: 'downloadAccount'
// },
{
authId: '9050103',
parentId: '90501',
label: '下载对账单',
icon: 'download',
category: 'Button',
type: 'primary',
handle: 'downloadAccount'
},
{
authId: "9050101",
parentId: "90501",
......
......@@ -738,7 +738,7 @@ export const routerName = {
authId: "9061905",
parentId: "9061904",
cache: false,
activePath: "/setWorkorderDetail"
activePath: "/shopConfig"
},
component: _import("systemConfig/ShopConfig/setWorkorderDetail")
},
......@@ -750,7 +750,7 @@ export const routerName = {
authId: "9061907",
parentId: "9061906",
cache: false,
activePath: "/shopSet"
activePath: "/shopConfig"
},
component: _import("systemConfig/ShopConfig/shopSet")
},
......@@ -762,7 +762,7 @@ export const routerName = {
authId: "9061909",
parentId: "9061908",
cache: false,
activePath: "/personnelManagementIndex"
activePath: "/shopConfig"
},
component: _import("systemConfig/ShopConfig/personnelManagementIndex")
},
......
......@@ -8,6 +8,71 @@
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
907: {
path: "/index",
name: "index",
meta: {
title: "总览",
authId: "907",
parentId: "1",
cache: false
},
auth: [
{
authId: "90701",
parentId: "907",
label: "报表模块"
},
{
authId: "90702",
parentId: "907",
category: "Button",
label: "查看企微推送对象",
addRoutePath: [
{
authId: "90703",
name: "企微推送配置",
parentId: "907"
}
]
},
{
authId: "90705",
parentId: "907",
category: "Button",
label: "编辑单店信息"
},
{
authId: "90706",
parentId: "907",
category: "Button",
type: "primary",
label: "导出日报",
handle: "exportDailyReport"
},
{
authId: "90707",
parentId: "907",
category: "Button",
label: "渗透率报表",
addRoutePath: [
{
authId: "90704",
name: "渗透率报表",
parentId: "907"
}
]
},
{
authId: "90708",
parentId: "907",
category: "Button",
handle: "handleOutputImport",
label: "导入"
},
],
component: _import("index")
},
90703: {
path: "/outputValue",
name: "outputValue",
......@@ -17,7 +82,7 @@ export const routerName = {
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/outputValue"
activePath: "/index"
},
auth: [
{
......@@ -60,17 +125,33 @@ export const routerName = {
parentId: "907",
cache: false,
sideHidden: true,
activePath: "/permeation"
activePath: "/index"
},
auth: [
{
authId: "9070301",
parentId: "90703",
label: "新增",
icon: "plus",
authId: "9070401",
parentId: "90704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleAdd"
handle: "handleExport"
},
// 新车交付率导出
{
authId: "9070402",
parentId: "90704",
label: "导出",
category: "Button",
type: "primary",
handle: "handleDetailExport"
},
{
authId: "9070403",
parentId: "90704",
label: "日报导出",
category: "Button",
type: "primary",
handle: "handleDetailExport"
}
],
component: _import("index/permeation")
......
......@@ -77,7 +77,15 @@ export const routerName = {
parentId: "90901",
label: "发货单",
handle: "handleSendgoods"
}
},
{
authId: "9090106",
parentId: "90901",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
],
component: _import("purchase/purchaseOrder")
},
......@@ -148,6 +156,14 @@ export const routerName = {
}
},
handle: "handleReject"
},
{
authId: "9090305",
parentId: "90903",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("purchase/procurementReview")
......@@ -193,6 +209,14 @@ export const routerName = {
parentId: "90904",
label: "分配",
handle: "handleAllocat"
},
{
authId: "9090405",
parentId: "90904",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("purchase/purchaseAndDelivery")
......@@ -277,6 +301,14 @@ export const routerName = {
}
},
handle: "handleReject"
},
{
authId: "9090605",
parentId: "90906",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
}
],
component: _import("purchase/procurementBusiness")
......
......@@ -56,7 +56,22 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleAdd"
}
},
{
authId: "9100104",
parentId: "91001",
label: "批量开通非融合",
category: "Button",
type: "primary",
handle: "massDevelopmentNonFusion"
},{
authId: "9100105",
parentId: "91001",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
],
component: _import("rightsAndInterestsManage/ruleConfigurationList")
}
......
......@@ -51,7 +51,8 @@ export const routerName = {
authId: "91202",
parentId: "91201",
// sideHidden: true,
cache: false
cache: false,
activePath: "/qualityControlList"
},
auth: [
......@@ -75,6 +76,16 @@ export const routerName = {
parentId: "912",
cache: false
},
auth: [
{
authId: "9120301",
parentId: "91203",
label: "数据同步",
category: "Button",
type: "primary",
handle: "handleUpdate"
}
],
component: _import("residentManage/workCard")
},
91204: {
......
......@@ -39,8 +39,6 @@ export const routerName = {
authId: "9130102",
parentId: "91301",
label: "查看",
category: "Button",
type: "primary",
handle: "handleDetail",
addRoutePath: [
{
......@@ -54,8 +52,6 @@ export const routerName = {
authId: "9130103",
parentId: "91301",
label: "统计",
category: "Button",
type: "primary",
handle: "goStatisticsPage",
addRoutePath: [
{
......@@ -64,7 +60,53 @@ export const routerName = {
parentId: "91301"
}
]
}
},
{
authId: "9130104",
parentId: "91301",
label: "批量启用",
category: "Button",
handle: "mutiStart"
},
{
authId: "9130105",
parentId: "91301",
label: "批量停用",
category: "Button",
handle: "mutiStop"
},
{
authId: "9130106",
parentId: "91301",
label: "编辑",
handle: "handleAdd",
addRoutePath: [
{
authId: "91302",
name: "新增内容",
parentId: "91301"
}
]
},
{
authId: "9130107",
parentId: "91301",
label: "删除",
handle: "handleDel"
},
{
authId: "9130108",
parentId: "91301",
label: "启用",
handle: "operatStatus",
ruleObj: {
attr: "status",
rule: {
2: "启用",
1: "停用"
}
}
},
],
component: _import("contentManager/contentManagerList")
},
......@@ -102,6 +144,15 @@ export const routerName = {
cache: false,
activePath: "/contentManagerList"
},
auth: [
{
authId: "9130401",
parentId: "91304",
label: "导出",
category: "Button",
handle: "exportList"
}
],
component: _import("contentManager/statisticsList")
}
}
......@@ -126,7 +126,7 @@ export const errorPage = {
export const frameInRoutes = frameIn
export const localRoutes = {
[home.meta.authId]: home,
// [home.meta.authId]: home,
...resources
}
......
......@@ -19,9 +19,9 @@
<div class="d2-container-content">
<d2-table-header>
<span>
<auth-button category="Button" :show-btn-ids="['9130101']" />
<auth-button category="Button" :show-btn-ids="['9130101', '9130104', '9130105']" />
</span>
<span>
<!-- <span>
<el-button size="mini" @click="mutiStartOrStop(1)">
批量启用
</el-button>
......@@ -30,7 +30,7 @@
<el-button size="mini" @click="mutiStartOrStop(2)">
批量停用
</el-button>
</span>
</span> -->
</d2-table-header>
<d2-table
ref="contentTable"
......@@ -68,7 +68,7 @@
<span>{{ statusEnum[scope.scope.status].name }}</span>
</div>
<div slot="auth-button" slot-scope="scope">
<el-button type="text" size="mini" @click="handleDetail(scope.scope)">
<!-- <el-button type="text" size="mini" @click="handleDetail(scope.scope)">
查看
</el-button>
<el-button type="text" size="mini" @click="handleAdd(scope.scope)">
......@@ -97,6 +97,29 @@
>
统计
</el-button>
</template> -->
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9130102']" />
</span>
<!-- 编辑 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9130106']" />
</span>
<!-- 删除 -->
<span v-if="scope.scope.status == 0" style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9130107']" />
</span>
<!-- -->
<template v-else>
<!-- 停用/启用 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9130108']" />
</span>
<!-- 统计 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9130103']" />
</span>
</template>
</div>
</d2-table>
......@@ -373,6 +396,14 @@ export default {
}
})
},
// 批量启用
mutiStart() {
this.mutiStartOrStop(1)
},
// 批量停用
mutiStop() {
this.mutiStartOrStop(2)
},
operatStatus(row) {
this.mutiStartOrStop(row.status == 1 ? 2 : 1, [row])
},
......
......@@ -17,7 +17,8 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button size="mini" @click="exportList()"> 导出 </el-button>
<!-- <el-button size="mini" @click="exportList()"> 导出 </el-button> -->
<auth-button category="Button" :show-btn-ids="['9130401']" />
</d2-table-header>
<d2-table
ref="contentTable"
......
......@@ -170,13 +170,14 @@
</span>
<!-- <span style="position: absolute; right: 41px; top: 42px; z-index: 999;"> -->
<span class="downloadBtn">
<el-button type="primary"
<!-- <el-button type="primary"
size="mini"
icon="el-icon-download"
v-if="userInfo.beSuper && userInfo.loginAccount.loginAccout != '18123663366'"
@click="downloadAccount">
下载对账单
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9050103']" v-if="userInfo.loginAccount.loginAccout != '18123663366'" category="Button"/>
</span>
<auth-button :show-btn-ids="['9050101']"
......
......@@ -245,14 +245,16 @@ export default {
// 1 太阳膜 2 (1.3场景商品)
const shopType = formData?.goodsType == 1 ? '1' : formData?.sceneType == 3 ? '2' : ''
const shopForm = deepClone(copyFormList[0].formBlock)
// 太阳膜/延保类保留上架部位字段 positionStr
// 太阳膜/延保类(第三方供应方)保留上架部位字段 positionStr
const spliceForm = shopType == '1'
? ['giftCost', 'recoveryCost', 'virtualAccountCost']
? ['giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
: shopType == '2'
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost']
: this.extendedPosiType.includes(formData?.goodsType) && !this.baseConfig.supplierCode.includes(`${formData.supplierCode}`)
? ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost']
: ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost']
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
: this.equitySceneType.includes(formData?.goodsType) || this.extendedPosiType.includes(formData?.goodsType)
? (this.extendedPosiType.includes(formData?.goodsType) && this.baseConfig.supplierCode.includes(`${formData.supplierCode}`)
? ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost']
: ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost'])
: ['positionStr', 'productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
// 未勾选基础商品类型
if (!this.formData.productType?.includes(1)) spliceForm.push('baseSupplyModeStr')
// 赠送成本:仅产品类型选择“基础产品”时展示
......@@ -335,15 +337,16 @@ export default {
return (data ?? '') === ''
},
handleUp(e) {
this.$refs[this.formRef + 'd2FormRuleForm'].validate((valid, options) => {
if (valid) {
this.$emit('handleAddConfirm')
} else {
var needRuleList = Object.keys(options)
this.jumpScroll(needRuleList[0])
return true
}
})
this.$emit('handleAddConfirm')
// this.$refs[this.formRef + 'd2FormRuleForm'].validate((valid, options) => {
// if (valid) {
// this.$emit('handleAddConfirm')
// } else {
// var needRuleList = Object.keys(options)
// this.jumpScroll(needRuleList[0])
// return true
// }
// })
}
}
}
......
......@@ -297,7 +297,9 @@ export default {
giftCost: [{ required: true, message: '请输入赠送成本', trigger: 'blur' }],
recoveryCost: [{ required: true, message: '请输入回收成本', trigger: 'blur' }],
virtualAccountCost: [{ required: true, message: '请输入虚拟对账成本', trigger: 'blur' }],
warrantyType: [{ required: true, message: '请选择质保卡类型', trigger: 'change' }]
warrantyType: [{ required: true, message: '请选择质保卡类型', trigger: 'change' }],
djCost: [{ required: true, message: '请输入嘀加成本', trigger: 'blur' }],
thirdPartyCost: [{ required: true, message: '请输入第三方成本', trigger: 'blur' }]
},
storeSelected: [],
relateStoreVisible: false,
......@@ -512,7 +514,12 @@ export default {
// 1 太阳膜 2 (1.3场景商品)
const shopType = formData?.goodsType == 1 ? '1' : formData?.sceneType == 3 ? '2' : ''
const shopForm = deepClone(copyFormList[0].formBlock)
const spliceForm = shopType == '1' ? ['giftCost', 'recoveryCost', 'virtualAccountCost'] : shopType == '2' ? ['productType', 'warrantyType', 'baseSupplyMode', 'giftCost', 'recoveryCost', 'virtualAccountCost'] : ['productType', 'warrantyType', 'baseSupplyMode', 'upgradeSupplyMode', 'giftCost', 'recoveryCost', 'virtualAccountCost']
const spliceForm = shopType == '1' ? ['giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost'] :
shopType == '2' ? ['productType', 'warrantyType', 'baseSupplyMode', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost'] :
// 权益/延保类 无升级成本 新增嘀加成本和第三方成本
this.equitySceneType.includes(formData?.goodsType) || this.extendedPosiType.includes(formData?.goodsType) ?
['productType', 'warrantyType', 'baseSupplyMode', 'upgradeSupplyMode', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'upgradeProductCost'] :
['productType', 'warrantyType', 'baseSupplyMode', 'upgradeSupplyMode', 'giftCost', 'recoveryCost', 'virtualAccountCost', 'djCost', 'thirdPartyCost']
// 未勾选基础商品类型
if (!formData.productType?.includes(1)) spliceForm.push('baseSupplyMode')
// 赠送成本:仅产品类型选择“基础产品”时展示
......
......@@ -156,6 +156,20 @@ export default {
width: '432px',
unit: true,
handleInput: true
}, {
name: 'djCost',
label: '嘀加成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}]
}, {
title: '门店信息',
......@@ -359,7 +373,9 @@ export default {
res.oldupgradeProductCost = res.upgradeProductCost
res.oldgiftCost = res.giftCost
res.oldrecoveryCost = res.recoveryCost
res.virtualAccountCost = res.virtualAccountCost
res.oldvirtualAccountCost = res.virtualAccountCost
res.olddjCost = res.djCost
res.oldthirdPartyCost = res.thirdPartyCost
const defaultSelect = [{ // 默认选中项 用于回显
confId: res?.upgradeGoodsId,
confNameValue: res?.upgradeGoodsName,
......@@ -481,7 +497,9 @@ export default {
giftCost: '',
recoveryCost: '',
virtualAccountCost: '',
validMinSellPrice: ''
validMinSellPrice: '',
djCost: '',
thirdPartyCost: ''
}
addOrUpdateAPI(this.dealObjectValue(params)).then(res => {
this.notice.okTips()
......
......@@ -37,7 +37,9 @@ export default {
giftCost: [{ required: true }],
recoveryCost: [{ required: true }],
virtualAccountCost: [{ required: true }],
warrantyTypeStr: { required: true }
warrantyTypeStr: [{ required: true }],
djCost: [{ required: true }],
thirdPartyCost: [{ required: true }]
},
editForm: [{
title: '商品信息',
......@@ -115,6 +117,14 @@ export default {
name: 'virtualAccountCost',
label: '虚拟对账成本',
unit: true
}, {
name: 'djCost',
label: '嘀加成本',
unit: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
}]
}, {
title: '门店信息',
......
......@@ -28,29 +28,35 @@
<span>上架管理列表</span>
</span>
<!-- 新增上架 -->
<span style="{display: inline-block}">
<span style="display: inline-block">
<auth-button category="Button"
style="{display: inline-block}"
style="display: inline-block"
:show-btn-ids="['9030901']" />
</span>
<!-- 批量导入 -->
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9030911']" />
</span>
<!-- 批量校验最低价 -->
<span style="{display: inline-block} ;margin-left: 10px">
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button" :show-btn-ids="['9030910']" />
</span>
<!-- 批量审核 -->
<span style="{display: inline-block} ;margin-left: 10px">
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button" :show-btn-ids="['9030903']" />
</span>
<!-- 批量下架 -->
<span style="{display: inline-block};margin-left: 10px">
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button" :show-btn-ids="['9030908']" />
</span>
<!-- 批量复制 -->
<span style="{display: inline-block};margin-left: 10px">
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button" :show-btn-ids="['9030909']" />
</span>
<!-- 导出 -->
<span style="{display: inline-block};margin-left: 10px">
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button" :show-btn-ids="['9030902']" />
</span>
</d2-table-header>
......@@ -143,15 +149,51 @@
@handleBatchCopyConfirm="handleBatchCopyConfirm"
@handleBatchCopyClose="handleBatchCopyClose">
</batch-copy-dialog>
<d2-dialog :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
</d2-container>
</template>
<script>
import { getProductTypeBySceneId, getList } from '@api/product'
import { getGroundingManageList, updateGoodsStatus, batchReviewAPI, delGroundingById, batchUpdateStatus, batchUpdateBatchCopy, batchSetValidMinSellPrice } from '@api/grounding'
import { getGroundingManageList, updateGoodsStatus, batchReviewAPI, delGroundingById, batchUpdateStatus, batchUpdateBatchCopy, batchSetValidMinSellPrice, groundingImport } from '@api/grounding'
import { deepClone, Util } from '@/common/util'
import { sceneCodeList, sceneList, BaseData } from '@/common/constants.js'
import { getParkStore } from '@api/editCustomer'
import { mapActions, mapState } from 'vuex'
import { mapActions, mapState, mapMutations } from 'vuex'
import { baseSupplyModeList, upgradeSupplyModeList } from './constants/data'
import { getShopMerchantList } from '@api/deviceManage'
import { baseConfig } from '@/main'
......@@ -429,6 +471,20 @@ export default {
},
width: 130
}, {
label: '嘀加成本/元',
prop: 'djCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.djCost)
},
width: 130
}, {
label: '第三方成本/元',
prop: 'thirdPartyCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.thirdPartyCost)
},
width: 130
}, {
label: '校验最低价',
prop: '',
addHtml: 'validMinSellPrice',
......@@ -485,7 +541,12 @@ export default {
selfBuildGoodsType: baseConfig.selfBuildGoodsType || '',
batchCopySelectScene: '', // 批量复制选中的场景值
batchCopyVisible: false,
batchCopySelectData: [] // 批量辅助选中的上架数据
batchCopySelectData: [], // 批量辅助选中的上架数据
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
fileForm: {},
fileVisible: false
}
},
mounted() {
......@@ -521,14 +582,25 @@ export default {
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
dowloadList: (state) => state.d2admin.user.dowloadList,
updateList: (state) => state.d2admin.user.updateList,
updateRefesh: (state) => state.d2admin.user.updateRefesh
})
},
watch: {
updateRefesh(val) {
if (val == true) {
this.$refs.groundingIndexTable.refreshTable()
this.setUpdateRefesh('false')
}
},
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
......@@ -619,6 +691,67 @@ export default {
// }
return true
},
// 模板下载
exportTemplate() {
var params = {}
params.method = 'dj.api.smartcarlife.merchantGoodsInfo.template.export'
const list = [
...this.dowloadList,
{
name: '门店模板',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
handleBatchImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
groundingImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleBatchImport()
}
})
}
})
},
handleReset() {
this.searchForm = {
upgradeGoodsName: '',
......@@ -821,21 +954,45 @@ export default {
}
</script>
<style lang="scss" scoped>
.merchant-name-box{
font-size: 12px;
max-height: 400px;
overflow-y: auto;
.title{
color: #333333;
font-weight: 500;
margin-bottom: 7px;
.grounding{
.merchant-name-box{
font-size: 12px;
max-height: 400px;
overflow-y: auto;
.title{
color: #333333;
font-weight: 500;
margin-bottom: 7px;
}
.merchant-item{
color: #666666;
font-weight: 400;
}
}
.merchant-item{
color: #666666;
font-weight: 400;
.checkText{
margin-left: 8px;
}
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
}
.checkText{
margin-left: 8px;
}
</style>
......@@ -58,6 +58,7 @@
</div>
<div v-else>
<el-form-item :prop="`groundingGoodsList[${eleIndex}][${item.name}]`"
:rules="rules[item.name]"
:label="item.label ? (item.unit ? (item.label + '(元)/件') : item.label) + ':' : ''"
v-if="item.name !== 'positionStr' || (item.name == 'positionStr' && extendedPosiType.includes(ele.goodsType) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`))"
:label-width="item.label ? '180px' : '0px'"
......@@ -291,11 +292,12 @@ export default {
},
// 审核
handleCheck(e) {
this.$refs[this.formRef + 'd2FormRuleForm'].validate((valid, options) => {
if (valid) {
this.$emit('handleCheck')
}
})
this.$emit('handleCheck')
// this.$refs[this.formRef + 'd2FormRuleForm'].validate((valid, options) => {
// if (valid) {
// this.$emit('handleCheck')
// }
// })
}
}
}
......
......@@ -264,7 +264,8 @@ export default {
}
}
],
upgradeProductCost: [{ required: true, message: '请输入产品、升级成本', trigger: 'blur' }]
djCost: [{ required: true, message: '请输入嘀加成本', trigger: 'blur' }],
thirdPartyCost: [{ required: true, message: '请输入第三方成本', trigger: 'blur' }]
},
storeSelected: [],
relateStoreVisible: false,
......@@ -330,16 +331,18 @@ export default {
'formData.groundingGoodsList': {
handler(newVal) {
if (newVal) {
// 建议售价,最低售价,成本合计计算
const acc = { sellPrice: '', minSellPrice: '', upgradeProductCost: '' }
// 建议售价,最低售价,嘀加成本,第三方成本合计计算
const acc = { sellPrice: '', minSellPrice: '', djCost: '', thirdPartyCost: '' }
newVal.forEach(val => {
acc.sellPrice = !this.filterEmpty(val.sellPrice) || !this.filterEmpty(acc.sellPrice) ? this.subStr(acc.sellPrice, Number(val.sellPrice)) : ''
acc.minSellPrice = !this.filterEmpty(val.minSellPrice) || !this.filterEmpty(acc.minSellPrice) ? this.subStr(acc.minSellPrice, Number(val.minSellPrice)) : ''
acc.upgradeProductCost = !this.filterEmpty(val.upgradeProductCost) || !this.filterEmpty(acc.upgradeProductCost) ? this.subStr(acc.upgradeProductCost, Number(val.upgradeProductCost)) : ''
acc.djCost = !this.filterEmpty(val.djCost) || !this.filterEmpty(acc.djCost) ? this.subStr(acc.djCost, Number(val.djCost)) : ''
acc.thirdPartyCost = !this.filterEmpty(val.thirdPartyCost) || !this.filterEmpty(acc.thirdPartyCost) ? this.subStr(acc.thirdPartyCost, Number(val.thirdPartyCost)) : ''
})
this.formData.sellPrice = acc.sellPrice
this.formData.minSellPrice = acc.minSellPrice
this.formData.upgradeProductCost = acc.upgradeProductCost
this.formData.djCost = acc.djCost
this.formData.thirdPartyCost = acc.thirdPartyCost
}
},
deep: true
......@@ -428,7 +431,8 @@ export default {
position: '', // 上架部位
sellPrice: '', // 参考售价
minSellPrice: '', // 最低售价
upgradeProductCost: '' // 成本
djCost: '', // 嘀加成本
thirdPartyCost: '' // 第三方成本
})
},
delGroundingGoods(index) {
......
......@@ -57,8 +57,17 @@ export default {
type: 'input',
width: '432px'
}, {
name: 'upgradeProductCost',
label: '成本',
name: 'djCost',
label: '嘀加成本',
isRequired: true,
isDisabled: true,
placeholder: '根据套餐商品成本自动累加',
unit: true,
type: 'input',
width: '432px'
}, {
name: 'thirdPartyCost',
label: '第三方成本',
isRequired: true,
isDisabled: true,
placeholder: '根据套餐商品成本自动累加',
......@@ -135,8 +144,15 @@ export default {
unit: true,
handleInput: true
}, {
name: 'upgradeProductCost',
label: '成本',
name: 'djCost',
label: '嘀加成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
type: 'input',
width: '432px',
unit: true,
......@@ -173,7 +189,8 @@ export default {
packageName: '', // 套餐名称
sellPrice: '', // 套餐售价总价
minSellPrice: '', // 套餐最低售价
upgradeProductCost: '', // 套餐总成本
djCost: '', // 嘀加成本
thirdPartyCost: '', // 第三方成本
validMinSellPriceFlag: false, // 是否校验最低价
groundingGoodsList: [{ // 上架商品集合
upgradeGoodsId: '', // 商品id
......@@ -181,7 +198,8 @@ export default {
position: '', // 上架部位
sellPrice: '', // 参考售价
minSellPrice: '', // 最低售价
upgradeProductCost: '' // 成本
djCost: '', // 嘀加成本
thirdPartyCost: '' // 第三方成本
}],
voucherList: [] // 上架凭证
},
......@@ -331,11 +349,13 @@ export default {
sellPrice: val?.sellPrice, // 售价
minSellPrice: val?.minSellPrice, // 最低售价
validMinSellPriceFlag: val?.validMinSellPrice == 'Y', // 是否校验最低价
upgradeProductCost: val?.upgradeProductCost, // 成本
djCost: val?.djCost, // 嘀加成本
thirdPartyCost: val?.thirdPartyCost, // 第三方成本
supplierCode: val?.goodsInfo?.supplierCode, // 供应方
oldsellPrice: val?.sellPrice,
oldminSellPrice: val?.minSellPrice,
oldupgradeProductCost: val?.upgradeProductCost
olddjCost: val?.djCost,
oldthirdPartyCost: val?.thirdPartyCost
})
defaultSelect.push({
confId: val?.upgradeGoodsId,
......@@ -400,7 +420,8 @@ export default {
sellPrice: val?.sellPrice,
minSellPrice: val?.minSellPrice,
validMinSellPrice: val.validMinSellPrice,
upgradeProductCost: val?.upgradeProductCost
djCost: val?.djCost,
thirdPartyCost: val?.thirdPartyCost
})
})
// 整理上传凭证数据
......
......@@ -226,13 +226,20 @@ export default {
},
width: '100'
}, {
label: '成本/元',
prop: 'upgradeProductCost',
label: '嘀加成本/元',
prop: 'djCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.upgradeProductCost)
return this.priceFilter(cellValue.djCost)
},
width: '100'
}, {
label: '第三方成本/元',
prop: 'thirdPartyCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.thirdPartyCost)
},
width: '120'
}, {
label: '上架门店',
name: '',
type: 'slot',
......
......@@ -31,7 +31,8 @@ export default {
upgradeGoodsName: [{ required: true }],
sellPrice: [{ required: true }],
minSellPrice: [{ required: true }],
upgradeProductCost: [{ required: true }]
djCost: [{ required: true }],
thirdPartyCost: [{ required: true }]
},
editForm: [{
title: '套餐信息',
......@@ -47,8 +48,12 @@ export default {
label: '最低售价',
unit: true
}, {
name: 'upgradeProductCost',
label: '成本',
name: 'djCost',
label: '嘀加成本',
unit: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
}]
}, {
......@@ -100,8 +105,12 @@ export default {
label: '最低售价',
unit: true
}, {
name: 'upgradeProductCost',
label: '成本',
name: 'djCost',
label: '嘀加成本',
unit: true
}, {
name: 'thirdPartyCost',
label: '第三方成本',
unit: true
}]
}, {
......@@ -179,7 +188,8 @@ export default {
sellPrice: val?.sellPrice, // 售价
minSellPrice: val?.minSellPrice, // 最低售价
validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价
upgradeProductCost: val?.upgradeProductCost, // 成本
djCost: val?.djCost, // 嘀加成本
thirdPartyCost: val?.thirdPartyCost, // 第三方成本
supplierCode: val?.goodsInfo?.supplierCode // 供应方
})
})
......
......@@ -21,9 +21,15 @@
<div class="d2-container-content">
<d2-table-header>
<span slot="left">
<auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9030701']" />
<!-- 新增产品 -->
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9030701']" />
</span>
<!-- 批量导入 -->
<auth-button category="Button" style="display: inline-block;" :show-btn-ids="['9030707']" />
</span>
<auth-button category="Button" style="{display: inline-block}" :show-btn-ids="['9030702']" />
<!-- 导出 -->
<auth-button category="Button" style="display: inline-block" :show-btn-ids="['9030702']" />
</d2-table-header>
<d2-table ref="productManageTable"
:has-num="false"
......@@ -39,12 +45,15 @@
<div v-if="Object.keys(scope.scope).includes('upgradeGoodsList')"
slot="auth-button"
slot-scope="scope">
<el-button type="text"
<!-- <el-button type="text"
size="mini"
style="margin-right: 10px;"
@click="handleCommodityDetail(scope.scope)">
查看
</el-button>
</el-button> -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9030708']" />
</span>
<!-- <auth-button :data="scope.scope"></auth-button> -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9030703']" />
......@@ -61,14 +70,50 @@
@handleDrawerClose="handleDrawerClose"
:position-type-list="positionTypeList"
:extended-posi-type-list="extendedPosiTypeList" />
<d2-dialog :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleBatchImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)">
<el-link type="primary"
class="import-template"
icon="el-icon-link"
@click="exportTemplate">
模版下载
</el-link>
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
</d2-container>
</template>
<script>
import { Util } from '@/common/util'
import { getProductManageList } from '@api/productManage'
import { getProductManageList, productImport } from '@api/productManage'
import { getProductTypeBySceneId } from '@api/product'
import { mapActions, mapState } from 'vuex'
import { mapActions, mapState, mapMutations } from 'vuex'
import { baseGoodsDelete } from '@api/commodity'
import drawerDetail from './components/drawerDetail.vue'
import { baseConfig } from '@/main'
......@@ -224,7 +269,12 @@ export default {
},
selfBuildGoodsType: baseConfig.selfBuildGoodsType || '', // 服务商自建类目值
positionTypeList: [], // 太阳膜类商品部位
extendedPosiTypeList: [] // 延保类商品部位
extendedPosiTypeList: [], // 延保类商品部位
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
fileForm: {},
fileVisible: false
}
},
......@@ -232,9 +282,20 @@ export default {
drawerDetail
},
watch: {
updateRefesh(val) {
if (val == true) {
this.$refs.productManageTable.refreshTable()
this.setUpdateRefesh('false')
}
},
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
dowloadList: (state) => state.d2admin.user.dowloadList,
updateList: (state) => state.d2admin.user.updateList,
updateRefesh: (state) => state.d2admin.user.updateRefesh
})
},
......@@ -253,6 +314,7 @@ export default {
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
......@@ -275,6 +337,67 @@ export default {
keyDowmGetList() {
this.$refs.productManageTable.refreshTable()
},
// 模板下载
exportTemplate() {
var params = {}
params.method = 'dj.api.smartcarlife.productManager.template.export'
const list = [
...this.dowloadList,
{
name: '门店模板',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
handleBatchImport() {
this.fileVisible = !this.fileVisible
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 9) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.fileInfo = e.target.files[0].name.split('.')[1] + '@' + arrBase64[1]
document.getElementById('fileUpload').value = ''
}
} else {
this.notice.errorTips('上传文件不可超过9M')
}
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
var params = {
file: this.fileInfo
}
productImport(params).then(res => {
if (res) {
// 异步处理文件上传 把id传入处理轮询
const list = [...this.updateList, {
name: this.fileForm.fileName,
ifSuccess: false,
uuid: res,
type: 'upload'
}]
this.actionSetDownloadList({ list, type: 'updateList' })
this.notice.okTips('上传成功')
this.handleBatchImport()
}
})
}
})
},
handleReset() {
this.searchForm = {
commodityCode: '',
......@@ -381,4 +504,26 @@ export default {
.product-manage p {
margin: 0;
}
.product-manage .m-l-md {
margin-left: 20px;
}
.product-manage .import-btn {
position: relative;
}
.product-manage .import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.product-manage .import-template {
position: absolute;
height: 20px;
top: 50px;
left: 0;
}
</style>
<!-- 月度库存结算单弹窗 -->
<!-- 新车交付明细弹窗 -->
<template>
<d2-dialog
title="新车交付明细"
......@@ -42,12 +42,13 @@
<div class="d2-container-content">
<div class="table-header">
<div class="table-title">{{ merchantName }}</div>
<el-button
<!-- <el-button
class="default-blue-btn"
type="primary"
@click="handleExport"
@click="handleDetailExport"
>导出</el-button
>
> -->
<auth-button category="Button" :show-btn-ids="['9070402']" />
</div>
<d2-table
ref="recordTable"
......@@ -214,7 +215,7 @@ export default {
this.searchFormSearch.sceneType = this.sceneType
return this.searchFormSearch
},
handleExport() {
handleDetailExport() {
var params = this.getParams()
params.method =
"dj.api.smartcarlife.permeability.report.detail.exportAsync"
......
......@@ -15,12 +15,13 @@
<el-button type="primary" size="small" @click="handleSearch" class="searchBtn">
搜索
</el-button>
<el-button size="small" @click="handleReset">
<el-button size="small" style="margin-right: 10px;" @click="handleReset">
重置
</el-button>
<el-button size="small" @click="() => fileVisible = true">
<!-- <el-button size="small" @click="() => fileVisible = true">
导入
</el-button>
</el-button> -->
<auth-button category="Button" size="small" :show-btn-ids="['90708']" />
</el-col>
</div>
<div class="yqdTableContainer">
......@@ -250,6 +251,10 @@ export default {
// })
})
},
// 导入
handleOutputImport() {
this.fileVisible = true
},
getOptionsList() {
findMerchantStaffList({ merchantId: -1 }).then((result) => {
console.log('findMerchantStaffList', result)
......
......@@ -23,15 +23,16 @@
:picker-options="pickerOptions"
value-format="yyyy-MM-dd" />
</div>
<el-button type="primary"
<!-- <el-button type="primary"
@click="exportDailyReport"
:loading="exportDailyReportBtn"
class="exportBtn">导出日报</el-button>
class="exportBtn">导出日报</el-button> -->
<auth-button category="Button" :show-btn-ids="['90706']" />
</div>
<div class="inputTargetBtn">
<div @click="goCheck"
<div @click="goCheck" v-if="checkBtnFlag"
style="margin-right: 32px;"><i class="el-icon-chat-round"></i>查看企微推送对象</div>
<div @click="outputVisible = true"><i class="el-icon-edit"></i>编辑单店信息</div>
<div @click="outputVisible = true" v-if="editBtnFlag"><i class="el-icon-edit"></i>编辑单店信息</div>
</div>
</div>
</el-card>
......@@ -68,7 +69,9 @@ export default {
// dateValue: dayjs().subtract(1, 'day').format('YYYY-MM-DD'),
dateValue: '',
outputVisible: false,
exportDailyReportBtn: false
exportDailyReportBtn: false,
checkBtnFlag: false, // 查看企微推送对象权限
editBtnFlag: false, // 编辑单店信息权限
}
},
computed: {
......@@ -80,6 +83,15 @@ export default {
}
},
mounted() {
this.$nextTick(() => {
const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = '90702' // 查看企微推送对象权限ID
const editStoreBtnId = '90705' // 编辑单店信息权限ID
const _item = $store?.find(i => (i.authId === btnId))
const _editItem = $store?.find(i => (i.authId === editStoreBtnId))
if (_item) this.checkBtnFlag = true
if (_editItem) this.editBtnFlag = true
})
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
......@@ -117,6 +129,7 @@ export default {
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
},
// 查看企微推送对象
goCheck(row) {
// console.log('goCheck')
// return
......
......@@ -7,7 +7,7 @@
<el-card class="box-card">
<div slot="header" class="clearfix card-header">
<span>工作台总览</span>
<div class="tabel-desc" @click="goPer">
<div class="tabel-desc" v-if="btnFlag" @click="goPer">
<i class="el-icon-document"></i>渗透率报表
</div>
<el-select
......@@ -352,7 +352,8 @@ export default {
upgradeTransfer: ""
},
parkServiceList: [],
productType: "thisMonth"
productType: "thisMonth",
btnFlag: false
}
},
computed: {
......@@ -374,6 +375,12 @@ export default {
this.getUserId().then(() => {
this.init()
})
this.$nextTick(() => {
const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = '90707' // 渗透率报表权限ID
const _item = $store?.find(i => (i.authId === btnId))
if (_item) this.btnFlag = true
})
},
watch: {
totalType(newType) {
......
<!-- 发货单 -->
<!-- 渗透率报表 -->
<template>
<div>
<d2-container>
......@@ -42,21 +42,16 @@
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
/>
<el-button
v-if="searchForm.sceneType == '0'"
<!-- <el-button
size="small"
class="default-blue-btn"
type="primary"
@click="handleExport"
>导出</el-button
>
<el-button
size="small"
type="primary"
:class="searchForm.sceneType == '0' ? '' : 'default-blue-btn'"
@click="handleDailyExport"
>日报导出</el-button
>
> -->
<span style="margin-left: auto;">
<auth-button category="Button" :show-btn-ids="['9070401', 'B9070403']" />
</span>
</div>
<d2-table
:key="searchForm.sceneType"
......
......@@ -21,19 +21,9 @@
<div class="d2-container-content">
<d2-table-header>
<span slot="left">累计订单金额:¥{{ totalCount }}元</span>
<!-- 车损权益营收概况 -->
<span style="padding:0px 13px;">
<auth-button :show-btn-ids="['9040114']"
<!-- 车损权益营收概况 分润&成本分析 导出 -->
<auth-button :show-btn-ids="['9040129', '9040130', '9040131']"
category="Button" />
</span>
<!-- 分润&成本分析 -->
<span style="padding:0px 13px;">
<auth-button :show-btn-ids="['9040113']"
category="Button" />
</span>
<!-- 导出 -->
<auth-button :show-btn-ids="['9040101']"
category="Button" />
</d2-table-header>
<el-table :data="tableData"
v-loading="$store.state.d2admin.loading.value"
......@@ -283,27 +273,42 @@
fixed="right">
<template slot-scope="scope">
<auth-button slot="auth-button"
:show-btn-ids="['9040111']"
:show-btn-ids="['9040132']"
:data="scope" />
<el-button type="text"
<!-- <el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 4"
@click="chooseRule(scope.row)">
发起分账
</el-button>
<el-button type="text"
</el-button> -->
<!-- 发起分账 -->
<auth-button slot="auth-button"
v-if="scope.row.profitAllocationStatus == 4"
:show-btn-ids="['9040133']"
:data="scope.row" />
<!-- <el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 2"
@click="ruleHistory(scope.row)">
分账记录
</el-button>
</el-button> -->
<!-- 分账记录 -->
<auth-button slot="auth-button"
v-if="scope.row.profitAllocationStatus == 2"
:show-btn-ids="['9040134']"
:data="scope.row" />
<!-- 取消分账 分帐中状态 -->
<el-button type="text"
<!-- <el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 5"
@click="cancelRule(scope.row)">
取消分账
</el-button>
</el-button> -->
<!-- 取消分账 -->
<auth-button slot="auth-button"
v-if="scope.row.profitAllocationStatus == 5"
:show-btn-ids="['9040135']"
:data="scope.row" />
</template>
</el-table-column>
</el-table>
......@@ -839,7 +844,7 @@ export default {
// }
const $store = this.$store.getters["d2admin/auth/curBtns"]
const btnId = "9040103" // 待补录订单权限ID
const signRefundBtnId = "9040105" // 标记退款权限ID
const signRefundBtnId = "9040136" // 标记退款权限ID
const _item = $store.find((i) => i.authId === btnId)
const signRefundItem = $store.find((i) => i.authId === signRefundBtnId)
if (_item) {
......
......@@ -31,7 +31,9 @@
</div>
<div class="btn-group">
<template>
<el-button class="default-blue-btn" type="primary" @click="handleExport">导出</el-button>
<!-- <el-button class="default-blue-btn" type="primary" @click="handleExport">导出</el-button> -->
<auth-button :show-btn-ids="['9040109']"
category="Button" />
</template>
</div>
<!-- 表格区域 -->
......@@ -104,48 +106,55 @@
</div>
</div>
<div slot="auth-button" slot-scope="scope">
<!-- 查看订单 -->
<span style="margin-left: 10px;">
<auth-button slot="auth-button" :show-btn-ids="['9040112']" :data="scope.scope" />
<auth-button slot="auth-button" :show-btn-ids="['9040118']" :data="scope.scope" />
</span>
<!-- 仅预支付状态显示 -->
<span v-if="scope.scope.tailOrderStatus == '3'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="record(scope.scope)">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="record(scope.scope)">
确认补录
</el-button>
<el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRelat(scope.scope)">
</el-button> -->
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRelat(scope.scope)">
取消关联
</el-button>
</el-button> -->
<auth-button slot="auth-button" style="margin-left: 10px" :show-btn-ids="['9040110', '9040111']" :data="scope.scope" />
</span>
<!-- 核销 -->
<span v-if="scope.scope.showVerf == '1'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="writeOff(scope.scope)">
<span v-if="scope.scope.showVerf == '1'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="writeOff(scope.scope)">
订单核销
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040112']" :data="scope.scope" />
</span>
<!-- 退款 -->
<span v-if="scope.scope.showRefund == '1'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="setRefund(scope.scope)">
<span v-if="scope.scope.showRefund == '1'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="setRefund(scope.scope)">
退款
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040113']" :data="scope.scope" />
</span>
<span v-if="scope.scope.ledgerStatus == '2'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="chooseRule(scope.scope)">
<span v-if="scope.scope.ledgerStatus == '2'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="chooseRule(scope.scope)">
发起分账
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040114']" :data="scope.scope" />
</span>
<span v-if="scope.scope.ledgerStatus == '3'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="ruleHistory(scope.scope)">
<span v-if="scope.scope.ledgerStatus == '3'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="ruleHistory(scope.scope)">
分账记录
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040115']" :data="scope.scope" />
</span>
<!-- 取消分账 分账中状态 -->
<span v-if="scope.scope.ledgerStatus == '4'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRule(scope.scope)">
<span v-if="scope.scope.ledgerStatus == '4'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRule(scope.scope)">
取消分账
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040116']" :data="scope.scope" />
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1'">
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
<el-button type="text" size="mini" style="margin-left: 10px" @click="refund(scope.scope)">
标记已退款
</el-button>
......@@ -292,13 +301,20 @@ export default {
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false
ruleInfoVisible: false,
signRefundFlag: false
}
},
name: "ConfigUpgradation",
mounted() {
this.getCrowdfundingOrderConfig()
this.getCount()
const $store = this.$store.getters['d2admin/auth/curBtns']
const signRefundBtnId = '9040117' // 标记退款权限ID
const signRefundItem = $store.find(i => (i.authId === signRefundBtnId))
if (signRefundItem) {
this.signRefundFlag = true // 是否有标记退款权限
}
},
methods: {
getCount() {
......
......@@ -43,12 +43,14 @@
</div>
<div class="btn-group">
<template>
<el-button class="default-blue-btn"
<!-- <el-button class="default-blue-btn"
type="primary"
@click="handleExport">导出</el-button>
@click="handleExport">导出</el-button>
<el-button class="default-blue-btn"
type="default"
@click="handlebillImport">导入对账单</el-button>
@click="handlebillImport">导入对账单</el-button> -->
<auth-button :show-btn-ids="['9040119', '9040120']"
category="Button" />
</template>
</div>
<!-- 表格区域 -->
......@@ -167,11 +169,11 @@
slot-scope="scope">
<span style="margin-left: 10px;">
<auth-button slot="auth-button"
:show-btn-ids="['9040106']"
:show-btn-ids="['9040121']"
:data="scope.scope" />
</span>
<span>
<el-button type="text"
<span style="margin-left: 10px">
<!-- <el-button type="text"
size="mini"
style="margin-left: 10px"
@click="handleEnd(scope.scope)"
......@@ -179,11 +181,15 @@
scope.scope.marketingStatus == 3
">
设为已完结
</el-button>
</el-button> -->
<auth-button slot="auth-button"
v-if="scope.scope.marketingStatus && scope.scope.marketingStatus == 3"
:show-btn-ids="['9040122']"
:data="scope.scope" />
</span>
<!-- 仅预支付状态显示 -->
<span v-if="scope.scope.tailOrderStatus == '3'">
<el-button type="text"
<!-- <el-button type="text"
size="mini"
style="margin-left: 10px"
@click="record(scope.scope)">
......@@ -194,26 +200,29 @@
style="margin-left: 10px"
@click="cancelRelat(scope.scope)">
取消关联
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040123', '9040124']" :data="scope.scope" />
</span>
<span v-if="scope.scope.ledgerStatus == '2'">
<el-button type="text"
<span v-if="scope.scope.ledgerStatus == '2'" style="margin-left: 10px">
<!-- <el-button type="text"
size="mini"
style="margin-left: 10px"
@click="chooseRule(scope.scope)">
发起分账
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040125']" :data="scope.scope" />
</span>
<span v-if="scope.scope.ledgerStatus == '3'">
<el-button type="text"
<span v-if="scope.scope.ledgerStatus == '3'" style="margin-left: 10px">
<!-- <el-button type="text"
size="mini"
style="margin-left: 10px"
@click="ruleHistory(scope.scope)">
分账记录
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040126']" :data="scope.scope" />
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1'">
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
<el-button type="text"
size="mini"
style="margin-left: 10px"
......@@ -222,13 +231,14 @@
</el-button>
</span>
<!-- 取消分账 分账中状态 -->
<span v-if="scope.scope.ledgerStatus == '4'">
<el-button type="text"
<span v-if="scope.scope.ledgerStatus == '4'" style="margin-left: 10px">
<!-- <el-button type="text"
size="mini"
style="margin-left: 10px"
@click="cancelRule(scope.scope)">
取消分账
</el-button>
</el-button> -->
<auth-button slot="auth-button" :show-btn-ids="['9040127']" :data="scope.scope" />
</span>
</div>
</d2-table>
......@@ -467,13 +477,20 @@ export default {
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false
ruleInfoVisible: false,
signRefundFlag: false
}
},
name: "Crowdfunding",
mounted() {
this.getCrowdfundingOrderConfig()
this.getCount()
const $store = this.$store.getters['d2admin/auth/curBtns']
const signRefundBtnId = '9040128' // 标记退款权限ID
const signRefundItem = $store.find(i => (i.authId === signRefundBtnId))
if (signRefundItem) {
this.signRefundFlag = true // 是否有标记退款权限
}
},
methods: {
getCount() {
......
......@@ -23,7 +23,9 @@
</div>
<div class="btn-group">
<template>
<el-button class="default-blue-btn" type="primary" @click="handleExport">导出</el-button>
<!-- <el-button class="default-blue-btn" type="primary" @click="handleExport">导出</el-button> -->
<auth-button :show-btn-ids="['9040137']"
category="Button" />
</template>
</div>
<!-- 表格区域 -->
......@@ -97,50 +99,62 @@
</div>
<div slot="auth-button" slot-scope="scope">
<span style="margin-left: 10px;">
<auth-button slot="auth-button" :show-btn-ids="['9040112']" :data="scope.scope" />
<auth-button slot="auth-button" :show-btn-ids="['9040146']" :data="scope.scope" />
</span>
<!-- 仅预支付状态显示 -->
<span v-if="scope.scope.tailOrderStatus == '3'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="record(scope.scope)">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="record(scope.scope)">
确认补录
</el-button>
<el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRelat(scope.scope)">
取消关联
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040138', '9040139']"
category="Button" />
</span>
<span v-if="scope.scope.ledgerStatus == '2'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="chooseRule(scope.scope)">
<span v-if="scope.scope.ledgerStatus == '2'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="chooseRule(scope.scope)">
发起分账
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040140']"
category="Button" />
</span>
<span v-if="scope.scope.ledgerStatus == '3'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="ruleHistory(scope.scope)">
<span v-if="scope.scope.ledgerStatus == '3'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="ruleHistory(scope.scope)">
分账记录
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040141']"
category="Button" />
</span>
<!-- 取消分账 分账中状态 -->
<span v-if="scope.scope.ledgerStatus == '4'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRule(scope.scope)">
<span v-if="scope.scope.ledgerStatus == '4'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="cancelRule(scope.scope)">
取消分账
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040142']"
category="Button" />
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1'">
<span v-if="scope.scope.tailOrderStatus == '1' && signRefundFlag">
<el-button type="text" size="mini" style="margin-left: 10px" @click="refund(scope.scope)">
标记已退款
</el-button>
</span>
<!-- 核销 -->
<span v-if="scope.scope.showVerf == '1'">
<el-button type="text" size="mini" style="margin-left: 10px" @click="writeOff(scope.scope)">
<span v-if="scope.scope.showVerf == '1'" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="writeOff(scope.scope)">
订单核销
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040143']"
category="Button" />
</span>
<!-- 商品发货 -->
<span v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6">
<el-button type="text" size="mini" style="margin-left: 10px" @click="handleExpressInfo(scope.scope)">
<span v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6" style="margin-left: 10px">
<!-- <el-button type="text" size="mini" style="margin-left: 10px" @click="handleExpressInfo(scope.scope)">
商品发货
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040144']"
category="Button" />
</span>
<!-- 退款 -->
<!-- <span v-if="scope.scope.showRefund == '1'">
......@@ -353,13 +367,20 @@ export default {
ruleVisible: false,
recordInfo: null,
ruleInfoVisible: false,
tabClickVal: ''
tabClickVal: '',
signRefundFlag: false
}
},
name: "IntegralShopping",
mounted() {
this.getCrowdfundingOrderConfig()
// this.getCount()
const $store = this.$store.getters['d2admin/auth/curBtns']
const signRefundBtnId = '9040145' // 标记退款权限ID
const signRefundItem = $store.find(i => (i.authId === signRefundBtnId))
if (signRefundItem) {
this.signRefundFlag = true // 是否有标记退款权限
}
},
methods: {
ruleDialogClose(flag) {
......
......@@ -38,7 +38,7 @@
<!-- <auth-button :showBtnIds="['9040104']"
class="p-r-20"
category="Button"></auth-button> -->
<auth-button :show-btn-ids="['9040101', '9040104']"
<auth-button :show-btn-ids="['9040101', '9040103']"
category="Button" />
</d2-table-header>
<el-table :data="tableData"
......@@ -281,28 +281,40 @@
align="center"
fixed="right">
<template slot-scope="scope">
<auth-button slot="auth-button"
:show-btn-ids="['9040102']"
<!-- 查看详情 -->
<auth-button :show-btn-ids="['9040104']"
:data="scope" />
<el-button type="text"
<!-- <el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 4"
@click="chooseRule(scope.row)">
发起分账
</el-button>
<el-button type="text"
</el-button> -->
<!-- 发起分账 -->
<auth-button v-if="scope.row.profitAllocationStatus == 4"
:show-btn-ids="['9040105']"
:data="scope.row" />
<!-- <el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 2"
@click="ruleHistory(scope.row)">
分账记录
</el-button>
<el-button type="text"
</el-button> -->
<!-- 分账记录 -->
<auth-button v-if="scope.row.profitAllocationStatus == 2"
:show-btn-ids="['9040106']"
:data="scope.row" />
<!-- <el-button type="text"
style="margin-left: 0;"
size="small"
v-if="scope.row.profitAllocationStatus == 5"
@click="cancelRule(scope.row)">
取消分账
</el-button>
</el-button> -->
<!-- 取消分账 -->
<auth-button v-if="scope.row.profitAllocationStatus == 5"
:show-btn-ids="['9040107']"
:data="scope.row" />
</template>
</el-table-column>
</el-table>
......@@ -848,8 +860,8 @@ export default {
this.getServiceStore(this.userInfo.detail.merchantId)
}
const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = '9040103' // 待补录订单权限ID
const signRefundBtnId = '9040105' // 标记退款权限ID
const btnId = '9040102' // 待补录订单权限ID
const signRefundBtnId = '9040108' // 标记退款权限ID
const _item = $store.find(i => (i.authId === btnId))
const signRefundItem = $store.find(i => (i.authId === signRefundBtnId))
if (_item) {
......
......@@ -11,7 +11,7 @@
src="./images/sign.png"> 标记为退款
</el-button>
&nbsp;&nbsp;&nbsp;<el-button size="mini"
v-if="[4].includes(detail.status)"
v-if="InvoicingFlag && [4].includes(detail.status)"
class="signRefundBtn"
@click="Invoicing(detail.id)">
<img class="signRefundIcon"
......@@ -75,9 +75,8 @@
<el-form-item class="remarkItem"
label="备注:">
{{ detail.remark }} <el-button type="text"
v-if="userInfo.beSuper"
@click="editRemark">修改</el-button>
</p>
v-if="editRemarkFlag"
@click="editRemark">修改</el-button>
</el-form-item>
<el-form-item label="战败原因:"
v-if="detail.status == 2">
......@@ -370,7 +369,9 @@ export default {
},
positionTypeList: [],
extendedPosiTypeList: [],
isPartialRefund: false // 支持部分退款
isPartialRefund: false, // 支持部分退款
InvoicingFlag: false, // 标记已开票权限
editRemarkFlag: false // 编辑备注权限
}
},
computed: {
......@@ -382,6 +383,12 @@ export default {
this.signRefundFlag = this.$route.query.signRefundFlag
this.getBaseData()
this.getGoodsOrderDetail()
const $store = this.$store.getters['d2admin/auth/curBtns']
const editRemarkBtnId = '9040303' // 编辑备注信息权限ID
const _item = $store?.find(i => (i.authId === editRemarkBtnId))
if (_item) {
this.editRemarkFlag = true
}
},
methods: {
......@@ -390,7 +397,6 @@ export default {
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
this.extendedPosiTypeList = await this.get(BaseData.extendedPosiTypeList)
console.log(this.extendedPosiTypeList, '------')
},
handleEnlargeImg(url, name) {
this.imgVisible = !this.imgVisible
......@@ -485,6 +491,14 @@ export default {
}, '')
// 1.1精品升级场景 2.1会员权益/升级场景 标记已退款 支持退部分款
if (res?.sceneType == 1 || res?.sceneType == 0) this.isPartialRefund = true
this.$nextTick(() => {
const $store = this.$store.getters['d2admin/auth/curBtns']
const InvoicingBtnId = res?.sceneType == 1 ? '9040301' : res?.sceneType == 0 ? '9040302' : '' // 标记已开票权限ID
const _item = $store?.find(i => (i.authId === InvoicingBtnId))
if (_item) {
this.InvoicingFlag = true
}
})
// this.detail.remark = ' this.detail.evaluation 价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜价格便宜'
// this.detail = Object.assign(this.detail, res)
// this.detail = Object.assign(res, res.payOrder)
......
......@@ -31,16 +31,18 @@
<!-- <el-button type="primary" @click="batchRecord">
批量确认补录
</el-button> -->
<el-button type="primary" @click="batchUpdateYqMerchant">
<!-- <el-button type="primary" @click="batchUpdateYqMerchant"> -->
<!-- 批量修改所属园区店 -->
批量修改所属服务对接
<!-- 批量修改所属服务对接
</el-button>
<el-button type="primary" @click="batchMarkAsNoUse">
批量标记为无需补录
</el-button>
<el-button type="primary" @click="handleExport">
导出
</el-button>
</el-button> -->
<auth-button :show-btn-ids="['9040201', '9040202', '9040203']"
category="Button" />
</d2-table-header>
<!-- :beforeSearchFn="beforeSearchFn" -->
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
......@@ -48,10 +50,10 @@
<template slot="auth-button" slot-scope="scope">
<!-- 已分帐无可操作内容 -->
<div v-if="scope.scope.inputStatus !== '6'">
<el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)">
<!-- <el-button type="text" v-if="scope.scope.inputStatus == '1'" @click="orderDetail(scope.scope)">
订单详情
</el-button>
</el-button> -->
<auth-button v-if="scope.scope.inputStatus == '1'" :show-btn-ids="['9040204']" :data="scope.scope"/>
<!-- <el-button type="text"
v-if="scope.scope.inputStatus == '0'"
@click="relatActivityOrder(scope.scope)">
......
......@@ -29,11 +29,12 @@
<auth-button category="Button" />
</span>
<span>
<el-button type="primary"
<!-- <el-button type="primary"
size="mini"
@click="handleExport">
导出
</el-button>
</el-button> -->
<auth-button category="Button" :show-btn-ids="['9090605']" />
</span>
</d2-table-header>
<d2-table ref="purchasementReviewTable"
......
......@@ -29,11 +29,12 @@
<auth-button category="Button" />
</span>
<span>
<el-button type="primary"
<!-- <el-button type="primary"
size="mini"
@click="handleExport">
导出
</el-button>
</el-button> -->
<auth-button category="Button" :show-btn-ids="['9090305']" />
</span>
</d2-table-header>
<d2-table ref="purchasementReviewTable"
......
......@@ -20,9 +20,10 @@
<auth-button category="Button" />
</span>
<span>
<el-button type="primary" size="mini" @click="handleExport">
<!-- <el-button type="primary" size="mini" @click="handleExport">
导出
</el-button>
</el-button> -->
<auth-button category="Button" :show-btn-ids="['9090405']" />
</span>
</d2-table-header>
<d2-table ref="purchaseAndDeliveryTable" :search-form="tableSearchForm" :table-params="tableParams"
......
......@@ -29,11 +29,12 @@
<auth-button category="Button" />
</span>
<span>
<el-button type="primary"
<!-- <el-button type="primary"
size="mini"
@click="handleExport">
导出
</el-button>
</el-button> -->
<auth-button category="Button" :show-btn-ids="['9090106']" />
</span>
</d2-table-header>
<d2-table ref="purchaseOrderTable"
......
......@@ -204,16 +204,16 @@
slot-scope="scope"
>
<!-- <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" /> -->
<el-button
<!-- <el-button
type="text"
@click="recepDetail(scope.scope)"
v-if="scope.scope.score || scope.scope.score == 0"
>接待明细</el-button>
<span
v-else
class="dis-class"
@click="recepDetail()"
>接待明细</span>
>接待明细</el-button
> -->
<span :class="scope.scope.score || scope.scope.score == 0 ? '' : 'dis-class'">
<auth-button :show-btn-ids="['9120101']" :data="scope.scope" />
</span>
<!-- <span v-else class="dis-class" @click="recepDetail()">接待明细</span> -->
</template>
</d2-table>
</div>
......@@ -801,4 +801,10 @@ export default {
color: #666;
cursor: pointer;
}
::v-deep .dis-class{
.el-button--text{
color:#666;
cursor: pointer;
}
}
</style>
......@@ -21,9 +21,11 @@
<h2>工牌管理</h2>
<div>
<span>最近同步:{{ currentTime }}</span>
<el-button @click="handleUpdate" size="small" plain type="primary">
<!-- <el-button @click="handleUpdate" size="small" plain type="primary">
数据同步
</el-button>
</el-button> -->
<auth-button category="Button"
:show-btn-ids="['9120301']"/>
</div>
</div>
<d2-table
......
......@@ -16,9 +16,9 @@
<!-- <el-button type="primary" @click="handleAddRule" size="small">
新增
</el-button> -->
<el-button type="primary" @click="massDevelopmentNonFusion" size="small"> 批量开通非融合 </el-button>
<el-button type="primary" @click="handleExport" size="small"> 导出 </el-button>
<!-- <auth-button :show-btn-ids="['9040101']" category="Button" /> -->
<!-- <el-button type="primary" @click="massDevelopmentNonFusion" size="small"> 批量开通非融合 </el-button>
<el-button type="primary" @click="handleExport" size="small"> 导出 </el-button> -->
<auth-button :show-btn-ids="['9100104', '9100105']" category="Button" />
</d2-table-header>
<d2-table ref="ruleTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :selectable-fn="selectableFn">
......
......@@ -118,10 +118,11 @@
:
</span>
<el-radio-group v-model="classificationObj.trafficSide[index].calculateMode"
@change="changeCalculateModeType">
>
<el-radio :label="1"> 按品类计算 </el-radio>
<el-radio :label="2" disabled> 按整单计算 </el-radio>
<el-radio :label="2"> 按整单计算 </el-radio>
</el-radio-group>
<span class="check_calculateMode" v-if="classificationObj.trafficSide[index].calculateModeError">仅支持整单规则</span>
</el-form-item>
<div style="display: flex">
<el-form-item required :prop="'trafficSide.' + index + '.expenseCategoryCalculateType'" :rules="[
......@@ -286,6 +287,7 @@
<el-radio :label="1"> 按品类计算 </el-radio>
<el-radio :label="2"> 按整单计算 </el-radio>
</el-radio-group>
<span class="check_calculateMode" v-if="classificationObj.serviceProvider[index].calculateModeError">仅支持整单规则</span>
</el-form-item>
<div style="display: flex">
<el-form-item required :prop="'serviceProvider.' + index + '.expenseCategoryCalculateType'" :rules="[
......@@ -476,6 +478,44 @@
<el-radio :label="'Y'"> 扣除回收成本 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item required :label="'嘀加成本'">
<span slot="label">
嘀加成本
<!-- content="Top Left 提示文字" -->
<el-tooltip class="item" effect="dark" placement="right">
<template slot="content">
<p>开启嘀加成本,计算分账时会自动预留出嘀加成本费用给对应的承担方;</p>
<p>不开启嘀加成本,计算分账时不自动预留出嘀加成本费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-radio-group v-model="classificationObj.djCostFlag">
<el-radio :label="'N'"> 不扣嘀加成本 </el-radio>
<el-radio :label="'Y'"> 扣除嘀加成本 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item required :label="'第三方成本'">
<span slot="label">
第三方成本
<!-- content="Top Left 提示文字" -->
<el-tooltip class="item" effect="dark" placement="right">
<template slot="content">
<p>开启第三方成本,计算分账时会自动预留出第三方成本费用给对应的承担方;</p>
<p>不开启第三方成本,计算分账时不自动预留出第三方成本费用;</p>
</template>
<i class="el-icon-info"></i>
</el-tooltip>
:
</span>
<el-radio-group v-model="classificationObj.thirdPartyCostFlag">
<el-radio :label="'N'"> 不扣第三方成本 </el-radio>
<el-radio :label="'Y'"> 扣除第三方成本 </el-radio>
</el-radio-group>
</el-form-item>
<div class="platformPublic" v-for="(item, index) in classificationObj.platformPublic" :key="index + 300">
<el-form-item :label="item.expenseCategoryName" :prop="'platformPublic.' + index + '.calculateMode'" :rules="[
{ required: true, message: '请选择计算方式', trigger: 'change' }
......@@ -512,9 +552,9 @@
:
</span>
<el-radio-group v-model="classificationObj.platformPublic[index].calculateMode"
:disabled="classificationObj.platformPublic[index].isDisabled" @change="changeCalculateModeType">
:disabled="classificationObj.platformPublic[index].isDisabled" >
<el-radio :label="1"> 按品类计算 </el-radio>
<el-radio :label="2" disabled> 按整单计算 </el-radio>
<el-radio :label="2"> 按整单计算 </el-radio>
</el-radio-group>
</el-form-item>
<div style="display: flex;">
......@@ -801,6 +841,8 @@ export default {
packageGoods: [],
virtualAccountCostFlag: 'Y',
recoveryCostFlag: 'Y',
djCostFlag: 'Y',
thirdPartyCostFlag: 'Y',
goodsSource: 1
// expenseCategoryRules: [
// {
......@@ -973,6 +1015,28 @@ export default {
]
obj.platformPublic && obj.platformPublic.push(...arr)
}
if (this.classificationObj.djCostFlag == 'Y') {
const arr = [
{
id: 302,
expenseCategoryId: 302,
applicationObjectName: "嘀加成本",
applicationObjectType: 3
}
]
obj.platformPublic && obj.platformPublic.push(...arr)
}
if (this.classificationObj.thirdPartyCostFlag == 'Y') {
const arr = [
{
id: 303,
expenseCategoryId: 303,
applicationObjectName: "第三方成本",
applicationObjectType: 3
}
]
obj.platformPublic && obj.platformPublic.push(...arr)
}
obj.platformPublic &&
obj.platformPublic.push({
......@@ -1496,14 +1560,14 @@ export default {
// debugger
// this.classificationObj[key].push(Object.assign(obj))
// 流量方分润/其他费用是按整单计算 服务商分润 均为按整单计算 不可操作
if (key == 'trafficSide' || key == 'platformPublic') {
if (editObj?.calculateMode == 2) {
this.classificationObj.serviceProvider?.forEach(val => {
val.isDisabled = true
val.calculateMode = 2
})
}
}
// if (key == 'trafficSide' || key == 'platformPublic') {
// if (editObj?.calculateMode == 2) {
// this.classificationObj.serviceProvider?.forEach(val => {
// val.isDisabled = true
// val.calculateMode = 2
// })
// }
// }
})
}
// 需要拷贝的值
......@@ -1513,6 +1577,8 @@ export default {
"goodsCostFlag",
"virtualAccountCostFlag",
"recoveryCostFlag",
"djCostFlag",
"thirdPartyCostFlag",
"groupType",
"goodsTypes",
"categoryType",
......@@ -1658,6 +1724,8 @@ export default {
partnerDeductChargeFlag: obj.partnerDeductChargeFlag,
virtualAccountCostFlag: obj.virtualAccountCostFlag,
recoveryCostFlag: obj.recoveryCostFlag,
djCostFlag: obj.djCostFlag,
thirdPartyCostFlag: obj.thirdPartyCostFlag,
goodsCostFlag: obj.goodsCostFlag,
goodsSource: obj.goodsSource,
groupType,
......@@ -1708,7 +1776,10 @@ export default {
// }
// })
// })
}
},
setCalculateError(index, item, flag = true) {
this.$set(this.classificationObj[item][index], 'calculateModeError', flag)
},
},
beforeDestroy() {
this.delGoodsSource({ tabIndex: this.tabindex })
......@@ -1770,6 +1841,10 @@ export default {
.el-form-item {
width: 25%;
}
.check_calculateMode{
margin-left: 30px;
color: #F56C6C;
}
}
}
......
......@@ -3,7 +3,7 @@
<d2-dialog title="分账测试" :is-visible="verificationCodeVisible" class="verificationCode" width="1200px"
@closeDialog="handleClose" @confirmDialog="handleConfirm">
<!-- <d2-container> -->
<el-form ref="form" border :model="form" :rules="rules" label-width="100px">
<el-form ref="form" border :model="form" :rules="rules" label-width="120px">
<div class="formItem">
<el-form-item label="商品售价:" prop="totalPrice" required>
<el-input v-model="form.totalPrice" @input="handleInput($event, 'totalPrice')" />
......@@ -17,6 +17,12 @@
<el-form-item label="回收成本:" prop="recoveryCost">
<el-input v-model="form.recoveryCost" @input="handleInput($event, 'recoveryCost')" />
</el-form-item>
<el-form-item label="嘀加成本:" prop="djCost">
<el-input v-model="form.djCost" @input="handleInput($event, 'djCost')" />
</el-form-item>
<el-form-item label="第三方成本:" prop="thirdPartyCost">
<el-input v-model="form.thirdPartyCost" @input="handleInput($event, 'thirdPartyCost')" />
</el-form-item>
<!-- prop="goodsCost" @input="handleInput($event,'goodsCost')"-->
<el-form-item label="手续费:" required>
<el-input :value="categoryTableData.serviceCharge" disabled>
......@@ -176,7 +182,9 @@ export default {
totalPrice: '',
goodsCost: '',
virtualAccountCost: '',
recoveryCost: ''
recoveryCost: '',
djCost: '',
thirdPartyCost: ''
},
oldVal: {
totalPrice: 0,
......
......@@ -86,7 +86,7 @@
<!-- closable -->
<el-tab-pane v-for="(item, idx) in editableTabs" :key="item.name" :label="item.title" :name="item.name"
:closable="idx != 0">
<span slot="label"><i v-show="item.testFlag != 'Y'" class="el-icon-warning car-error-txt" />{{ item.title }}
<span slot="label"><i v-show="item.testFlag != 'Y' || item.calculateModeError" class="el-icon-warning car-error-txt" />{{ item.title }}
</span>
<div class="classificationCptContainer">
<classificationCpt :ref="`classification${item.name}`" :key="idx" :goods-list="goodsTypeGroupRelations"
......@@ -422,8 +422,8 @@ export default {
} else if (applicationObjectType == 2) {
prev.serviceProvider.push(obj)
} else if (applicationObjectType == 3) {
// 过滤掉 产品成本 虚拟对账成本 回收成本
const filterIdList = [3, 4, 300, 301]
// 过滤掉 产品成本 虚拟对账成本 回收成本 嘀加成本 第三方成本
const filterIdList = [3, 4, 300, 301, 302, 303]
if (!filterIdList.includes(obj.id)) {
prev.platformPublic.push(obj)
}
......@@ -579,8 +579,56 @@ export default {
this.submitParams.smsCode = smsCode
// this.submitParams.effectStartDate = effectStartDate
this.submitParams.effectStartDate = effectStartDate ? effectStartDate + ' 00:00:00' : ''
console.log(this.submitParams)
// return
// let flag = true
this.submitParams?.goodsTypeGroupRules?.forEach((val, index) => {
this.editableTabs[index].calculateModeError = false
const node = this.$refs[`classification${this.editableTabs[index].name}`][0]
let [trafficSide, serviceProvider, platformPublic] = [[], [], []]
val?.expenseCategoryRules?.forEach((subV, subIndex) => {
if (subV?.targetType == 1) {
trafficSide.push(subV)
} else if (subV?.targetType == 2) {
serviceProvider.push(subV)
} else if (subV?.targetType == 3) {
platformPublic.push(subV)
}
if (subIndex == val.expenseCategoryRules?.length - 1) {
// 若自定义费用类目存在按整单分润模式,则流量方类目设置和服务商类目设置时,在按(收入-自定义其他费用)比例、按(收入-其他费用)比例按、园区店毛利(不扣除产品成本)、按园区店毛利仅支持整单模式(面向整套规则),存在该情况则无法提交(短信验证提交时)并toast提示:存在费用类目的计算模式冲突,请确认后重新操作
let platformPublicCalculateModeFlag = platformPublic.findIndex(i => i.calculateMode == 2)
// 若流量方费用类目存在按整单分润模式,则服务商类目设置时,在按园区店总金额、按园区店毛利(不扣除产品成本)、按园区店毛利仅支持整单模式(面向整套规则),存在该情况则无法提交(短信验证提交时)并toast提示:存在费用类目的计算模式冲突,请确认后重新操作
let trafficSideCalculateModeFlag = trafficSide.findIndex(i => i.calculateMode == 2)
if (platformPublicCalculateModeFlag > -1) {
trafficSide?.map((value, subI) => {
node.setCalculateError(subI, 'trafficSide', false)
if (value?.calculateMode == 1 && [8, 9].includes(value.expenseCategoryCalculateType)) {
// flag = false
this.editableTabs[index].calculateModeError = true
node.setCalculateError(subI, 'trafficSide')
}
})
serviceProvider?.map((value, subI) => {
node.setCalculateError(subI, 'serviceProvider', false)
if (value?.calculateMode == 1 && [5, 6, 8, 9].includes(value.expenseCategoryCalculateType)) {
// flag = false
this.editableTabs[index].calculateModeError = true
node.setCalculateError(subI, 'serviceProvider')
}
})
} else if (trafficSideCalculateModeFlag > -1) {
serviceProvider?.map((value, subI) => {
node.setCalculateError(subI, 'trafficSide', false)
node.setCalculateError(subI, 'serviceProvider', false)
if (value?.calculateMode == 1 && [5, 6, 8, 9].includes(value.expenseCategoryCalculateType)) {
// flag = false
this.editableTabs[index].calculateModeError = true
node.setCalculateError(subI, 'serviceProvider')
}
})
}
}
})
})
// if (!flag) return this.$message.error('存在费用类目的计算模式冲突,请确认后重新操作')
merchantSettleDistributeRule({ json: JSON.stringify(this.submitParams) }).then((result) => {
// 判断是否有没有进行过分账测试的账号
......
......@@ -107,11 +107,11 @@
</el-tooltip>
</span>
<el-radio-group v-model="classificationObj.flowCostArr[floweIdx].calculateMode"
@change="changeCalculateMode">
>
<el-radio :label="1">
按品类计算
</el-radio>
<el-radio :label="2" disabled>
<el-radio :label="2">
按整单计算
</el-radio>
</el-radio-group>
......
......@@ -22,10 +22,12 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button class="default-blue-btn"
<!-- <el-button class="default-blue-btn"
plain
@click="handleExport"
size="small">导出</el-button>
size="small">导出</el-button> -->
<auth-button :show-btn-ids="['9040606']"
category="Button" />
</d2-table-header>
<d2-table ref="damageTable"
:get-list-api="getListApi"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!