Commit eb354dd5 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !212
2 parents c9414dda ae5841a3
Showing 60 changed files with 1192 additions and 612 deletions
...@@ -112,8 +112,9 @@ ...@@ -112,8 +112,9 @@
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script> <script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %> <% } %>
</body> </body>
<script> <script type="text/javascript"
src="https://webapi.amap.com/maps?v=1.4.15&key=44cc16e43ad7ed3358df507bd0618181&plugin=AMap.Geocoder&plugin=AMap.PlaceSearch&plugin=AMap.Geolocation">
</script> </script>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -54,3 +54,9 @@ export function getAllGoodsList(data) { ...@@ -54,3 +54,9 @@ export function getAllGoodsList(data) {
data.method = `${path}productManager.search` data.method = `${path}productManager.search`
return request(data, 'post') return request(data, 'post')
} }
// 批量下架
export function batchUpdateStatus(data) {
data.method = `${path}merchantGoodsInfo.updateBatchOffShelf`
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
...@@ -135,3 +135,9 @@ export function getDivisionRecordByOrderCode(data) { ...@@ -135,3 +135,9 @@ export function getDivisionRecordByOrderCode(data) {
data.method = `${path2}getDivisionRecordByOrderCode` data.method = `${path2}getDivisionRecordByOrderCode`
return request(data, "post") return request(data, "post")
} }
// 取消分账
export function cancelDivideAccountsAPI(data) {
data.method = `${path2}order.cancelProfitAllocation`
return request(data, "post")
}
...@@ -10,6 +10,7 @@ import sign from "./sign" ...@@ -10,6 +10,7 @@ import sign from "./sign"
import RequestMethods from "./request.methods" import RequestMethods from "./request.methods"
import util from "@/libs/util.js" import util from "@/libs/util.js"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import axiosPackage from 'axios'
const request = ( const request = (
params = {}, params = {},
method = RequestMethods.GET, method = RequestMethods.GET,
...@@ -34,6 +35,7 @@ const request = ( ...@@ -34,6 +35,7 @@ const request = (
"dj.smartcarlife": "axios", "dj.smartcarlife": "axios",
dj: "axios", dj: "axios",
scrm: "axios2", scrm: "axios2",
merchants: "axios3",
"glsx.accounts.biz.common.pictureUpload": "common" "glsx.accounts.biz.common.pictureUpload": "common"
} }
const baseApiName = mappingName[apiName] const baseApiName = mappingName[apiName]
...@@ -70,6 +72,7 @@ const request = ( ...@@ -70,6 +72,7 @@ const request = (
} }
// console.log(signWay[apiName], "baseApiName") // console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret const secret = baseConfig[baseApiName].secret
const CancelToken = axiosPackage.CancelToken
var reqData = var reqData =
method === RequestMethods.POST method === RequestMethods.POST
? { ? {
...@@ -78,6 +81,16 @@ const request = ( ...@@ -78,6 +81,16 @@ const request = (
} }
: { params: sign(params, noSignAttr, secret, signWay[apiName]) } : { params: sign(params, noSignAttr, secret, signWay[apiName]) }
reqData = reqData = Object.assign(reqData, options, {}) reqData = reqData = Object.assign(reqData, options, {})
// 请求进度
if (params?.onProcess) {
reqData.onUploadProgress = params.onProcess
}
// 取消请求
if (params?.cancelFun) {
reqData.cancelToken = new CancelToken(function excutor(c) {
params.cancelFun.cancel = c
})
}
// console.log(method === RequestMethods.POST) // console.log(method === RequestMethods.POST)
// console.log(url) // console.log(url)
// console.log(options) // console.log(options)
......
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 分页查询店面配置列表
export function shopSettingList(data) {
data.method = `${path}serviceMerchant.shopSettingList`
return request(data)
}
// 店铺设置保存
export function shopSetting(data) {
data.method = `${path}serviceMerchant.shopSetting`
return request(data, RequestMethods.POST)
}
// 获取店铺设置
export function getShopSetting(data) {
data.method = `${path}serviceMerchant.getShopSetting`
return request(data)
}
// 根据商户号年份查询产值
export function listByMerchantIdAndYear(data) {
data.method = `${path}workbench.listByMerchantIdAndYear`
return request(data)
}
// 查询4s店关联各场景园区店
export function listYqRef(data) {
data.method = `${path}scenemerchantref.listYqRef`
return request(data)
}
// 查询4s店关联各场景园区店账户中心配置
export function listYqRefConfig(data) {
data.method = `${path}scenemerchantref.listYqRefConfig`
return request(data)
}
// 查询员工分页列表
export function findStaffByPage(data) {
data.method = `merchants.api.staff.findStaffByPageForDJ`
return request(data)
}
// 根据商户名称和渠道类型查询商户列表
export function findMerchantListByPage(data) {
data.method = `merchants.api.open.findMerchantListByPage`
return request(data)
}
// 查询字典数据列表
export function findDictData(data) {
data.method = `merchants.api.menu.findDictData`
return request(data)
}
// 更新员工标签
export function updateStaffBatch(data) {
data.method = `merchants.api.staff.updateStaffBatch`
return request(data)
}
...@@ -90,3 +90,9 @@ export function queryFeeCategoryByType(data) { ...@@ -90,3 +90,9 @@ export function queryFeeCategoryByType(data) {
data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType` data.method = `${path}smartcarlife.feeCategory.queryFeeCategoryByType`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// pdf上传
export function uploadPDF(data) {
data.method = `${path}smartcarlife.common.uploadPdf`
return request(data, RequestMethods.POST, ["file"])
}
...@@ -242,13 +242,18 @@ export const payTypeList = [ ...@@ -242,13 +242,18 @@ export const payTypeList = [
{ {
confId: "4", confId: "4",
confLabel: "支付宝支付" confLabel: "支付宝支付"
},
{
confId: "5",
confLabel: "嘀加收款"
} }
] ]
export const payType = { export const payType = {
1: "微信支付", 1: "微信支付",
2: "4S店支付", 2: "4S店支付",
3: "POS机收款", 3: "POS机收款",
4: "支付宝支付" 4: "支付宝支付",
5: "嘀加收款"
} }
// 订单类型 // 订单类型
...@@ -631,9 +636,41 @@ export const procureModeList = [ ...@@ -631,9 +636,41 @@ export const procureModeList = [
{ confId: 2, confName: "批发" }, { confId: 2, confName: "批发" },
{ confId: 3, confName: "代销" } { confId: 3, confName: "代销" }
] ]
//开店审核 申请状态 // 开店审核 申请状态
export const applyStatus = [ export const applyStatus = [
{ confId: 1, confName: "待审核" }, { confId: 1, confName: "待审核" },
{ confId: 2, confName: "已审核" }, { confId: 2, confName: "已审核" },
{ confId: 3, confName: "已驳回" } { confId: 3, confName: "已驳回" }
] ]
// 店面配置 业务性质
export const businessNature = [
{ confId: 1, confName: "直营渠道" },
{ confId: 2, confName: "直营4S店" }
]
// 店面配置 门店类型
export const storeType = [
{ confId: 1, confName: "嘀加" },
{ confId: 2, confName: "广汇" },
{ confId: 3, confName: "直营" }
]
// 店面配置 部署场景
export const sceneForShop = [
{ confId: 1, confValue: "1.1精品升级" },
{ confId: 4, confValue: "1.2次新车升配" },
{ confId: 3, confValue: "1.3售后众筹" },
{ confId: 0, confValue: "2.1会员权益/升级" },
{ confId: 2, confValue: "2.2续保膨胀金" }
]
// 店面配置 员工类型
export const staffBusinessType = [
{ confId: 0, confValue: "驻店人员" },
{ confId: 1, confValue: "门店销售" }
]
// 店面配置 人员设置列表-部署场景
export const sceneForPerson = [
{ confId: "1", confValue: "1.1" },
{ confId: "4", confValue: "1.2" },
{ confId: "3", confValue: "1.3" },
{ confId: "0", confValue: "2.1" },
{ confId: "2", confValue: "2.2" }
]
...@@ -99,3 +99,19 @@ export const rangePickerOptions_year_2023 = { ...@@ -99,3 +99,19 @@ export const rangePickerOptions_year_2023 = {
return false return false
} }
} }
/**
* 时间控件-单年份选择时限制年份
*/
export const rangePickerOptions_year = {
disabledDate(date) {
// console.log(date)
// console.log(date.getFullYear())
// console.log(new Date())
if (date.getFullYear() > new Date().getFullYear()) {
return true
}
return false
}
}
<!-- 弹窗 --> <!-- 弹窗 -->
<template> <template>
<div> <div>
<el-dialog <el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose"
:title="title" :close-on-click-modal="false" :width="width">
:visible.sync="isVisible"
:show-close="showClose"
:before-close="handleClose"
:close-on-click-modal="false"
:width="width"
>
<span slot="title"> <span slot="title">
{{ title }} {{ title }}
<span class="dialog-sub-title"> <span class="dialog-sub-title">
...@@ -18,12 +12,8 @@ ...@@ -18,12 +12,8 @@
<slot /> <slot />
<div slot="footer"> <div slot="footer">
<slot name="btn-start" /> <slot name="btn-start" />
<el-button <el-button type="primary" v-if="isShowFooter" @click="handleConfirm"
type="primary" :loading="$store.state.d2admin.loading.value">
v-if="isShowFooter"
@click="handleConfirm"
:loading="$store.state.d2admin.loading.value"
>
{{ btnOkLabel }} {{ btnOkLabel }}
</el-button> </el-button>
<el-button v-if="!noCancel" @click="handleClose"> 取消 </el-button> <el-button v-if="!noCancel" @click="handleClose"> 取消 </el-button>
......
...@@ -786,7 +786,7 @@ export default { ...@@ -786,7 +786,7 @@ export default {
this.profitOldVal.splice(index, 1) this.profitOldVal.splice(index, 1)
} }
this.judgeIsDisable() this.judgeIsDisable()
}) }).catch(() => { })
}, },
// 图片 // 图片
handleImgChange(e, targetItem, subIndex = 0) { handleImgChange(e, targetItem, subIndex = 0) {
......
...@@ -415,7 +415,7 @@ export default { ...@@ -415,7 +415,7 @@ export default {
} }
}, 0) }, 0)
} }
}) }).catch(() => { })
}, },
async logOut() { async logOut() {
this.$confirm('确认退出?', '退出', { this.$confirm('确认退出?', '退出', {
...@@ -426,7 +426,7 @@ export default { ...@@ -426,7 +426,7 @@ export default {
this.$router.push('/login') this.$router.push('/login')
await this.logout() await this.logout()
await this.$StoreReset.call(this.$store) // 重置 store await this.$StoreReset.call(this.$store) // 重置 store
}) }).catch(() => { })
}, },
async getInfo() { async getInfo() {
this.info = await this.load() this.info = await this.load()
......
...@@ -38,7 +38,22 @@ process.env.NODE_ENV === "production" && ...@@ -38,7 +38,22 @@ process.env.NODE_ENV === "production" &&
// of transactions for performance monitoring. // of transactions for performance monitoring.
// We recommend adjusting this value in production // We recommend adjusting this value in production
tracesSampleRate: 1.0, tracesSampleRate: 1.0,
logErrors: true logErrors: true,
// 解决火狐浏览器 无法捕获错误的问题
beforeSend(event, hint) {
const isNonErrorException =
event.exception.values[0].value.startsWith(
"Non-Error exception captured"
) ||
hint.originalException.message.startsWith(
"Non-Error exception captured"
)
if (isNonErrorException) {
// We want to ignore those kind of errors
return null
}
return event
}
// "send-default-pii": true // "send-default-pii": true
}) })
......
...@@ -184,7 +184,7 @@ service.interceptors.response.use( ...@@ -184,7 +184,7 @@ service.interceptors.response.use(
break break
} }
} }
if (error && error.stack.indexOf("timeout") > -1) { if (error && error?.stack?.indexOf("timeout") > -1) {
if (error.stack.indexOf("5000ms")) { if (error.stack.indexOf("5000ms")) {
error.message = "查询超时,请刷新页面重试!" error.message = "查询超时,请刷新页面重试!"
} }
...@@ -192,7 +192,7 @@ service.interceptors.response.use( ...@@ -192,7 +192,7 @@ service.interceptors.response.use(
// console.log(error) // console.log(error)
} }
store.commit("d2admin/loading/set", false) store.commit("d2admin/loading/set", false)
errorLog(error) if (!error.__CANCEL__) errorLog(error) // 取消请求 不做错误提示
return Promise.reject(error) return Promise.reject(error)
} }
) )
......
...@@ -346,6 +346,14 @@ export const routerName = { ...@@ -346,6 +346,14 @@ export const routerName = {
} }
] ]
}, },
{
authId: "9030908",
parentId: "90309",
label: "批量下架",
category: "Button",
type: "primary",
handle: "handleBatchOffShelf"
}
], ],
component: _import("goods/grounding/index") component: _import("goods/grounding/index")
}, },
......
...@@ -166,9 +166,9 @@ export const routerName = { ...@@ -166,9 +166,9 @@ export const routerName = {
meta: { meta: {
title: "配置详情", title: "配置详情",
authId: "90603013", authId: "90603013",
parentId: "90603012", parentId: "90603",
cache: false, cache: false,
activePath: "/setDetail" activePath: "/merchantManage"
}, },
component: _import("systemConfig/merchant/setDetail") component: _import("systemConfig/merchant/setDetail")
}, },
...@@ -302,7 +302,7 @@ export const routerName = { ...@@ -302,7 +302,7 @@ export const routerName = {
addRoutePath: [ addRoutePath: [
{ {
authId: "90611", authId: "90611",
name: "申请虚拟对账账户", name: "申请虚拟账户成本",
parentId: "90610" parentId: "90610"
} }
] ]
...@@ -322,7 +322,7 @@ export const routerName = { ...@@ -322,7 +322,7 @@ export const routerName = {
path: "/applyAccount_new", path: "/applyAccount_new",
name: "applyAccount_new", name: "applyAccount_new",
meta: { meta: {
title: "申请虚拟对账账户", title: "申请虚拟账户成本",
authId: "90611", authId: "90611",
parentId: "90610", parentId: "90610",
cache: false, cache: false,
...@@ -617,5 +617,115 @@ export const routerName = { ...@@ -617,5 +617,115 @@ export const routerName = {
} }
], ],
component: _import("systemConfig/OpenshopProcess/index") component: _import("systemConfig/OpenshopProcess/index")
},
90619: {
path: "/shopConfig",
name: "shopConfig",
meta: {
title: "店面配置",
authId: "90619",
parentId: "906",
cache: false
},
auth: [
{
authId: "9061901",
parentId: "90619",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9061902",
parentId: "90619",
label: "导入更新",
category: "Button",
type: "primary",
handle: "handleImport"
},
{
authId: "9061903",
parentId: "90619",
label: "收款码",
handle: "collectionQRcode"
},
{
authId: "9061904",
parentId: "90619",
label: "工单设置",
handle: "handleSet",
addRoutePath: [
{
authId: "9061905",
name: "工单设置页面",
parentId: "9061904"
}
]
},
{
authId: "9061906",
parentId: "90619",
label: "店铺设置",
handle: "handleShopSet",
addRoutePath: [
{
authId: "9061907",
name: "店铺设置页面",
parentId: "9061906"
}
]
},
{
authId: "9061908",
parentId: "90619",
label: "人员管理",
handle: "handlePersonnelManage",
addRoutePath: [
{
authId: "9061909",
name: "人员管理页面",
parentId: "9061908"
}
]
}
],
component: _import("systemConfig/ShopConfig/index")
},
9061905: {
path: "/setWorkorderDetail",
name: "setWorkorderDetail",
meta: {
title: "配置详情",
authId: "9061905",
parentId: "9061904",
cache: false,
activePath: "/setWorkorderDetail"
},
component: _import("systemConfig/ShopConfig/setWorkorderDetail")
},
9061907: {
path: "/shopSet",
name: "shopSet",
meta: {
title: "店铺设置",
authId: "9061907",
parentId: "9061906",
cache: false,
activePath: "/shopSet"
},
component: _import("systemConfig/ShopConfig/shopSet")
},
9061909: {
path: "/personnelManagementIndex",
name: "personnelManagementIndex",
meta: {
title: "人员设置",
authId: "9061909",
parentId: "9061908",
cache: false,
activePath: "/personnelManagementIndex"
},
component: _import("systemConfig/ShopConfig/personnelManagementIndex")
} }
} }
...@@ -134,6 +134,9 @@ export default { ...@@ -134,6 +134,9 @@ export default {
*/ */
opend2db({ state, dispatch }) { opend2db({ state, dispatch }) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
try {
// debugger
console.log(state, dispatch)
// 设置数据 // 设置数据
dispatch( dispatch(
"d2admin/db/set", "d2admin/db/set",
...@@ -147,6 +150,10 @@ export default { ...@@ -147,6 +150,10 @@ export default {
root: true root: true
} }
) )
} catch (error) {
console.log(error, "opend2db")
}
// end // end
resolve() resolve()
}) })
...@@ -280,6 +287,7 @@ export default { ...@@ -280,6 +287,7 @@ export default {
state.opened.splice(index, 1) state.opened.splice(index, 1)
} }
// 持久化 // 持久化
await dispatch("opend2db") await dispatch("opend2db")
// 最后需要判断是否需要跳到首页 // 最后需要判断是否需要跳到首页
if (isCurrent) { if (isCurrent) {
......
<!-- 被选中门店展示 --> <!-- 被选中门店展示 -->
<template> <template>
<div> <div>
<el-table <el-table :data="tableData" style="width: 690px" border class="store-table">
:data="tableData" <el-table-column label="序号" align="center" type="index" width="64px" />
style="width: 690px" <el-table-column prop="yqMerchantName" label="园区店名称" align="center" />
border <el-table-column prop="merchantName" label="4S店名称" align="center" />
class="store-table"> <el-table-column prop="merchantId" label="商户编号" align="center" />
<el-table-column <el-table-column prop="userType" label="商户类型" align="center">
label="序号"
align="center"
type="index"
width="64px" />
<el-table-column
prop="yqMerchantName"
label="园区店名称"
align="center" />
<el-table-column
prop="merchantName"
label="4S店名称"
align="center" />
<el-table-column
prop="merchantId"
label="商户编号"
align="center" />
<el-table-column
prop="userType"
label="商户类型"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span> <span>{{ baseData[scope.row.channelType === 2 ? 'ghUserTypeList' : 'userTypeList'][scope.row.userType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="删除" align="center">
label="删除"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
class="el-icon-delete"
@click="handleDelete(scope.row)"
type="text" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="券码数量(张)" align="center" width="160px">
label="券码数量(张)"
align="center"
width="160px">
<template slot-scope="scope"> <template slot-scope="scope">
<slot <slot name="num" :scope="{ row: scope.row, index: scope.$index }" />
name="num"
:scope="{row: scope.row, index: scope.$index}" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -90,11 +60,12 @@ export default { ...@@ -90,11 +60,12 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('handleTableStoreDelete', row) this.$emit('handleTableStoreDelete', row)
}).catch(err => {
console.log(err)
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped></style>
</style>
<!-- 发券宝 - 店里列表 --> <!-- 发券宝 - 店里列表 -->
<template> <template>
<div class="coupons"> <div class="coupons">
<d2-table ref="couponsTable" <d2-table ref="couponsTable" :has-num="false" :base-data="baseData" :sort-obj="sortObj"
:has-num="false" :search-form="searchFormSearch" :head-search-form="searchForm" :table-params="tableParams"
:base-data="baseData" :get-list-api="getListApi" :before-search-fn="beforeSearchFn" @handleTableHeadChange="handleTableHeadChange">
:sort-obj="sortObj" <template slot="auth-button" slot-scope="scope">
:search-form="searchFormSearch"
:head-search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@handleTableHeadChange="handleTableHeadChange">
<template slot="auth-button"
slot-scope="scope">
<auth-button :data="scope.scope" /> <auth-button :data="scope.scope" />
</template> </template>
</d2-table> </d2-table>
<edit-coupons-dialog :coupons-visible="couponsVisible" <edit-coupons-dialog :coupons-visible="couponsVisible" :coupon-info="couponInfo" @couponClose="couponClose" />
:coupon-info="couponInfo"
@couponClose="couponClose" />
</div> </div>
</template> </template>
...@@ -77,7 +67,7 @@ export default { ...@@ -77,7 +67,7 @@ export default {
}, { }, {
label: '类型', label: '类型',
parentProp: 'couponInfo', parentProp: 'couponInfo',
prop: 'couponTypeName', prop: 'couponTypeName'
// optionConfig: { // optionConfig: {
// searchItemName: 'couponTypeList', // searchItemName: 'couponTypeList',
// optionId: 'goodsType', // optionId: 'goodsType',
...@@ -192,7 +182,7 @@ export default { ...@@ -192,7 +182,7 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = { this.searchFormSearch = {
...this.parentSearchForm, ...this.parentSearchForm
// ...this.searchForm // ...this.searchForm
} }
resolve() resolve()
...@@ -231,6 +221,8 @@ export default { ...@@ -231,6 +221,8 @@ export default {
this.notice.okTips() this.notice.okTips()
this.$refs.couponsTable.refreshTable() this.$refs.couponsTable.refreshTable()
}) })
}).catch(err => {
console.log(err)
}) })
}, },
// 删除 // 删除
...@@ -244,11 +236,12 @@ export default { ...@@ -244,11 +236,12 @@ export default {
this.notice.okTips() this.notice.okTips()
this.$refs.couponsTable.refreshTable() this.$refs.couponsTable.refreshTable()
}) })
}).catch(err => {
console.log(err)
}) })
} }
} }
} }
</script> </script>
<style scoped> <style scoped></style>
</style>
<template> <template>
<div> <div>
<el-table <el-table :data="goodsInfoData.linkMerchants" style="width: 100%" border class="store-table">
:data="goodsInfoData.linkMerchants" <el-table-column prop="merchantName" label="门店名称" align="center" />
style="width: 100%" <el-table-column prop="yqMerchantName" label="园区店名称" align="center" />
border <el-table-column prop="warrantyType" label="质保类型" align="center" width="205">
class="store-table">
<el-table-column
prop="merchantName"
label="门店名称"
align="center" />
<el-table-column
prop="yqMerchantName"
label="园区店名称"
align="center" />
<el-table-column
prop="warrantyType"
label="质保类型"
align="center"
width="205">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
<el-select <el-select style="width: 90%;" v-model="scope.row.warrantyType">
style="width: 90%;" <el-option v-for="item in warrantyTypeList" :key="item.confId" :label="item.confLabel"
v-model="scope.row.warrantyType">
<el-option
v-for="item in warrantyTypeList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId" /> :value="item.confId" />
</el-select> </el-select>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="删除" align="center" width="90">
label="删除"
align="center"
width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -48,7 +24,7 @@ ...@@ -48,7 +24,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'relateProTable', name: 'RelateProTable',
props: { props: {
warrantyTypeList: { warrantyTypeList: {
type: Array, type: Array,
...@@ -60,7 +36,7 @@ export default { ...@@ -60,7 +36,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters('goodsInfoData', {goodsInfoData: 'getGoodsInfoData'}) ...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
}, },
methods: { methods: {
handleDelete(item) { handleDelete(item) {
...@@ -70,6 +46,8 @@ export default { ...@@ -70,6 +46,8 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('handleDelete', 1, item) this.$emit('handleDelete', 1, item)
}).catch(err => {
console.log(err)
}) })
} }
} }
......
<template> <template>
<div> <div>
<el-table <el-table :data="goodsInfoData.speciLinkMerchants" style="width: 100%" border class="store-table">
:data="goodsInfoData.speciLinkMerchants" <el-table-column prop="merchantName" label="门店名称" align="center" />
style="width: 100%" <el-table-column prop="yqMerchantName" label="园区店名称" align="center" />
border <el-table-column prop="upgradeGoodsList" label="规格" align="center">
class="store-table">
<el-table-column prop="merchantName"
label="门店名称"
align="center" />
<el-table-column prop="yqMerchantName"
label="园区店名称"
align="center" />
<el-table-column prop="upgradeGoodsList"
label="规格"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
<span v-for="(item, index) in scope.row.upgradeGoodsList" <span v-for="(item, index) in scope.row.upgradeGoodsList" :key="index">{{
:key="index">{{ item.specificationData.replace(/;~;/g, ' ') }}<span item.specificationData.replace(/;~;/g, ' ') }}<span
v-if="index !== scope.row.upgradeGoodsList.length - 1">;</span></span> v-if="index !== scope.row.upgradeGoodsList.length - 1">;</span></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warrantyType" <el-table-column prop="warrantyType" label="质保类型" align="center" width="205">
label="质保类型"
align="center"
width="205">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
<el-select style="width: 90%;" <el-select style="width: 90%;" v-model="scope.row.warrantyType">
v-model="scope.row.warrantyType"> <el-option v-for="item in warrantyTypeList" :key="item.confId" :label="item.confLabel"
<el-option v-for="item in warrantyTypeList"
:key="item.confId"
:label="item.confLabel"
:value="item.confId" /> :value="item.confId" />
</el-select> </el-select>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="删除" <el-table-column label="删除" align="center" width="90">
align="center"
width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -52,7 +33,7 @@ ...@@ -52,7 +33,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'specRelateStoreTable', name: 'SpecRelateStoreTable',
props: { props: {
warrantyTypeList: { warrantyTypeList: {
type: Array, type: Array,
...@@ -64,7 +45,7 @@ export default { ...@@ -64,7 +45,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters('goodsInfoData', {goodsInfoData: 'getGoodsInfoData'}) ...mapGetters('goodsInfoData', { goodsInfoData: 'getGoodsInfoData' })
}, },
methods: { methods: {
handleDelete(item) { handleDelete(item) {
...@@ -74,8 +55,10 @@ export default { ...@@ -74,8 +55,10 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('handleDelete', 2, item) this.$emit('handleDelete', 2, item)
}).catch(err => {
console.log(err)
}) })
}, }
} }
} }
</script> </script>
...@@ -6,29 +6,22 @@ ...@@ -6,29 +6,22 @@
{{ addOrEdit === 'add' ? '新增商品' : '编辑商品' }} {{ addOrEdit === 'add' ? '新增商品' : '编辑商品' }}
</p> </p>
<!-- SPU --> <!-- SPU -->
<sourceMaterial <sourceMaterial :thired-material-list="thiredMaterialList">
:thiredMaterialList="thiredMaterialList">
</sourceMaterial> </sourceMaterial>
<!-- SKU --> <!-- SKU -->
<specifications ref="specifications-form" @checkGoodsInfo="checkGoodsInfo" @saveAssignByMerchantEvent="saveAssignByMerchantEvent" @getCopyGoodsInfoData="getCopyGoodsInfoData"></specifications> <specifications ref="specifications-form" @checkGoodsInfo="checkGoodsInfo"
@saveAssignByMerchantEvent="saveAssignByMerchantEvent" @getCopyGoodsInfoData="getCopyGoodsInfoData">
</specifications>
<!-- 分配门店 --> <!-- 分配门店 -->
<distribution :store-api="getMerchantListByScene" @checkGoodsInfo="checkGoodsInfo" @saveAssignByMerchantEvent="saveAssignByMerchantEvent" @getGoodsInfo="getGoodsInfo"></distribution> <distribution :store-api="getMerchantListByScene" @checkGoodsInfo="checkGoodsInfo"
@saveAssignByMerchantEvent="saveAssignByMerchantEvent" @getGoodsInfo="getGoodsInfo"></distribution>
<div style="margin-top: 40px;"> <div style="margin-top: 40px;">
<el-button <el-button type="primary" @click="handleUp(1)" :disabled="$store.state.d2admin.loading.value" class="ok-btn"
type="primary"
@click="handleUp(1)"
:disabled="$store.state.d2admin.loading.value"
class="ok-btn"
style="marginRight:16px">提交</el-button> style="marginRight:16px">提交</el-button>
<el-button <el-button class="cancel-btn" @click="handleClose">取消</el-button>
class="cancel-btn" <el-button type="primary" @click="handleUp()"
@click="handleClose">取消</el-button>
<el-button
type="primary"
@click="handleUp()"
:disabled="!$store.state.d2admin.loading.value && (goodsInfoData.status == 1 || goodsInfoData.status == 2)" :disabled="!$store.state.d2admin.loading.value && (goodsInfoData.status == 1 || goodsInfoData.status == 2)"
class="ok-btn" class="ok-btn" style="marginLeft:26px">保存</el-button>
style="marginLeft:26px">保存</el-button>
</div> </div>
</div> </div>
</d2-container> </d2-container>
...@@ -142,7 +135,7 @@ export default { ...@@ -142,7 +135,7 @@ export default {
}) })
item.children = twoChildren item.children = twoChildren
}) })
this.thiredMaterialList= res this.thiredMaterialList = res
if (showSelect) { if (showSelect) {
this.decorate(goodsInfoId, res) this.decorate(goodsInfoId, res)
this.$nextTick(() => { this.$nextTick(() => {
...@@ -156,7 +149,7 @@ export default { ...@@ -156,7 +149,7 @@ export default {
}, },
getGoodsInfo(id, flag) { getGoodsInfo(id, flag) {
getGoodsInfoById({ id: id }).then(res => { getGoodsInfoById({ id: id }).then(res => {
let specificationDetailList = [] const specificationDetailList = []
let objData = {} let objData = {}
res.upgradeGoodsMerchantRefList && res.upgradeGoodsMerchantRefList.forEach(val => { res.upgradeGoodsMerchantRefList && res.upgradeGoodsMerchantRefList.forEach(val => {
// 默认质保类型 0质保卡 1质保权益卡 // 默认质保类型 0质保卡 1质保权益卡
...@@ -184,7 +177,7 @@ export default { ...@@ -184,7 +177,7 @@ export default {
val.specificationValueList = val.goodsSpecificationValueList || [] val.specificationValueList = val.goodsSpecificationValueList || []
specificationDetailList.push(val) specificationDetailList.push(val)
}) })
let selectedPositions = res.goodsInfo?.goodsPositionList?.map((val) => {return val.position}) || [] const selectedPositions = res.goodsInfo?.goodsPositionList?.map((val) => { return val.position }) || []
objData = { objData = {
supplierName: res.goodsInfo.supplierName, supplierName: res.goodsInfo.supplierName,
sceneName: res.goodsInfo.sceneName, sceneName: res.goodsInfo.sceneName,
...@@ -219,7 +212,7 @@ export default { ...@@ -219,7 +212,7 @@ export default {
this.setUpdateGoodsInfo(objData) this.setUpdateGoodsInfo(objData)
if (this.show) { if (this.show) {
this.$nextTick(() => { this.$nextTick(() => {
if (res.goodsSpecificationNameList.length > 1) this.$refs['specifications-form']?.$refs['multipleSpecificationFormRef'].changeSpecs() if (res.goodsSpecificationNameList.length > 1) this.$refs['specifications-form']?.$refs.multipleSpecificationFormRef.changeSpecs()
}) })
} }
if (flag) { // 首次进入编辑页面 if (flag) { // 首次进入编辑页面
...@@ -230,14 +223,14 @@ export default { ...@@ -230,14 +223,14 @@ export default {
}) })
}, },
decorate(goodsInfoId, treeData) { decorate(goodsInfoId, treeData) {
let arr = this.changeDetSelect( const arr = this.changeDetSelect(
goodsInfoId, goodsInfoId,
treeData treeData
) )
this.setUpdateGoodsInfo({goodsId: arr}) this.setUpdateGoodsInfo({ goodsId: arr })
}, },
changeDetSelect(key, treeData) { changeDetSelect(key, treeData) {
let arr = [] // 在递归时操作的数组 const arr = [] // 在递归时操作的数组
let returnArr = [] // 存放结果的数组 let returnArr = [] // 存放结果的数组
let depth = 0 // 定义全局层级 let depth = 0 // 定义全局层级
// 定义递归函数 // 定义递归函数
...@@ -272,6 +265,8 @@ export default { ...@@ -272,6 +265,8 @@ export default {
this.close({ tagName: '/commodity' }) this.close({ tagName: '/commodity' })
this.$router.push({ name: 'commodity' }) this.$router.push({ name: 'commodity' })
this.close({ tagName: '/editCommodity' }) this.close({ tagName: '/editCommodity' })
}).catch(err => {
console.log(err)
}) })
} }
}, },
...@@ -299,7 +294,7 @@ export default { ...@@ -299,7 +294,7 @@ export default {
}, },
checkGoodsInfo(num, callback) { checkGoodsInfo(num, callback) {
// 根据规格类型赋值进行校验判断 // 根据规格类型赋值进行校验判断
let confirmShopData = this.goodsInfoData.specificationType == 1 ? deepClone(this.goodsInfoData.goodsSpecificationSingleList) : deepClone(this.goodsInfoData.goodsSpecificationList) const confirmShopData = this.goodsInfoData.specificationType == 1 ? deepClone(this.goodsInfoData.goodsSpecificationSingleList) : deepClone(this.goodsInfoData.goodsSpecificationList)
// num 1提交 3关联门店 // num 1提交 3关联门店
if (!this.goodsInfoData.goodsCode) { if (!this.goodsInfoData.goodsCode) {
this.$message({ this.$message({
...@@ -322,7 +317,7 @@ export default { ...@@ -322,7 +317,7 @@ export default {
}) })
return document.getElementById('specificationDetailList').scrollIntoView() return document.getElementById('specificationDetailList').scrollIntoView()
} }
let arr = confirmShopData.map(item => { const arr = confirmShopData.map(item => {
item.shopPriceEmpty = true item.shopPriceEmpty = true
item.shopMinPriceEmpty = true item.shopMinPriceEmpty = true
item.upgradePriceEmpty = true item.upgradePriceEmpty = true
...@@ -348,7 +343,7 @@ export default { ...@@ -348,7 +343,7 @@ export default {
} }
// 仅分发至单店时,隐藏采购价/卷,无需填写 // 仅分发至单店时,隐藏采购价/卷,无需填写
if (this.goodsInfoData.shoppingMallFlag === '0') specialList.splice(specialList.indexOf('purchasePrice'), 1) if (this.goodsInfoData.shoppingMallFlag === '0') specialList.splice(specialList.indexOf('purchasePrice'), 1)
let requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'upgradePrice'] const requiredList = ['specificationData', 'shopPrice', ...specialList, 'shopMinPrice', 'upgradePrice']
// 有设置供应方 且供应方是第三方(除广联直营以外的) // 有设置供应方 且供应方是第三方(除广联直营以外的)
if (this.isThirdShop()) requiredList.splice(1, 1) if (this.isThirdShop()) requiredList.splice(1, 1)
for (var i = 0; i < confirmShopData.length; i++) { for (var i = 0; i < confirmShopData.length; i++) {
...@@ -369,7 +364,7 @@ export default { ...@@ -369,7 +364,7 @@ export default {
} }
// 删除表单校验新增字段 // 删除表单校验新增字段
for (var i = 0; i < confirmShopData?.length; i++) { for (var i = 0; i < confirmShopData?.length; i++) {
let item = confirmShopData[i] const item = confirmShopData[i]
item.shopMinPrice = item.shopMinPrice && parseFloat(item.shopMinPrice) item.shopMinPrice = item.shopMinPrice && parseFloat(item.shopMinPrice)
item.shopPrice = item.shopPrice && parseFloat(item.shopPrice) item.shopPrice = item.shopPrice && parseFloat(item.shopPrice)
item.upgradePrice = item.upgradePrice && parseFloat(item.upgradePrice) item.upgradePrice = item.upgradePrice && parseFloat(item.upgradePrice)
...@@ -397,6 +392,8 @@ export default { ...@@ -397,6 +392,8 @@ export default {
// document.getElementById('specificationDetailList').scrollIntoView() // document.getElementById('specificationDetailList').scrollIntoView()
// 直接做保存 // 直接做保存
this.$refs['specifications-form'].handleAddConfirm(this.goodsInfoData, this.goodsInfoData.specificationType, false, num) this.$refs['specifications-form'].handleAddConfirm(this.goodsInfoData, this.goodsInfoData.specificationType, false, num)
}).catch(err => {
console.log(err)
}) })
} }
if (num == 1) { if (num == 1) {
...@@ -416,12 +413,12 @@ export default { ...@@ -416,12 +413,12 @@ export default {
}, },
// 校验零售价成本价最低价关系 // 校验零售价成本价最低价关系
formatPrice(item) { formatPrice(item) {
return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice)) return (!this.filterEmpty(item.shopPrice) && !this.filterEmpty(item.shopMinPrice) && Number(item.shopPrice) > Number(item.shopMinPrice)) ||
|| (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice)) (!this.filterEmpty(item.upgradePrice) && !this.filterEmpty(item.shopPrice) && Number(item.shopPrice) > Number(item.upgradePrice)) ||
|| (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice)) (!this.filterEmpty(item.shopMinPrice) && !this.filterEmpty(item.upgradePrice) && Number(item.shopMinPrice) > Number(item.upgradePrice))
}, },
saveAssignByMerchantEvent(data, isDelete) { saveAssignByMerchantEvent(data, isDelete) {
let flag = this.goodsInfoData.distributionType == '1' const flag = this.goodsInfoData.distributionType == '1'
// flag true按规格保存 // flag true按规格保存
const copyData = deepClone(data) const copyData = deepClone(data)
const arrData = [] const arrData = []
...@@ -472,6 +469,7 @@ export default { ...@@ -472,6 +469,7 @@ export default {
.edit-commodity { .edit-commodity {
position: relative; position: relative;
} }
.d2-form-block { .d2-form-block {
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
padding: 20px 0px; padding: 20px 0px;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
{{ i.title }} {{ i.title }}
</p> </p>
<div class="flex_item"> <div class="flex_item">
<div v-for="(item, index) in i.formBlock" :key="index" :class="(item.type === 'incidBox' || item.type === 'table') ? 'item message-box' : 'item'"> <div v-for="(item, index) in i.formBlock" :key="index" :class="(item.type === 'incidBox' || item.type === 'table' || item.type === 'upload') ? 'item message-box' : 'item'">
<!-- 商品附带信息 --> <!-- 商品附带信息 -->
<div v-if="formData['upgradeGoodsName'] && item.type === 'incidBox'"> <div v-if="formData['upgradeGoodsName'] && item.type === 'incidBox'">
<el-form-item :prop="item.name" <el-form-item :prop="item.name"
...@@ -77,6 +77,27 @@ ...@@ -77,6 +77,27 @@
<relateStoreTable v-if="$$(formData['merchantGoodsRefList'], 'length')" :merchant-goods-ref-list="formData['merchantGoodsRefList']" :isDetail="true"></relateStoreTable> <relateStoreTable v-if="$$(formData['merchantGoodsRefList'], 'length')" :merchant-goods-ref-list="formData['merchantGoodsRefList']" :isDetail="true"></relateStoreTable>
</el-form-item> </el-form-item>
</div> </div>
<!-- 图片文件 -->
<div v-else-if="item.type === 'upload'">
<div v-if="$$(formData[item.name], 'length')">
<el-form-item :prop="item.name"
:label="item.label ? item.label + ':' : ''"
:id="item.name"
:label-width="item.label ? '180px' : '0px'"
class="dis-in-block"
style="margin-bottom: 0">
<div class="file_box">
<div class="file_item" v-for="(subItem, subIndex) in formData[item.name]" :key="subIndex">
<div class="item_box" @click="handleFileView(subItem)">
<img class="image_icon" v-if="subItem.voucherFileUrl.includes('.png') || subItem.voucherFileUrl.includes('.jpg')" src="../images/photo_thumbnail.png"/>
<img class="image_icon" v-if="subItem.voucherFileUrl.includes('.pdf')" src="../images/PDF_thumbnail.png"/>
<span class="file_size">文件大小:{{ formatSize(subItem.fileSize) }}</span>
</div>
</div>
</div>
</el-form-item>
</div>
</div>
<div v-else> <div v-else>
<el-form-item :prop="item.name" <el-form-item :prop="item.name"
:label="item.label ? (item.unit ? (membraneTypeList.includes(formData['goodsType']) ? item.label + `(元)/车` : (item.label + '(元)/件')) : item.label) + ':' : ''" :label="item.label ? (item.unit ? (membraneTypeList.includes(formData['goodsType']) ? item.label + `(元)/车` : (item.label + '(元)/件')) : item.label) + ':' : ''"
...@@ -106,6 +127,11 @@ ...@@ -106,6 +127,11 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-image-viewer
v-if="imgViewerVisible"
:on-close="closeImgViewer"
:url-list="imageFileArr"
:initialIndex="initialIndex" />
</div> </div>
</template> </template>
...@@ -118,7 +144,8 @@ import relateStoreTable from "./relateStoreTable.vue" ...@@ -118,7 +144,8 @@ import relateStoreTable from "./relateStoreTable.vue"
export default { export default {
name: 'groundingForm', name: 'groundingForm',
components: { components: {
relateStoreTable relateStoreTable,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer')
}, },
data() { data() {
return { return {
...@@ -128,7 +155,11 @@ export default { ...@@ -128,7 +155,11 @@ export default {
selectedValue: '', selectedValue: '',
show: false, show: false,
examineFlag: false, examineFlag: false,
membraneTypeList membraneTypeList,
dialogObj: {},
imageFileArr: [],
imgViewerVisible: false,
initialIndex: 0
} }
}, },
...@@ -169,6 +200,16 @@ export default { ...@@ -169,6 +200,16 @@ export default {
} }
}, },
deep: true deep: true
},
// 获取所有文件中的图片
'formData.voucherList': {
handler(newVal) {
if (newVal) {
let imageFileArr = newVal.filter(v => v.voucherFileUrl && (v.voucherFileUrl.includes('.png') || v.voucherFileUrl.includes('jpg')))
this.imageFileArr = imageFileArr.map(item => { return item.voucherFileUrl })
}
},
deep: true
} }
}, },
...@@ -227,6 +268,42 @@ export default { ...@@ -227,6 +268,42 @@ export default {
} }
this.selectedValue = value this.selectedValue = value
}, },
// 文件预览
handleFileView(item) {
if (item?.voucherFileUrl?.includes('.pdf')) {
window.open(item.voucherFileUrl) // pdf文件新窗口打开直接预览
} else {
this.imgViewerVisible = true
this.imageFileArr.forEach((val, index) => { // 图片使用elementImage图片预览组件
if (val == item.voucherFileUrl) this.initialIndex = index
})
}
},
closeImgViewer() {
this.imgViewerVisible = false
},
// 文件大小格式化
formatSize(byte) {
let size = ""
if (byte < 0.1 * 1024) {
// 小于0.1KB,则转化成B
size = `${byte.toFixed(2)}B`
} else if (byte < 0.1 * 1024 * 1024) {
// 小于0.1MB,则转化成KB
size = `${(byte / 1024).toFixed(2)}KB`
} else if (byte < 0.1 * 1024 * 1024 * 1024) {
// 小于0.1GB,则转化成MB
size = `${(byte / (1024 * 1024)).toFixed(2)}MB`
}
const sizeStr = `${size}` // 转成字符串
const index = sizeStr.indexOf(".") // 获取小数点处的索引
const dou = sizeStr.substr(index + 1, 2) // 获取小数点后两位的值
if (dou == "00") {
// 判断后两位是否为00,如果是则删除00
return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2)
}
return size
},
// 处理金额补零 // 处理金额补零
priceFilter(num) { priceFilter(num) {
var pow = Math.pow(10, 2) var pow = Math.pow(10, 2)
...@@ -268,6 +345,7 @@ export default { ...@@ -268,6 +345,7 @@ export default {
flex-flow: wrap; flex-flow: wrap;
.item { .item {
flex: 0 0 33%; flex: 0 0 33%;
margin-bottom: 10px;
} }
.message-box{ .message-box{
flex: 0 0 100%; flex: 0 0 100%;
...@@ -294,6 +372,29 @@ export default { ...@@ -294,6 +372,29 @@ export default {
} }
} }
} }
.file_box{
width: 100%;
display: flex;
flex-wrap: wrap;
.file_item{
flex: 0 0 20%;
display: flex;
.item_box{
display: flex;
align-items: center;
cursor: pointer;
.image_icon{
width: 24px;
height: 24px;
}
.file_size{
color: #999999;
font-size: 14px;
margin-left: 8px;
}
}
}
}
} }
} }
.width_100{ .width_100{
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<d2-container class="edit-commodity" v-loading="!show"> <d2-container class="edit-commodity" v-loading="!show">
<div class="" v-if="show"> <div class="" v-if="show">
<grounding-form ref="d2GroundingForm" :add-or-edit="addOrEdit" :form-ref="proFormRef" :origin-data="editData" <grounding-form ref="d2GroundingForm" :add-or-edit="addOrEdit" :form-ref="proFormRef" :origin-data="editData"
:form-list="editForm" :secondGoodsList="secondGoodsList" @handleAddConfirm="handleAddConfirm" :form-list="editForm" :second-goods-list="secondGoodsList" @handleAddConfirm="handleAddConfirm"
@visibleChange="visibleChange" @interestsLoadmore="interestsLoadmore" @remoteMethod="remoteMethod" @visibleChange="visibleChange" @interestsLoadmore="interestsLoadmore" @remoteMethod="remoteMethod"
@handleClose="handleAddClose"></grounding-form> @handleClose="handleAddClose"></grounding-form>
</div> </div>
...@@ -11,15 +11,14 @@ ...@@ -11,15 +11,14 @@
</template> </template>
<script> <script>
import { productList, baseSupplyModeList, upgradeSupplyModeList } from "./constants/data" import { productList, baseSupplyModeList, upgradeSupplyModeList } from "./constants/data"
import { getMerchantGoodsInfo } from '@api/grounding' import { getMerchantGoodsInfo, addOrUpdateAPI, getAllGoodsList } from '@api/grounding'
import groundingForm from "./components/groundingForm.vue" import groundingForm from "./components/groundingForm.vue"
import { positionTypeList, sceneCodeList } from '@/common/constants.js' import { positionTypeList, sceneCodeList } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { addOrUpdateAPI, getAllGoodsList } from '@api/grounding'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
export default { export default {
name: 'editGrounding', name: 'EditGrounding',
components: { components: {
groundingForm groundingForm
}, },
...@@ -169,6 +168,13 @@ export default { ...@@ -169,6 +168,13 @@ export default {
label: '上架门店', label: '上架门店',
isRequired: true, isRequired: true,
type: 'button' type: 'button'
}, {
name: 'voucherList',
label: '上架凭证',
type: 'upload',
topTips: '支持扩展名:.pdf .jpg .png',
tips: '注:最多可上传30个文件',
maxPhotoNum: 30
}] }]
}], }],
editData: { editData: {
...@@ -186,7 +192,8 @@ export default { ...@@ -186,7 +192,8 @@ export default {
minSellPrice: '', minSellPrice: '',
giveCostPrice: '', giveCostPrice: '',
recoveryCostPrice: '', recoveryCostPrice: '',
reconcilyCostPrice: '' reconcilyCostPrice: '',
voucherList: []
}, },
secondGoodsList: [], secondGoodsList: [],
goodsNameKeyword: '', goodsNameKeyword: '',
...@@ -196,7 +203,7 @@ export default { ...@@ -196,7 +203,7 @@ export default {
}, },
mounted() { mounted() {
this.getBaseData() this.getBaseData()
let id = this.$route.params.id const id = this.$route.params.id
if (!id) { if (!id) {
// 获取全部上架商品 // 获取全部上架商品
this.getSelectingList() this.getSelectingList()
...@@ -247,7 +254,7 @@ export default { ...@@ -247,7 +254,7 @@ export default {
}).then(res => { }).then(res => {
this.copyFormList = deepClone(this.editForm) this.copyFormList = deepClone(this.editForm)
this.allPages = res.pages this.allPages = res.pages
let resArr = [] const resArr = []
res.list && res.list.forEach(val => { res.list && res.list.forEach(val => {
val.upgradeGoodsList.forEach(v => { val.upgradeGoodsList.forEach(v => {
resArr.push({ resArr.push({
...@@ -310,8 +317,8 @@ export default { ...@@ -310,8 +317,8 @@ export default {
}, },
getDetailInfo(id) { getDetailInfo(id) {
getMerchantGoodsInfo({ id }).then(res => { getMerchantGoodsInfo({ id }).then(res => {
let productType = [] const productType = []
let positionNamesArr = res?.goodsType == 1 ? deepClone(positionTypeList).filter(val => res.upgradeGoods.position == val.position) : [] const positionNamesArr = res?.goodsType == 1 ? deepClone(positionTypeList).filter(val => res.upgradeGoods.position == val.position) : []
if (res?.upgradeProductFlag == 'Y') productType.push(2) if (res?.upgradeProductFlag == 'Y') productType.push(2)
if (res?.baseProductFlag == 'Y') productType.push(1) if (res?.baseProductFlag == 'Y') productType.push(1)
res.productType = productType // 产品类型 res.productType = productType // 产品类型
...@@ -324,13 +331,17 @@ export default { ...@@ -324,13 +331,17 @@ export default {
res.supplierCode = res?.goodsInfo?.supplierCode // 供应方code res.supplierCode = res?.goodsInfo?.supplierCode // 供应方code
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode // 第三方编码 res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode // 第三方编码
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
let defaultSelect = [{ // 默认选中项 用于回显 const defaultSelect = [{ // 默认选中项 用于回显
confId: res?.upgradeGoodsId, confId: res?.upgradeGoodsId,
confNameValue: res?.upgradeGoodsName, confNameValue: res?.upgradeGoodsName,
confTypeNameValue: `(${res?.goodsTypeName} / ${res?.goodsName} / ${res?.upgradeCommodityCode})`, confTypeNameValue: `(${res?.goodsTypeName} / ${res?.goodsName} / ${res?.upgradeCommodityCode})`
}] }]
res.voucherList.forEach(val => { // 处理上传进度 默认进度100%
if (val.voucherFileUrl) val.uploadProgress = 100
})
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',') // 服务项目 res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',') // 服务项目
res.merchantGoodsRefList = res.merchantGoodsRefList || [] // 上架门店 res.merchantGoodsRefList = res.merchantGoodsRefList || [] // 上架门店
res.voucherList = res.voucherList || [] // 上架凭证
this.editData = res || {} this.editData = res || {}
this.getSelectingList(defaultSelect) this.getSelectingList(defaultSelect)
}) })
...@@ -344,12 +355,12 @@ export default { ...@@ -344,12 +355,12 @@ export default {
this.close({ tagName: '/editGrounding' }) this.close({ tagName: '/editGrounding' })
}, },
handleAddConfirm(data) { handleAddConfirm(data) {
let { num } = data const { num } = data
this.confirm(num, data) this.confirm(num, data)
}, },
confirm(num, data) { confirm(num, data) {
// 1保存并上架 2存草稿 // 1保存并上架 2存草稿
let formObj = {} const formObj = {}
this.editForm.forEach(val => { this.editForm.forEach(val => {
val.formBlock.forEach(v => { val.formBlock.forEach(v => {
if (v.name) formObj[v.name] = data[v.name] if (v.name) formObj[v.name] = data[v.name]
...@@ -359,19 +370,31 @@ export default { ...@@ -359,19 +370,31 @@ export default {
} }
}) })
}) })
let arr = [] const arr = []
data?.merchantGoodsRefList?.forEach(val => { // 组合数据 防止请求参数过长 data?.merchantGoodsRefList?.forEach(val => { // 上架门店组合数据 防止请求参数过长
arr.push({ arr.push({
merchantId: val.merchantId, merchantId: val.merchantId,
merchantName: val.merchantName merchantName: val.merchantName
}) })
}) })
const fileArr = []
data?.voucherList?.forEach(val => { // 处理上传凭证数据 删除或取消上传并不会删除数组 只是将url置空
if (val.voucherFileUrl) {
fileArr.push({
voucherFileUrl: val.voucherFileUrl,
fileSize: val.fileSize,
fileName: val.fileName
})
}
})
// 整理上传凭证数据
delete formObj?.productType delete formObj?.productType
let params = { const params = {
saveDraft: num !== 1, saveDraft: num !== 1,
id: data.id, id: data.id,
...formObj, ...formObj,
merchantGoodsRefList: arr merchantGoodsRefList: arr,
voucherList: fileArr
} }
if (num == 1 && !baseConfig.supplierCode.includes(data.supplierCode)) { // 第三方商品无需走审核流程不用提示 if (num == 1 && !baseConfig.supplierCode.includes(data.supplierCode)) { // 第三方商品无需走审核流程不用提示
this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', { this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', {
...@@ -398,7 +421,7 @@ export default { ...@@ -398,7 +421,7 @@ export default {
if (obj === null || obj === undefined || obj === "") return param if (obj === null || obj === undefined || obj === "") return param
for (var key in obj) { for (var key in obj) {
if (obj[key] !== null && obj[key] !== undefined && obj[key] !== "") { if (obj[key] !== null && obj[key] !== undefined && obj[key] !== "") {
param[key] = obj[key]; param[key] = obj[key]
} }
} }
return param return param
...@@ -416,6 +439,8 @@ export default { ...@@ -416,6 +439,8 @@ export default {
this.close({ tagName: '/grounding' }) this.close({ tagName: '/grounding' })
this.$router.push({ name: 'grounding' }) this.$router.push({ name: 'grounding' })
this.close({ tagName: '/grounding' }) this.close({ tagName: '/grounding' })
}).catch(err => {
console.log(err)
}) })
} }
} }
......
...@@ -2,14 +2,8 @@ ...@@ -2,14 +2,8 @@
<template> <template>
<d2-container class="edit-commodity"> <d2-container class="edit-commodity">
<div class="" v-if="show"> <div class="" v-if="show">
<detail <detail ref="d2GroundingDetail" :rules="rules" form-name="grounding" :origin-data="editData" :form-list="editForm"
ref="d2GroundingDetail" :product-service-item-list="productServiceItemList" @handleAddConfirm="handleAddConfirm"
:rules="rules"
form-name="grounding"
:origin-data="editData"
:form-list="editForm"
:productServiceItemList="productServiceItemList"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"></detail> @handleClose="handleAddClose"></detail>
</div> </div>
</d2-container> </d2-container>
...@@ -17,13 +11,12 @@ ...@@ -17,13 +11,12 @@
<script> <script>
import { getMerchantGoodsInfo, batchReviewAPI } from '@api/grounding' import { getMerchantGoodsInfo, batchReviewAPI } from '@api/grounding'
import detail from './components/detail.vue' import detail from './components/detail.vue'
import { sceneList } from '@/common/constants.js' import { sceneList, positionTypeList } from '@/common/constants.js'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { positionTypeList } from '@/common/constants' import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data'
import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList} from './constants/data'
export default { export default {
name: 'groundingDetail', name: 'GroundingDetail',
components: { components: {
detail detail
}, },
...@@ -42,7 +35,7 @@ export default { ...@@ -42,7 +35,7 @@ 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 }
}, },
editForm: [{ editForm: [{
title: '商品信息', title: '商品信息',
...@@ -127,6 +120,10 @@ export default { ...@@ -127,6 +120,10 @@ export default {
name: 'merchantGoodsRefList', name: 'merchantGoodsRefList',
label: '上架门店', label: '上架门店',
type: 'table' type: 'table'
}, {
name: 'voucherList',
label: '上架凭证',
type: 'upload'
}] }]
}, { }, {
title: '操作信息', title: '操作信息',
...@@ -148,7 +145,7 @@ export default { ...@@ -148,7 +145,7 @@ export default {
}, },
mounted() { mounted() {
// 获取商品详情 // 获取商品详情
let id = this.$route.params.id const id = this.$route.params.id
this.detailId = id this.detailId = id
if (!id) return this.show = true if (!id) return this.show = true
this.getDetailInfo(id) this.getDetailInfo(id)
...@@ -160,12 +157,12 @@ export default { ...@@ -160,12 +157,12 @@ export default {
}), }),
getDetailInfo(id) { getDetailInfo(id) {
getMerchantGoodsInfo({ id }).then(res => { getMerchantGoodsInfo({ id }).then(res => {
let productType = [] const productType = []
if (res?.upgradeProductFlag == 'Y') productType.push(2) if (res?.upgradeProductFlag == 'Y') productType.push(2)
if (res?.baseProductFlag == 'Y') productType.push(1) if (res?.baseProductFlag == 'Y') productType.push(1)
let productTypeTextArr = [] const productTypeTextArr = []
// 太阳膜回显 部位 // 太阳膜回显 部位
let positionNamesArr = res?.goodsType == 1 ? deepClone(positionTypeList).filter(val => res.upgradeGoods.position == val.position) : [] const positionNamesArr = res?.goodsType == 1 ? deepClone(positionTypeList).filter(val => res.upgradeGoods.position == val.position) : []
// 产品类型 // 产品类型
productList.forEach(v => { productList.forEach(v => {
if (productType.includes(v.confId)) productTypeTextArr.push(v.confName) if (productType.includes(v.confId)) productTypeTextArr.push(v.confName)
...@@ -193,8 +190,9 @@ export default { ...@@ -193,8 +190,9 @@ export default {
res.warrantyPeriod = res.upgradeGoods?.warrantyPeriod res.warrantyPeriod = res.upgradeGoods?.warrantyPeriod
res.serviceYears = res.upgradeGoods?.serviceYears res.serviceYears = res.upgradeGoods?.serviceYears
res.merchantGoodsRefList = res.merchantGoodsRefList || [] res.merchantGoodsRefList = res.merchantGoodsRefList || []
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || '', res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || ''
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
res.voucherList = res?.voucherList || []
this.editData = res || {} this.editData = res || {}
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
...@@ -231,6 +229,8 @@ export default { ...@@ -231,6 +229,8 @@ export default {
this.close({ tagName: '/grounding' }) this.close({ tagName: '/grounding' })
this.$router.push({ name: 'grounding' }) this.$router.push({ name: 'grounding' })
this.close({ tagName: '/grounding' }) this.close({ tagName: '/grounding' })
}).catch(err => {
console.log(err)
}) })
} }
}, },
......
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
<span style="{display: inline-block;}"> <span style="{display: inline-block;}">
<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">
<auth-button category="Button" :show-btn-ids="['9030908']" />
</span>
<!-- 导出 --> <!-- 导出 -->
<span style="{display: inline-block};margin-left: 10px"> <span style="{display: inline-block};margin-left: 10px">
<auth-button category="Button" :show-btn-ids="['9030902']" /> <auth-button category="Button" :show-btn-ids="['9030902']" />
...@@ -120,7 +124,7 @@ ...@@ -120,7 +124,7 @@
</template> </template>
<script> <script>
import { getProductTypeBySceneId, getList } from '@api/product' import { getProductTypeBySceneId, getList } from '@api/product'
import { getGroundingManageList, updateGoodsStatus, batchReviewAPI, delGroundingById } from '@api/grounding' import { getGroundingManageList, updateGoodsStatus, batchReviewAPI, delGroundingById, batchUpdateStatus } from '@api/grounding'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { sceneCodeList, sceneList } from '@/common/constants.js' import { sceneCodeList, sceneList } from '@/common/constants.js'
import { getParkStore } from '@api/editCustomer' import { getParkStore } from '@api/editCustomer'
...@@ -513,11 +517,11 @@ export default { ...@@ -513,11 +517,11 @@ export default {
}) })
}, },
selectableFn(row) { selectableFn(row) {
var isSelect = true // var isSelect = true
if (row.status !== 4) { // 仅待审核状态可勾选 // if (row.status !== 4) { // 仅待审核状态可勾选
isSelect = false // isSelect = false
} // }
return isSelect return true
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
...@@ -609,7 +613,7 @@ export default { ...@@ -609,7 +613,7 @@ export default {
}) })
}, },
handleUpOrDown(row) { handleUpOrDown(row) {
var html = row.status == '0' ? '上架信息保存后,自动进入上架审核流程,是否确定保存?' : '下架后对应的门店无法再使用该商品,是否确定下架?' var html = row.status == '0' ? '上架后重新进入审核流程;是否确定上架?' : '下架后对应的门店无法再使用该商品,是否确定下架?'
this.$confirm(html, '提示', { this.$confirm(html, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -624,15 +628,18 @@ export default { ...@@ -624,15 +628,18 @@ export default {
console.log(err) console.log(err)
}) })
}, },
// 批量审核
handleBatchReview() { handleBatchReview() {
var selectedData = [] var selectedData = []
if (this.$refs.groundingIndexTable.mutiSelectArr.groundingIndex) { if (this.$refs.groundingIndexTable.mutiSelectArr.groundingIndex) {
selectedData = this.$refs.groundingIndexTable.mutiSelectArr.groundingIndex selectedData = this.$refs.groundingIndexTable.mutiSelectArr.groundingIndex
} }
if (!selectedData.length) { // 上架状态
let status = selectedData.map(v => { return v.status }) || []
if (status.includes(1) || status.includes(0) || status.includes(3) || !selectedData.length) { // 包含1已上架/0已下架/3草稿 未选择
this.$message({ this.$message({
message: "请选择需要审核的商品", message: '请选择待审核的记录',
type: "warning", type: 'warning',
showClose: true showClose: true
}) })
return false return false
...@@ -650,6 +657,36 @@ export default { ...@@ -650,6 +657,36 @@ export default {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
},
// 批量下架
handleBatchOffShelf() {
var selectedData = []
if (this.$refs.groundingIndexTable.mutiSelectArr.groundingIndex) {
selectedData = this.$refs.groundingIndexTable.mutiSelectArr.groundingIndex
}
// 上架状态
let status = selectedData.map(v => { return v.status }) || []
if (status.includes(4) || status.includes(0) || status.includes(3) || !selectedData.length) { // 包含4待审核/0已下架/3草稿 未选择
this.$message({
message: '请选择已上架的记录',
type: 'warning',
showClose: true
})
return false
}
this.$confirm('下架后对应的门店无法再使用该商品,是否确定下架?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let ids = selectedData.map(v => { return v.id }) || []
batchUpdateStatus({ ids: ids }).then(res => {
this.notice.okTips()
this.$refs.groundingIndexTable.refreshTable()
})
}).catch(err => {
console.log(err)
})
} }
} }
} }
......
...@@ -724,6 +724,7 @@ export default { ...@@ -724,6 +724,7 @@ export default {
handleImgChange(e, targetItem, subIndex = 0) { handleImgChange(e, targetItem, subIndex = 0) {
var reader = new FileReader() var reader = new FileReader()
var fileInfo = e.srcElement.files[0] var fileInfo = e.srcElement.files[0]
if (!fileInfo) return
reader.readAsDataURL(fileInfo) reader.readAsDataURL(fileInfo)
reader.onload = e => { reader.onload = e => {
const imgFile = e.target.result const imgFile = e.target.result
...@@ -737,6 +738,9 @@ export default { ...@@ -737,6 +738,9 @@ export default {
} else { } else {
this.formData[targetItem.name][subIndex].content = res this.formData[targetItem.name][subIndex].content = res
} }
document.getElementById(`${targetItem.name}file`).value = ""
}).catch(() => {
document.getElementById(`${targetItem.name}file`).value = ""
}) })
} }
}, },
...@@ -933,7 +937,7 @@ export default { ...@@ -933,7 +937,7 @@ export default {
height: 100%; height: 100%;
position: absolute; position: absolute;
width: 88px; width: 88px;
height: 74px; height: 88px;
left: 0; left: 0;
top: 0; top: 0;
z-index: 2; z-index: 2;
......
...@@ -163,6 +163,13 @@ ...@@ -163,6 +163,13 @@
@click="ruleHistory(scope.row)"> @click="ruleHistory(scope.row)">
分账记录 分账记录
</el-button> </el-button>
<!-- 取消分账 分帐中状态 -->
<el-button type="text"
size="small"
v-if="scope.row.profitAllocationStatus == 5"
@click="cancelRule(scope.row)">
取消分账
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -216,8 +223,9 @@ import { ...@@ -216,8 +223,9 @@ import {
getList, getList,
getOrderCount, getOrderCount,
waitinputorderCount, waitinputorderCount,
orderImport orderImport,
, getServiceStore getServiceStore,
cancelDivideAccountsAPI
} from "@api/order" } from "@api/order"
import { getDiversionMerchantRef } from "@api/merchant" import { getDiversionMerchantRef } from "@api/merchant"
import { manageTypeList, BaseData } from "@/common/constants" import { manageTypeList, BaseData } from "@/common/constants"
...@@ -271,7 +279,8 @@ export default { ...@@ -271,7 +279,8 @@ export default {
profitAllocationStatusOpts: { profitAllocationStatusOpts: {
1: '未分账', 1: '未分账',
2: '已分账', 2: '已分账',
4: '待分账' 4: '待分账',
5: '分账中'
}, },
showFormData: [ showFormData: [
{ {
...@@ -526,6 +535,10 @@ export default { ...@@ -526,6 +535,10 @@ export default {
{ {
confId: '4', confId: '4',
confLabel: '待分账' confLabel: '待分账'
},
{
confId: '5',
confLabel: '分账中'
} }
], ],
}, },
...@@ -896,6 +909,19 @@ export default { ...@@ -896,6 +909,19 @@ export default {
this.ruleInfoVisible = true this.ruleInfoVisible = true
}, },
// 取消分账
cancelRule(row) {
this.$confirm('取消分帐后,订单按线下对账方式计算分润,收款金额统一分账至嘀加智慧云,请谨慎操作。是否确定取消?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
cancelDivideAccountsAPI({orderCode: row.orderCode}).then(res => {
this.notice.okTips()
this.handleSearch()
})
}).catch(() => {})
},
ruleInfoDialogClose(flag) { ruleInfoDialogClose(flag) {
this.ruleInfoVisible = !this.ruleInfoVisible this.ruleInfoVisible = !this.ruleInfoVisible
// if (flag) { // if (flag) {
......
...@@ -13,7 +13,13 @@ ...@@ -13,7 +13,13 @@
:key="subIndex" :key="subIndex"
:label="subItem.label" :label="subItem.label"
class="row-item"> class="row-item">
<span class="detail-txt ellipsis-1" <div class="" v-if="subItem.isImage">
<img v-if="detailForm[subItem.name]" class="order-img"
:src="detailForm[subItem.name]"
@click="handleEnlargeImg(detailForm[subItem.name])">
<span v-else>-</span>
</div>
<span v-else class="detail-txt ellipsis-1"
:title="detailForm[subItem.name]">{{ :title="detailForm[subItem.name]">{{
detailForm[subItem.name] detailForm[subItem.name]
? detailForm[subItem.name] + (subItem.suffix || "") ? detailForm[subItem.name] + (subItem.suffix || "")
...@@ -105,6 +111,12 @@ ...@@ -105,6 +111,12 @@
</div> </div>
<!-- </GLFooter> --> <!-- </GLFooter> -->
</div> </div>
<el-dialog :visible="imgVisible"
:before-close="handleEnlargeImg">
<img width="100%"
:src="detailForm.payVoucher"
alt="图片">
</el-dialog>
</d2-container> </d2-container>
</template> </template>
...@@ -180,7 +192,8 @@ export default { ...@@ -180,7 +192,8 @@ export default {
{ confId: "2", confName: "企微" } { confId: "2", confName: "企微" }
] ]
}, },
hideStatus: false hideStatus: false,
imgVisible: false // 收款凭证图片弹窗
} }
}, },
...@@ -273,6 +286,15 @@ export default { ...@@ -273,6 +286,15 @@ export default {
{ {
label: "退款备注", label: "退款备注",
name: 'refundRemark' name: 'refundRemark'
},
{
label: '备注',
name: 'orderRemark'
},
{
label: '收款凭证',
name: 'payVoucher',
isImage: true
} }
] ]
this.detailFormData = detailFormData this.detailFormData = detailFormData
...@@ -394,6 +416,9 @@ export default { ...@@ -394,6 +416,9 @@ export default {
this.formToRow("detailFormData") this.formToRow("detailFormData")
}) })
}, },
handleEnlargeImg() {
this.imgVisible = !this.imgVisible
},
handleCancel() { handleCancel() {
this.$router.push({ this.$router.push({
path: "/orderList" path: "/orderList"
...@@ -443,9 +468,18 @@ export default { ...@@ -443,9 +468,18 @@ export default {
.order-detail .row-item { .order-detail .row-item {
width: 33%; width: 33%;
} }
.order-detail .row-item .order-img {
width: 80px;
height: 80px;
cursor: pointer;
}
.detail-txt { .detail-txt {
display: inline-block; display: inline-block;
width: 320px; width: 320px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.order-detail .show-table > tbody > tr > td { .order-detail .show-table > tbody > tr > td {
text-align: center; text-align: center;
......
...@@ -158,6 +158,10 @@ ...@@ -158,6 +158,10 @@
@click="ruleHistory(scope.row)"> @click="ruleHistory(scope.row)">
分账记录 分账记录
</el-button> </el-button>
<el-button type="text" style="margin-left: 0;" size="small" v-if="scope.row.profitAllocationStatus == 5"
@click="cancelRule(scope.row)">
取消分账
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -205,7 +209,7 @@ ...@@ -205,7 +209,7 @@
<script> <script>
import { Util } from '@/common/util' import { Util } from '@/common/util'
import { getList, getOrderCount, waitinputorderCount, orderImport } from '@api/order' import { getList, getOrderCount, waitinputorderCount, orderImport, cancelDivideAccountsAPI } from '@api/order'
import { getDiversionMerchantRef, listShop4sByRef } from '@api/merchant' import { getDiversionMerchantRef, listShop4sByRef } from '@api/merchant'
import { manageTypeList, BaseData } from '@/common/constants' import { manageTypeList, BaseData } from '@/common/constants'
import { mapActions, mapState, mapMutations } from 'vuex' import { mapActions, mapState, mapMutations } from 'vuex'
...@@ -255,7 +259,8 @@ export default { ...@@ -255,7 +259,8 @@ export default {
profitAllocationStatusOpts: { profitAllocationStatusOpts: {
1: '未分账', 1: '未分账',
2: '已分账', 2: '已分账',
4: '待分账' 4: '待分账',
5: '分账中'
}, },
showFormData: [{ showFormData: [{
label: '订单状态', label: '订单状态',
...@@ -482,6 +487,10 @@ export default { ...@@ -482,6 +487,10 @@ export default {
{ {
confId: '4', confId: '4',
confLabel: '待分账' confLabel: '待分账'
},
{
confId: '5',
confLabel: '分账中'
} }
], ],
parkServiceList: [], parkServiceList: [],
...@@ -576,7 +585,7 @@ export default { ...@@ -576,7 +585,7 @@ export default {
'baseData.subShopMerchantList': { 'baseData.subShopMerchantList': {
handler(val) { handler(val) {
console.log('baseData.subShopMerchantList', val) // console.log('baseData.subShopMerchantList', val)
if (val.length > 0) { if (val.length > 0) {
this.showFormData[this.findFormIdx('subShopMerchantId')].isHide = false this.showFormData[this.findFormIdx('subShopMerchantId')].isHide = false
} else { } else {
...@@ -690,7 +699,7 @@ export default { ...@@ -690,7 +699,7 @@ export default {
listShop4sByRef({ listShop4sByRef({
scene: 1 scene: 1
}).then(res => { }).then(res => {
console.log('this.getAllServiceStore()', res) // console.log('this.getAllServiceStore()', res)
this.baseData.storeIdList = res || [] this.baseData.storeIdList = res || []
this.getOptionsList() this.getOptionsList()
}) })
...@@ -844,6 +853,19 @@ export default { ...@@ -844,6 +853,19 @@ export default {
this.ruleInfoVisible = true this.ruleInfoVisible = true
}, },
// 取消分账
cancelRule(row) {
this.$confirm('取消分帐后,订单按线下对账方式计算分润,收款金额统一分账至嘀加智慧云,请谨慎操作。是否确定取消?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
cancelDivideAccountsAPI({orderCode: row.orderCode}).then(res => {
this.notice.okTips()
this.handleSearch()
})
}).catch(() => {})
},
ruleInfoDialogClose(flag) { ruleInfoDialogClose(flag) {
this.ruleInfoVisible = !this.ruleInfoVisible this.ruleInfoVisible = !this.ruleInfoVisible
// if (flag) { // if (flag) {
......
...@@ -72,11 +72,11 @@ ...@@ -72,11 +72,11 @@
:inline="true"> :inline="true">
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="分账操作人:"> label="分账操作人:">
<span>{{ ruleInfo.divisionOperBy }}</span> <span>{{ $$(ruleInfo, 'divisionOperBy') }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="分账操作时间:"> label="分账操作时间:">
<span>{{ ruleInfo.divisionOperDate }}</span> <span>{{ $$(ruleInfo, 'divisionOperDate') }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
......
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose(false)"> <baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose(false)">
<div class="edit-order-dialog" v-if="dialogShow"> <div class="edit-order-dialog" v-if="dialogShow">
<div class="addressTitle"> <div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon"> <img src="../images/addressIcon.webp" alt="" class="icon">
...@@ -12,11 +13,18 @@ ...@@ -12,11 +13,18 @@
<span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span> <span class="address">收货地址:<span class="label">{{ detailInfo.contactAddress }}</span></span>
</div> </div>
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal"> <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage"
@refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<div slot="nowPurNum" slot-scope="scope"> <div slot="nowPurNum" slot-scope="scope">
<div v-if="detailInfo.tableData[scope.index].purchaseNumber == detailInfo.tableData[scope.index].goodsNumber">{{ detailInfo.tableData[scope.index].shipper || '未分配'}}</div> <div
<div v-else-if="detailInfo.tableData[scope.index].shipper && detailInfo.tableData[scope.index].purchaseNumber != 0">{{ detailInfo.tableData[scope.index].shipper }}</div> v-if="detailInfo.tableData[scope.index].purchaseNumber == detailInfo.tableData[scope.index].goodsNumber">
<div v-else-if="detailInfo.tableData[scope.index].purchaseNumber != 0 && !detailInfo.tableData[scope.index].shipper">未分配</div> {{ detailInfo.tableData[scope.index].shipper || '未分配' }}</div>
<div
v-else-if="detailInfo.tableData[scope.index].shipper && detailInfo.tableData[scope.index].purchaseNumber != 0">
{{ detailInfo.tableData[scope.index].shipper }}</div>
<div
v-else-if="detailInfo.tableData[scope.index].purchaseNumber != 0 && !detailInfo.tableData[scope.index].shipper">
未分配</div>
<el-select v-else v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable> <el-select v-else v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable>
<el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid"> <el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid">
</el-option> </el-option>
...@@ -26,11 +34,13 @@ ...@@ -26,11 +34,13 @@
</div> </div>
<div class="footer"> <div class="footer">
<el-button @click="handleDetailClose(false)">取消</el-button> <el-button @click="handleDetailClose(false)">取消</el-button>
<el-button @click="submit" type="primary" v-preventReClick :loading="$store.state.d2admin.loading.value">确定</el-button> <el-button @click="submit" type="primary" v-preventReClick
:loading="$store.state.d2admin.loading.value">确定</el-button>
</div> </div>
</div> </div>
</baseDialog> </baseDialog>
<card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList" @handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog> <card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList"
@handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog>
</div> </div>
</template> </template>
...@@ -211,7 +221,7 @@ export default { ...@@ -211,7 +221,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.addressTitle { .addressTitle {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -243,7 +253,7 @@ export default { ...@@ -243,7 +253,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { >span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -269,7 +279,7 @@ export default { ...@@ -269,7 +279,7 @@ export default {
display: flex; display: flex;
justify-content: end; justify-content: end;
} }
.edit-order-dialog .el-input--medium.border-red .el-input__inner { .edit-order-dialog .el-input--medium.border-red .el-input__inner {
border: 1px solid #eb4e4e; border: 1px solid #eb4e4e;
} }</style>
</style>
...@@ -331,7 +331,7 @@ export default { ...@@ -331,7 +331,7 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.addressTitle { .addressTitle {
display: flex; display: flex;
align-items: center; align-items: center;
......
<!-- 采购审核-运营审核 --> <!-- 采购审核-运营审核 -->
<template> <template>
<d2-container class="container"> <d2-container class="container">
<div class="header" <div class="header" slot="header">
slot="header"> <d2-search ref="showSearch" class="show-search" :search-form="searchForm" @handleChangeSelect="handleChangeSelect"
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
@handleChangeSelect="handleChangeSelect"
:form-data="showFormData"> :form-data="showFormData">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary" handle>
size="small"
type="primary"
handle>
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
...@@ -29,31 +21,18 @@ ...@@ -29,31 +21,18 @@
<auth-button category="Button" /> <auth-button category="Button" />
</span> </span>
<span> <span>
<el-button type="primary" <el-button type="primary" size="mini" @click="handleExport">
size="mini"
@click="handleExport">
导出 导出
</el-button> </el-button>
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="purchasementReviewTable" <d2-table ref="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams"
:search-form="tableSearchForm" :table-data="tableData" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
:table-params="tableParams" <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
:table-data="tableData"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
<orderDeatilDialog :visible.sync="detailVisible" <orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :params-obj="paramsObj"></orderDeatilDialog>
v-if="detailVisible" <rejectDialog :reject-visible="rejectVisible" v-if="rejectVisible" :params-obj="paramsObj" @dialogClose="dialogClose">
:params-obj="paramsObj"></orderDeatilDialog>
<rejectDialog :reject-visible="rejectVisible"
v-if="rejectVisible"
:params-obj="paramsObj"
@dialogClose="dialogClose">
</rejectDialog> </rejectDialog>
</d2-container> </d2-container>
</template> </template>
...@@ -371,13 +350,13 @@ export default { ...@@ -371,13 +350,13 @@ export default {
}).then(() => { }).then(() => {
// purchaseOrderCancelOrCheck({ // purchaseOrderCancelOrCheck({
operatorreviewOperatorAudit({ operatorreviewOperatorAudit({
orderCode: row.orderCode, orderCode: row.orderCode
// operateType: 1 // operateType: 1
}).then(() => { }).then(() => {
this.notice.okTips() this.notice.okTips()
this.$refs.purchasementReviewTable.refreshTable() this.$refs.purchasementReviewTable.refreshTable()
}).catch(() => { })
}) })
}).catch(() => { })
}, },
// 查看详情 // 查看详情
handleDetail(row) { handleDetail(row) {
......
...@@ -2,22 +2,14 @@ ...@@ -2,22 +2,14 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" <div class="header" slot="header" style="padding: 10px 20px;">
slot="header" <d2-search ref="showSearch" class="show-search" label-width="100px" :search-form="searchForm"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
labelWidth="100px"
:search-form="searchForm"
:form-data="showFormData" /> :form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
...@@ -26,33 +18,17 @@ ...@@ -26,33 +18,17 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
slot-scope="scope"
:data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
<baseDialog :is-show.sync="rejectVisible" <baseDialog :is-show.sync="rejectVisible" :dialog-config="rejectConfig.config" @handleClick="handleRejectConfirm">
:dialog-config="rejectConfig.config"
@handleClick="handleRejectConfirm">
<div class="reject-dialog"> <div class="reject-dialog">
<el-form :rules="rejectRules" <el-form :rules="rejectRules" :model="rejectData" label-width="150px" ref="delivery-dialog-form">
:model="rejectData" <el-form-item label="驳回原因:" prop="rejectedReason">
label-width="150px" <el-input type="textarea" placeholder="请输入驳回原因" maxlength="50" :rows="3" show-word-limit
ref="delivery-dialog-form"> v-model.trim="rejectData.rejectedReason" class="dis-in-block reject-input" />
<el-form-item label="驳回原因:"
prop="rejectedReason">
<el-input type="textarea"
placeholder="请输入驳回原因"
maxlength="50"
:rows="3"
show-word-limit
v-model.trim="rejectData.rejectedReason"
class="dis-in-block reject-input" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -127,6 +103,20 @@ export default { ...@@ -127,6 +103,20 @@ export default {
prop: 'phone', prop: 'phone',
width: '120px' width: '120px'
}, { }, {
label: '商户地址',
prop: '',
width: '200px',
formatter: (cellValue) => {
return (cellValue.provinceName || '') + (cellValue.cityName || '') + (cellValue.merchantAddress || '')
}
}, {
label: '主营品牌',
prop: '',
width: '200px',
formatter: (cellValue) => {
return cellValue.merchantBrandNameList ? cellValue.merchantBrandNameList.join('/') : '-'
}
}, {
label: '商户类型', label: '商户类型',
prop: 'merchantType', prop: 'merchantType',
width: '100px', width: '100px',
...@@ -179,7 +169,7 @@ export default { ...@@ -179,7 +169,7 @@ export default {
] ]
}, },
baseData: { baseData: {
applyStatus: applyStatus, applyStatus: applyStatus
}, },
recordInfo: null, recordInfo: null,
rejectVisible: false, rejectVisible: false,
...@@ -201,7 +191,7 @@ export default { ...@@ -201,7 +191,7 @@ export default {
}, },
rejectRules: { rejectRules: {
rejectedReason: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }] rejectedReason: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
}, }
} }
}, },
computed: { computed: {
...@@ -250,9 +240,9 @@ export default { ...@@ -250,9 +240,9 @@ export default {
}) })
}, },
handleSearch() { // handleSearch() {
this.$refs.recordTable.refreshTable() // this.$refs.recordTable.refreshTable()
}, // },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
merchantName: '', merchantName: '',
...@@ -300,7 +290,7 @@ export default { ...@@ -300,7 +290,7 @@ export default {
}) })
} }
}) })
}, }
} }
} }
......
<!-- 商户管理员 -->
<template>
<div>
<!-- <d2-container> -->
<div class="d2-container-content">
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:hasPage="false">
</d2-table>
</div>
<!-- </d2-container> -->
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { listYqRefConfig } from '@/api/shopConfig.js'
export default {
name: 'MerchantAdmin',
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
},
searchFormSearch: {},
showFormData: [],
getListApi: listYqRefConfig,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [{
label: '商户',
prop: 'merchantName'
}, {
label: '联系人',
prop: 'merchantLegalPerson'
}, {
label: '手机号',
prop: 'merchantLegalPersonPhone'
}, {
label: '关联场景',
prop: 'sceneStr'
}, {
label: '更新时间',
prop: 'updatedTime',
formatter: (cellValue) => {
return cellValue.updatedTime ? Util.dateFormate(cellValue.updatedTime, 'YYYY-MM-DD HH:mm:ss') : ''
}
}
]
},
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
props: {
info: {
type: Object,
default: () => { }
}
},
mounted() {
// this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
// async getBaseData() {
// this.getOptionsList()
// },
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.merchantId = this.info.merchantId
resolve()
})
},
// getOptionsList() {
// this.showFormData.forEach((item, index) => {
// if (item.type === 'select') {
// if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
// const temp = {}
// temp[this.showFormData[index].optionId] = ''
// temp[this.showFormData[index].optionLabel] = '全部'
// this.baseData[item.optionsName].unshift(temp)
// }
// this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
// }
// })
// },
}
}
</script>
<style lang="scss" scoped>
</style>
<!-- 人员管理 -->
<template>
<d2-container class="personnelManagement">
<div class="header"
slot="header">
<el-tabs v-model="activeName">
<el-tab-pane label="员工列表"
name="person" />
<el-tab-pane label="商户管理员"
name="admini" />
</el-tabs>
</div>
<personnel-management v-if="activeName === 'person'"
:merchantNoList="merchantNoList" />
<merchant-admin v-if="activeName === 'admini'"
:info="info" />
</d2-container>
</template>
<script>
import personnelManagement from './personnelManagement'
import merchantAdmin from './merchantAdmin'
export default {
name: 'PersonnelManagementIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'person',
merchantNoList: this.$route.params?.merchants,
info: this.$route.params?.info,
}
},
components: {
personnelManagement,
merchantAdmin
},
mounted() {
console.log('merchantNoList', this.merchantNoList);
},
methods: {}
}
</script>
<style>
.personnelManagement .el-tabs__header {
margin: 0;
padding: 0 20px;
}
</style>
<!-- 虚拟对账账户 --> <!-- 虚拟账户成本 -->
<template> <template>
<d2-container class="account-list"> <d2-container class="account-list">
<div class="header" <div class="header" slot="header">
slot="header"> <d2-search ref="showSearch" :search-form="searchForm" :form-data="showFormData">
<d2-search ref="showSearch"
:search-form="searchForm"
:form-data="showFormData">
<!-- :slot-scope="item" --> <!-- :slot-scope="item" -->
<template slot="channelType"> <template slot="channelType">
<el-cascader style="width: 50%;" <el-cascader style="width: 50%;" :options="merchantLevelOptions[nameToOption[searchForm.channelType]]"
:options="merchantLevelOptions[nameToOption[searchForm.channelType]]" :props="{ checkStrictly: true, value: 'id', label: 'merchantName' }" :show-all-levels="false"
:props="{ checkStrictly: true, value: 'id', label: 'merchantName' }" v-model="merchantLevelVal" clearable filterable />
:show-all-levels="false"
v-model="merchantLevelVal"
clearable
filterable />
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<span slot="left"> <span slot="left">
<auth-button category="Button" <auth-button category="Button" :show-btn-ids="['9061003']" />
:show-btn-ids="['9061003']" />
</span> </span>
<d2-table ref="merchantTable" <d2-table ref="merchantTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<auth-button slot="auth-button" <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
slot-scope="scope"
:data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
<!-- width="70%" <!-- width="70%"
...@@ -51,12 +35,9 @@ ...@@ -51,12 +35,9 @@
@confirmDialog="handleDetailClose" @confirmDialog="handleDetailClose"
noCancel="true" --> noCancel="true" -->
<!-- v-if="accountDetailVisible" --> <!-- v-if="accountDetailVisible" -->
<baseDialog :is-show.sync="accountDetailVisible" <baseDialog :is-show.sync="accountDetailVisible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"> @closeDialog="handleDetailClose">
<account-detail v-if="accountDetailVisible" <account-detail v-if="accountDetailVisible" :account-detail-visible="accountDetailVisible"
:account-detail-visible="accountDetailVisible"
:merchant-row="merchantRow" /> :merchant-row="merchantRow" />
</baseDialog> </baseDialog>
<!-- <settingDetail :show="settingDetailVisible"></settingDetail> --> <!-- <settingDetail :show="settingDetailVisible"></settingDetail> -->
......
<!-- 申请虚拟对账账户 --> <!-- 申请虚拟账户成本 -->
<template> <template>
<div class="apply-account"> <div class="apply-account">
<edit-form ref="editFormRef" :title="formTitle" :current-page="custType" :settlement-page="editForm.settlementType" <edit-form ref="editFormRef" :title="formTitle" :current-page="custType" :settlement-page="editForm.settlementType"
......
<!-- 分账类目 --> <!-- 分账类目 -->
<template> <template>
<div> <div>
<div class="d2-container-content" <div class="d2-container-content" style="padding: 10px 20px;">
style="padding: 10px 20px;"> <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" />
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
...@@ -22,24 +15,15 @@ ...@@ -22,24 +15,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" <auth-button category="Button" :show-btn-ids="['9061601']" />
:show-btn-ids="['9061601']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="ledgerListTable" <d2-table ref="ledgerListTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="auth-button" <!-- !hideOptList.includes(scope.scope.id) -->
slot-scope="scope" <div slot="auth-button" slot-scope="scope" v-if="filterEnableEdit(scope.scope.sourceType)">
v-if="!hideOptList.includes(scope.scope.id)"> <auth-button slot="auth-button" :show-btn-ids="['9061602']" :data="scope.scope" />
<auth-button slot="auth-button" <auth-button slot="auth-button" :show-btn-ids="['9061603']" :data="scope.scope" />
:show-btn-ids="['9061602']"
:data="scope.scope" />
<auth-button slot="auth-button"
:show-btn-ids="['9061603']"
:data="scope.scope" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -155,7 +139,13 @@ export default { ...@@ -155,7 +139,13 @@ export default {
hideOptList: [1, 2, 3, 4, 5] hideOptList: [1, 2, 3, 4, 5]
} }
}, },
// // 定义组件过滤器
// filters: {
// filterEnableEdit(sourceType) {
// console.log('sourceType', sourceType)
// return sourceType != 1
// }
// },
components: { components: {
// relationCategoryDialog // relationCategoryDialog
}, },
...@@ -172,7 +162,11 @@ export default { ...@@ -172,7 +162,11 @@ export default {
async getBaseData() { async getBaseData() {
this.getOptionsList() this.getOptionsList()
}, },
// 1是自建 2是系统内置 (不允许修改)
filterEnableEdit(sourceType) {
// console.log('sourceType', sourceType)
return sourceType != 2
},
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
resolve() resolve()
...@@ -254,5 +248,4 @@ export default { ...@@ -254,5 +248,4 @@ export default {
} }
</script> </script>
<style scoped> <style scoped></style>
</style>
...@@ -3,60 +3,36 @@ ...@@ -3,60 +3,36 @@
<div class="tableBox"> <div class="tableBox">
<span> <span>
<!-- <el-tag>{{showData[sourcePage].title}}</el-tag> --> <!-- <el-tag>{{showData[sourcePage].title}}</el-tag> -->
<p class="edit-title" <p class="edit-title" style="textAlign:center">
style="textAlign:center">
{{ showData[sourcePage].title }} {{ showData[sourcePage].title }}
<el-button type="text" <el-button type="text" style="paddingLeft:20px" v-if="sourcePage == 'serviceStore'"
style="paddingLeft:20px"
v-if="sourcePage == 'serviceStore'"
@click="resetCheck">重新选择</el-button> @click="resetCheck">重新选择</el-button>
</p> </p>
</span> </span>
<div class="checkSpan"> <div class="checkSpan">
<p v-for="item in selectedDataShow">已选:<span <p v-for="item in selectedDataShow">已选:<span style="paddingRight:20px">{{ item.merchantName }}</span><span>{{
style="paddingRight:20px">{{ item.merchantName }}</span><span>{{ item.merchantId }}</span> item.merchantId }}</span>
</p> </p>
</div> </div>
<div style="padding: 10px 50px;"> <div style="padding: 10px 50px;">
<el-input v-model="merchantIdName" <el-input v-model="merchantIdName" placeholder="搜索门店内容" maxlength="20" style="width:300px;paddingRight:20px" />
placeholder="搜索门店内容" <el-button size="small" type="primary" @click="searchList">
maxlength="20"
style="width:300px;paddingRight:20px" />
<el-button size="small"
type="primary"
@click="searchList">
查询 查询
</el-button> </el-button>
</div> </div>
<el-table ref="seletingTable" <el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="selectFn"
:data="selectingData" @select-all="handleAll" :header-cell-class-name="cellClass">
height="464px"
class="table"
border
@select="selectFn"
@select-all="handleAll"
:header-cell-class-name="cellClass">
<!-- :selectable="selectable" --> <!-- :selectable="selectable" -->
<el-table-column type="selection" <el-table-column type="selection" width="55" align="center" />
width="55" <el-table-column prop="merchantName" align="center">
align="center" />
<el-table-column prop="merchantName"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span style="paddingRight:20px">{{ scope.row.merchantName }}</span><span>{{ scope.row.merchantNo }}</span>
style="paddingRight:20px">{{ scope.row.merchantName }}</span><span>{{ scope.row.merchantNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination v-if="sourcePage == '4sStore'" <el-pagination v-if="sourcePage == '4sStore'" small background @current-change="handleCurrentChange"
small :current-page.sync="currentPage" :page-size="pageSize" layout="total, prev, pager, next" :total="total" />
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div> </div>
</template> </template>
...@@ -287,7 +263,7 @@ export default { ...@@ -287,7 +263,7 @@ export default {
this.selectedDataShow = [] this.selectedDataShow = []
this.$emit('chooseData', this.selectedData) this.$emit('chooseData', this.selectedData)
}).catch(err => { }).catch(err => {
console.log(err)
}) })
} else { } else {
this.$refs.seletingTable.clearSelection() this.$refs.seletingTable.clearSelection()
...@@ -314,23 +290,29 @@ export default { ...@@ -314,23 +290,29 @@ export default {
margin: 0 auto 20px !important; margin: 0 auto 20px !important;
width: 98%; width: 98%;
} }
.relateStore .tableCon { .relateStore .tableCon {
display: flex; display: flex;
.tableBox { .tableBox {
flex: 1; flex: 1;
} }
} }
.service-store .relateStore .el-table .cell, .service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell { .d2-form .relateStore .el-table .cell {
line-height: 26px !important; line-height: 26px !important;
} }
.service-store .relateStore .el-table--medium td, .service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td { .d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important; padding: 6px 8px !important;
} }
.relateStore .red { .relateStore .red {
color: red; color: red;
} }
.relateStore .tip-icon { .relateStore .tip-icon {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
......
...@@ -30,21 +30,10 @@ ...@@ -30,21 +30,10 @@
trigger: ['change', 'blur'] trigger: ['change', 'blur']
} }
]"> ]">
<el-select <el-select v-model="classificationObj.goodsTypes" value-key="goodsType" multiple collapse-tags
v-model="classificationObj.goodsTypes" style="width: 320px;" placeholder="请选择品类">
value-key="goodsType" <el-option v-for="item in goodsList" :key="item.goodsType" :label="item.goodsTypeName"
multiple :disabled="item | filterGoodsTypeItem(disabledGoodsTypeList)" :value="item" />
collapse-tags
style="width: 320px;"
placeholder="请选择品类"
>
<el-option
v-for="item in goodsList"
:key="item.goodsType"
:label="item.goodsTypeName"
:disabled="item | filterGoodsTypeItem(disabledGoodsTypeList)"
:value="item"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="classificationObj.categoryType == 2" prop="upgradeGoods" label-width="20px" :rules="[ <el-form-item v-if="classificationObj.categoryType == 2" prop="upgradeGoods" label-width="20px" :rules="[
...@@ -54,24 +43,12 @@ ...@@ -54,24 +43,12 @@
trigger: ['change', 'blur'] trigger: ['change', 'blur']
} }
]"> ]">
<el-select <el-select v-model="classificationObj.upgradeGoods" multiple collapse-tags remote reserve-keyword
v-model="classificationObj.upgradeGoods" placeholder="请选择商品" @visible-change="visibleChange" :remote-method="remoteMethod"
multiple v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="upgradeGoodsId" filterable>
collapse-tags <el-option v-for="subItem in copyUpgradeGoodsList" :key="subItem.upgradeGoodsId"
remote
reserve-keyword
placeholder="请选择商品"
@visible-change="visibleChange"
:remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore"
style="width: 370px;"
value-key="upgradeGoodsId"
filterable>
<el-option v-for="subItem in copyUpgradeGoodsList"
:key="subItem.upgradeGoodsId"
:label="`${subItem.upgradeGoodsName}(${subItem.commodityCode})`" :label="`${subItem.upgradeGoodsName}(${subItem.commodityCode})`"
:disabled="subItem | filterupgradeGoodsItem(disabledUpgradeGoodsList)" :disabled="subItem | filterupgradeGoodsItem(disabledUpgradeGoodsList)" :value="subItem" />
:value="subItem" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
...@@ -284,6 +261,42 @@ ...@@ -284,6 +261,42 @@
<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.virtualAccountCostFlag">
<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.recoveryCostFlag">
<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' }
...@@ -498,7 +511,9 @@ export default { ...@@ -498,7 +511,9 @@ export default {
goodsCostFlag: "Y", // 平台方是否扣除产品成本(Y:计算,N:不计算) goodsCostFlag: "Y", // 平台方是否扣除产品成本(Y:计算,N:不计算)
groupType: 1, groupType: 1,
categoryType: '', // 分类类别 categoryType: '', // 分类类别
upgradeGoods: [] // 具体商品 upgradeGoods: [], // 具体商品
virtualAccountCostFlag: 'Y',
recoveryCostFlag: 'Y'
// expenseCategoryRules: [ // expenseCategoryRules: [
// { // {
// expenseCategoryCalculateType: "string", // 计算方式 // expenseCategoryCalculateType: "string", // 计算方式
...@@ -593,7 +608,6 @@ export default { ...@@ -593,7 +608,6 @@ export default {
const obj = deepClone(this.classificationObjSelect) const obj = deepClone(this.classificationObjSelect)
if (this.classificationObj.goodsCostFlag == "Y") { if (this.classificationObj.goodsCostFlag == "Y") {
// console.log(obj, 'obj')
const arr = [ const arr = [
{ {
id: 3, id: 3,
...@@ -602,8 +616,26 @@ export default { ...@@ -602,8 +616,26 @@ export default {
} }
] ]
obj.platformPublic && obj.platformPublic.push(...arr) obj.platformPublic && obj.platformPublic.push(...arr)
// return obj }
// platformPublic if (this.classificationObj.virtualAccountCostFlag == "Y") {
const arr = [
{
id: 300,
applicationObjectName: "虚拟账户成本",
applicationObjectType: 3
}
]
obj.platformPublic && obj.platformPublic.push(...arr)
}
if (this.classificationObj.recoveryCostFlag == "Y") {
const arr = [
{
id: 301,
applicationObjectName: "回收成本",
applicationObjectType: 3
}
]
obj.platformPublic && obj.platformPublic.push(...arr)
} }
obj.platformPublic && obj.platformPublic &&
...@@ -770,7 +802,7 @@ export default { ...@@ -770,7 +802,7 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
}).then(res => { }).then(res => {
this.allPages = res.pages this.allPages = res.pages
let resArr = [] const resArr = []
res.list && res.list.forEach(val => { res.list && res.list.forEach(val => {
val.upgradeGoodsList.forEach(v => { val.upgradeGoodsList.forEach(v => {
resArr.push({ resArr.push({
...@@ -786,9 +818,9 @@ export default { ...@@ -786,9 +818,9 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}, },
unique(arr){ unique(arr) {
const res= new Map() const res = new Map()
return arr.filter((a)=> !res.has(a.upgradeGoodsId) && res.set(a.upgradeGoodsId,1)) return arr.filter((a) => !res.has(a.upgradeGoodsId) && res.set(a.upgradeGoodsId, 1))
}, },
...mapActions("FinancialRules", ["reset"]), ...mapActions("FinancialRules", ["reset"]),
// ...mapMutations('FinancialRules', ['toggle', 'set']), // ...mapMutations('FinancialRules', ['toggle', 'set']),
...@@ -931,6 +963,8 @@ export default { ...@@ -931,6 +963,8 @@ export default {
"shop4sDeductChargeFlag", "shop4sDeductChargeFlag",
"partnerDeductChargeFlag", "partnerDeductChargeFlag",
"goodsCostFlag", "goodsCostFlag",
"virtualAccountCostFlag",
"recoveryCostFlag",
"groupType", "groupType",
"goodsTypes", "goodsTypes",
"categoryType", "categoryType",
...@@ -1023,12 +1057,12 @@ export default { ...@@ -1023,12 +1057,12 @@ export default {
} }
// console.log('expenseCategoryRules', expenseCategoryRules) // console.log('expenseCategoryRules', expenseCategoryRules)
const groupType = this.tabindex ? 2 : 1 const groupType = this.tabindex ? 2 : 1
let goodsTypes = obj.goodsTypes const goodsTypes = obj.goodsTypes
goodsTypes.map(val => { goodsTypes.map(val => {
val.categoryType = 1 // 按商品分类 val.categoryType = 1 // 按商品分类
return val return val
}) })
let upgradeGoods = obj.upgradeGoods const upgradeGoods = obj.upgradeGoods
upgradeGoods.map(val => { upgradeGoods.map(val => {
val.categoryType = 2 // 按具体商品 val.categoryType = 2 // 按具体商品
return val return val
...@@ -1039,6 +1073,8 @@ export default { ...@@ -1039,6 +1073,8 @@ export default {
categoryType: obj.categoryType, categoryType: obj.categoryType,
shop4sDeductChargeFlag: obj.shop4sDeductChargeFlag, shop4sDeductChargeFlag: obj.shop4sDeductChargeFlag,
partnerDeductChargeFlag: obj.partnerDeductChargeFlag, partnerDeductChargeFlag: obj.partnerDeductChargeFlag,
virtualAccountCostFlag: obj.virtualAccountCostFlag,
recoveryCostFlag: obj.recoveryCostFlag,
goodsCostFlag: obj.goodsCostFlag, goodsCostFlag: obj.goodsCostFlag,
groupType groupType
} }
...@@ -1121,33 +1157,40 @@ export default { ...@@ -1121,33 +1157,40 @@ export default {
} }
} }
} }
.el-select-dropdown__item{
.el-select-dropdown__item {
padding-right: 40px; padding-right: 40px;
.goodName{
.goodName {
color: #333333; color: #333333;
} }
.typeName { .typeName {
margin: 0 8px; margin: 0 8px;
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
} }
} }
.el-select-dropdown__item.selected{
span{ .el-select-dropdown__item.selected {
span {
color: #2A58AD; color: #2A58AD;
} }
} }
::v-deep{
.el-select__tags{ ::v-deep {
.el-select__tags {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
flex-wrap: nowrap; flex-wrap: nowrap;
.el-tag--info{
.el-tag--info {
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
.el-select__tags-text{
.el-select__tags-text {
display: inline-block; display: inline-block;
max-width: 180px; max-width: 180px;
white-space: nowrap; white-space: nowrap;
......
<!-- 财务分账测试 --> <!-- 财务分账测试 -->
<template> <template>
<d2-dialog title="分账测试" <d2-dialog title="分账测试" :is-visible="verificationCodeVisible" class="verificationCode" width="1000px"
:is-visible="verificationCodeVisible" @closeDialog="handleClose" @confirmDialog="handleConfirm">
class="verificationCode"
width="900px"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<!-- <d2-container> --> <!-- <d2-container> -->
<el-form ref="form" <el-form ref="form" border :model="form" :rules="rules" label-width="100px">
border
:model="form"
:rules="rules"
label-width="100px">
<div class="formItem"> <div class="formItem">
<el-form-item label="商品售价:" <el-form-item label="商品售价:" prop="totalPrice" required>
prop="totalPrice" <el-input v-model="form.totalPrice" @input="handleInput($event, 'totalPrice')" />
required>
<el-input v-model="form.totalPrice"
@input="handleInput($event,'totalPrice')" />
</el-form-item> </el-form-item>
<el-form-item label="商品成本:" <el-form-item label="商品成本:" prop="goodsCost" required>
prop="goodsCost" <el-input v-model="form.goodsCost" @input="handleInput($event, 'goodsCost')" />
required> </el-form-item>
<el-input v-model="form.goodsCost" <el-form-item label="虚拟对账成本:" label-width="120px" prop="virtualAccountCost" required>
@input="handleInput($event,'goodsCost')" /> <el-input v-model="form.virtualAccountCost" @input="handleInput($event, 'virtualAccountCost')" />
</el-form-item>
<el-form-item label="回收成本:" prop="recoveryCost" required>
<el-input v-model="form.recoveryCost" @input="handleInput($event, 'recoveryCost')" />
</el-form-item> </el-form-item>
<!-- prop="goodsCost" @input="handleInput($event,'goodsCost')"--> <!-- prop="goodsCost" @input="handleInput($event,'goodsCost')"-->
<el-form-item label="手续费:" <el-form-item label="手续费:" required>
required> <el-input :value="categoryTableData.serviceCharge" disabled>
<el-input :value="categoryTableData.serviceCharge"
disabled>
<!-- <i slot="suffix" <!-- <i slot="suffix"
class="suffix">%</i> --> class="suffix">%</i> -->
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-button class="subBtn" <el-button class="subBtn" @click="submitForm" type="primary">提交测试</el-button>
@click="submitForm"
type="primary">提交测试</el-button>
</div> </div>
</el-form> </el-form>
...@@ -46,61 +34,45 @@ ...@@ -46,61 +34,45 @@
<div class="tableHeader"><span class="serviceCharge item">手续费计算(仅针对线上支付订单)</span><span <div class="tableHeader"><span class="serviceCharge item">手续费计算(仅针对线上支付订单)</span><span
class="diversionSide item">导流方分润<span class="diversionSide item">导流方分润<span
v-if="rulesTestParams.goodsTypeGroupRule.shop4sDeductChargeFlag != 'Y'">不</span>扣除手续费;服务商分润<span v-if="rulesTestParams.goodsTypeGroupRule.shop4sDeductChargeFlag != 'Y'">不</span>扣除手续费;服务商分润<span
v-if="rulesTestParams.goodsTypeGroupRule.partnerDeductChargeFlag!= 'Y'">不</span>扣除手续费</span> v-if="rulesTestParams.goodsTypeGroupRule.partnerDeductChargeFlag != 'Y'">不</span>扣除手续费</span>
</div> </div>
<el-table :header-cell-style="{background:'#F2F4F7','text-align':'center','color': '#333333'}" <el-table :header-cell-style="{ background: '#F2F4F7', 'text-align': 'center', 'color': '#333333' }"
:cell-style="{'text-align':'center','color': '#666666;'}" :cell-style="{ 'text-align': 'center', 'color': '#666666;' }" border :span-method="objectSpanMethod"
border
:span-method="objectSpanMethod"
:data="categoryTableData.expenseCategoryCalculatedItemForRuleTestsResults"> :data="categoryTableData.expenseCategoryCalculatedItemForRuleTestsResults">
<el-table-column prop="targetType" <el-table-column prop="targetType" label="类型" width="143">
label="类型"
width="143">
<template slot-scope="scope"> <template slot-scope="scope">
{{ targetType[scope.row.targetType] }} {{ targetType[scope.row.targetType] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="expenseCategoryName" <el-table-column prop="expenseCategoryName" label="分账类目" width="143" />
label="分账类目" <el-table-column prop="calculateMode" label="计算模式" width="143">
width="143" />
<el-table-column prop="calculateMode"
label="计算模式"
width="143">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.calculateMode == 1 ? '按类目计算' : scope.row.calculateMode == 2 ? '按整单计算' : '-' }}</span> <span>{{ scope.row.calculateMode == 1 ? '按类目计算' : scope.row.calculateMode == 2 ? '按整单计算' : '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="expenseCategoryCalculateType" <el-table-column prop="expenseCategoryCalculateType" label="分账规则">
label="分账规则">
<!-- width="180" --> <!-- width="180" -->
<template slot-scope="scope"> <template slot-scope="scope">
<!-- {{ scope.row.expenseCategoryCalculateType }} --> <!-- {{ scope.row.expenseCategoryCalculateType }} -->
<span> {{ severSelectOptionsLabel[scope.row.expenseCategoryCalculateType] }}</span> <span> {{ severSelectOptionsLabel[scope.row.expenseCategoryCalculateType] }}</span>
<span> {{ scope.row.expenseCategoryValue }}</span> <span> {{ scope.row.expenseCategoryValue }}</span>
<span v-if="scope.row.expenseCategoryValue"> <span v-if="scope.row.expenseCategoryValue">
{{ scope.row.expenseCategoryCalculateType==3?'' :'%' }}</span> {{ scope.row.expenseCategoryCalculateType == 3 ? '' : '%' }}</span>
<span <span v-else-if="scope.row.targetType == 4">收入-流量方分润-服务商分润-其他费用({{
v-else-if="scope.row.targetType==4">收入-流量方分润-服务商分润-其他费用({{ rulesTestParams.goodsTypeGroupRule.goodsCostFlag=='Y'?'':'不' }}包含成本)</span> rulesTestParams.goodsTypeGroupRule.goodsCostFlag == 'Y' ? '' : '不' }}包含成本)</span>
<!-- <span v-else-if="scope.row.targetType==4">收入-流量方分润-服务商分润-产品成本-安装成本</span> --> <!-- <span v-else-if="scope.row.targetType==4">收入-流量方分润-服务商分润-产品成本-安装成本</span> -->
<span v-else>--</span> <span v-else>--</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="expenseCategoryResult" <el-table-column prop="expenseCategoryResult" label="分账金额" text-align="center" width="200" />
label="分账金额"
text-align="center"
width="200" />
</el-table> </el-table>
<p class="edit-sub-title"> <p class="edit-sub-title">
实际到账结果 实际到账结果
</p> </p>
<d2-table :table-data="resultTableData" <d2-table :table-data="resultTableData" :has-num="false" :has-page="false" :row-style="{ height: '40px' }"
:has-num="false" :header-cell-style="{ background: '#F2F4F7', 'text-align': 'center', 'color': '#333333' }"
:has-page="false" :cell-style="{ 'text-align': 'center', 'color': '#666666;' }" :table-params="tableParams" />
:row-style="{height: '40px'}"
:header-cell-style="{background:'#F2F4F7','text-align':'center','color': '#333333'}"
:cell-style="{'text-align':'center','color': '#666666;'}"
:table-params="tableParams" />
<!-- </d2-container> --> <!-- </d2-container> -->
</d2-dialog> </d2-dialog>
...@@ -164,7 +136,9 @@ export default { ...@@ -164,7 +136,9 @@ export default {
form: { form: {
// model: '' // model: ''
totalPrice: '', totalPrice: '',
goodsCost: '' goodsCost: '',
virtualAccountCost: '',
recoveryCost: ''
}, },
oldVal: { oldVal: {
totalPrice: 0, totalPrice: 0,
...@@ -172,6 +146,8 @@ export default { ...@@ -172,6 +146,8 @@ export default {
}, },
rules: { rules: {
totalPrice: [{ required: true, message: '请输入商品价格', trigger: ['change', 'blur'] }], totalPrice: [{ required: true, message: '请输入商品价格', trigger: ['change', 'blur'] }],
virtualAccountCost: [{ required: true, message: '请输虚拟对账成本', trigger: ['change', 'blur'] }],
recoveryCost: [{ required: true, message: '请输回收成本', trigger: ['change', 'blur'] }],
goodsCost: [{ required: true, message: '请输入商品成本', trigger: ['change', 'blur'] }, goodsCost: [{ required: true, message: '请输入商品成本', trigger: ['change', 'blur'] },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
...@@ -348,18 +324,23 @@ export default { ...@@ -348,18 +324,23 @@ export default {
border: 1px solid #e8e8ea; border: 1px solid #e8e8ea;
border-bottom: none; border-bottom: none;
margin-bottom: -4px; margin-bottom: -4px;
.item { .item {
flex: 1; flex: 1;
padding: 10px 0; padding: 10px 0;
text-align: center; text-align: center;
} }
.item + .item {
.item+.item {
border-left: 1px solid #e8e8ea; border-left: 1px solid #e8e8ea;
} }
} }
.formItem { .formItem {
display: flex; display: flex;
flex-wrap: wrap;
} }
.subBtn { .subBtn {
margin-left: 20px; margin-left: 20px;
height: 36px; height: 36px;
......
...@@ -82,9 +82,11 @@ ...@@ -82,9 +82,11 @@
:goods-type-group-rules="financialObj['goodsTypeGroupRules'][idx]" :goods-select-list="goodsSelectList" :goods-type-group-rules="financialObj['goodsTypeGroupRules'][idx]" :goods-select-list="goodsSelectList"
:financial-ledger-party="financialLedgerParty" :tabindex="idx" :tab-item="item" :financial-ledger-party="financialLedgerParty" :tabindex="idx" :tab-item="item"
:service-merchant-list="serviceMerchantList" :router-info="routerInfo" :service-merchant-list="serviceMerchantList" :router-info="routerInfo"
:classification-obj-select="classificationObj" @rulesTest="rulesTest" @assignGoodsTypeList="assignGoodsTypeList" :classification-obj-select="classificationObj" @rulesTest="rulesTest"
@deleteGoodsTypeItem="deleteGoodsTypeItem" @checkSuccess="checkSuccess(idx)" :upgradeGoodsList="upgradeGoodsList" @assignGoodsTypeList="assignGoodsTypeList" @deleteGoodsTypeItem="deleteGoodsTypeItem"
@deleteUpgradeGoodsItem="deleteUpgradeGoodsItem" @assignUpgradeGoodsList="assignUpgradeGoodsList" :selectUpgradeGoodsList="selectUpgradeGoodsList"/> @checkSuccess="checkSuccess(idx)" :upgrade-goods-list="upgradeGoodsList"
@deleteUpgradeGoodsItem="deleteUpgradeGoodsItem" @assignUpgradeGoodsList="assignUpgradeGoodsList"
:select-upgrade-goods-list="selectUpgradeGoodsList" />
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane key="add" v-if="addVisible" name="add"> <el-tab-pane key="add" v-if="addVisible" name="add">
...@@ -318,9 +320,14 @@ export default { ...@@ -318,9 +320,14 @@ 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) {
if ((obj.id != 3 && obj.applicationObjectName != '产品成本') && (obj.id != 4)) { // 过滤掉 产品成本 虚拟对账成本 回收成本
const filterIdList = [3, 4, 300, 301]
if (!filterIdList.includes(obj.id)) {
prev.platformPublic.push(obj) prev.platformPublic.push(obj)
} }
// if ((obj.id != 3 && obj.applicationObjectName != '产品成本') && (obj.id != 4)) {
// }
} }
return prev return prev
}, { }, {
...@@ -364,7 +371,7 @@ export default { ...@@ -364,7 +371,7 @@ export default {
// } // }
// } // }
// goodsTypeGroupRules = goodsTypeGroupRules.sort(compare('groupType')) // goodsTypeGroupRules = goodsTypeGroupRules.sort(compare('groupType'))
let upgradeArr = [] const upgradeArr = []
goodsTypeGroupRules && goodsTypeGroupRules.forEach((item, index) => { goodsTypeGroupRules && goodsTypeGroupRules.forEach((item, index) => {
this.editableTabs[index] = { this.editableTabs[index] = {
title: index ? '特殊品类' + index : '全部品类', title: index ? '特殊品类' + index : '全部品类',
...@@ -552,7 +559,7 @@ export default { ...@@ -552,7 +559,7 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
}).then(res => { }).then(res => {
this.allPages = res.pages this.allPages = res.pages
let resArr = [] const resArr = []
res.list && res.list.forEach(val => { res.list && res.list.forEach(val => {
val.upgradeGoodsList.forEach(v => { val.upgradeGoodsList.forEach(v => {
resArr.push({ resArr.push({
...@@ -568,9 +575,9 @@ export default { ...@@ -568,9 +575,9 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}, },
unique(arr){ unique(arr) {
const res= new Map() const res = new Map()
return arr.filter((a)=> !res.has(a.upgradeGoodsId) && res.set(a.upgradeGoodsId,1)) return arr.filter((a) => !res.has(a.upgradeGoodsId) && res.set(a.upgradeGoodsId, 1))
}, },
getParams() { getParams() {
var realityPlatform = this.baseData.PlatformLevelList.find(item => item.merchantId == this.financialObj.realityPlatformMerchantId) var realityPlatform = this.baseData.PlatformLevelList.find(item => item.merchantId == this.financialObj.realityPlatformMerchantId)
......
...@@ -73,9 +73,9 @@ ...@@ -73,9 +73,9 @@
<!-- 对账 --> <!-- 对账 -->
<!-- <auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" /> --> <!-- <auth-button slot="auth-button" :show-btn-ids="['9060308']" :data="scope.scope" /> -->
<!-- 配置 --> <!-- 配置 -->
<auth-button slot="auth-button" <!-- <auth-button slot="auth-button"
:show-btn-ids="['90603012']" :show-btn-ids="['90603012']"
:data="scope.scope" /> :data="scope.scope" /> -->
<!-- 删除 --> <!-- 删除 -->
<auth-button slot="auth-button" <auth-button slot="auth-button"
:show-btn-ids="['9060305']" :show-btn-ids="['9060305']"
...@@ -562,11 +562,11 @@ export default { ...@@ -562,11 +562,11 @@ export default {
) )
} }
}, },
{ // {
label: "操作", // label: "操作",
width: "80px", // width: "80px",
addHtml: 'newOperate' // addHtml: 'newOperate'
} // }
] ]
}, },
// 关联门店 // 关联门店
...@@ -1152,8 +1152,8 @@ export default { ...@@ -1152,8 +1152,8 @@ export default {
this.spanIndex3 = 0 // 合并流量方商户号索引 this.spanIndex3 = 0 // 合并流量方商户号索引
this.spanArr4 = [] // 合并渠道 this.spanArr4 = [] // 合并渠道
this.spanIndex4 = 0 // 合并渠道索引 this.spanIndex4 = 0 // 合并渠道索引
this.spanArr11 = [] // 合并第二操作栏 // this.spanArr11 = [] // 合并第二操作栏
this.spanIndex11 = 0 // 合并第二操作栏索引 // this.spanIndex11 = 0 // 合并第二操作栏索引
}, },
// 合并表格 // 合并表格
merge(data) { merge(data) {
...@@ -1174,8 +1174,8 @@ export default { ...@@ -1174,8 +1174,8 @@ export default {
this.spanArr4.push(1) // 合并渠道 this.spanArr4.push(1) // 合并渠道
this.spanIndex4 = 0 this.spanIndex4 = 0
this.spanArr11.push(1) // 合并第二操作栏 // this.spanArr11.push(1) // 合并第二操作栏
this.spanIndex11 = 0 // this.spanIndex11 = 0
} else { } else {
// 判断当前元素与上一元素是否相同 // 判断当前元素与上一元素是否相同
// // 合并序列 // // 合并序列
...@@ -1208,8 +1208,8 @@ export default { ...@@ -1208,8 +1208,8 @@ export default {
this.spanArr3.push(0) this.spanArr3.push(0)
this.spanArr4[this.spanIndex4] += 1 this.spanArr4[this.spanIndex4] += 1
this.spanArr4.push(0) this.spanArr4.push(0)
this.spanArr11[this.spanIndex11] += 1 // this.spanArr11[this.spanIndex11] += 1
this.spanArr11.push(0) // this.spanArr11.push(0)
} else { } else {
this.spanArr1.push(1) this.spanArr1.push(1)
this.spanIndex1 = i this.spanIndex1 = i
...@@ -1219,8 +1219,8 @@ export default { ...@@ -1219,8 +1219,8 @@ export default {
this.spanIndex3 = i this.spanIndex3 = i
this.spanArr4.push(1) this.spanArr4.push(1)
this.spanIndex4 = i this.spanIndex4 = i
this.spanArr11.push(1) // this.spanArr11.push(1)
this.spanIndex11 = i // this.spanIndex11 = i
} }
} }
} }
...@@ -1264,15 +1264,17 @@ export default { ...@@ -1264,15 +1264,17 @@ export default {
rowspan: _row_4, rowspan: _row_4,
colspan: _col_4 colspan: _col_4
} }
} else if (columnIndex === 11) {
// 第11列 第二操作栏
const _row_11 = this.spanArr11[rowIndex]
const _col_11 = _row_11 > 0 ? 1 : 0
return {
rowspan: _row_11,
colspan: _col_11
} }
} else if (columnIndex === t) { // else if (columnIndex === 11) {
// // 第11列 第二操作栏
// const _row_11 = this.spanArr11[rowIndex]
// const _col_11 = _row_11 > 0 ? 1 : 0
// return {
// rowspan: _row_11,
// colspan: _col_11
// }
// }
else if (columnIndex === t) {
const _row_6 = len const _row_6 = len
const _col_6 = 1 const _col_6 = 1
return { return {
......
...@@ -284,7 +284,7 @@ export default { ...@@ -284,7 +284,7 @@ export default {
}), }),
getRowItem() { getRowItem() {
const info = this.$route.params?.info const info = this.$route.params?.info
this.infoForm2.signatureSwitch = this.merchantRow.signatureSwitch || 0 this.infoForm2.signatureSwitch = this.merchantRow?.signatureSwitch || 0
if (info) { if (info) {
this.merchantRow = info this.merchantRow = info
console.log("is.merchantRow", this.merchantRow) console.log("is.merchantRow", this.merchantRow)
...@@ -351,6 +351,8 @@ export default { ...@@ -351,6 +351,8 @@ export default {
list.push(info) list.push(info)
}) })
params.list = list params.list = list
console.log(list)
return
insertOrUpdateDiversionMerchantRef(params).then(res => { insertOrUpdateDiversionMerchantRef(params).then(res => {
this.notice.okTips('操作成功') this.notice.okTips('操作成功')
this.handleCancel() this.handleCancel()
...@@ -428,7 +430,7 @@ export default { ...@@ -428,7 +430,7 @@ export default {
getSignatureConfiguration(merchantId) { getSignatureConfiguration(merchantId) {
getSignatureConfiguration({ merchantId, sceneType: 1 }).then(res => { getSignatureConfiguration({ merchantId, sceneType: 1 }).then(res => {
console.log(res, 'res') console.log(res, 'res')
this.infoForm2.signatureSwitch = res.signatureSwitch || 0 this.infoForm2.signatureSwitch = res?.signatureSwitch || 0
}) })
}, },
......
<template> <template>
<d2-container class="edit_service"> <d2-container class="edit_service">
<div class="d2-container-content form_class"> <div class="d2-container-content form_class">
<el-form label-width="120px" <el-form label-width="120px" :model="detailInfo" ref="editServiceForm" :rules="rules">
:model="detailInfo" <el-form-item label="采购模式:" prop="procurementType">
ref="editServiceForm"
:rules="rules">
<el-form-item
label="采购模式:"
prop="procurementType">
<el-radio-group size="mini" v-model="detailInfo.procurementType"> <el-radio-group size="mini" v-model="detailInfo.procurementType">
<el-radio v-for="(subItem, subIdx) in procureModeList" :key="subIdx" :label="subItem.confId">{{ <el-radio v-for="(subItem, subIdx) in procureModeList" :key="subIdx" :label="subItem.confId">{{
subItem.confName }}</el-radio> subItem.confName }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="发货主体:" prop="shippingEntityId">
label="发货主体:" <el-select v-model="detailInfo.shippingEntityId" class="select_class" placeholder="请选择发货主体">
prop="shippingEntityId"> <el-option v-for="(subItem, subIndex) in shippingEntityList" :key="subIndex" :label="subItem.shippingEntity"
<el-select v-model="detailInfo.shippingEntityId"
class="select_class"
placeholder="请选择发货主体">
<el-option v-for="(subItem, subIndex) in shippingEntityList"
:key="subIndex"
:label="subItem.shippingEntity"
:value="subItem.shippingEntityId" /> :value="subItem.shippingEntityId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div style="margin-top: 40px;text-align: center;"> <div style="margin-top: 40px;text-align: center;">
<el-button class="width_100 cancel-btn" <el-button class="width_100 cancel-btn" @click="handleClose">取消</el-button>
@click="handleClose">取消</el-button> <el-button type="primary" @click="handleUp" :disabled="$store.state.d2admin.loading.value"
<el-button
type="primary"
@click="handleUp"
:disabled="$store.state.d2admin.loading.value"
class="width_100">提交</el-button> class="width_100">提交</el-button>
</div> </div>
</d2-container> </d2-container>
...@@ -43,7 +28,7 @@ import { procureModeList } from "@/common/constants" ...@@ -43,7 +28,7 @@ import { procureModeList } from "@/common/constants"
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { getProviderProcurementInfo, updateProviderProcurementInfo, getShippingEntityInfoAll } from "@api/serviceManage" import { getProviderProcurementInfo, updateProviderProcurementInfo, getShippingEntityInfoAll } from "@api/serviceManage"
export default { export default {
name: "editService", name: "EditService",
data() { data() {
return { return {
procureModeList, procureModeList,
...@@ -60,7 +45,7 @@ export default { ...@@ -60,7 +45,7 @@ export default {
} }
}, },
mounted() { mounted() {
let { serviceMerchantId } = this.$route.params const { serviceMerchantId } = this.$route.params
this.serviceMerchantId = serviceMerchantId this.serviceMerchantId = serviceMerchantId
// 获取发货主体数据 // 获取发货主体数据
getShippingEntityInfoAll({}).then(res => { getShippingEntityInfoAll({}).then(res => {
...@@ -74,10 +59,10 @@ export default { ...@@ -74,10 +59,10 @@ export default {
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
getInfo() { getInfo() {
getProviderProcurementInfo({merchantId: this.serviceMerchantId}).then(res => { getProviderProcurementInfo({ merchantId: this.serviceMerchantId }).then(res => {
this.detailInfo = res || {} this.detailInfo = res || {}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['editServiceForm'].clearValidate() this.$refs.editServiceForm.clearValidate()
}) })
}) })
}, },
...@@ -95,14 +80,16 @@ export default { ...@@ -95,14 +80,16 @@ export default {
this.close({ tagName: '/editService' }) this.close({ tagName: '/editService' })
this.$router.push({ name: 'serviceManage' }) this.$router.push({ name: 'serviceManage' })
this.close({ tagName: '/serviceManage' }) this.close({ tagName: '/serviceManage' })
}).catch(err => {
console.log(err)
}) })
} }
}, },
// 保存 // 保存
handleUp() { handleUp() {
this.$refs['editServiceForm'].validate(valid => { this.$refs.editServiceForm.validate(valid => {
if (valid) { if (valid) {
let params = { const params = {
partnerMerchantId: this.serviceMerchantId, partnerMerchantId: this.serviceMerchantId,
procurementType: this.detailInfo.procurementType, procurementType: this.detailInfo.procurementType,
shippingEntity: this.shippingEntityList.filter(val => val.shippingEntityId == this.detailInfo.shippingEntityId)[0]?.shippingEntity || '', shippingEntity: this.shippingEntityList.filter(val => val.shippingEntityId == this.detailInfo.shippingEntityId)[0]?.shippingEntity || '',
...@@ -121,14 +108,16 @@ export default { ...@@ -121,14 +108,16 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.edit_service{ .edit_service {
.form_class{ .form_class {
height: calc(100vh - 300px); height: calc(100vh - 300px);
} }
.select_class{
.select_class {
width: 432px; width: 432px;
} }
.width_100{
.width_100 {
width: 100px; width: 100px;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!