Commit a68f29e1 by chenwq

店铺设置

1 parent d7a12e40
......@@ -245,7 +245,7 @@ export function getSunshineIncentivePoint(data) {
return request(data)
}
// 获取4s店某场景类型相关的员工列表
// 获取4s店某场景类型相关的员工列表
export function getStaffDataApi(data) {
data.method = `dj.api.smartcarlife.staff.listBySceneShop`
return request(data)
......@@ -280,3 +280,15 @@ export function personalConfigImport(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.import`
return request(data, "post", ["file"])
}
// 批量设置运营人员
export function shopBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.shopOperation.setting.batch'
return request(data, "post")
}
// 批量设置展业场景
export function busiBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch'
return request(data, "post")
}
......@@ -78,6 +78,7 @@
:index="scope.$index"
:prop="item.prop"
:width="item.width"
:columnsObj="item"
/>
<template v-else-if="item.type == 'ownSerialNum'">
<span>{{
......
<template>
<d2-dialog title="系统对账单" :is-visible="billVisible" class="privacyDailog" width="80%" btnOkLabel="关闭" :noCancel="true" @closeDialog="handleClose" @confirmDialog="handleClose">
<el-table :data="tableList" style="width: 100%">
<el-table :data="tableList" style="width: 100%" :span-method="arraySpanMethod" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column v-for="(item, idx) in tableHeader" :key="idx" :label="item.moduleName">
<el-table-column v-for="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName"></el-table-column>
<el-table-column v-for="(subItem, subIdx) in item.items" :key="subIdx" :prop="subItem.fieldCode" :label="subItem.fieldName">
<template slot-scope="scope">
<!-- 选择框 -->
<div v-if="subItem.editType == 'select'">
<el-select style="width: 200px" v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode]" v-bind="item.attrs ? item.attrs : {}" v-on="item.listeners ? item.listeners : {}" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="k in baseData[subItem.editObj.optionsName]" :key="k[subItem.editObj.optionId]" :label="k[subItem.editObj.optionLabel]" :value="k[subItem.editObj.optionId]"></el-option>
</el-select>
<!-- <slot :name="item.suffixSlot" :scope="item"></slot> -->
</div>
<!-- {{subItem.editType}} -->
<div v-else>{{scope.row[subItem.extInfo.source || 'ORDER'][subItem.fieldCode] || '——'}}</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
</d2-dialog>
......@@ -10,6 +24,7 @@
<script>
import { deepClone } from '@/common/util'
import { getPlatformMerchantList } from '@api/index'
export default {
name: 'SystemBillDialog',
props: {
......@@ -26,33 +41,114 @@ export default {
return {
tmplFieldsList: [],
tableHeader: [],
originalOrderList: [],
tableList: [],
editObj: {
select: {
attrList: ['platformMerchantName'],
defaultConf: {
platformMerchantName: {
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList'
}
}
},
input: {
attrList: ['']
}
},
baseData: {
PlatformMerchantList: []
}
}
},
watch: {},
mounted() {
this.tmplFieldsList = JSON.parse(this.billTmplInfo.fieldsJson)
this.tableList = this.billTmplInfo.orders
this.originalOrderList = this.billTmplInfo.orders
// console.log(this.tmplFieldsList, 'this.tmplFieldsList')
this.dealTableHeader()
this.getPlatformMerchantList()
this.dealTable()
},
methods: {
handleClose() {
this.$emit('handleClose')
},
dealTableHeader() {
// 获取平台方数据
getPlatformMerchantList() {
getPlatformMerchantList({}).then(res => {
res.unshift({
merchantId: -1,
merchantName: '嘀加智慧云'
})
this.baseData.PlatformMerchantList = res
})
},
dealTable() {
// 处理表格表头
this.tableHeader = []
const moduleList = [...new Set(this.tmplFieldsList.map(item => item.moduleName))]
moduleList.forEach(item => {
let list = this.tmplFieldsList.filter(k => k.moduleName == item)
list.forEach(k => {
k.extInfo = JSON.parse(k.extInfo)
if (this.editObj.select.attrList.includes(k.fieldCode)) {
k.editType = 'select'
k.editObj = {
...this.editObj.select.defaultConf[k.fieldCode]
}
}
})
this.tableHeader.push({
moduleName: item,
items: list
})
})
console.log(this.tableHeader, 'this.tableHeader---')
console.log(this.tableHeader, 'moduleList------------')
console.log(this.originalOrderList, 'this.originalOrderList---')
// 处理表格数据,以subOrders为最小粒度(作为一行)
this.tableList = []
var serialNo = 1
this.originalOrderList.forEach(item => {
let { packages, ...orderOtherObj } = item
item.packages.forEach(k => {
let { subOrders, ...packagesOtherObj } = k
k.subOrders.forEach((m, mIdx) => {
this.tableList.push({
ORDER: orderOtherObj,
PACKAGE: packagesOtherObj,
SUB_ORDER: { ...m, serialNo: serialNo++ }
})
if (mIdx == 0) {
let targetIdx = this.tableList.length - 1
// 行合并
this.tableList[targetIdx].rowspan = k.subOrders.length
}
})
})
})
console.log(this.tableList, 'this.tableList---')
},
// 合并单元格
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(this.tmplFieldsList, 'this.tmplFieldsList--')
// console.log(row, 'row----')
// console.log(column, 'column----property')
// console.log('-----------------------------------------------------')
/** 用于标识数据来源(ORDER、PACKAGE、SUB_ORDER)
* SUB_ORDER - 无需合并单元格;ORDER、PACKAGE - 需合并单元格
*/
const source = this.tmplFieldsList.find(item => item.fieldCode == column.property)?.extInfo?.source || 'ORDER'
if (['ORDER', 'PACKAGE'].includes(source)) {
return {
rowspan: row.rowspan,
colspan: row.rowspan ? 1 : 0
}
}
},
},
};
</script>
......
......@@ -506,6 +506,32 @@ export const resData = {
partnerFeeCalculateCoefficient: null,
secondPartnerFee: null,
yqProfitMoney: 275.34
},
{
orderCode: "250521164946668",
subOrderCode: "S25052116494666800",
merchantGoodsId: 1113,
packageCode: null,
packageName: null,
upgradeGoodsCommodityCode: null,
upgradeGoodsName: null,
specification: null,
bulkCode: "",
thirdPartyCode: "",
supplierCode: "12",
supplierName: "广联直营",
number: 1,
goodsCost: 1.0,
totalPaymentAmount: 348.37,
trafficFeeCalculateType: 1,
trafficFeeCalculateValue: 10,
trafficFee: 34.73,
partnerFeeCalculateType: null,
partnerFeeCalculateValue: null,
firstPartnerFee: null,
partnerFeeCalculateCoefficient: null,
secondPartnerFee: null,
yqProfitMoney: 275.34
}
]
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!