Commit 095cb680 by 前端

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

上线合并

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