Commit b8d8c843 by zhangxw

商品成本字段根据配置显示

1 parent 6c2efa41
...@@ -142,4 +142,9 @@ const getMerchantList = params => { ...@@ -142,4 +142,9 @@ const getMerchantList = params => {
sign: true sign: true
}) })
} }
export { getRulesData, getRulesListData, guestComTotal, isOpenUpgrade, isOpenInsurance, orderTotal, couponsTotal, couponsTotalByDay, moneyTotal, findCoupons, findupGradeOrder, newFindupGradeOrder, checkCoupons, mydivision, exportMydivision, exportUpgrade, exportInsurance, exportCoupons, getEmployName, checkDetail, orderTotalOfJT, orderTotalNumOfJT, myAccountTotalNumOfJT, get4SList, introConpute, getMerchantList } // 获取店面配置数据
const getMerchantSetting = () => {
let method = `dj.api.smartcarlife.serviceMerchant.getShopSetting`
return method
}
export { getRulesData, getRulesListData, guestComTotal, isOpenUpgrade, isOpenInsurance, orderTotal, couponsTotal, couponsTotalByDay, moneyTotal, findCoupons, findupGradeOrder, newFindupGradeOrder, checkCoupons, mydivision, exportMydivision, exportUpgrade, exportInsurance, exportCoupons, getEmployName, checkDetail, orderTotalOfJT, orderTotalNumOfJT, myAccountTotalNumOfJT, get4SList, introConpute, getMerchantList, getMerchantSetting }
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</template> </template>
<script> <script>
import { findupGradeOrder, newFindupGradeOrder, exportUpgrade, exportInsurance, checkDetail, orderTotalNumOfJT, getMerchantList } from '../../api/modules/rules' import { findupGradeOrder, newFindupGradeOrder, exportUpgrade, exportInsurance, checkDetail, orderTotalNumOfJT, getMerchantList, getMerchantSetting } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter' import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util' import utils from '../../util/util'
const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务'] const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务']
...@@ -459,6 +459,30 @@ export default { ...@@ -459,6 +459,30 @@ export default {
width: '200', width: '200',
disabled: false disabled: false
}, },
{
label: '车架号',
value: 'standNo',
level: 1,
enumId: 'standNo',
width: '200',
disabled: false
},
{
label: '车牌号',
value: 'plateNumber',
level: 1,
enumId: 'plateNumber',
width: '120',
disabled: false
},
{
label: '车型',
value: 'carTypeName',
level: 1,
enumId: 'carTypeName',
width: '120',
disabled: false
},
// { // {
// value: 'customerPhone', // value: 'customerPhone',
// label: '客户手机号', // label: '客户手机号',
...@@ -759,17 +783,26 @@ export default { ...@@ -759,17 +783,26 @@ export default {
this.handlerNewTableCoulum(newvalue) this.handlerNewTableCoulum(newvalue)
} }
}, },
created() { async created() {
const { session } = this.$globalState const { session } = this.$globalState
this.accountLevel = session.accountLevel this.accountLevel = session.accountLevel
this.merchantId = session.merchantId this.merchantId = session.merchantId
this.isAdmin = session.admin this.isAdmin = session.admin
let temp = JSON.parse(localStorage.getItem(`${this.pageName == 'insurance' ? 'in' : ''}menuList${session.merchantId}`)) let temp = JSON.parse(localStorage.getItem(`${this.pageName == 'insurance' ? 'in' : ''}menuList${session.merchantId}`))
if (temp) { let res = await converterApi({
this.tableCoulumList = temp routerMethod: getMerchantSetting(),
} else { merchantId: this.merchantId,
this.tableCoulumList = this.fieldList sceneType: this.pageName == 'insurance' ? 0 : 1
})
// 商品成本设置不可见
if (res?.shopMerchantConfig?.costPrivacyShowFlag != 'Y') {
this.fieldList?.splice(this.fieldList?.findIndex(item => item.value == 'goodsCost'), 1)
} }
// if (temp) {
// // this.tableCoulumList = temp // 有动态值,不取缓存内容
// } else {
this.tableCoulumList = this.fieldList
// }
// 1.工厂 2省代 3市代 4门店 // 1.工厂 2省代 3市代 4门店
if (session.accountLevel < 4) { if (session.accountLevel < 4) {
this.getMerchanListData(session.accountLevel) this.getMerchanListData(session.accountLevel)
...@@ -813,7 +846,7 @@ export default { ...@@ -813,7 +846,7 @@ export default {
methods: { methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column没有prop,只能用label判断 // column没有prop,只能用label判断
const mergeColNameList = ['序号', '主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', `流量费/元`, '分账类型', '操作'] const mergeColNameList = ['序号', '主订单编号', '交易参考号', '客户姓名', '车架号', '车牌号', '车型', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', `流量费/元`, '分账类型', '操作']
return { return {
rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1, rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1,
colspan: 1 colspan: 1
...@@ -911,7 +944,7 @@ export default { ...@@ -911,7 +944,7 @@ export default {
} }
}, },
setClass({ row, column, rowIndex, columnIndex }) { setClass({ row, column, rowIndex, columnIndex }) {
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', `流量费/元`, '分账类型'] const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '车架号', '车牌号', '车型', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', `流量费/元`, '分账类型']
if (columnIndex == 1) return 'add-right-border' if (columnIndex == 1) return 'add-right-border'
return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : '' return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : ''
}, },
...@@ -1138,6 +1171,7 @@ export default { ...@@ -1138,6 +1171,7 @@ export default {
routerMethod: method, routerMethod: method,
pageNum: this.$refs.subTable.page.pageNum, pageNum: this.$refs.subTable.page.pageNum,
pageSize: this.$refs.subTable.page.pageSize, pageSize: this.$refs.subTable.page.pageSize,
merchantIdsStr: this.merchantId,
...this.newHttpParam ...this.newHttpParam
} }
converterApi(para).then(res => { converterApi(para).then(res => {
...@@ -1261,7 +1295,8 @@ export default { ...@@ -1261,7 +1295,8 @@ export default {
let para = { let para = {
routerMethod: method, routerMethod: method,
...this.httpParam, ...this.httpParam,
sceneType: this.pageName == 'insurance' ? 0 : 1 sceneType: this.pageName == 'insurance' ? 0 : 1,
merchantIdsStr: this.merchantId
} }
if (this.pageName == 'insurance') { if (this.pageName == 'insurance') {
para.hiddenColumnList = hiddenColumnList para.hiddenColumnList = hiddenColumnList
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!