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