This commit is contained in:
parent
a88c8e1cf4
commit
04f5a3055d
|
@ -1,12 +1,8 @@
|
||||||
package com.JN.demo.jnzmquatation.controller;
|
package com.JN.demo.jnzmquatation.controller;
|
||||||
|
|
||||||
import com.JN.common.R;
|
import com.JN.common.R;
|
||||||
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnMaterialDto;
|
import com.JN.demo.jnzmquatation.dto.JnMaterialDto;
|
||||||
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
|
|
||||||
import com.JN.demo.jnzmquatation.service.JnInventoryService;
|
|
||||||
import com.JN.demo.jnzmquatation.service.JnMaterialService;
|
import com.JN.demo.jnzmquatation.service.JnMaterialService;
|
||||||
import com.JN.demo.jnzmquatation.service.JnRegionService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -27,32 +23,12 @@ import java.util.List;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequestMapping("/jnquotation")
|
@RequestMapping("/jnquotation")
|
||||||
public class JNController {
|
public class JNController {
|
||||||
@Autowired
|
|
||||||
JnRegionService regionService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
JnMaterialService materialService;
|
JnMaterialService materialService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
JnInventoryService inventoryService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @title queryRegionList
|
|
||||||
* @description 查询地区列表信息
|
|
||||||
* @author JIAL
|
|
||||||
* @param: regionName
|
|
||||||
* @updateTime 2024/2/20 16:54
|
|
||||||
* @return: com.JN.common.R<java.util.List<com.JN.demo.zmquotation.dto.RegionDto>>
|
|
||||||
*/
|
|
||||||
@PostMapping("/regionList")
|
|
||||||
public R queryRegionList(@RequestParam("regionName") String regionName){
|
|
||||||
|
|
||||||
List<JnRegionDto> regionList = regionService.queryRegionListByName(regionName);
|
|
||||||
|
|
||||||
log.info("查询到的地区列表结果是:{}", regionList);
|
|
||||||
|
|
||||||
return R.success(regionList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title queryMaterialList
|
* @title queryMaterialList
|
||||||
|
@ -77,19 +53,4 @@ public class JNController {
|
||||||
return R.success(materialList);
|
return R.success(materialList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @title queryInventoryList
|
|
||||||
* @description 获取盘具列表
|
|
||||||
* @author JIAL
|
|
||||||
* @updateTime 2024/2/22 10:09
|
|
||||||
* @return: com.JN.common.R<java.util.List<com.JN.demo.zmquotation.dto.InventoryDto>>
|
|
||||||
*/
|
|
||||||
@PostMapping("/inventoryList")
|
|
||||||
public R queryInventoryList() {
|
|
||||||
List<JnInventoryDto> inventoryList = inventoryService.queryInventoryList();
|
|
||||||
|
|
||||||
return R.success(inventoryList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName InventoryDto
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/22 9:48
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class JnInventoryDto implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private String inventory; //盘具名称
|
|
||||||
|
|
||||||
private String invDesc; //盘具描述
|
|
||||||
|
|
||||||
private String weighInv; //盘重
|
|
||||||
}
|
|
|
@ -15,37 +15,27 @@ import java.io.Serializable;
|
||||||
public class JnMaterialDto implements Serializable {
|
public class JnMaterialDto implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private String materialName; //物料名称
|
private String uid; //物料uid
|
||||||
|
|
||||||
|
private String prodCategory; //产品大类
|
||||||
|
|
||||||
|
private String prodWorkshop; //生产车间
|
||||||
|
|
||||||
private String model; //型号
|
private String model; //型号
|
||||||
|
|
||||||
private String specification; //规格
|
private String specification; //规格
|
||||||
|
|
||||||
private String voltage; //电压
|
private String voltLevel; //电压等级
|
||||||
|
|
||||||
private String standard; //标准
|
private String measureUnit; //单位
|
||||||
|
|
||||||
private String costPrice; //成本价
|
private String matCostPrice; //材料成本价格
|
||||||
|
|
||||||
private String factoryPrice; //厂价
|
private String redBookPrice; //红本价格
|
||||||
|
|
||||||
private String netVolume; //净种量(物料重量)
|
private String redBookCost; //红本成本
|
||||||
|
|
||||||
private String inventory; //盘具
|
private String rbFacPrice; //红本厂价
|
||||||
|
|
||||||
private String weighInv; //盘重
|
private Integer number = 1; //数量默认1
|
||||||
|
|
||||||
private String matPrice; //材料价格(去掉铜铝后的价格)
|
|
||||||
|
|
||||||
private String totalCopperConsume; //铜导体总消耗
|
|
||||||
|
|
||||||
private String totalAluminumConsume; //铝导体总消耗
|
|
||||||
|
|
||||||
private String totalLHCost; //人工水电费合计
|
|
||||||
|
|
||||||
private String steamFee; //蒸汽费
|
|
||||||
|
|
||||||
private int quantity = 1; //数量默认为1
|
|
||||||
|
|
||||||
private int invItemCount = 1; //盘具数量默认1
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName RegionDto
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/19 10:40
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class JnRegionDto implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private String province;
|
|
||||||
|
|
||||||
private String city;
|
|
||||||
|
|
||||||
private String district;
|
|
||||||
|
|
||||||
private Integer kilometers;
|
|
||||||
|
|
||||||
private BigDecimal price01;
|
|
||||||
|
|
||||||
private BigDecimal price02;
|
|
||||||
|
|
||||||
private BigDecimal price03;
|
|
||||||
|
|
||||||
private BigDecimal price04;
|
|
||||||
|
|
||||||
private BigDecimal price05;
|
|
||||||
}
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.JN.demo.jnzmquatation.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName MaterialEneity
|
||||||
|
* @Description TODO
|
||||||
|
* @Author JIAL
|
||||||
|
* @Date 2024/2/27 13:57
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MaterialEneity {
|
||||||
|
|
||||||
|
private String uid_0;
|
||||||
|
private String desp_0;
|
||||||
|
private String desp_1;
|
||||||
|
private String desp_2;
|
||||||
|
private String model_0;
|
||||||
|
private String model_1;
|
||||||
|
private String spec_0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,24 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.mapper;
|
|
||||||
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName InventoryMapper
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/22 9:56
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface JnInventoryMapper {
|
|
||||||
|
|
||||||
@Select("SELECT [cbpj_mc] as inventory,\n" +
|
|
||||||
" [cbpj_pzjd1] as inv_desc,\n" +
|
|
||||||
" [cbpj_zl] as weigh_inv\n" +
|
|
||||||
"FROM [zm_erp2].[dbo].[cb_cbpj]")
|
|
||||||
List<JnInventoryDto> queryInventoryList();
|
|
||||||
}
|
|
|
@ -15,24 +15,18 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface JnMaterialMapper {
|
public interface JnMaterialMapper {
|
||||||
@Select(" SELECT [cb_name] as material_name\n" +
|
@Select("SELECT [uid_0] AS uid \n" +
|
||||||
" ,[cb_cj] as factory_price\n" +
|
" ,[desp_0] AS prodCategory\n" +
|
||||||
" ,[cb_cbj] as cost_price\n" +
|
" ,[model_0] AS model\n" +
|
||||||
" ,[cb_zl] as net_volume\n" +
|
" ,[spec_0] AS specification\n" +
|
||||||
" ,[cb_gspj] as inventory\n" +
|
" ,[voltage_0] AS voltLevel\n" +
|
||||||
" ,[cbpj_zl] as weigh_inv\n" +
|
" ,[unit_0] AS measureUnit\n" +
|
||||||
" ,[CB_bz] as standard\n" +
|
" ,[redBookPrice] \n" +
|
||||||
" ,[cb_xx] as model\n" +
|
" ,[rbFacPrice]\n" +
|
||||||
" ,[cb_gg] as specification\n" +
|
" ,[matCostPrice]\n" +
|
||||||
" ,[cb_dy] as voltage\n" +
|
" ,[redBookCost]\n" +
|
||||||
" ,[cb_cljg] as mat_price\n" +
|
" FROM [jn_quot].[dbo].[c_material_detail]" +
|
||||||
" ,[tdtjg] as total_copper_consume\n" +
|
" WHERE [model_0] like '${precMaterialName}%' and [model_0] like '%${vagueMaterialName}%' and [spec_0] like '%${vagueModel}%'")
|
||||||
" ,[ldtjg] as total_aluminum_consume\n" +
|
|
||||||
" ,[rgsdf] as total_l_h_cost\n" +
|
|
||||||
" ,[cb_zqf]as steam_fee\n" +
|
|
||||||
" ,ROW_NUMBER() OVER(Order by [cb_name]) AS RowId\n" +
|
|
||||||
" FROM [zm_erp2].[dbo].[view_cb_material]\n" +
|
|
||||||
" WHERE [cb_name] like '${precMaterialName}%' and [cb_name] like '%${vagueMaterialName}%' and [cb_gg] like '%${vagueModel}%'")
|
|
||||||
List<JnMaterialDto> queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel);
|
List<JnMaterialDto> queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.mapper;
|
|
||||||
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName RegionMapper
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/19 10:47
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface JnRegionMapper {
|
|
||||||
@Select("select * from c_place a where 1=1 and a.province like '%${regionName}%' or a.city like '%${regionName}%' or a.district like '%${regionName}%' ")
|
|
||||||
List<JnRegionDto> queryRegionListByName(String regionName);
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.service;
|
|
||||||
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName InventoryService
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/22 9:55
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
public interface JnInventoryService {
|
|
||||||
List<JnInventoryDto> queryInventoryList();
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.service;
|
|
||||||
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName RegionService
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/19 10:46
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
public interface JnRegionService {
|
|
||||||
|
|
||||||
List<JnRegionDto> queryRegionListByName(String regionName);
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.service.impl;
|
|
||||||
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnInventoryDto;
|
|
||||||
import com.JN.demo.jnzmquatation.mapper.JnInventoryMapper;
|
|
||||||
import com.JN.demo.jnzmquatation.service.JnInventoryService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName InventoryServiceImpl
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/22 9:55
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class JnInventoryServiceImpl implements JnInventoryService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
JnInventoryMapper inventoryMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @title queryInventoryList
|
|
||||||
* @description 获取盘具列表
|
|
||||||
* @author JIAL
|
|
||||||
* @updateTime 2024/2/22 10:06
|
|
||||||
* @return: java.util.List<com.JN.demo.zmquotation.dto.InventoryDto>
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<JnInventoryDto> queryInventoryList() {
|
|
||||||
return inventoryMapper.queryInventoryList();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
package com.JN.demo.jnzmquatation.service.impl;
|
|
||||||
|
|
||||||
import com.JN.demo.jnzmquatation.dto.JnRegionDto;
|
|
||||||
import com.JN.demo.jnzmquatation.mapper.JnRegionMapper;
|
|
||||||
import com.JN.demo.jnzmquatation.service.JnRegionService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName RegionServiceImpl
|
|
||||||
* @Description TODO
|
|
||||||
* @Author JIAL
|
|
||||||
* @Date 2024/2/19 10:46
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class JnRegionServiceImpl implements JnRegionService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
JnRegionMapper regionMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @title queryRegionListByName
|
|
||||||
* @description 根据输入的地区名称查询地区列表
|
|
||||||
* @author JIAL
|
|
||||||
* @param: regionName
|
|
||||||
* @updateTime 2024/2/19 10:59
|
|
||||||
* @return: java.util.List<com.JN.demo.zmquotation.dto.RegionDto>
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<JnRegionDto> queryRegionListByName(String regionName){
|
|
||||||
return regionMapper.queryRegionListByName(regionName);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -41,7 +41,7 @@ logging:
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
#在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
|
#在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: false
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input-group{
|
.form-box .el-input-group{
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
margin: 10px 80px 10px 0px;
|
margin: 10px 80px 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-box {
|
.collapse-box {
|
||||||
background-color: #f0f0f0; /* 浅灰色背景 */
|
background-color: #f0f0f0; /* 浅灰色背景 */
|
||||||
border-radius: 10px; /* 可以根据需要调整边框圆角 */
|
border-radius: 10px; /* 可以根据需要调整边框圆角 */
|
||||||
backdrop-filter: blur(10px); /* 调整模糊度 */
|
backdrop-filter: blur(10px); /* 调整模糊度 */
|
||||||
|
|
|
@ -8,7 +8,7 @@ const queryRegionListByName = (params) => {
|
||||||
|
|
||||||
const queryMaterialListByParam = (params) => {
|
const queryMaterialListByParam = (params) => {
|
||||||
return $axios({
|
return $axios({
|
||||||
url: '/zmquotation/materialList',
|
url: '/jnquotation/materialList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,33 +15,39 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="container" id="index-app">
|
<div class="container" id="index-app">
|
||||||
<div class="center-container">
|
<div class="center-container">
|
||||||
<div class="form-box">
|
<el-form label-width="45%" :model="formLabelAlign" class="form-box">
|
||||||
<el-form label-width="45%" :model="formLabelAlign">
|
<el-collapse v-model="activeNames">
|
||||||
|
<el-collapse-item title="财务费用明细" name="1" >
|
||||||
|
<div class="collapse-box">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="加工费" title="蒸汽费/钢丝铠装材料及加工费">
|
<el-form-item label="办公费" title="办公费" >
|
||||||
<el-input v-model="formLabelAlign.processingFee" placeholder="蒸汽费/钢丝铠装材料及加工费">
|
<el-input v-model="formLabelAlign.officeExpense" placeholder="办公费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'officeExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col >
|
</el-col >
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="生产财务成本" title="生产财务成本">
|
<el-form-item label="差旅费" title="差旅费">
|
||||||
<el-input v-model="formLabelAlign.prodFinancialCost" placeholder="生产财务成本">
|
<el-input v-model="formLabelAlign.travelExpense" placeholder="差旅费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'travelExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="额外账期" title="额外账期">
|
<el-form-item label="工资及福利保险" title="工资及福利保险">
|
||||||
<el-input v-model="formLabelAlign.accountPeriod" placeholder="账期">
|
<el-input v-model="formLabelAlign.salaryInsur" placeholder="工资及福利保险"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'salaryInsur')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="承兑" title="承兑">
|
<el-form-item label="其他管理费" title="其他管理费">
|
||||||
<el-input v-model="formLabelAlign.acceptance" placeholder="承兑">
|
<el-input v-model="formLabelAlign.otherMgmtExpense" placeholder="其他管理费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'otherMgmtExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -49,29 +55,33 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="公司管理成本" title="公司管理成本">
|
<el-form-item label="汽车费用" title="汽车费用">
|
||||||
<el-input v-model="formLabelAlign.companyMgmtCost" placeholder="公司管理成本">
|
<el-input v-model="formLabelAlign.carExpense" placeholder="汽车费用"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'carExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col >
|
</el-col >
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="中标服务费" title="中标服务费">
|
<el-form-item label="管理-业务招待费" title="管理-业务招待费">
|
||||||
<el-input v-model="formLabelAlign.bidServiceFee" placeholder="中标服务费">
|
<el-input v-model="formLabelAlign.mgmtBizEntFee" placeholder="管理-业务招待费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'mgmtBizEntFee')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="公司净利润" title="公司净利润">
|
<el-form-item label="管理-折旧费" title="管理-折旧费">
|
||||||
<el-input v-model="formLabelAlign.netProfit" placeholder="公司净利润">
|
<el-input v-model="formLabelAlign.mgmtDeprecExpense" placeholder="管理-折旧费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'mgmtDeprecExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="业务费" title="业务费">
|
<el-form-item label="咨询与审计费" title="咨询与审计费">
|
||||||
<el-input v-model="formLabelAlign.businessFee" placeholder="业务费">
|
<el-input v-model="formLabelAlign.consultAuditFee" placeholder="咨询与审计费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'consultAuditFee')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -79,56 +89,158 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="省">
|
<el-form-item label="标书费用" title="标书费用">
|
||||||
<el-input :disabled="true" v-model="formLabelAlign.province" placeholder="省"></el-input>
|
<el-input v-model="formLabelAlign.tenderCost" placeholder="标书费用"
|
||||||
</el-form-item>
|
@blur="validateAndSetDefault(formLabelAlign, 'tenderCost')">
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="市">
|
|
||||||
<el-input :disabled="true" v-model="formLabelAlign.city" placeholder="市"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="区">
|
|
||||||
<el-input :disabled="true" v-model="formLabelAlign.district" placeholder="区"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6" >
|
|
||||||
<el-form-item label="公里数">
|
|
||||||
<el-input v-model="formLabelAlign.kilometers" placeholder="公里数">
|
|
||||||
<template slot="append">KM</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="可下浮点数" title="可下浮点数">
|
|
||||||
<el-input v-model="formLabelAlign.canFloat" placeholder="可下浮">
|
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="运费">
|
<el-form-item label="房租费" title="房租费">
|
||||||
<el-input v-model="formLabelAlign.freight" placeholder="运费">
|
<el-input v-model="formLabelAlign.rentExpense" placeholder="房租费"
|
||||||
<template slot="append">¥</template>
|
@blur="validateAndSetDefault(formLabelAlign, 'rentExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="工资" title="工资">
|
||||||
|
<el-input v-model="formLabelAlign.salary" placeholder="工资"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'salary')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="检验检查费">
|
||||||
|
<el-input v-model="formLabelAlign.inspectFee" placeholder="检验检查费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'inspectFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="净重合计" title="净重合计">
|
<el-form-item label="销售-交通与差旅费" title="交通与差旅费">
|
||||||
<el-input v-model="formLabelAlign.netWeightTotal" placeholder="净重合计">
|
<el-input v-model="formLabelAlign.transTravelExpense" placeholder="交通与差旅费"
|
||||||
<template slot="append">KG</template>
|
@blur="validateAndSetDefault(formLabelAlign, 'transTravelExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" >
|
<el-col :span="6" >
|
||||||
<el-form-item label="重量合计" title="重量合计">
|
<el-form-item label="其他销售费" title="其他销售费">
|
||||||
<el-input v-model="formLabelAlign.weightTotal" placeholder="重量合计">
|
<el-input v-model="formLabelAlign.otherSalesExpense" placeholder="其他销售费"
|
||||||
<template slot="append">KG</template>
|
@blur="validateAndSetDefault(formLabelAlign, 'otherSalesExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="投标费用" title="投标费用">
|
||||||
|
<el-input v-model="formLabelAlign.biddingCost" placeholder="投标费用"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'biddingCost')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="销售-业务费" title="销售-业务费">
|
||||||
|
<el-input v-model="formLabelAlign.bizFee" placeholder="销售-业务费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'bizFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="销售-业务招待费" title="销售-业务招待费">
|
||||||
|
<el-input v-model="formLabelAlign.salesBizEntFee" placeholder="销售-业务招待费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'salesBizEntFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="运输装卸费" title="运输装卸费">
|
||||||
|
<el-input v-model="formLabelAlign.transpHandlingFee" placeholder="运输装卸费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'transpHandlingFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="制造-折旧费" title="制造-折旧费">
|
||||||
|
<el-input v-model="formLabelAlign.manufDeprecExpense" placeholder="制造-折旧费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'manufDeprecExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="利息支出" title="利息支出">
|
||||||
|
<el-input v-model="formLabelAlign.interestExpense" placeholder="利息支出"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'interestExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="手续费" title="手续费">
|
||||||
|
<el-input v-model="formLabelAlign.handlingFee" placeholder="手续费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'handlingFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="贴现利息" title="贴现利息">
|
||||||
|
<el-input v-model="formLabelAlign.discInterest" placeholder="贴现利息"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'discInterest')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="财务-其他费用" title="财务-其他费用">
|
||||||
|
<el-input v-model="formLabelAlign.otherFinExpenses" placeholder="财务-其他费用"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'otherFinExpenses')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="存货机会成本" title="存货机会成本">
|
||||||
|
<el-input v-model="formLabelAlign.invOpCost" placeholder="存货机会成本"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'invOpCost')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="税金" title="税金">
|
||||||
|
<el-input v-model="formLabelAlign.tax" placeholder="税金"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'tax')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
|
<el-collapse-item title="财务费用合计" name="2">
|
||||||
|
<el-row class="collapse-box">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="财务费用合计" title="财务费用合计">
|
||||||
|
<el-input v-model="formLabelAlign.totalFinExpenses" placeholder="财务费用合计">
|
||||||
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -147,13 +259,12 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<el-button type="text" @click="selectedRegion">选择地区</el-button>
|
|
||||||
<el-button type="text" @click="addMaterial">添加物料</el-button>
|
<el-button type="text" @click="addMaterial">添加物料</el-button>
|
||||||
<el-button type="text" @click="calculatedData">刷新界面</el-button>
|
<el-button type="text" @click="calculatedData">计算数据</el-button>
|
||||||
<el-button type="text"></el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -168,71 +279,93 @@
|
||||||
width="50">
|
width="50">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed
|
|
||||||
width="180"
|
width="180"
|
||||||
prop="materialName"
|
prop="prodCategory"
|
||||||
label="物料名称">
|
label="产品大类">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="120"
|
||||||
|
prop="model"
|
||||||
|
label="型号">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="180"
|
width="180"
|
||||||
prop="quantity"
|
prop="specification"
|
||||||
|
label="规格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="voltLevel"
|
||||||
|
label="电压等级">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="measureUnit"
|
||||||
|
label="单位">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="matCostPrice"
|
||||||
|
label="材料成本价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="redBookPrice"
|
||||||
|
label="红本价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="redBookCost"
|
||||||
|
label="红本成本">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="rbFacPrice"
|
||||||
|
label="红本厂价">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="number"
|
||||||
label="数量">
|
label="数量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.quantity" >
|
<el-input v-model="scope.row.number" @blur="validateNumber(scope.row)">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120"
|
width="180"
|
||||||
prop="voltage"
|
prop="varRatio"
|
||||||
label="电压">
|
label="差异比率">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="80"
|
|
||||||
prop="standard"
|
|
||||||
label="标准">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="180"
|
width="180"
|
||||||
prop="costPrice"
|
prop="wdFSurcharge"
|
||||||
label="成本价">
|
label="盘具运费上浮金额">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="factoryPrice"
|
|
||||||
label="厂价">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="netVolume"
|
|
||||||
label="净重量">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="120"
|
|
||||||
prop="inventory"
|
|
||||||
label="盘具">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link @click="handleInventoryClick(scope.row, scope.$index)" type="primary">{{ scope.row.inventory }}</el-link>
|
<el-input v-model="scope.row.wdFSurcharge" >
|
||||||
</template>
|
<template slot="append">¥</template>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="invItemCount"
|
|
||||||
label="盘具数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.invItemCount" >
|
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="100"
|
width="180"
|
||||||
prop="weighInv"
|
prop="laborCostFloat"
|
||||||
label="盘重">
|
label="人工成本上浮点数">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.laborCostFloat" >
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="180"
|
width="180"
|
||||||
prop="totalWeight"
|
prop="hydroCostFloat"
|
||||||
label="总重">
|
label="水电成本上浮点数">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.hydroCostFloat" >
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
@ -246,12 +379,6 @@
|
||||||
prop="totalFacPrice"
|
prop="totalFacPrice"
|
||||||
label="总厂价">
|
label="总厂价">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
fixed="right"
|
|
||||||
width="120"
|
|
||||||
prop="totalNetWt"
|
|
||||||
label="总净重">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
width="80"
|
width="80"
|
||||||
|
@ -263,67 +390,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog class="regionDialogTable" :visible.sync="dialogRegionVisible" width="932px" >
|
<el-dialog class="materialDialogTable" :visible.sync="dialogMaterialVisible" width="1100px">
|
||||||
<div slot="title" style="margin: 0px">
|
|
||||||
<el-form>
|
|
||||||
<el-form-item >
|
|
||||||
<el-input style="width: 300px; " v-model="regionName" placeholder="请输入地区名称">
|
|
||||||
</el-input>
|
|
||||||
<el-button type="primary" size="small" @click="searchRegion">查询地区</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-table
|
|
||||||
:data="getCurrentRegionData"
|
|
||||||
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
|
||||||
:cell-style="{'text-align': 'center', 'padding': '0px'}"
|
|
||||||
highlight-current-row
|
|
||||||
border>
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
type="index"
|
|
||||||
width="50">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="province"
|
|
||||||
label="省">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="city"
|
|
||||||
label="市">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="district"
|
|
||||||
label="区">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="kilometers"
|
|
||||||
label="公里数">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="80"
|
|
||||||
label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button @click="chooseRegion(scope.row)" style="color: blue;" type="text">选择</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; margin-top: 10px;">
|
|
||||||
<el-pagination
|
|
||||||
@current-change="handleRegionCurrentChange"
|
|
||||||
:current-page.sync="regionCurrentPage"
|
|
||||||
:page-size="pageSize"
|
|
||||||
:total="regionTableData.length"
|
|
||||||
></el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog class="materialDialogTable" :visible.sync="dialogMaterialVisible" width="1200px">
|
|
||||||
<div slot="title" style="margin: 0px">
|
<div slot="title" style="margin: 0px">
|
||||||
<el-form>
|
<el-form>
|
||||||
<el-form-item >
|
<el-form-item >
|
||||||
|
@ -338,7 +405,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: row;">
|
<div style="display: flex; flex-direction: row;">
|
||||||
<div style="width: 766px">
|
<div style="width: 688px">
|
||||||
<el-table
|
<el-table
|
||||||
:data="getCurrentMaterialData"
|
:data="getCurrentMaterialData"
|
||||||
ref="materialTable"
|
ref="materialTable"
|
||||||
|
@ -346,7 +413,7 @@
|
||||||
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
||||||
:cell-style="{'text-align': 'center', 'padding': '5px 0px'}"
|
:cell-style="{'text-align': 'center', 'padding': '5px 0px'}"
|
||||||
highlight-selection-row
|
highlight-selection-row
|
||||||
:row-key="row => row.materialName"
|
:row-key="row => row.uid"
|
||||||
:reserve-selection="true"
|
:reserve-selection="true"
|
||||||
border>
|
border>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -359,9 +426,9 @@
|
||||||
width="50">
|
width="50">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="200"
|
width="120"
|
||||||
prop="materialName"
|
prop="prodCategory"
|
||||||
label="物料名称">
|
label="产品大类">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120"
|
width="120"
|
||||||
|
@ -375,13 +442,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120"
|
width="120"
|
||||||
prop="voltage"
|
prop="voltLevel"
|
||||||
label="电压">
|
label="电压">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="100"
|
width="100"
|
||||||
prop="standard"
|
prop="measureUnit"
|
||||||
label="标准">
|
label="单位">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: center; margin-top: 10px;">
|
<div style="text-align: center; margin-top: 10px;">
|
||||||
|
@ -399,7 +466,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
class="selected-item"
|
class="selected-item"
|
||||||
>
|
>
|
||||||
{{ selectedItem.materialName }} - {{ selectedItem.voltage }}
|
{{ selectedItem.model }} , {{ selectedItem.specification }} , {{ selectedItem.voltLevel }}
|
||||||
<el-button @click="removeSelectedItem(selectedItem)" type="text" class="remove-btn">✖</el-button>
|
<el-button @click="removeSelectedItem(selectedItem)" type="text" class="remove-btn">✖</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -412,52 +479,6 @@
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog class="inventoryDialogTable" :visible.sync="dialogInventoryVisible" width="792px" >
|
|
||||||
<div>
|
|
||||||
<el-table
|
|
||||||
:data="getCurrentInventoryData"
|
|
||||||
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
|
||||||
:cell-style="{'text-align': 'center', 'padding': '0px'}"
|
|
||||||
highlight-current-row
|
|
||||||
border>
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
type="index"
|
|
||||||
width="50">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="inventory"
|
|
||||||
label="盘具名称">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="invDesc"
|
|
||||||
label="盘具描述">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="weighInv"
|
|
||||||
label="盘重">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="100"
|
|
||||||
label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button @click="chooseInventory(scope.row)" style="color: blue;" type="text">选择</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; margin-top: 10px;">
|
|
||||||
<el-pagination
|
|
||||||
@current-change="handleInventoryCurrentChange"
|
|
||||||
:current-page.sync="inventoryCurrentPage"
|
|
||||||
:page-size="pageSize"
|
|
||||||
:total="inventoryTableData.length"
|
|
||||||
></el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -474,39 +495,41 @@
|
||||||
el: '#index-app',
|
el: '#index-app',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeNames: ['2'],
|
||||||
formLabelAlign: {
|
formLabelAlign: {
|
||||||
processingFee: '0.60', /*蒸汽费/钢丝铠装材料及加工费*/
|
officeExpense: 0.022,
|
||||||
prodFinancialCost: '0.40', /*生产财务成本*/
|
travelExpense: 0.011,
|
||||||
accountPeriod: '1.20', /*账期*/
|
salaryInsur: 0.394,
|
||||||
acceptance: '0.90', /*承兑*/
|
otherMgmtExpense: 0.373,
|
||||||
companyMgmtCost: '1.50', /*公司管理成本*/
|
carExpense: 0.010,
|
||||||
bidServiceFee: '0.44', /*中标服务费*/
|
mgmtBizEntFee:0.156, //管理-业务招待费
|
||||||
netProfit: '3.00', /*公司净利润*/
|
mgmtDeprecExpense: 0.016, //管理-折旧费
|
||||||
businessFee: '2.00', /*业务费*/
|
consultAuditFee: 0.026, //咨询审计费
|
||||||
province: '', /*省*/
|
tenderCost: 0.023, //标书费用
|
||||||
city: '', /*市*/
|
rentExpense: 0.052, //房租费
|
||||||
district: '', /*区*/
|
salary: 0.239, //工资
|
||||||
freight: '', /*运费*/
|
inspectFee: 0.016, //检验检测费
|
||||||
canFloat: '', /*可下浮点数*/
|
transTravelExpense: 0.020, //交通与差旅费
|
||||||
kilometers: '', /*公里数*/
|
otherSalesExpense: 0.073, //其他销售费
|
||||||
netWeightTotal: '', /*净重合计*/
|
biddingCost: 0.134, //投标费用
|
||||||
weightTotal: '', /*重量合计*/
|
bizFee: 1.183, //销售-业务费
|
||||||
totalFactoryAmount: '', /*厂价金额合计*/
|
salesBizEntFee: 0.098, //销售-业务招待费
|
||||||
totalActualAmount: '', /*实际金额合计*/
|
transpHandlingFee: 0.621, //运输装卸费
|
||||||
|
manufDeprecExpense: 0.217, //制造-折旧费
|
||||||
|
interestExpense: 0.436, //利息支出
|
||||||
|
handlingFee: 0.108, //手续费
|
||||||
|
discInterest: 0.363, //贴现利息
|
||||||
|
otherFinExpenses: 0.197, //财务-其他费用
|
||||||
|
invOpCost: 0.031, //存货机会成本
|
||||||
|
tax: 1.5, //税金
|
||||||
|
totalFinExpenses : 0,
|
||||||
|
totalFactoryAmount: 0,
|
||||||
|
totalActualAmount: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
materialData: [
|
materialData: [
|
||||||
|
|
||||||
],
|
],
|
||||||
regionTableData: [],
|
|
||||||
price_0t_5t: '',
|
|
||||||
price_5t_10t: '',
|
|
||||||
price_10t_25t: '',
|
|
||||||
price_25t_100t: '',
|
|
||||||
price_100t: '',
|
|
||||||
dialogRegionVisible: false,
|
|
||||||
regionName: '',
|
|
||||||
regionCurrentPage: 1,
|
|
||||||
inventoryCurrentPage : 1,
|
|
||||||
materialCurrentPage: 1,
|
materialCurrentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
dialogMaterialVisible: false,
|
dialogMaterialVisible: false,
|
||||||
|
@ -516,35 +539,25 @@
|
||||||
precMaterialName: '',
|
precMaterialName: '',
|
||||||
vagueMaterialName: '',
|
vagueMaterialName: '',
|
||||||
vagueModel: '',
|
vagueModel: '',
|
||||||
dialogInventoryVisible: false,
|
validationErrors: [], // 用于存储验证错误信息的数组
|
||||||
inventoryTableData: [],
|
|
||||||
clickedRowIndex: null, // 用于记录点击的行的索引
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getCurrentRegionData() {
|
|
||||||
const start = (this.regionCurrentPage - 1) * this.pageSize;
|
|
||||||
const end = start + this.pageSize;
|
|
||||||
return this.regionTableData.slice(start, end);
|
|
||||||
},
|
|
||||||
getCurrentMaterialData() {
|
getCurrentMaterialData() {
|
||||||
const start = (this.materialCurrentPage - 1) * this.pageSize;
|
const start = (this.materialCurrentPage - 1) * this.pageSize;
|
||||||
const end = start + this.pageSize;
|
const end = start + this.pageSize;
|
||||||
return this.materialTableData.slice(start, end);
|
return this.materialTableData.slice(start, end);
|
||||||
},
|
},
|
||||||
getCurrentInventoryData() {
|
|
||||||
const start = (this.inventoryCurrentPage - 1) * this.pageSize;
|
|
||||||
const end = start + this.pageSize;
|
|
||||||
return this.inventoryTableData.slice(start, end);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getInventoryData();
|
this.calculateTotal();
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
async init () {
|
async init () {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -559,67 +572,55 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
calculateTotal() {
|
||||||
|
this.formLabelAlign.totalFinExpenses =parseFloat(
|
||||||
|
(
|
||||||
|
parseFloat(this.formLabelAlign.officeExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.travelExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.salaryInsur) +
|
||||||
|
parseFloat(this.formLabelAlign.otherMgmtExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.carExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.mgmtBizEntFee) +
|
||||||
|
parseFloat(this.formLabelAlign.mgmtDeprecExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.consultAuditFee) +
|
||||||
|
parseFloat(this.formLabelAlign.tenderCost) +
|
||||||
|
parseFloat(this.formLabelAlign.rentExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.salary) +
|
||||||
|
parseFloat(this.formLabelAlign.inspectFee) +
|
||||||
|
parseFloat(this.formLabelAlign.transTravelExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.otherSalesExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.biddingCost) +
|
||||||
|
parseFloat(this.formLabelAlign.bizFee) +
|
||||||
|
parseFloat(this.formLabelAlign.salesBizEntFee) +
|
||||||
|
parseFloat(this.formLabelAlign.transpHandlingFee) +
|
||||||
|
parseFloat(this.formLabelAlign.manufDeprecExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.interestExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.handlingFee) +
|
||||||
|
parseFloat(this.formLabelAlign.discInterest) +
|
||||||
|
parseFloat(this.formLabelAlign.otherFinExpenses) +
|
||||||
|
parseFloat(this.formLabelAlign.invOpCost) +
|
||||||
|
parseFloat(this.formLabelAlign.tax)
|
||||||
|
).toFixed(2))
|
||||||
|
},
|
||||||
|
|
||||||
handleDeleteClick(index){
|
handleDeleteClick(index){
|
||||||
this.materialData.splice(index, 1)
|
this.materialData.splice(index, 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
selectedRegion(){
|
|
||||||
this.dialogRegionVisible = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
chooseRegion(row) {
|
|
||||||
this.dialogRegionVisible = false;
|
|
||||||
this.formLabelAlign.province = row.province
|
|
||||||
this.formLabelAlign.city = row.city
|
|
||||||
this.formLabelAlign.district = row.district
|
|
||||||
this.formLabelAlign.kilometers = row.kilometers
|
|
||||||
this.price_0t_5t = row.price01
|
|
||||||
this.price_5t_10t = row.price02
|
|
||||||
this.price_10t_25t = row.price03
|
|
||||||
this.price_25t_100t = row.price04
|
|
||||||
this.price_100t = row.price05
|
|
||||||
},
|
|
||||||
searchRegion(){
|
|
||||||
if(this.regionName === ''){
|
|
||||||
this.$message({
|
|
||||||
message: '请输入你要查询的地区名称',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
const params = {
|
|
||||||
regionName : this.regionName
|
|
||||||
}
|
|
||||||
console.log(params)
|
|
||||||
queryRegionListByName(params).then(res => {
|
|
||||||
console.log('queryRegionListByName')
|
|
||||||
this.regionTableData = res.data || []
|
|
||||||
this.regionCurrentPage = 1;
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error('请求出错了:' + err)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
handleRegionCurrentChange(val) {
|
|
||||||
this.currentPage = val;
|
|
||||||
},
|
|
||||||
|
|
||||||
handleMaterialCurrentChange(val) {
|
handleMaterialCurrentChange(val) {
|
||||||
this.currentPage = val;
|
this.currentPage = val;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleInventoryCurrentChange(val) {
|
|
||||||
this.currentPage = val;
|
|
||||||
},
|
|
||||||
|
|
||||||
addMaterial(){
|
addMaterial(){
|
||||||
this.dialogMaterialVisible = true;
|
this.dialogMaterialVisible = true;
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
selection.forEach(item => {
|
selection.forEach(item => {
|
||||||
// 判断是否已经存在于已选列表中,避免重复添加
|
// 判断是否已经存在于已选列表中,避免重复添加
|
||||||
if (!this.selectedMaterialItems.some(selectedItem => selectedItem.materialName === item.materialName)) {
|
if (!this.selectedMaterialItems.some(selectedItem => selectedItem.uid === item.uid)) {
|
||||||
this.selectedMaterialItems.push(item);
|
this.selectedMaterialItems.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -630,7 +631,7 @@
|
||||||
const isSelected = this.$refs.materialTable.selection.includes(selectedItem);
|
const isSelected = this.$refs.materialTable.selection.includes(selectedItem);
|
||||||
|
|
||||||
// 从已选列表中移除该项
|
// 从已选列表中移除该项
|
||||||
const index = this.selectedMaterialItems.findIndex(item => item.materialName === selectedItem.materialName);
|
const index = this.selectedMaterialItems.findIndex(item => item.uid === selectedItem.uid);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.selectedMaterialItems.splice(index, 1);
|
this.selectedMaterialItems.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
@ -667,12 +668,11 @@
|
||||||
const params = {
|
const params = {
|
||||||
precMaterialName : this.precMaterialName,
|
precMaterialName : this.precMaterialName,
|
||||||
vagueMaterialName : this.vagueMaterialName,
|
vagueMaterialName : this.vagueMaterialName,
|
||||||
vagueModel : this.vagueModel
|
vagueModel : this.vagueModel,
|
||||||
}
|
}
|
||||||
|
|
||||||
queryMaterialListByParam(params).then(res => {
|
queryMaterialListByParam(params).then(res => {
|
||||||
this.materialTableData = res.data || []
|
this.materialTableData = res.data || [];
|
||||||
this.materialCurrentPage = 1;
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error('请求出错了:' + err)
|
this.$message.error('请求出错了:' + err)
|
||||||
})
|
})
|
||||||
|
@ -680,35 +680,90 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleInventoryClick(row, index) {
|
|
||||||
this.clickedRowIndex = index; // 记录点击的行的索引
|
|
||||||
this.dialogInventoryVisible = true; // 打开选择盘具的 dialog
|
|
||||||
},
|
|
||||||
|
|
||||||
getInventoryData() {
|
|
||||||
queryInventoryList().then(res => {
|
|
||||||
this.inventoryTableData = res.data || []
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error('请求出错了:' + err)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
chooseInventory(row) {
|
|
||||||
// 在选择盘具的逻辑中,将选择的盘具信息赋值给之前点击的行的数据
|
|
||||||
if (this.clickedRowIndex !== null) {
|
|
||||||
// 假设选择盘具后的数据存储在 this.selectedInventory 中
|
|
||||||
const updatedRow = {
|
|
||||||
inventory: row.inventory, // 盘具名称
|
|
||||||
weighInv: row.weighInv, // 盘重信息
|
|
||||||
};
|
|
||||||
this.$set(this.materialData, this.clickedRowIndex, updatedRow);
|
|
||||||
}
|
|
||||||
this.dialogInventoryVisible = false; // 打开选择盘具的 dialog
|
|
||||||
// 其他逻辑
|
|
||||||
},
|
|
||||||
|
|
||||||
calculatedData() {
|
calculatedData() {
|
||||||
|
/**-------------计算财务总成本---------------**/
|
||||||
|
this.calculateTotal();
|
||||||
|
/**----------------------进行盘具、数量、人工、水电三个数值的验证---------------**/
|
||||||
|
this.validationErrors = []; // 清空之前的错误信息
|
||||||
|
this.materialData.forEach((row, index) => {
|
||||||
|
const wdFSurcharge = parseFloat(row.wdFSurcharge) || 0; // 如果为空,默认为0
|
||||||
|
const laborCostFloat = parseFloat(row.laborCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const hydroCostFloat = parseFloat(row.hydroCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const quantity = parseFloat(row.number) || 0; // 如果为空,默认为0
|
||||||
|
// 进行数量验证
|
||||||
|
if (isNaN(quantity) || quantity < 0) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行数量不符合要求\n`);
|
||||||
|
}
|
||||||
|
// 进行盘具运费的验证
|
||||||
|
if (isNaN(wdFSurcharge) || wdFSurcharge < 0) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行盘具运费上浮金额不符合要求`);
|
||||||
|
}
|
||||||
|
// 进行点数的验证
|
||||||
|
if (isNaN(laborCostFloat) || laborCostFloat < 0 || laborCostFloat > 100) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行人工成本上浮点数不符合要求(应在 0 到 100 之间)`);
|
||||||
|
}
|
||||||
|
if (isNaN(hydroCostFloat) || hydroCostFloat < 0 || hydroCostFloat > 100) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行水电成本上浮点数不符合要求(应在 0 到 100 之间)`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**-----------------------验证完成进行运算,验证结果通过才进行计算--------------------------**/
|
||||||
|
if (this.validationErrors.length === 0) {
|
||||||
|
// 遍历表格数据进行计算
|
||||||
|
this.materialData.forEach((row, index) => {
|
||||||
|
this.validationErrors = []; // 清空之前的错误信息
|
||||||
|
|
||||||
|
const redBookFacPrice = parseFloat(row.rbFacPrice);
|
||||||
|
const materialCost = parseFloat(row.matCostPrice);
|
||||||
|
const wdFSurcharge = parseFloat(row.wdFSurcharge) || 0; // 如果为空,默认为0
|
||||||
|
const laborCostFloat = parseFloat(row.laborCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const hydroCostFloat = parseFloat(row.hydroCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const quantity = parseFloat(row.number) || 0; // 如果为空,默认为0
|
||||||
|
|
||||||
|
// 进行其他计算
|
||||||
|
this.$set(this.materialData, index, {
|
||||||
|
...row,
|
||||||
|
varRatio: ((redBookFacPrice - materialCost) / redBookFacPrice * 100).toFixed(2),
|
||||||
|
totalFacPrice: (quantity * redBookFacPrice).toFixed(2),
|
||||||
|
totalCost: (
|
||||||
|
(materialCost + wdFSurcharge +
|
||||||
|
materialCost * (laborCostFloat / 100) + materialCost * (hydroCostFloat / 100)) *
|
||||||
|
quantity
|
||||||
|
).toFixed(2),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
message: this.validationErrors.join('<br>')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 计算厂价金额合计
|
||||||
|
const totalFactoryAmount = this.materialData.reduce((sum, row) => sum + parseFloat(row.totalFacPrice), 0);
|
||||||
|
this.formLabelAlign.totalFactoryAmount = totalFactoryAmount.toFixed(2);
|
||||||
|
|
||||||
|
// 计算实际金额合计
|
||||||
|
const totalCost = this.materialData.reduce((sum, row) => sum + parseFloat(row.totalCost), 0);
|
||||||
|
this.formLabelAlign.totalActualAmount = (totalCost + totalCost * (parseFloat(this.formLabelAlign.totalFinExpenses) / 100)).toFixed(2);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**----------------表头表单验证-----------------**/
|
||||||
|
validateInputRange(value) {
|
||||||
|
const number = parseFloat(value);
|
||||||
|
return isNaN(number) || (number >= 0 && number <= 100);
|
||||||
|
},
|
||||||
|
validateAndSetDefault(model, field) {
|
||||||
|
if (!this.validateInputRange(model[field])) {
|
||||||
|
// 如果验证不通过,设置错误提示
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '填写错误,范围为0~100'
|
||||||
|
});
|
||||||
|
this.$set(model, field, 0);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -519,7 +519,6 @@
|
||||||
dialogInventoryVisible: false,
|
dialogInventoryVisible: false,
|
||||||
inventoryTableData: [],
|
inventoryTableData: [],
|
||||||
clickedRowIndex: null, // 用于记录点击的行的索引
|
clickedRowIndex: null, // 用于记录点击的行的索引
|
||||||
materialTotalRows: 0,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -41,7 +41,7 @@ logging:
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
#在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
|
#在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: false
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -47,7 +47,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input-group{
|
.form-box .el-input-group{
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
margin: 10px 80px 10px 0px;
|
margin: 10px 80px 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-box {
|
.collapse-box {
|
||||||
background-color: #f0f0f0; /* 浅灰色背景 */
|
background-color: #f0f0f0; /* 浅灰色背景 */
|
||||||
border-radius: 10px; /* 可以根据需要调整边框圆角 */
|
border-radius: 10px; /* 可以根据需要调整边框圆角 */
|
||||||
backdrop-filter: blur(10px); /* 调整模糊度 */
|
backdrop-filter: blur(10px); /* 调整模糊度 */
|
||||||
|
|
|
@ -8,7 +8,7 @@ const queryRegionListByName = (params) => {
|
||||||
|
|
||||||
const queryMaterialListByParam = (params) => {
|
const queryMaterialListByParam = (params) => {
|
||||||
return $axios({
|
return $axios({
|
||||||
url: '/zmquotation/materialList',
|
url: '/jnquotation/materialList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,33 +15,39 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="container" id="index-app">
|
<div class="container" id="index-app">
|
||||||
<div class="center-container">
|
<div class="center-container">
|
||||||
<div class="form-box">
|
<el-form label-width="45%" :model="formLabelAlign" class="form-box">
|
||||||
<el-form label-width="45%" :model="formLabelAlign">
|
<el-collapse v-model="activeNames">
|
||||||
|
<el-collapse-item title="财务费用明细" name="1" >
|
||||||
|
<div class="collapse-box">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="加工费" title="蒸汽费/钢丝铠装材料及加工费">
|
<el-form-item label="办公费" title="办公费" >
|
||||||
<el-input v-model="formLabelAlign.processingFee" placeholder="蒸汽费/钢丝铠装材料及加工费">
|
<el-input v-model="formLabelAlign.officeExpense" placeholder="办公费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'officeExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col >
|
</el-col >
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="生产财务成本" title="生产财务成本">
|
<el-form-item label="差旅费" title="差旅费">
|
||||||
<el-input v-model="formLabelAlign.prodFinancialCost" placeholder="生产财务成本">
|
<el-input v-model="formLabelAlign.travelExpense" placeholder="差旅费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'travelExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="额外账期" title="额外账期">
|
<el-form-item label="工资及福利保险" title="工资及福利保险">
|
||||||
<el-input v-model="formLabelAlign.accountPeriod" placeholder="账期">
|
<el-input v-model="formLabelAlign.salaryInsur" placeholder="工资及福利保险"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'salaryInsur')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="承兑" title="承兑">
|
<el-form-item label="其他管理费" title="其他管理费">
|
||||||
<el-input v-model="formLabelAlign.acceptance" placeholder="承兑">
|
<el-input v-model="formLabelAlign.otherMgmtExpense" placeholder="其他管理费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'otherMgmtExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -49,29 +55,33 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="公司管理成本" title="公司管理成本">
|
<el-form-item label="汽车费用" title="汽车费用">
|
||||||
<el-input v-model="formLabelAlign.companyMgmtCost" placeholder="公司管理成本">
|
<el-input v-model="formLabelAlign.carExpense" placeholder="汽车费用"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'carExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col >
|
</el-col >
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="中标服务费" title="中标服务费">
|
<el-form-item label="管理-业务招待费" title="管理-业务招待费">
|
||||||
<el-input v-model="formLabelAlign.bidServiceFee" placeholder="中标服务费">
|
<el-input v-model="formLabelAlign.mgmtBizEntFee" placeholder="管理-业务招待费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'mgmtBizEntFee')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="公司净利润" title="公司净利润">
|
<el-form-item label="管理-折旧费" title="管理-折旧费">
|
||||||
<el-input v-model="formLabelAlign.netProfit" placeholder="公司净利润">
|
<el-input v-model="formLabelAlign.mgmtDeprecExpense" placeholder="管理-折旧费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'mgmtDeprecExpense')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="业务费" title="业务费">
|
<el-form-item label="咨询与审计费" title="咨询与审计费">
|
||||||
<el-input v-model="formLabelAlign.businessFee" placeholder="业务费">
|
<el-input v-model="formLabelAlign.consultAuditFee" placeholder="咨询与审计费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'consultAuditFee')">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -79,56 +89,158 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="省">
|
<el-form-item label="标书费用" title="标书费用">
|
||||||
<el-input :disabled="true" v-model="formLabelAlign.province" placeholder="省"></el-input>
|
<el-input v-model="formLabelAlign.tenderCost" placeholder="标书费用"
|
||||||
</el-form-item>
|
@blur="validateAndSetDefault(formLabelAlign, 'tenderCost')">
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="市">
|
|
||||||
<el-input :disabled="true" v-model="formLabelAlign.city" placeholder="市"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="区">
|
|
||||||
<el-input :disabled="true" v-model="formLabelAlign.district" placeholder="区"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6" >
|
|
||||||
<el-form-item label="公里数">
|
|
||||||
<el-input v-model="formLabelAlign.kilometers" placeholder="公里数">
|
|
||||||
<template slot="append">KM</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="可下浮点数" title="可下浮点数">
|
|
||||||
<el-input v-model="formLabelAlign.canFloat" placeholder="可下浮">
|
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="运费">
|
<el-form-item label="房租费" title="房租费">
|
||||||
<el-input v-model="formLabelAlign.freight" placeholder="运费">
|
<el-input v-model="formLabelAlign.rentExpense" placeholder="房租费"
|
||||||
<template slot="append">¥</template>
|
@blur="validateAndSetDefault(formLabelAlign, 'rentExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="工资" title="工资">
|
||||||
|
<el-input v-model="formLabelAlign.salary" placeholder="工资"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'salary')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="检验检查费">
|
||||||
|
<el-input v-model="formLabelAlign.inspectFee" placeholder="检验检查费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'inspectFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="净重合计" title="净重合计">
|
<el-form-item label="销售-交通与差旅费" title="交通与差旅费">
|
||||||
<el-input v-model="formLabelAlign.netWeightTotal" placeholder="净重合计">
|
<el-input v-model="formLabelAlign.transTravelExpense" placeholder="交通与差旅费"
|
||||||
<template slot="append">KG</template>
|
@blur="validateAndSetDefault(formLabelAlign, 'transTravelExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" >
|
<el-col :span="6" >
|
||||||
<el-form-item label="重量合计" title="重量合计">
|
<el-form-item label="其他销售费" title="其他销售费">
|
||||||
<el-input v-model="formLabelAlign.weightTotal" placeholder="重量合计">
|
<el-input v-model="formLabelAlign.otherSalesExpense" placeholder="其他销售费"
|
||||||
<template slot="append">KG</template>
|
@blur="validateAndSetDefault(formLabelAlign, 'otherSalesExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="投标费用" title="投标费用">
|
||||||
|
<el-input v-model="formLabelAlign.biddingCost" placeholder="投标费用"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'biddingCost')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="销售-业务费" title="销售-业务费">
|
||||||
|
<el-input v-model="formLabelAlign.bizFee" placeholder="销售-业务费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'bizFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="销售-业务招待费" title="销售-业务招待费">
|
||||||
|
<el-input v-model="formLabelAlign.salesBizEntFee" placeholder="销售-业务招待费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'salesBizEntFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="运输装卸费" title="运输装卸费">
|
||||||
|
<el-input v-model="formLabelAlign.transpHandlingFee" placeholder="运输装卸费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'transpHandlingFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="制造-折旧费" title="制造-折旧费">
|
||||||
|
<el-input v-model="formLabelAlign.manufDeprecExpense" placeholder="制造-折旧费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'manufDeprecExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="利息支出" title="利息支出">
|
||||||
|
<el-input v-model="formLabelAlign.interestExpense" placeholder="利息支出"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'interestExpense')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="手续费" title="手续费">
|
||||||
|
<el-input v-model="formLabelAlign.handlingFee" placeholder="手续费"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'handlingFee')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="贴现利息" title="贴现利息">
|
||||||
|
<el-input v-model="formLabelAlign.discInterest" placeholder="贴现利息"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'discInterest')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" >
|
||||||
|
<el-form-item label="财务-其他费用" title="财务-其他费用">
|
||||||
|
<el-input v-model="formLabelAlign.otherFinExpenses" placeholder="财务-其他费用"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'otherFinExpenses')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="存货机会成本" title="存货机会成本">
|
||||||
|
<el-input v-model="formLabelAlign.invOpCost" placeholder="存货机会成本"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'invOpCost')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="税金" title="税金">
|
||||||
|
<el-input v-model="formLabelAlign.tax" placeholder="税金"
|
||||||
|
@blur="validateAndSetDefault(formLabelAlign, 'tax')">
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
|
<el-collapse-item title="财务费用合计" name="2">
|
||||||
|
<el-row class="collapse-box">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="财务费用合计" title="财务费用合计">
|
||||||
|
<el-input v-model="formLabelAlign.totalFinExpenses" placeholder="财务费用合计">
|
||||||
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -147,13 +259,12 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<el-button type="text" @click="selectedRegion">选择地区</el-button>
|
|
||||||
<el-button type="text" @click="addMaterial">添加物料</el-button>
|
<el-button type="text" @click="addMaterial">添加物料</el-button>
|
||||||
<el-button type="text" @click="calculatedData">刷新界面</el-button>
|
<el-button type="text" @click="calculatedData">计算数据</el-button>
|
||||||
<el-button type="text"></el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -168,71 +279,93 @@
|
||||||
width="50">
|
width="50">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed
|
|
||||||
width="180"
|
width="180"
|
||||||
prop="materialName"
|
prop="prodCategory"
|
||||||
label="物料名称">
|
label="产品大类">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="120"
|
||||||
|
prop="model"
|
||||||
|
label="型号">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="180"
|
width="180"
|
||||||
prop="quantity"
|
prop="specification"
|
||||||
|
label="规格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="voltLevel"
|
||||||
|
label="电压等级">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="measureUnit"
|
||||||
|
label="单位">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="matCostPrice"
|
||||||
|
label="材料成本价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="redBookPrice"
|
||||||
|
label="红本价格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="redBookCost"
|
||||||
|
label="红本成本">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="rbFacPrice"
|
||||||
|
label="红本厂价">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
width="180"
|
||||||
|
prop="number"
|
||||||
label="数量">
|
label="数量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.quantity" >
|
<el-input v-model="scope.row.number" @blur="validateNumber(scope.row)">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120"
|
width="180"
|
||||||
prop="voltage"
|
prop="varRatio"
|
||||||
label="电压">
|
label="差异比率">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="80"
|
|
||||||
prop="standard"
|
|
||||||
label="标准">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="180"
|
width="180"
|
||||||
prop="costPrice"
|
prop="wdFSurcharge"
|
||||||
label="成本价">
|
label="盘具运费上浮金额">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="factoryPrice"
|
|
||||||
label="厂价">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="netVolume"
|
|
||||||
label="净重量">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="120"
|
|
||||||
prop="inventory"
|
|
||||||
label="盘具">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link @click="handleInventoryClick(scope.row, scope.$index)" type="primary">{{ scope.row.inventory }}</el-link>
|
<el-input v-model="scope.row.wdFSurcharge" >
|
||||||
</template>
|
<template slot="append">¥</template>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="invItemCount"
|
|
||||||
label="盘具数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.invItemCount" >
|
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="100"
|
width="180"
|
||||||
prop="weighInv"
|
prop="laborCostFloat"
|
||||||
label="盘重">
|
label="人工成本上浮点数">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.laborCostFloat" >
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="180"
|
width="180"
|
||||||
prop="totalWeight"
|
prop="hydroCostFloat"
|
||||||
label="总重">
|
label="水电成本上浮点数">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.hydroCostFloat" >
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
@ -246,12 +379,6 @@
|
||||||
prop="totalFacPrice"
|
prop="totalFacPrice"
|
||||||
label="总厂价">
|
label="总厂价">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
fixed="right"
|
|
||||||
width="120"
|
|
||||||
prop="totalNetWt"
|
|
||||||
label="总净重">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
fixed="right"
|
fixed="right"
|
||||||
width="80"
|
width="80"
|
||||||
|
@ -263,67 +390,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog class="regionDialogTable" :visible.sync="dialogRegionVisible" width="932px" >
|
<el-dialog class="materialDialogTable" :visible.sync="dialogMaterialVisible" width="1100px">
|
||||||
<div slot="title" style="margin: 0px">
|
|
||||||
<el-form>
|
|
||||||
<el-form-item >
|
|
||||||
<el-input style="width: 300px; " v-model="regionName" placeholder="请输入地区名称">
|
|
||||||
</el-input>
|
|
||||||
<el-button type="primary" size="small" @click="searchRegion">查询地区</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<el-table
|
|
||||||
:data="getCurrentRegionData"
|
|
||||||
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
|
||||||
:cell-style="{'text-align': 'center', 'padding': '0px'}"
|
|
||||||
highlight-current-row
|
|
||||||
border>
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
type="index"
|
|
||||||
width="50">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="province"
|
|
||||||
label="省">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="180"
|
|
||||||
prop="city"
|
|
||||||
label="市">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="district"
|
|
||||||
label="区">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="kilometers"
|
|
||||||
label="公里数">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="80"
|
|
||||||
label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button @click="chooseRegion(scope.row)" style="color: blue;" type="text">选择</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; margin-top: 10px;">
|
|
||||||
<el-pagination
|
|
||||||
@current-change="handleRegionCurrentChange"
|
|
||||||
:current-page.sync="regionCurrentPage"
|
|
||||||
:page-size="pageSize"
|
|
||||||
:total="regionTableData.length"
|
|
||||||
></el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog class="materialDialogTable" :visible.sync="dialogMaterialVisible" width="1200px">
|
|
||||||
<div slot="title" style="margin: 0px">
|
<div slot="title" style="margin: 0px">
|
||||||
<el-form>
|
<el-form>
|
||||||
<el-form-item >
|
<el-form-item >
|
||||||
|
@ -338,7 +405,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: row;">
|
<div style="display: flex; flex-direction: row;">
|
||||||
<div style="width: 766px">
|
<div style="width: 688px">
|
||||||
<el-table
|
<el-table
|
||||||
:data="getCurrentMaterialData"
|
:data="getCurrentMaterialData"
|
||||||
ref="materialTable"
|
ref="materialTable"
|
||||||
|
@ -346,7 +413,7 @@
|
||||||
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
||||||
:cell-style="{'text-align': 'center', 'padding': '5px 0px'}"
|
:cell-style="{'text-align': 'center', 'padding': '5px 0px'}"
|
||||||
highlight-selection-row
|
highlight-selection-row
|
||||||
:row-key="row => row.materialName"
|
:row-key="row => row.uid"
|
||||||
:reserve-selection="true"
|
:reserve-selection="true"
|
||||||
border>
|
border>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -359,9 +426,9 @@
|
||||||
width="50">
|
width="50">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="200"
|
width="120"
|
||||||
prop="materialName"
|
prop="prodCategory"
|
||||||
label="物料名称">
|
label="产品大类">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120"
|
width="120"
|
||||||
|
@ -375,13 +442,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="120"
|
width="120"
|
||||||
prop="voltage"
|
prop="voltLevel"
|
||||||
label="电压">
|
label="电压">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="100"
|
width="100"
|
||||||
prop="standard"
|
prop="measureUnit"
|
||||||
label="标准">
|
label="单位">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: center; margin-top: 10px;">
|
<div style="text-align: center; margin-top: 10px;">
|
||||||
|
@ -399,7 +466,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
class="selected-item"
|
class="selected-item"
|
||||||
>
|
>
|
||||||
{{ selectedItem.materialName }} - {{ selectedItem.voltage }}
|
{{ selectedItem.model }} , {{ selectedItem.specification }} , {{ selectedItem.voltLevel }}
|
||||||
<el-button @click="removeSelectedItem(selectedItem)" type="text" class="remove-btn">✖</el-button>
|
<el-button @click="removeSelectedItem(selectedItem)" type="text" class="remove-btn">✖</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -412,52 +479,6 @@
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog class="inventoryDialogTable" :visible.sync="dialogInventoryVisible" width="792px" >
|
|
||||||
<div>
|
|
||||||
<el-table
|
|
||||||
:data="getCurrentInventoryData"
|
|
||||||
:header-cell-style="{ background: '#eef1f6', color: '#606266', 'text-align': 'center', 'padding': '0px'}"
|
|
||||||
:cell-style="{'text-align': 'center', 'padding': '0px'}"
|
|
||||||
highlight-current-row
|
|
||||||
border>
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
type="index"
|
|
||||||
width="50">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="inventory"
|
|
||||||
label="盘具名称">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="invDesc"
|
|
||||||
label="盘具描述">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="200"
|
|
||||||
prop="weighInv"
|
|
||||||
label="盘重">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
width="100"
|
|
||||||
label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button @click="chooseInventory(scope.row)" style="color: blue;" type="text">选择</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; margin-top: 10px;">
|
|
||||||
<el-pagination
|
|
||||||
@current-change="handleInventoryCurrentChange"
|
|
||||||
:current-page.sync="inventoryCurrentPage"
|
|
||||||
:page-size="pageSize"
|
|
||||||
:total="inventoryTableData.length"
|
|
||||||
></el-pagination>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -474,39 +495,41 @@
|
||||||
el: '#index-app',
|
el: '#index-app',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeNames: ['2'],
|
||||||
formLabelAlign: {
|
formLabelAlign: {
|
||||||
processingFee: '0.60', /*蒸汽费/钢丝铠装材料及加工费*/
|
officeExpense: 0.022,
|
||||||
prodFinancialCost: '0.40', /*生产财务成本*/
|
travelExpense: 0.011,
|
||||||
accountPeriod: '1.20', /*账期*/
|
salaryInsur: 0.394,
|
||||||
acceptance: '0.90', /*承兑*/
|
otherMgmtExpense: 0.373,
|
||||||
companyMgmtCost: '1.50', /*公司管理成本*/
|
carExpense: 0.010,
|
||||||
bidServiceFee: '0.44', /*中标服务费*/
|
mgmtBizEntFee:0.156, //管理-业务招待费
|
||||||
netProfit: '3.00', /*公司净利润*/
|
mgmtDeprecExpense: 0.016, //管理-折旧费
|
||||||
businessFee: '2.00', /*业务费*/
|
consultAuditFee: 0.026, //咨询审计费
|
||||||
province: '', /*省*/
|
tenderCost: 0.023, //标书费用
|
||||||
city: '', /*市*/
|
rentExpense: 0.052, //房租费
|
||||||
district: '', /*区*/
|
salary: 0.239, //工资
|
||||||
freight: '', /*运费*/
|
inspectFee: 0.016, //检验检测费
|
||||||
canFloat: '', /*可下浮点数*/
|
transTravelExpense: 0.020, //交通与差旅费
|
||||||
kilometers: '', /*公里数*/
|
otherSalesExpense: 0.073, //其他销售费
|
||||||
netWeightTotal: '', /*净重合计*/
|
biddingCost: 0.134, //投标费用
|
||||||
weightTotal: '', /*重量合计*/
|
bizFee: 1.183, //销售-业务费
|
||||||
totalFactoryAmount: '', /*厂价金额合计*/
|
salesBizEntFee: 0.098, //销售-业务招待费
|
||||||
totalActualAmount: '', /*实际金额合计*/
|
transpHandlingFee: 0.621, //运输装卸费
|
||||||
|
manufDeprecExpense: 0.217, //制造-折旧费
|
||||||
|
interestExpense: 0.436, //利息支出
|
||||||
|
handlingFee: 0.108, //手续费
|
||||||
|
discInterest: 0.363, //贴现利息
|
||||||
|
otherFinExpenses: 0.197, //财务-其他费用
|
||||||
|
invOpCost: 0.031, //存货机会成本
|
||||||
|
tax: 1.5, //税金
|
||||||
|
totalFinExpenses : 0,
|
||||||
|
totalFactoryAmount: 0,
|
||||||
|
totalActualAmount: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
materialData: [
|
materialData: [
|
||||||
|
|
||||||
],
|
],
|
||||||
regionTableData: [],
|
|
||||||
price_0t_5t: '',
|
|
||||||
price_5t_10t: '',
|
|
||||||
price_10t_25t: '',
|
|
||||||
price_25t_100t: '',
|
|
||||||
price_100t: '',
|
|
||||||
dialogRegionVisible: false,
|
|
||||||
regionName: '',
|
|
||||||
regionCurrentPage: 1,
|
|
||||||
inventoryCurrentPage : 1,
|
|
||||||
materialCurrentPage: 1,
|
materialCurrentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
dialogMaterialVisible: false,
|
dialogMaterialVisible: false,
|
||||||
|
@ -516,35 +539,25 @@
|
||||||
precMaterialName: '',
|
precMaterialName: '',
|
||||||
vagueMaterialName: '',
|
vagueMaterialName: '',
|
||||||
vagueModel: '',
|
vagueModel: '',
|
||||||
dialogInventoryVisible: false,
|
validationErrors: [], // 用于存储验证错误信息的数组
|
||||||
inventoryTableData: [],
|
|
||||||
clickedRowIndex: null, // 用于记录点击的行的索引
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getCurrentRegionData() {
|
|
||||||
const start = (this.regionCurrentPage - 1) * this.pageSize;
|
|
||||||
const end = start + this.pageSize;
|
|
||||||
return this.regionTableData.slice(start, end);
|
|
||||||
},
|
|
||||||
getCurrentMaterialData() {
|
getCurrentMaterialData() {
|
||||||
const start = (this.materialCurrentPage - 1) * this.pageSize;
|
const start = (this.materialCurrentPage - 1) * this.pageSize;
|
||||||
const end = start + this.pageSize;
|
const end = start + this.pageSize;
|
||||||
return this.materialTableData.slice(start, end);
|
return this.materialTableData.slice(start, end);
|
||||||
},
|
},
|
||||||
getCurrentInventoryData() {
|
|
||||||
const start = (this.inventoryCurrentPage - 1) * this.pageSize;
|
|
||||||
const end = start + this.pageSize;
|
|
||||||
return this.inventoryTableData.slice(start, end);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getInventoryData();
|
this.calculateTotal();
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
async init () {
|
async init () {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -559,67 +572,55 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
calculateTotal() {
|
||||||
|
this.formLabelAlign.totalFinExpenses =parseFloat(
|
||||||
|
(
|
||||||
|
parseFloat(this.formLabelAlign.officeExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.travelExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.salaryInsur) +
|
||||||
|
parseFloat(this.formLabelAlign.otherMgmtExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.carExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.mgmtBizEntFee) +
|
||||||
|
parseFloat(this.formLabelAlign.mgmtDeprecExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.consultAuditFee) +
|
||||||
|
parseFloat(this.formLabelAlign.tenderCost) +
|
||||||
|
parseFloat(this.formLabelAlign.rentExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.salary) +
|
||||||
|
parseFloat(this.formLabelAlign.inspectFee) +
|
||||||
|
parseFloat(this.formLabelAlign.transTravelExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.otherSalesExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.biddingCost) +
|
||||||
|
parseFloat(this.formLabelAlign.bizFee) +
|
||||||
|
parseFloat(this.formLabelAlign.salesBizEntFee) +
|
||||||
|
parseFloat(this.formLabelAlign.transpHandlingFee) +
|
||||||
|
parseFloat(this.formLabelAlign.manufDeprecExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.interestExpense) +
|
||||||
|
parseFloat(this.formLabelAlign.handlingFee) +
|
||||||
|
parseFloat(this.formLabelAlign.discInterest) +
|
||||||
|
parseFloat(this.formLabelAlign.otherFinExpenses) +
|
||||||
|
parseFloat(this.formLabelAlign.invOpCost) +
|
||||||
|
parseFloat(this.formLabelAlign.tax)
|
||||||
|
).toFixed(2))
|
||||||
|
},
|
||||||
|
|
||||||
handleDeleteClick(index){
|
handleDeleteClick(index){
|
||||||
this.materialData.splice(index, 1)
|
this.materialData.splice(index, 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
selectedRegion(){
|
|
||||||
this.dialogRegionVisible = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
chooseRegion(row) {
|
|
||||||
this.dialogRegionVisible = false;
|
|
||||||
this.formLabelAlign.province = row.province
|
|
||||||
this.formLabelAlign.city = row.city
|
|
||||||
this.formLabelAlign.district = row.district
|
|
||||||
this.formLabelAlign.kilometers = row.kilometers
|
|
||||||
this.price_0t_5t = row.price01
|
|
||||||
this.price_5t_10t = row.price02
|
|
||||||
this.price_10t_25t = row.price03
|
|
||||||
this.price_25t_100t = row.price04
|
|
||||||
this.price_100t = row.price05
|
|
||||||
},
|
|
||||||
searchRegion(){
|
|
||||||
if(this.regionName === ''){
|
|
||||||
this.$message({
|
|
||||||
message: '请输入你要查询的地区名称',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
const params = {
|
|
||||||
regionName : this.regionName
|
|
||||||
}
|
|
||||||
console.log(params)
|
|
||||||
queryRegionListByName(params).then(res => {
|
|
||||||
console.log('queryRegionListByName')
|
|
||||||
this.regionTableData = res.data || []
|
|
||||||
this.regionCurrentPage = 1;
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error('请求出错了:' + err)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
handleRegionCurrentChange(val) {
|
|
||||||
this.currentPage = val;
|
|
||||||
},
|
|
||||||
|
|
||||||
handleMaterialCurrentChange(val) {
|
handleMaterialCurrentChange(val) {
|
||||||
this.currentPage = val;
|
this.currentPage = val;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleInventoryCurrentChange(val) {
|
|
||||||
this.currentPage = val;
|
|
||||||
},
|
|
||||||
|
|
||||||
addMaterial(){
|
addMaterial(){
|
||||||
this.dialogMaterialVisible = true;
|
this.dialogMaterialVisible = true;
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
selection.forEach(item => {
|
selection.forEach(item => {
|
||||||
// 判断是否已经存在于已选列表中,避免重复添加
|
// 判断是否已经存在于已选列表中,避免重复添加
|
||||||
if (!this.selectedMaterialItems.some(selectedItem => selectedItem.materialName === item.materialName)) {
|
if (!this.selectedMaterialItems.some(selectedItem => selectedItem.uid === item.uid)) {
|
||||||
this.selectedMaterialItems.push(item);
|
this.selectedMaterialItems.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -630,7 +631,7 @@
|
||||||
const isSelected = this.$refs.materialTable.selection.includes(selectedItem);
|
const isSelected = this.$refs.materialTable.selection.includes(selectedItem);
|
||||||
|
|
||||||
// 从已选列表中移除该项
|
// 从已选列表中移除该项
|
||||||
const index = this.selectedMaterialItems.findIndex(item => item.materialName === selectedItem.materialName);
|
const index = this.selectedMaterialItems.findIndex(item => item.uid === selectedItem.uid);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.selectedMaterialItems.splice(index, 1);
|
this.selectedMaterialItems.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
@ -667,12 +668,11 @@
|
||||||
const params = {
|
const params = {
|
||||||
precMaterialName : this.precMaterialName,
|
precMaterialName : this.precMaterialName,
|
||||||
vagueMaterialName : this.vagueMaterialName,
|
vagueMaterialName : this.vagueMaterialName,
|
||||||
vagueModel : this.vagueModel
|
vagueModel : this.vagueModel,
|
||||||
}
|
}
|
||||||
|
|
||||||
queryMaterialListByParam(params).then(res => {
|
queryMaterialListByParam(params).then(res => {
|
||||||
this.materialTableData = res.data || []
|
this.materialTableData = res.data || [];
|
||||||
this.materialCurrentPage = 1;
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error('请求出错了:' + err)
|
this.$message.error('请求出错了:' + err)
|
||||||
})
|
})
|
||||||
|
@ -680,35 +680,90 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleInventoryClick(row, index) {
|
|
||||||
this.clickedRowIndex = index; // 记录点击的行的索引
|
|
||||||
this.dialogInventoryVisible = true; // 打开选择盘具的 dialog
|
|
||||||
},
|
|
||||||
|
|
||||||
getInventoryData() {
|
|
||||||
queryInventoryList().then(res => {
|
|
||||||
this.inventoryTableData = res.data || []
|
|
||||||
}).catch(err => {
|
|
||||||
this.$message.error('请求出错了:' + err)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
chooseInventory(row) {
|
|
||||||
// 在选择盘具的逻辑中,将选择的盘具信息赋值给之前点击的行的数据
|
|
||||||
if (this.clickedRowIndex !== null) {
|
|
||||||
// 假设选择盘具后的数据存储在 this.selectedInventory 中
|
|
||||||
const updatedRow = {
|
|
||||||
inventory: row.inventory, // 盘具名称
|
|
||||||
weighInv: row.weighInv, // 盘重信息
|
|
||||||
};
|
|
||||||
this.$set(this.materialData, this.clickedRowIndex, updatedRow);
|
|
||||||
}
|
|
||||||
this.dialogInventoryVisible = false; // 打开选择盘具的 dialog
|
|
||||||
// 其他逻辑
|
|
||||||
},
|
|
||||||
|
|
||||||
calculatedData() {
|
calculatedData() {
|
||||||
|
/**-------------计算财务总成本---------------**/
|
||||||
|
this.calculateTotal();
|
||||||
|
/**----------------------进行盘具、数量、人工、水电三个数值的验证---------------**/
|
||||||
|
this.validationErrors = []; // 清空之前的错误信息
|
||||||
|
this.materialData.forEach((row, index) => {
|
||||||
|
const wdFSurcharge = parseFloat(row.wdFSurcharge) || 0; // 如果为空,默认为0
|
||||||
|
const laborCostFloat = parseFloat(row.laborCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const hydroCostFloat = parseFloat(row.hydroCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const quantity = parseFloat(row.number) || 0; // 如果为空,默认为0
|
||||||
|
// 进行数量验证
|
||||||
|
if (isNaN(quantity) || quantity < 0) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行数量不符合要求\n`);
|
||||||
|
}
|
||||||
|
// 进行盘具运费的验证
|
||||||
|
if (isNaN(wdFSurcharge) || wdFSurcharge < 0) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行盘具运费上浮金额不符合要求`);
|
||||||
|
}
|
||||||
|
// 进行点数的验证
|
||||||
|
if (isNaN(laborCostFloat) || laborCostFloat < 0 || laborCostFloat > 100) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行人工成本上浮点数不符合要求(应在 0 到 100 之间)`);
|
||||||
|
}
|
||||||
|
if (isNaN(hydroCostFloat) || hydroCostFloat < 0 || hydroCostFloat > 100) {
|
||||||
|
this.validationErrors.push(`第 ${index + 1} 行水电成本上浮点数不符合要求(应在 0 到 100 之间)`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**-----------------------验证完成进行运算,验证结果通过才进行计算--------------------------**/
|
||||||
|
if (this.validationErrors.length === 0) {
|
||||||
|
// 遍历表格数据进行计算
|
||||||
|
this.materialData.forEach((row, index) => {
|
||||||
|
this.validationErrors = []; // 清空之前的错误信息
|
||||||
|
|
||||||
|
const redBookFacPrice = parseFloat(row.rbFacPrice);
|
||||||
|
const materialCost = parseFloat(row.matCostPrice);
|
||||||
|
const wdFSurcharge = parseFloat(row.wdFSurcharge) || 0; // 如果为空,默认为0
|
||||||
|
const laborCostFloat = parseFloat(row.laborCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const hydroCostFloat = parseFloat(row.hydroCostFloat) || 0; // 如果为空,默认为0
|
||||||
|
const quantity = parseFloat(row.number) || 0; // 如果为空,默认为0
|
||||||
|
|
||||||
|
// 进行其他计算
|
||||||
|
this.$set(this.materialData, index, {
|
||||||
|
...row,
|
||||||
|
varRatio: ((redBookFacPrice - materialCost) / redBookFacPrice * 100).toFixed(2),
|
||||||
|
totalFacPrice: (quantity * redBookFacPrice).toFixed(2),
|
||||||
|
totalCost: (
|
||||||
|
(materialCost + wdFSurcharge +
|
||||||
|
materialCost * (laborCostFloat / 100) + materialCost * (hydroCostFloat / 100)) *
|
||||||
|
quantity
|
||||||
|
).toFixed(2),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
message: this.validationErrors.join('<br>')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 计算厂价金额合计
|
||||||
|
const totalFactoryAmount = this.materialData.reduce((sum, row) => sum + parseFloat(row.totalFacPrice), 0);
|
||||||
|
this.formLabelAlign.totalFactoryAmount = totalFactoryAmount.toFixed(2);
|
||||||
|
|
||||||
|
// 计算实际金额合计
|
||||||
|
const totalCost = this.materialData.reduce((sum, row) => sum + parseFloat(row.totalCost), 0);
|
||||||
|
this.formLabelAlign.totalActualAmount = (totalCost + totalCost * (parseFloat(this.formLabelAlign.totalFinExpenses) / 100)).toFixed(2);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**----------------表头表单验证-----------------**/
|
||||||
|
validateInputRange(value) {
|
||||||
|
const number = parseFloat(value);
|
||||||
|
return isNaN(number) || (number >= 0 && number <= 100);
|
||||||
|
},
|
||||||
|
validateAndSetDefault(model, field) {
|
||||||
|
if (!this.validateInputRange(model[field])) {
|
||||||
|
// 如果验证不通过,设置错误提示
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '填写错误,范围为0~100'
|
||||||
|
});
|
||||||
|
this.$set(model, field, 0);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -519,7 +519,6 @@
|
||||||
dialogInventoryVisible: false,
|
dialogInventoryVisible: false,
|
||||||
inventoryTableData: [],
|
inventoryTableData: [],
|
||||||
clickedRowIndex: null, // 用于记录点击的行的索引
|
clickedRowIndex: null, // 用于记录点击的行的索引
|
||||||
materialTotalRows: 0,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -1,56 +1,56 @@
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\impl\JnMaterialServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\dto\JnInventoryDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\JnMaterialService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\impl\MaterialServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\dto\JnInventoryDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\dto\BizDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\controller\BizQccController.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\utils\SMSUtils.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\service\BizService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\controller\ZMController.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\mapper\RegionMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\API\qichacha\QccApiUntils.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\mapper\EmployeeMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\utils\JSONHelper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\dto\JnRegionDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\config\WebMvcConfig.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\filter\LoginCheckFilter.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\common\JacksonObjectMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\config\MybatisPlusConfig.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\JnMaterialService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\mapper\JnInventoryMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\common\CustomException.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\utils\JSONHelper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\RegionService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\controller\PageRedirectController.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\dto\MaterialDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\dto\InventoryDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\mapper\InventoryMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\JnRegionService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\utils\StringUtils.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\InventoryService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\impl\JnMaterialServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\dto\RegionDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\common\R.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\mapper\BizMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\entity\QccInfo.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\MaterialService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\mapper\MaterialMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\API\qichacha\QccApiUntils.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\config\MybatisPlusConfig.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\impl\MaterialServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\common\BaseContext.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\service\QccInfoService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\mapper\JnInventoryMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\mapper\QccInfoMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\dto\JnMaterialDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\controller\JNController.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\controller\PageRedirectController.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\JNApplication.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\impl\RegionServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\mapper\InventoryMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\controller\BizQccController.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\RegionService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\utils\HttpHelper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\dto\BizDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\JnInventoryService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\mapper\JnRegionMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\service\EmployeeService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\config\WebMvcConfig.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\JNApplication.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\controller\BizController.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\JnRegionService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\service\impl\BizServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\dto\InventoryDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\entity\QccInfo.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\common\MyMetaObjecthandler.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\impl\JnRegionServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\filter\LoginCheckFilter.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\common\CustomException.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\mapper\JnMaterialMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\common\JacksonObjectMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\service\QccInfoService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\dto\JnMaterialDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\service\impl\BizServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\utils\HttpHelper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\impl\JnInventoryServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\utils\StringUtils.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\mapper\QccInfoMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\utils\SMSUtils.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\mapper\EmployeeMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\impl\JnInventoryServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\controller\JNController.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\bizquery\service\impl\QccInfoServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\dto\RegionDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\JnInventoryService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\service\impl\EmployeeServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\service\EmployeeService.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\service\impl\QccInfoServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\impl\InventoryServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\impl\InventoryServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\common\GlobalExceptionHandler.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\utils\ValidateCodeUtils.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\controller\ZMController.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\dto\JnRegionDto.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\service\impl\EmployeeServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\mapper\JnRegionMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\common\BaseContext.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\controller\BizController.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\common\R.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\service\BizService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\mapper\JnMaterialMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\bizquery\mapper\BizMapper.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\mapper\MaterialMapper.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\common\GlobalExceptionHandler.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\impl\RegionServiceImpl.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\jnzmquatation\service\impl\JnRegionServiceImpl.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\demo\zmquotation\dto\MaterialDto.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\InventoryService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\utils\ValidateCodeUtils.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\service\MaterialService.java
|
||||||
E:\myproject\JNDemo\src\main\java\com\JN\common\MyMetaObjecthandler.java
|
D:\JavaProject\JNDemo\src\main\java\com\JN\demo\zmquotation\mapper\RegionMapper.java
|
||||||
|
|
Loading…
Reference in New Issue