✨ 合并毛利分析客户筛选并调整订单号输入高度
This commit is contained in:
+10
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.bms.common.annotation.Log;
|
import com.bms.common.annotation.Log;
|
||||||
import com.bms.common.config.BmsConfig;
|
import com.bms.common.config.BmsConfig;
|
||||||
@@ -48,6 +49,15 @@ public class PrcProfitReportController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private OssStorage ossStorage;
|
private OssStorage ossStorage;
|
||||||
|
|
||||||
|
/** 客户筛选选项,沿用毛利报表的访问权限和查询范围。 */
|
||||||
|
@PreAuthorize("@ss.hasPermi('report:profit:list')")
|
||||||
|
@GetMapping("/customer-options")
|
||||||
|
public TableDataInfo customerOptions(@RequestParam(required = false) String keywords)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
return getDataTable(profitReportService.selectCustomerOptions(keywords));
|
||||||
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('report:profit:list')")
|
@PreAuthorize("@ss.hasPermi('report:profit:list')")
|
||||||
@GetMapping("/summary")
|
@GetMapping("/summary")
|
||||||
public AjaxResult summary(PrcProfitReportQuery query)
|
public AjaxResult summary(PrcProfitReportQuery query)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.bms.price.service;
|
package com.bms.price.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import com.bms.customer.customerinfo.domain.BmsCustomerOption;
|
||||||
// 提成功能暂停使用:import com.bms.price.domain.PrcProfitCommissionRate;
|
// 提成功能暂停使用:import com.bms.price.domain.PrcProfitCommissionRate;
|
||||||
import com.bms.price.domain.PrcProfitReportExport;
|
import com.bms.price.domain.PrcProfitReportExport;
|
||||||
import com.bms.price.domain.vo.PrcProfitReportOrderRow;
|
import com.bms.price.domain.vo.PrcProfitReportOrderRow;
|
||||||
@@ -11,6 +12,8 @@ import com.bms.price.domain.vo.PrcProfitReportSummary;
|
|||||||
/** 毛利报表服务。 */
|
/** 毛利报表服务。 */
|
||||||
public interface IPrcProfitReportService
|
public interface IPrcProfitReportService
|
||||||
{
|
{
|
||||||
|
List<BmsCustomerOption> selectCustomerOptions(String keywords);
|
||||||
|
|
||||||
List<PrcProfitReportOrderRow> selectOrderRows(PrcProfitReportQuery query);
|
List<PrcProfitReportOrderRow> selectOrderRows(PrcProfitReportQuery query);
|
||||||
|
|
||||||
List<PrcProfitReportProductRow> selectProductRows(PrcProfitReportQuery query);
|
List<PrcProfitReportProductRow> selectProductRows(PrcProfitReportQuery query);
|
||||||
|
|||||||
+15
@@ -9,6 +9,9 @@ import org.springframework.stereotype.Service;
|
|||||||
// 提成功能暂停使用:import org.springframework.transaction.annotation.Transactional;
|
// 提成功能暂停使用:import org.springframework.transaction.annotation.Transactional;
|
||||||
import com.bms.common.exception.ServiceException;
|
import com.bms.common.exception.ServiceException;
|
||||||
import com.bms.common.utils.SecurityUtils;
|
import com.bms.common.utils.SecurityUtils;
|
||||||
|
import com.bms.customer.customerinfo.domain.BmsCustomer;
|
||||||
|
import com.bms.customer.customerinfo.domain.BmsCustomerOption;
|
||||||
|
import com.bms.customer.customerinfo.mapper.BmsCustomerMapper;
|
||||||
// 提成功能暂停使用:import com.bms.price.domain.PrcProfitCommissionRate;
|
// 提成功能暂停使用:import com.bms.price.domain.PrcProfitCommissionRate;
|
||||||
// 提成功能暂停使用:import com.bms.price.mapper.PrcProfitCommissionRateMapper;
|
// 提成功能暂停使用:import com.bms.price.mapper.PrcProfitCommissionRateMapper;
|
||||||
import com.bms.price.domain.PrcProfitReportExport;
|
import com.bms.price.domain.PrcProfitReportExport;
|
||||||
@@ -28,11 +31,23 @@ public class PrcProfitReportServiceImpl implements IPrcProfitReportService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PrcProfitReportMapper profitReportMapper;
|
private PrcProfitReportMapper profitReportMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BmsCustomerMapper customerMapper;
|
||||||
|
|
||||||
/* 提成配置依赖暂停使用。
|
/* 提成配置依赖暂停使用。
|
||||||
@Autowired
|
@Autowired
|
||||||
private PrcProfitCommissionRateMapper commissionRateMapper;
|
private PrcProfitCommissionRateMapper commissionRateMapper;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BmsCustomerOption> selectCustomerOptions(String keywords)
|
||||||
|
{
|
||||||
|
// 报表不应用客户模块的 DataScope,只接收关键字并构造内部查询条件。
|
||||||
|
BmsCustomer query = new BmsCustomer();
|
||||||
|
query.setKeywords(keywords);
|
||||||
|
return customerMapper.selectCustomerOptions(query);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PrcProfitReportOrderRow> selectOrderRows(PrcProfitReportQuery query)
|
public List<PrcProfitReportOrderRow> selectOrderRows(PrcProfitReportQuery query)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,14 @@ function createProfitExport(url, params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function listProfitCustomerOptions(params) {
|
||||||
|
return request({
|
||||||
|
url: '/report/profit/customer-options',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function listProfitSummary(params) {
|
export function listProfitSummary(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/report/profit/summary',
|
url: '/report/profit/summary',
|
||||||
|
|||||||
@@ -28,27 +28,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="12" :lg="8">
|
<el-col :xs="24" :sm="12" :lg="8">
|
||||||
<el-form-item label="客户名称" class="filter-item">
|
<el-form-item label="客户名称" class="filter-item">
|
||||||
<el-input
|
<customer-select
|
||||||
v-model="query.customerName"
|
|
||||||
type="textarea"
|
|
||||||
:rows="3"
|
|
||||||
resize="vertical"
|
|
||||||
clearable
|
|
||||||
placeholder="输入客户名称,多个值请换行"
|
|
||||||
class="filter-control multi-line-filter"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="12" :lg="8">
|
|
||||||
<el-form-item label="客户代码" class="filter-item">
|
|
||||||
<el-input
|
|
||||||
v-model="query.customerCode"
|
v-model="query.customerCode"
|
||||||
type="textarea"
|
:fetch-options="listProfitCustomerOptions"
|
||||||
:rows="3"
|
value-key="customerCode"
|
||||||
resize="vertical"
|
remote-search
|
||||||
clearable
|
:page-size="20"
|
||||||
placeholder="输入客户代码,多个值请换行"
|
placeholder="请输入客户名称或代码搜索"
|
||||||
class="filter-control multi-line-filter"
|
class="filter-control"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -57,8 +44,8 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="query.orderNo"
|
v-model="query.orderNo"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="3"
|
:rows="1"
|
||||||
resize="vertical"
|
resize="none"
|
||||||
clearable
|
clearable
|
||||||
placeholder="输入订单号,多个值请换行"
|
placeholder="输入订单号,多个值请换行"
|
||||||
class="filter-control multi-line-filter"
|
class="filter-control multi-line-filter"
|
||||||
@@ -315,7 +302,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="ProfitReport">
|
<script setup name="ProfitReport">
|
||||||
import { downloadProfitExport, exportProfitOrders, exportProfitProducts, listProfitExports, listProfitOrders, listProfitProducts, listProfitSummary } from '@/api/report/profit'
|
import { downloadProfitExport, exportProfitOrders, exportProfitProducts, listProfitCustomerOptions, listProfitExports, listProfitOrders, listProfitProducts, listProfitSummary } from '@/api/report/profit'
|
||||||
// 提成功能暂停使用:import { deleteProfitCommissionRate, listProfitCommissionRates, saveProfitCommissionRate } from '@/api/report/profit'
|
// 提成功能暂停使用:import { deleteProfitCommissionRate, listProfitCommissionRates, saveProfitCommissionRate } from '@/api/report/profit'
|
||||||
import { parseTime } from '@/utils/bms'
|
import { parseTime } from '@/utils/bms'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
@@ -329,7 +316,6 @@ const arBillStatus = ref('')
|
|||||||
const query = reactive({
|
const query = reactive({
|
||||||
orderNo: '',
|
orderNo: '',
|
||||||
customerCode: '',
|
customerCode: '',
|
||||||
customerName: '',
|
|
||||||
belongSalerCode: '',
|
belongSalerCode: '',
|
||||||
productCode: ''
|
productCode: ''
|
||||||
})
|
})
|
||||||
@@ -405,9 +391,7 @@ function buildQuery(paged = true, includeArBillStatus = dimension.value === 'ord
|
|||||||
|
|
||||||
function validateMultiValueFilters(showMessage = true) {
|
function validateMultiValueFilters(showMessage = true) {
|
||||||
const filters = [
|
const filters = [
|
||||||
['orderNo', '订单号'],
|
['orderNo', '订单号']
|
||||||
['customerCode', '客户代码'],
|
|
||||||
['customerName', '客户名称']
|
|
||||||
]
|
]
|
||||||
for (const [key, label] of filters) {
|
for (const [key, label] of filters) {
|
||||||
const values = new Set(String(query[key] || '').split(/[\s,,;;]+/).map(value => value.trim()).filter(Boolean))
|
const values = new Set(String(query[key] || '').split(/[\s,,;;]+/).map(value => value.trim()).filter(Boolean))
|
||||||
|
|||||||
Reference in New Issue
Block a user