'123'
This commit is contained in:
parent
5e89e079b9
commit
2a43b84a47
|
@ -5,11 +5,13 @@ import com.ruoyi.common.annotation.Log;
|
|||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.customer.domain.Customer;
|
||||
import com.ruoyi.redBook.domain.OAQuotProduct;
|
||||
import com.ruoyi.redBook.domain.Product;
|
||||
import com.ruoyi.redBook.domain.OAQuot;
|
||||
|
@ -18,6 +20,7 @@ import com.ruoyi.redBook.service.IRedBookService;
|
|||
import com.ruoyi.web.utils.IdUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
|
@ -280,4 +283,17 @@ public class RedBookController extends BaseController
|
|||
logger.info("根据选择的调价日期 匹配数据结果: {}", oaQuotProducts);
|
||||
return success(oaQuotProducts);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询已生成的报价单列表
|
||||
*/
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
@GetMapping("/listQuots")
|
||||
public TableDataInfo listQuots(OAQuot oaQuot)
|
||||
{
|
||||
startPage();
|
||||
List<Customer> list = redBookService.listQuots(oaQuot);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ public class OAQuot extends BaseEntity {
|
|||
private String quotProject;//报价项目
|
||||
private String quotLxr;//联系人
|
||||
private String quotLxrdh;//联系人电话
|
||||
private String totalPrice;//总金额
|
||||
|
||||
private List<OAQuotProduct> selectedResultData;
|
||||
|
||||
|
@ -54,6 +55,10 @@ public class OAQuot extends BaseEntity {
|
|||
this.quotLxrdh = quotLxrdh;
|
||||
}
|
||||
|
||||
public String getTotalPrice() { return totalPrice; }
|
||||
|
||||
public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; }
|
||||
|
||||
public List<OAQuotProduct> getSelectedResultData() {
|
||||
return selectedResultData;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.redBook.mapper;
|
||||
|
||||
import com.ruoyi.customer.domain.Customer;
|
||||
import com.ruoyi.material.domain.CMaterial;
|
||||
import com.ruoyi.material.domain.CMaterialCost;
|
||||
import com.ruoyi.material.domain.temp;
|
||||
|
@ -100,4 +101,11 @@ public interface OARedBookMapper
|
|||
* @return
|
||||
*/
|
||||
List<OAQuotProduct> queryRedBPriceByParams(@Param("params") List<OAQuotProduct> params);
|
||||
|
||||
/**
|
||||
* 查询已生成的报价单列表
|
||||
* @param oaQuot
|
||||
* @return
|
||||
*/
|
||||
List<Customer> listQuots(OAQuot oaQuot);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ruoyi.redBook.service;
|
|||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.customer.domain.Customer;
|
||||
import com.ruoyi.quote.domain.CalculateRBParamDto;
|
||||
import com.ruoyi.redBook.domain.OAQuot;
|
||||
import com.ruoyi.redBook.domain.OAQuotProduct;
|
||||
|
@ -93,4 +94,11 @@ public interface IRedBookService
|
|||
* @return
|
||||
*/
|
||||
List<OAQuotProduct> queryRedBPriceByParams(List<OAQuotProduct> params);
|
||||
|
||||
/**
|
||||
* 查询已生成的报价单列表
|
||||
* @param oaQuot
|
||||
* @return
|
||||
*/
|
||||
List<Customer> listQuots(OAQuot oaQuot);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.redBook.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
|
@ -166,4 +167,15 @@ public class RedBookServiceImpl implements IRedBookService
|
|||
public List<OAQuotProduct> queryRedBPriceByParams(List<OAQuotProduct> params) {
|
||||
return oaRedBookMapper.queryRedBPriceByParams(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已生成的报价单列表
|
||||
* @param oaQuot
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d", userAlias = "u")
|
||||
public List<Customer> listQuots(OAQuot oaQuot) {
|
||||
return oaRedBookMapper.listQuots(oaQuot);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotProject != null and quotProject != ''">quotProject,</if>
|
||||
<if test="quotLxr != null and quotLxr != ''">quotLxr,</if>
|
||||
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh,</if>
|
||||
<if test="totalPrice != null and totalPrice != ''">totalPrice,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
</trim>
|
||||
|
@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotProject != null and quotProject != ''">#{quotProject},</if>
|
||||
<if test="quotLxr != null and quotLxr != ''">#{quotLxr},</if>
|
||||
<if test="quotLxrdh != null and quotLxrdh != ''">#{quotLxrdh},</if>
|
||||
<if test="totalPrice != null and totalPrice != ''">#{totalPrice},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
getdate()
|
||||
</trim>
|
||||
|
@ -134,4 +136,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND a.电压等级 = v.电压等级
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="quotsJoins">
|
||||
LEFT JOIN sys_user u on u.user_name=a.create_by
|
||||
LEFT JOIN sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
<select id="listQuots" parameterType="OAQuot" resultType="OAQuot">
|
||||
select a.quot_id,a.quotCode,a.quotCustomer,a.quotProject,a.quotLxr,a.quotLxrdh,a.totalPrice,a.create_by,a.create_time createTime
|
||||
from OAQuot a
|
||||
<include refid="quotsJoins"/>
|
||||
<where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -138,6 +138,16 @@ export function updateSelectedResultData(data) {
|
|||
}
|
||||
|
||||
|
||||
/** 已生成的报价单列表 */
|
||||
export function listQuots(query) {
|
||||
return request({
|
||||
url: '/redBook/redBook/listQuots',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
:limit.sync="searchResultPageSize"
|
||||
@size-change="handleSearchResultSizeChange"
|
||||
@current-change="handleSearchResultCurrentChange"
|
||||
:layout="'total, sizes, prev, pager, next'"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
@ -96,6 +97,9 @@
|
|||
</el-row>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="总金额" prop="totalPrice" v-if="false">
|
||||
<el-input v-model="form.totalPrice"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批量调折扣率" label-width="100px">
|
||||
<el-input style="width:10%" v-model="perc" size="small" @blur="changeData"></el-input>
|
||||
<el-input style="width:10%;margin-left: 5px" v-model="perc2" size="small" @blur="changeData"></el-input>
|
||||
|
@ -257,7 +261,7 @@
|
|||
perc2: '',
|
||||
|
||||
//表单
|
||||
form: {},
|
||||
form: {totalPrice: ''},
|
||||
|
||||
//调价日期选择
|
||||
versionList: [], // 国家数据列表
|
||||
|
@ -622,6 +626,8 @@
|
|||
|
||||
// 报价单保存
|
||||
handleSaveClick() {
|
||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||
this.form.totalPrice = allPrice.toFixed(2);
|
||||
this.form.selectedResultData = this.selectedResultData;
|
||||
saveQuot(this.form).then(response => {
|
||||
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
|
||||
|
@ -629,6 +635,11 @@
|
|||
},
|
||||
// 报价单生成
|
||||
handleMadeQuotClick() {
|
||||
if(this.selectedResultData.length==0){
|
||||
this.$modal.msgWarning("未选择报价产品信息");
|
||||
return;
|
||||
}
|
||||
|
||||
this.form.selectedResultData = this.selectedResultData;
|
||||
madeQuot(this.form).then(response => {
|
||||
this.$modal.msgSuccess("生成报价单成功");
|
||||
|
@ -662,6 +673,11 @@
|
|||
},
|
||||
//选择调价日期
|
||||
selectRbDate(uid){
|
||||
if(this.selectedResultData.length==0){
|
||||
this.$modal.msgWarning("未选择报价产品信息");
|
||||
return;
|
||||
}
|
||||
|
||||
this.selectedResultData.forEach((row, index) => {
|
||||
this.$set(this.selectedResultData, index, {
|
||||
...row,
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table width="100%" v-loading="loading" :data="quotsList" :row-class-name="rowQuotsIndex">
|
||||
<el-table-column label="序号" align="center" prop="index" width="80"/>
|
||||
<el-table-column label="quot_id" align="center" prop="quot_id" v-if="false"/>
|
||||
<el-table-column label="报价单号" width="260" align="center" prop="quotCode" />
|
||||
<el-table-column label="报价客户" width="200" align="center" prop="quotCustomer" />
|
||||
<el-table-column label="报价项目" width="200" align="center" prop="quotProject" />
|
||||
<el-table-column label="联系人"align="center" prop="quotLxr" />
|
||||
<el-table-column label="联系人电话"align="center" prop="quotLxrdh" />
|
||||
<el-table-column label="创建日期" width="200" align="center" prop="createTime" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listQuots } from "@/api/redBook/redBook";
|
||||
|
||||
export default {
|
||||
name: "quots",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
//报价单数据
|
||||
quotsList: [],
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询报价单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listQuots(this.queryParams).then(response => {
|
||||
this.quotsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
rowQuotsIndex({ row, rowIndex }) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue