This commit is contained in:
xd 2024-07-09 12:09:08 +08:00
parent 5a73a179ff
commit 93ee2e9cfb
10 changed files with 138 additions and 13 deletions

View File

@ -847,6 +847,9 @@ public class QuotController extends BaseController
}
}*/
BigDecimal matQuotTp = materials.get(0).getMatQuotTp();
if(matQuotTp == null){
matQuotTp = BigDecimal.ONE;
}
tpxd = matQuotTp;
}
@ -985,4 +988,23 @@ public class QuotController extends BaseController
List<Quot> list = quotService.selectStatisticsQuotList(quot);
return getDataTable(list);
}
/**
* 统计有效报价单模块-明细进单占比
*/
@PreAuthorize("@ss.hasPermi('quot:quot:listStatisticsQuotQuot')")
@GetMapping("/zbInfo")
public String zbInfo(Quot quot)
{
String zbInfo = "";
List<QuotZb> list = quotService.selectZbInfo(quot);
for(QuotZb quotZb:list){
if(StringUtils.isEmpty(zbInfo)){
zbInfo = quotZb.getQuot_distinguish()+":"+quotZb.getQuot_percentage()+"%";
}else{
zbInfo = zbInfo +","+quotZb.getQuot_distinguish()+":"+quotZb.getQuot_percentage()+"%";
}
}
return zbInfo;
}
}

View File

@ -0,0 +1,28 @@
package com.ruoyi.quot.domain;
public class QuotZb {
private String quot_distinguish;
private String quot_percentage;
public String getQuot_distinguish() {
if("1".equals(quot_distinguish)){
quot_distinguish = "明细进单";
}
if("2".equals(quot_distinguish)){
quot_distinguish = "附件进单";
}
return quot_distinguish;
}
public void setQuot_distinguish(String quot_distinguish) {
this.quot_distinguish = quot_distinguish;
}
public String getQuot_percentage() {
return quot_percentage;
}
public void setQuot_percentage(String quot_percentage) {
this.quot_percentage = quot_percentage;
}
}

View File

@ -3,6 +3,7 @@ package com.ruoyi.quot.mapper;
import java.util.List;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.domain.QuotMaterial;
import com.ruoyi.quot.domain.QuotZb;
import com.ruoyi.quot.domain.SysOaQuot;
import org.apache.ibatis.annotations.Param;
@ -161,4 +162,10 @@ public interface QuotMapper
*/
List<Quot> selectStatisticsQuotList(Quot quot);
/**
* 统计有效报价单模块-明细进单占比
* @param quot
* @return
*/
List<QuotZb> selectZbInfo(Quot quot);
}

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.ruoyi.customer.domain.Customer;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.quot.domain.QuotZb;
import com.ruoyi.quot.domain.SysOaQuot;
/**
@ -143,4 +144,11 @@ public interface IQuotService
* @return
*/
List<Quot> selectStatisticsQuotList(Quot quot);
/**
* 统计有效报价单模块-明细进单占比
* @param quot
* @return
*/
List<QuotZb> selectZbInfo(Quot quot);
}

View File

@ -8,6 +8,7 @@ import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.customer.domain.Customer;
import com.ruoyi.quot.domain.QuotZb;
import com.ruoyi.quot.domain.SysOaQuot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -297,4 +298,14 @@ public class QuotServiceImpl implements IQuotService
public List<Quot> selectStatisticsQuotList(Quot quot) {
return quotMapper.selectStatisticsQuotList(quot);
}
/**
* 统计有效报价单模块-明细进单占比
* @param quot
* @return
*/
@Override
public List<QuotZb> selectZbInfo(Quot quot) {
return quotMapper.selectZbInfo(quot);
}
}

View File

@ -555,4 +555,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by a.quot_quotation_date desc
</select>
<select id="selectZbInfo" resultType="QuotZb">
select quot_distinguish,100 * count / SUM(count) OVER() AS quot_percentage
from (
select quot_distinguish,count(1) count
from quot
<where>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
and datediff(d, quot_quotation_date, #{params.beginTime}) <![CDATA[<=]]> 0
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and datediff(d, quot_quotation_date, #{params.endTime}) <![CDATA[>=]]> 0
</if>
and quot_distinguish is not null
and quot_distinguish in ('1','2')
and quot_approval_status = '2'
</where>
group by quot_distinguish) a
</select>
</mapper>

View File

@ -208,3 +208,13 @@ export function listStatisticsQuotQuot(query) {
})
}
//统计有效报价单模块-明细进单占比
export function zbInfo(query) {
return request({
url: '/quot/quot/zbInfo',
method: 'get',
params: query
})
}

View File

@ -139,7 +139,7 @@
:value="item.value"
@click.native="selectRbDate(item.value)"/>
</el-select>
<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
<!--<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>-->
</el-form-item>
</el-col>
</el-row>

View File

@ -53,6 +53,9 @@
<!-- 报价详情对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1050px" v-el-drag-dialog append-to-body>
<template slot="title">
报价单信息<span style="color:red;margin-left:25px">(一次折扣率默认0.8,二次折扣率下点不超过5.2个点)</span>
</template>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row :gutter="8">
<el-col :span="12">
@ -111,9 +114,9 @@
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial">删除</el-button>
</el-col>
<el-col :span="1.5">
<!--<el-col :span="1.5">
<el-button size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
</el-col>
</el-col>-->
</el-row>
<el-table v-loading="selectedResultLoading" width="100%;" :row-class-name="selectedResultIndex" :data="selectedResultData" @selection-change="handleQuotMaterialSelectionChange" style="margin-top: 10px">
<el-table-column type="selection" width="50" align="center"/>

View File

@ -51,14 +51,14 @@
</el-form-item>
</el-form>
<el-row>
<el-col :span="4">
总条数:<span style="font-size: 18px">{{sumQuotMaterialsCount}}</span>
</el-col>
<el-col :span="4">
总价:<span style="font-size: 18px">{{sumQuotTotalPrice}}</span>
</el-col>
<el-col :span="4">
总单量:<span style="font-size: 18px">{{sumQuotCount}}</span>
<el-col :span="24">
<span>总条数:<span style="font-size: 18px">{{sumQuotMaterialsCount}}</span></span>
<span style="margin-left: 30px">总价:<span style="font-size: 18px">{{sumQuotTotalPrice}}</span></span>
<span style="margin-left: 30px">总单量:<span style="font-size: 18px">{{sumQuotCount}}</span></span>
<span style="margin-left: 30px">{{this.zbInfo}}</span>
</el-col>
</el-row>
<el-table v-loading="loading" :data="quotList" style="width: 100%;margin-top: 10px;" :height="tableHeight">
@ -90,7 +90,7 @@
</div>
</template>
<script>
import { listStatisticsQuotQuot } from "@/api/quot/quot"; //
import { listStatisticsQuotQuot,zbInfo } from "@/api/quot/quot"; //
import {toDecimal} from "@/api/redBook/redBook";
import { getNowDate } from '@/utils/date'
@ -117,7 +117,8 @@ export default {
quotCustomerName: null,
quotSalesmanName: null,
quotProject: null
}
},
zbInfo: null
};
},
created() {
@ -132,11 +133,27 @@ export default {
this.total = response.total;
this.loading = false;
});
this.getZb();
},
/** 明细进单占比 */
getZb() {
zbInfo(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.zbInfo = response;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
console.log(!this.dateRange)
if(!this.dateRange){
let dateRange = [];
const date = [getNowDate(),getNowDate()];
dateRange = dateRange.concat(date);
this.dateRange = dateRange;
}
this.getList();
},
/** 重置按钮操作 */