Compare commits
2 Commits
ff62d808f6
...
df2b17ebca
Author | SHA1 | Date |
---|---|---|
xd | df2b17ebca | |
xd | 491ddefcce |
|
@ -144,15 +144,13 @@ public class QuotController extends BaseController
|
||||||
public AjaxResult getReturnUpdateInfo(@PathVariable("quotId") String quotId)
|
public AjaxResult getReturnUpdateInfo(@PathVariable("quotId") String quotId)
|
||||||
{
|
{
|
||||||
Quot quot = quotService.selectQuotByQuotId(quotId);
|
Quot quot = quotService.selectQuotByQuotId(quotId);
|
||||||
if("2".equals(quot.getQuotApprovalStatus())){
|
if("2".equals(quot.getQuotApprovalStatus()) || "3".equals(quot.getQuotApprovalStatus())){
|
||||||
quot.setQuotApprovalStatus("1");// 提交状态设置为 协助中
|
quot.setQuotApprovalStatus("1");// 提交状态设置为 协助中
|
||||||
quotService.updateQuot(quot);
|
quotService.updateQuot(quot);
|
||||||
}else if("0".equals(quot.getQuotApprovalStatus())){
|
}else if("0".equals(quot.getQuotApprovalStatus())){
|
||||||
return error("该报价单当前状态为【待提交】状态,无法修改");
|
return error("该报价单当前状态为【待提交】状态,无法修改");
|
||||||
}else if("1".equals(quot.getQuotApprovalStatus())){
|
}else if("1".equals(quot.getQuotApprovalStatus())){
|
||||||
return error("该报价单当前状态为【协助中】状态,无法修改");
|
return error("该报价单当前状态为【协助中】状态,无法修改");
|
||||||
}else if("3".equals(quot.getQuotApprovalStatus())){
|
|
||||||
return error("该报价单当前状态为【已驳回】状态,无法修改");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return success(quot);
|
return success(quot);
|
||||||
|
@ -833,4 +831,16 @@ public class QuotController extends BaseController
|
||||||
quotService.updateQuot(quot);
|
quotService.updateQuot(quot);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计有效报价单模块-获取报价单数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('quot:quot:listStatisticsQuotQuot')")
|
||||||
|
@GetMapping("/listStatisticsQuotQuot")
|
||||||
|
public TableDataInfo listStatisticsQuotQuot(Quot quot)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Quot> list = quotService.selectStatisticsQuotList(quot);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,8 +96,10 @@ public class Quot extends BaseEntity
|
||||||
|
|
||||||
/** 是否打印 */
|
/** 是否打印 */
|
||||||
private String quotPrint;
|
private String quotPrint;
|
||||||
/** 打印人 */
|
/** 打印人账号 */
|
||||||
private String quotPrintUserName;
|
private String quotPrintUserName;
|
||||||
|
/** 打印人 */
|
||||||
|
private String quotPrintUserNickName;
|
||||||
|
|
||||||
/** 总价 */
|
/** 总价 */
|
||||||
private String quotTotalPrice;
|
private String quotTotalPrice;
|
||||||
|
@ -309,6 +311,9 @@ public class Quot extends BaseEntity
|
||||||
public String getQuotPrintUserName() { return quotPrintUserName; }
|
public String getQuotPrintUserName() { return quotPrintUserName; }
|
||||||
|
|
||||||
public void setQuotPrintUserName(String quotPrintUserName) { this.quotPrintUserName = quotPrintUserName; }
|
public void setQuotPrintUserName(String quotPrintUserName) { this.quotPrintUserName = quotPrintUserName; }
|
||||||
|
public String getQuotPrintUserNickName() { return quotPrintUserNickName; }
|
||||||
|
|
||||||
|
public void setQuotPrintUserNickName(String quotPrintUserNickName) { this.quotPrintUserNickName = quotPrintUserNickName; }
|
||||||
public void setQuotQuantity(String quotQuantity)
|
public void setQuotQuantity(String quotQuantity)
|
||||||
{
|
{
|
||||||
this.quotQuantity = quotQuantity;
|
this.quotQuantity = quotQuantity;
|
||||||
|
|
|
@ -147,4 +147,12 @@ public interface QuotMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getCode(String type);
|
String getCode(String type);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计有效报价单模块-获取报价单数据
|
||||||
|
* @param quot
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Quot> selectStatisticsQuotList(Quot quot);
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,4 +130,12 @@ public interface IQuotService
|
||||||
* @param quot
|
* @param quot
|
||||||
*/
|
*/
|
||||||
void updateQuotAllPassInfo(Quot quot);
|
void updateQuotAllPassInfo(Quot quot);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计有效报价单模块-获取报价单数据
|
||||||
|
* @param quot
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Quot> selectStatisticsQuotList(Quot quot);
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,4 +278,15 @@ public class QuotServiceImpl implements IQuotService
|
||||||
public void updateQuotAllPassInfo(Quot quot) {
|
public void updateQuotAllPassInfo(Quot quot) {
|
||||||
quotMapper.updateQuot(quot);
|
quotMapper.updateQuot(quot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计有效报价单模块-获取报价单数据
|
||||||
|
* @param quot
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Quot> selectStatisticsQuotList(Quot quot) {
|
||||||
|
return quotMapper.selectStatisticsQuotList(quot);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="quotMatpriceDiff" column="quot_matprice_diff" />
|
<result property="quotMatpriceDiff" column="quot_matprice_diff" />
|
||||||
<result property="quotPrint" column="quot_print" />
|
<result property="quotPrint" column="quot_print" />
|
||||||
<result property="quotPrintUserName" column="quot_print_user_name" />
|
<result property="quotPrintUserName" column="quot_print_user_name" />
|
||||||
|
<result property="quotPrintUserNickName" column="quot_print_user_nickName" />
|
||||||
|
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createName" column="create_name" />
|
<result property="createName" column="create_name" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
|
@ -111,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from,
|
a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from,
|
||||||
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
|
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
|
||||||
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count,
|
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count,
|
||||||
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,u3.nick_name quot_print_user_name,
|
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
|
||||||
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,
|
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,
|
||||||
|
|
||||||
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
|
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
|
||||||
|
@ -156,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts, a.quot_phone, a.quot_inquiry_date,
|
a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts, a.quot_phone, a.quot_inquiry_date,
|
||||||
a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation,
|
a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation,
|
||||||
a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
|
a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,
|
||||||
a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,u3.nick_name quot_print_user_name,
|
a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
|
||||||
a.create_by, a.create_time, a.update_by, a.update_time,
|
a.create_by, a.create_time, a.update_by, a.update_time,
|
||||||
|
|
||||||
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
|
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
|
||||||
|
@ -499,4 +501,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getCode" resultType="String" statementType="CALLABLE">
|
<select id="getCode" resultType="String" statementType="CALLABLE">
|
||||||
{call GetSerialNo(#{type,mode=IN,jdbcType=VARCHAR})}
|
{call GetSerialNo(#{type,mode=IN,jdbcType=VARCHAR})}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectStatisticsQuotList" parameterType="Quot" resultMap="QuotResult">
|
||||||
|
<include refid="selectQuotVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="quotCode != null and quotCode != ''"> and quot_code like concat('%', #{quotCode}, '%')</if>
|
||||||
|
<if test="quotCustomerName != null and quotCustomerName != ''"> and quot_customer_name like concat('%', #{quotCustomerName}, '%')</if>
|
||||||
|
<if test="quotProject != null and quotProject != ''"> and quot_project like concat('%', #{quotProject}, '%')</if>
|
||||||
|
<if test="quotSalesmanName != null and quotSalesmanName != ''"> and quot_salesman_name like concat('%', #{quotSalesmanName}, '%')</if>
|
||||||
|
</where>
|
||||||
|
order by a.quot_inquiry_date desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -178,3 +178,12 @@ export function rejectQuot(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//统计有效报价单模块-获取报价单数据
|
||||||
|
export function listStatisticsQuotQuot(query) {
|
||||||
|
return request({
|
||||||
|
url: '/quot/quot/listStatisticsQuotQuot',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ export default {
|
||||||
dialogHeaderEl.onmousedown = null;
|
dialogHeaderEl.onmousedown = null;
|
||||||
if (!hasSetBodyHight) {
|
if (!hasSetBodyHight) {
|
||||||
let footerHeight = dragDom.querySelector('.el-dialog__footer') && dragDom.querySelector('.el-dialog__footer').offsetHeight;
|
let footerHeight = dragDom.querySelector('.el-dialog__footer') && dragDom.querySelector('.el-dialog__footer').offsetHeight;
|
||||||
dragDom.querySelector('.el-dialog__body').style.height = 'calc(100% - ' + (dialogHeaderEl.offsetHeight + footerHeight) + 'px)';
|
dragDom.querySelector('.el-dialog__body').style.height = 'calc(100% - 110px)';
|
||||||
dragDom.querySelector('.el-dialog__body').style.maxHeight = dragDom.style.height
|
dragDom.querySelector('.el-dialog__body').style.maxHeight = dragDom.style.height
|
||||||
hasSetBodyHight = true;
|
hasSetBodyHight = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="报价单号" prop="quotCode">
|
<el-form-item label="询价单号" prop="quotCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.quotCode"
|
v-model="queryParams.quotCode"
|
||||||
placeholder="请输入报价单号"
|
placeholder="请输入询价单号"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
<el-table v-loading="loading" :data="quotList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="quotList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/>
|
<el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/>
|
||||||
<el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px">
|
<el-table-column fixed label="询价单号" align="center" prop="quotCode" width="250px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.quotCode}}</el-link>
|
<el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.quotCode}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="打印人" align="center" prop="quotPrintUserName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
|
||||||
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
||||||
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
||||||
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
<el-divider content-position="left" class="customer_divider_text">报价信息</el-divider>
|
<el-divider content-position="left" class="customer_divider_text">报价信息</el-divider>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="报价单号" prop="quotCode">
|
<el-form-item label="询价单号" prop="quotCode">
|
||||||
<el-input v-model="form.quotCode" placeholder="系统自动生成" :disabled="true"/>
|
<el-input v-model="form.quotCode" placeholder="系统自动生成" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -362,8 +362,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
<el-col :span="6" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
|
||||||
<el-form-item label="打印人" prop="quotPrintUserName">
|
<el-form-item label="打印人" prop="quotPrintUserNickName">
|
||||||
<el-input v-model="form.quotPrintUserName" :disabled="true"/>
|
<el-input v-model="form.quotPrintUserNickName" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -1232,6 +1232,7 @@ export default {
|
||||||
quotApprovalStatus: null,
|
quotApprovalStatus: null,
|
||||||
|
|
||||||
quotPrintUserName: null,
|
quotPrintUserName: null,
|
||||||
|
quotPrintUserNickName: null,
|
||||||
quotMaterialsCount: null,
|
quotMaterialsCount: null,
|
||||||
quotTongPrice: null,
|
quotTongPrice: null,
|
||||||
quotLvPrice: null,
|
quotLvPrice: null,
|
||||||
|
|
|
@ -0,0 +1,171 @@
|
||||||
|
<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="报价单号" prop="quotCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quotCode"
|
||||||
|
placeholder="请输入报价单号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户名称" prop="quotCustomerName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quotCustomerName"
|
||||||
|
placeholder="请输入客户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目名称" prop="quotProject">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quotProject"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务员" prop="quotSalesmanName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quotSalesmanName"
|
||||||
|
placeholder="请输入业务员"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-row>
|
||||||
|
<el-col :span="2">
|
||||||
|
<span>总条数:{{sumQuotMaterialsCount}}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<span>总价:{{sumQuotTotalPrice}}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="quotList" style="width: 100%;margin-top: 10px;" show-summary :summary-method="getSummaries">
|
||||||
|
<el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px"/>
|
||||||
|
<el-table-column fixed label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
|
||||||
|
<el-table-column fixed label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
|
||||||
|
<el-table-column fixed label="项目名称" align="center" prop="quotProject" width="250px"/>
|
||||||
|
<!--<el-table-column label="金思维报价单号" align="center" prop="quotJswCode" width="280px"/>-->
|
||||||
|
<el-table-column label="询价日期" align="center" prop="quotInquiryDate" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.quotInquiryDate) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="报价日期" align="center" prop="quotQuotationDate" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.quotQuotationDate) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="明细条数" align="center" prop="quotMaterialsCount" width="100"/>
|
||||||
|
<el-table-column label="总价" align="center" prop="quotTotalPrice" width="100"/>
|
||||||
|
<el-table-column label="创建人" align="center" prop="createName" width="150px"/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listStatisticsQuotQuot } from "@/api/quot/quot"; // 有效报价单统计
|
||||||
|
import { NumberAdd } from '@/utils/number';// 数值计算
|
||||||
|
export default {
|
||||||
|
name: "statisticsQuot",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 报价表格数据
|
||||||
|
quotList: [],
|
||||||
|
//总条数
|
||||||
|
sumQuotMaterialsCount: 0,
|
||||||
|
//总价
|
||||||
|
sumQuotTotalPrice: 0,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
quotCode: null,
|
||||||
|
quotCustomerName: null,
|
||||||
|
quotSalesmanName: null,
|
||||||
|
quotProject: null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询报价列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listStatisticsQuotQuot(this.queryParams).then(response => {
|
||||||
|
this.quotList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 对产品数据-数量、金额进行合算 */
|
||||||
|
getSummaries(param) {
|
||||||
|
const { columns, data } = param;
|
||||||
|
const sums = [];
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const values = data.map(item => Number(item[column.property]));
|
||||||
|
|
||||||
|
if (column.property === 'quotMaterialsCount' || column.property === 'quotTotalPrice') {
|
||||||
|
if (!values.every(value => isNaN(value))) {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr);
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return NumberAdd(prev,curr);
|
||||||
|
}else {
|
||||||
|
return prev;
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
} else {
|
||||||
|
sums[index] = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return sums;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue