Commit 095cb680 by 前端

Merge branch 'V4.39.0-0603' into 'master'

上线合并

See merge request !14
2 parents cc49135c fe312553
......@@ -16,6 +16,7 @@
"glsx-common": "^2.0.4",
"glsx-components": "^1.5.4",
"lodash": "^4.17.21",
"number-precision": "^1.6.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2",
......
......@@ -162,7 +162,7 @@
<el-checkbox-group v-model="curSelectCustomPro" :disabled="disabled || dataSourceDisable">
<div v-for="(item, index) in customProductList" :key="index" class="product_wrapper">
<div>
<el-checkbox @change="changeRaido($event, item, index)" :label="item.packageCode" :disabled="item.disabled">
<el-checkbox @change="changeRaido($event, item)" :label="item.packageCode" :disabled="item.disabled">
<div>{{ item.parentName ? item.packageName + '-' + item.parentName : item.packageName }}</div>
</el-checkbox>
<p class="h20_title product_intro">包括服务项目:{{ item.serviceItems }}</p>
......@@ -316,6 +316,7 @@ import { fetchConfig } from '@/config'
import utils from '../../util/util'
import uploadInfo from './uploadInfo.vue'
import FormatInput from '@/components/FormatInput'
import NP from 'number-precision'
export default {
name: 'editEquity',
data() {
......@@ -435,8 +436,8 @@ export default {
type: 'input',
placeholder: '请输入车辆价格',
maxlength: 11,
inputBlur: () => {
this.packageToPrice()
inputBlur: e => {
this.packageToPrice(e)
}
},
{
......@@ -1206,7 +1207,8 @@ export default {
let hasRefitFlagList = this.allProdList.filter(item => this.packageCodeList.includes(item.packageCode))
this.refitFormObj.autoFlag = !!hasRefitFlagList?.find(item => item.qsFlag)
},
changeRaido(e, item) {
changeRaido(e, item, isDel) {
// isDel 删除选中的
if (e) {
// this.checkCodeList = []
// this.autoPackageCodeList = []
......@@ -1236,6 +1238,9 @@ export default {
} else {
this.checkCodeList = this.checkCodeList.filter(t => t != item.packageCode)
this.autoPackageCodeList = this.autoPackageCodeList.filter(t => t != item.packageCode)
if (isDel) {
this.curSelectCustomPro = this.curSelectCustomPro.filter(t => t != item.packageCode)
}
for (let key in this.productModal[item.idName]) {
item.groupAttributeList.forEach(attr => {
if (attr.attributeName == key) {
......@@ -1615,6 +1620,7 @@ export default {
this.customProductList.push(item)
}
})
this.copyCustomProductList = this.$common.utils.deepClone(this.customProductList) //复制一份出来当做过滤源数据
this.autoGenerate(this.customProductList, this.productList)
},
setDisabled(partDisabledList = []) {
......@@ -1766,19 +1772,33 @@ export default {
})
},
// 改建议价,实际销售价
packageToPrice() {
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
this.editForm.suggestedSellingPrice = ''
if (this.editForm.vehicle.invoicePrice) {
var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2)
targetItem &&
targetItem.servicePackagePrices.forEach(item => {
if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) {
this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2)
this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2)
packageToPrice(e) {
let _price = e?.target?.value || ''
if (_price && this.editForm.orderStatus != 2) {
let _list = []
this.copyCustomProductList.forEach(item => {
if (!item.carHighestPrice || (item.carHighestPrice && _price <= NP.divide(item.carHighestPrice || 0, 100) && _price >= NP.divide(item.carLowestPrice || 0, 100))) {
_list.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
this.changeRaido(false, item, true)
}
})
}
}
})
this.customProductList = _list
}
// var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
// this.editForm.suggestedSellingPrice = ''
// if (this.editForm.vehicle.invoicePrice) {
// var invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(2)
// targetItem &&
// targetItem.servicePackagePrices.forEach(item => {
// if (+invoicePrice >= +item.carButtomPrice && +invoicePrice < +item.carHighestPrice) {
// this.editForm.suggestedSellingPrice = (item.retailPrice / 100).toFixed(2)
// this.editForm.actualSalesPrice = (item.retailPrice / 100).toFixed(2)
// }
// })
// }
},
packageAttr(recovery = false, productArrData, detailInfo) {
// 2023 7月底版本 改版
......
......@@ -26,7 +26,7 @@
</div>
<!-- :span-method="objectSpanMethod" -->
<div class="table_wrap">
<GLTable :cell-class-name="setClass" @cell-mouse-leave="handleCellMouseLeave" @cell-mouse-enter="handleCellMouseEnter" :span-method="objectSpanMethod" v-if="dynamicTableShow" ref="subTable" :tableData="tableData" :tableTotal="tableTotal" :tableParams="newTableParams" @refreshTable="toGetCouponsList">
<GLTable :cell-class-name="setClass" :hasNum="false" @cell-mouse-leave="handleCellMouseLeave" @cell-mouse-enter="handleCellMouseEnter" :span-method="objectSpanMethod" v-if="dynamicTableShow" ref="subTable" :tableData="tableData" :tableTotal="tableTotal" :tableParams="newTableParams" @refreshTable="toGetCouponsList">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
......@@ -594,6 +594,12 @@ export default {
tableOption: false,
tableColumns: [
{
label: '序号',
prop: 'tableNum',
width: '80px',
align: 'center'
},
{
label: '订单信息',
align: 'center',
children: [
......@@ -801,7 +807,7 @@ export default {
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// column没有prop,只能用label判断
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型', '操作']
const mergeColNameList = ['序号', '主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型', '操作']
return {
rowspan: mergeColNameList.includes(column.label) ? row.rowspan : column.label == '套餐规则' ? row.setMealRowspan : 1,
colspan: 1
......@@ -900,6 +906,7 @@ export default {
},
setClass({ row, column, rowIndex, columnIndex }) {
const mergeColNameList = ['主订单编号', '交易参考号', '客户姓名', '转化员姓名', '销售顾问', '支付方式', '支付时间', '分账对象', '二级流量方', '整单规则', '分账金额/元', '分账类型']
if (columnIndex == 1) return 'add-right-border'
return (mergeColNameList.includes(column.label) && row.rowspan > 1) || (column.label == '套餐规则' && row.setMealRowspan > 1) ? 'add-border' : ''
},
/**获取商户列表 */
......@@ -977,6 +984,12 @@ export default {
tableOption: false,
tableColumns: [
{
label: '序号',
prop: 'tableNum',
width: '80px',
align: 'center'
},
{
label: '订单信息',
align: 'center',
children: []
......@@ -1009,7 +1022,7 @@ export default {
if (item.align) {
obj.align = item.align
}
newTableParams.tableColumns[item.level - 1].children.push(obj)
newTableParams.tableColumns[item.level].children.push(obj)
})
this.newTableParams = newTableParams
this.$refs.subTable.componentKey = Date.now()
......@@ -1125,7 +1138,7 @@ export default {
res.list = res && res.list ? res.list : []
let tableData = []
const TYPELIST = { 0: '--', 1: '毛利', 2: '收入', 3: '固定', 8: '(收入-自定义其他费用)', 9: '(收入-其他费用)' }
res.list.forEach(item => {
res.list.forEach((item, _idx) => {
const packageOrderList = item.packageOrderList || []
const orderRuleObj = item.mainProfitAllocation || {} // 整单规则取值对象
packageOrderList.forEach((subItem, sunIdx) => {
......@@ -1145,6 +1158,7 @@ export default {
const _obj = {
...item,
tableNum: _idx + 1,
rowspan: 1,
setMealRowspan: eleIdx == 0 ? subOrderList.length : 0,
id,
......@@ -1317,6 +1331,12 @@ export default {
border-collapse: collapse;
}
/deep/ .el-table__row {
td:first-child:after {
content: none !important;
}
.add-right-border {
border-right: 1px solid #ebeef5;
}
.add-border {
border-right: 1px solid #ebeef5;
border-left: 1px solid #ebeef5;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!