Commit a30877b4 by 前端

Merge branch 'SAAS+V4.49.2-0225' into 'master'

上线合并

See merge request !24
2 parents 6c2efa41 841e22a5
...@@ -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.getSubAndShopSetting`
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 }
...@@ -16,6 +16,31 @@ import '@/filter' ...@@ -16,6 +16,31 @@ import '@/filter'
import { start } from '@/setup' import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.directive('preventReClick', {
bind: (el, binding) => {
let time = binding.value // 防抖时间
if (!time) {
// 用户若不设置防抖时间,则默认1s
time = 1000
}
let fun
el.addEventListener(
'click',
event => {
if (!fun) {
// 第一次执行
fun = setTimeout(() => {
fun = null
}, time)
} else {
// 直接取消当前事件
event && event.stopImmediatePropagation()
}
},
true
)
}
})
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
......
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
<!-- 改装件信息 --> <!-- 改装件信息 -->
<div v-if="(refitFormObj.customFlag && equityRadio == '2') || (refitFormObj.autoFlag && equityRadio == '1') || refitFormObj.showFlag" class="container m-t-10"> <div v-if="(refitFormObj.customFlag && equityRadio == '2') || (refitFormObj.autoFlag && equityRadio == '1') || refitFormObj.showFlag" class="container m-t-10">
<p class="edit-title">改装件信息</p> <p class="edit-title">改装件信息</p>
<div style="padding: 20px 20px 1px;"><glsx-combi-form ref="refitRef" :isEdit="true" :isInline="false" defaultWidth="320px" :formObj="refitFormObj" :formData="refitFormData" :formRules="refitRules"></glsx-combi-form></div> <div style="padding: 20px 20px 1px"><glsx-combi-form ref="refitRef" :isEdit="true" :isInline="false" defaultWidth="320px" :formObj="refitFormObj" :formData="refitFormData" :formRules="refitRules"></glsx-combi-form></div>
</div> </div>
<!-- 其他信息 --> <!-- 其他信息 -->
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
<div class="mar-10"></div> <div class="mar-10"></div>
<el-button plain v-if="![3, 5].includes(routeInfo.addOrEdit)" @click="handleDraft">草稿</el-button> <el-button plain v-if="![3, 5].includes(routeInfo.addOrEdit)" @click="handleDraft">草稿</el-button>
<div class="mar-10"></div> <div class="mar-10"></div>
<el-button v-if="routeInfo.addOrEdit != '5'" type="primary" @click="checkRefitInfo()">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button> <el-button v-if="routeInfo.addOrEdit != '5'" type="primary" @click="checkRefitInfo()" v-preventReClick>{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
<div class="mar-10"></div> <div class="mar-10"></div>
</div> </div>
</div> </div>
...@@ -1956,21 +1956,63 @@ export default { ...@@ -1956,21 +1956,63 @@ export default {
} }
} }
}) })
this.customProductList = _list console.log(_list, '_list')
let list2 = []
if (this.editForm.vehicle.vehicleSeriesId) {
let cartype = this.editForm.vehicle.vehicleSeriesId
// let _price = this.editForm.vehicle.invoicePrice
_list.forEach(item => {
// 套餐商品不做过滤 没有这个字段也给全部默认显示
if (item.parentId || !item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
list2.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
}
})
} else {
list2 = _list
}
console.log(list2, '_list')
this.customProductList = list2
if (formDetail) return _list if (formDetail) return _list
} }
// var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode) },
// this.editForm.suggestedSellingPrice = '' packageToCarType() {
// if (this.editForm.vehicle.invoicePrice) { let cartype = this.editForm.vehicle.vehicleSeriesId
// var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2) let _price = this.editForm.vehicle.invoicePrice
// targetItem && if ((cartype || _price) && this.editForm.orderStatus != 2) {
// targetItem.servicePackagePrices.forEach(item => { let _list = []
// if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) { this.copyCustomProductList.forEach(item => {
// this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2) // 套餐商品不做过滤 没有这个字段也给全部默认显示
// this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2) if (item.parentId || !item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
// } _list.push(item)
// }) } else {
// } if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
}
})
console.log(_list, '_list')
let list2 = []
if (this.editForm.vehicle.invoicePrice) {
// let _price = this.editForm.vehicle.invoicePrice
_list.forEach(item => {
// 套餐商品不做过滤
if (item.parentId || !item.carHighestPrice || (item.carHighestPrice && _price <= NP.divide(item.carHighestPrice || 0, 100) && _price >= NP.divide(item.carLowestPrice || 0, 100))) {
list2.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
}
})
} else {
list2 = _list
}
this.customProductList = list2
}
}, },
packageAttr(recovery = false, productArrData, detailInfo) { packageAttr(recovery = false, productArrData, detailInfo) {
// 2023 7月底版本 改版 // 2023 7月底版本 改版
...@@ -1978,7 +2020,7 @@ export default { ...@@ -1978,7 +2020,7 @@ export default {
packCode = [] packCode = []
detailInfo.attributes.forEach(item => { detailInfo.attributes.forEach(item => {
let targetItem = productArrData.find(k => k.packageCode == item.packageCode) let targetItem = productArrData.find(k => k.packageCode == item.packageCode)
if(targetItem){ if (targetItem) {
if (targetItem && item.parentId) { if (targetItem && item.parentId) {
targetItem.parentId = item.parentId targetItem.parentId = item.parentId
targetItem.parentName = item.parentName targetItem.parentName = item.parentName
...@@ -2106,7 +2148,6 @@ export default { ...@@ -2106,7 +2148,6 @@ export default {
} }
} }
packCode.push(item.packageCode) packCode.push(item.packageCode)
const _curProdTarget = this.allProdList.find(el => el.packageCode == item.packageCode) const _curProdTarget = this.allProdList.find(el => el.packageCode == item.packageCode)
const hasTire = _curProdTarget?.groupAttributeList?.find(el => el.attributeGroup == 'tireDTONew' || el.attributeGroup == 'tireBatchNew') const hasTire = _curProdTarget?.groupAttributeList?.find(el => el.attributeGroup == 'tireDTONew' || el.attributeGroup == 'tireBatchNew')
...@@ -2304,6 +2345,7 @@ export default { ...@@ -2304,6 +2345,7 @@ export default {
this.$apis.beforeSale.getCarTypeListApi(params).then(res => { this.$apis.beforeSale.getCarTypeListApi(params).then(res => {
this.baseData.carTypeOptions = res || [] this.baseData.carTypeOptions = res || []
}) })
this.packageToCarType(this.editForm.vehicle.vehicleSeriesId)
}, },
// 跳转 // 跳转
whereToGo(id) { whereToGo(id) {
......
...@@ -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?.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 => {
...@@ -1161,7 +1195,8 @@ export default { ...@@ -1161,7 +1195,8 @@ export default {
if ((thirdPartyCost || djCost) && this.pageName == 'insurance') { if ((thirdPartyCost || djCost) && this.pageName == 'insurance') {
_goodsCost = (thirdPartyCost || 0) + (djCost || 0) _goodsCost = (thirdPartyCost || 0) + (djCost || 0)
} }
const types = [item.carBrand, item.carChildsBrandName, item.carSeriesName]
const result = types.filter(type => type).join('-')
const _obj = { const _obj = {
...item, ...item,
tableNum: _idx + (para.pageNum - 1) * para.pageSize + 1, tableNum: _idx + (para.pageNum - 1) * para.pageSize + 1,
...@@ -1182,7 +1217,8 @@ export default { ...@@ -1182,7 +1217,8 @@ export default {
setMealRule: `${setMealRuleType}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateValue}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateType == 3 ? '元' : '%'}`, setMealRule: `${setMealRuleType}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateValue}${!setMealRuleObj.shopTrafficMoneyCalculateType ? '' : setMealRuleObj.shopTrafficMoneyCalculateType == 3 ? '元' : '%'}`,
divisionTypeName: item.divisionType == 1 ? '线下对账' : '线上分账', divisionTypeName: item.divisionType == 1 ? '线下对账' : '线上分账',
payTypeName: PAYTYPEOBJ[item.payType], payTypeName: PAYTYPEOBJ[item.payType],
paySuccessDate: utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') paySuccessDate: utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss'),
carTypeName: result // 车型使用主品牌-子品牌-车系
} }
// 按固定金额*购买数量特殊处理 // 按固定金额*购买数量特殊处理
if (shopTrafficMoneyCalculateType == 10) { if (shopTrafficMoneyCalculateType == 10) {
...@@ -1261,7 +1297,8 @@ export default { ...@@ -1261,7 +1297,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!