Compare commits

...

2 Commits

Author SHA1 Message Date
xd c09a908d39 Merge branch 'main' of http://jialcheerful.club:3000/xd/JNBusiness 2024-07-04 15:31:56 +08:00
xd 8d4e901748 '123' 2024-07-04 15:31:43 +08:00
6 changed files with 125 additions and 28 deletions

View File

@ -0,0 +1,11 @@
#for tests only !
#Thu Jul 04 15:05:23 CST 2024
jco.destination.pool_capacity=10
jco.client.lang=ZH
jco.client.ashost=172.19.0.125
jco.client.saprouter=
jco.client.user=RFC
jco.client.sysnr=00
jco.destination.peak_limit=10
jco.client.passwd=654321
jco.client.client=800

View File

@ -267,23 +267,46 @@ public class RedBookController extends BaseController
public AjaxResult madeXjQuot(HttpServletResponse response, @RequestBody OAQuot quot) public AjaxResult madeXjQuot(HttpServletResponse response, @RequestBody OAQuot quot)
{ {
Quot xjquot = new Quot(); Quot xjquot = new Quot();
File excelFile = null; List<QuotMaterial> materials = new ArrayList<QuotMaterial>();
QuotMaterial xjquotMaterials = new QuotMaterial();
/*File excelFile = null;*/
try{ try{
xjquot.setQuotId(UUID.fastUUID().toString()); xjquot.setQuotId(UUID.fastUUID().toString());
String quotCode = redBookService.getCode("BJD"); String quotCode = redBookService.getCode("BJD");
xjquot.setQuotCode(quotCode); xjquot.setQuotCode(quotCode);
xjquot.setQuotApprovalStatus("0"); xjquot.setQuotApprovalStatus("0");//询价单状态设置为 待提交
xjquot.setQuotSalesmanCode(getUsername()); xjquot.setQuotSalesmanCode(getUsername());//业务员id
xjquot.setQuotSalesmanBm(getLoginUser().getUser().getSapUserBm()); xjquot.setQuotSalesmanBm(getLoginUser().getUser().getSapUserBm());//业务员编码
xjquot.setQuotSalesmanName(getLoginUser().getUser().getNickName()); xjquot.setQuotSalesmanName(getLoginUser().getUser().getNickName());//业务员名称
xjquot.setQuotSalesmanDeptId(getLoginUser().getUser().getDept().getDeptId()+""); xjquot.setQuotSalesmanDeptId(getLoginUser().getUser().getDept().getDeptId()+"");//部门id
xjquot.setQuotSalesmanDeptName(getLoginUser().getUser().getDept().getDeptName()); xjquot.setQuotSalesmanDeptName(getLoginUser().getUser().getDept().getDeptName());//部门名称
xjquot.setQuotRbDateUid(quot.getRbDateUid());//调价日期
xjquot.setCreateBy(getUsername()); xjquot.setCreateBy(getUsername());
iQuotService.insertQuot(xjquot);
List<OAQuotProduct> list = quot.getSelectedResultData(); List<OAQuotProduct> list = quot.getSelectedResultData();
/** ===================================插入询价单明细表==================================*/
for(OAQuotProduct op:list){
xjquotMaterials = new QuotMaterial();
xjquotMaterials.setMatXingh(op.getName_1());//型号
xjquotMaterials.setMatGuig(op.getSpec());//规格
xjquotMaterials.setMatDiany(op.getVoltage());//电压
xjquotMaterials.setMatDanw(op.getStu());//单位
xjquotMaterials.setMatSl(op.getCount());//数量
xjquotMaterials.setMatPrice(new BigDecimal(op.getPrice()));//红本价
xjquotMaterials.setMatPerc(op.getPer());//一次折扣
xjquotMaterials.setMatPerc2(op.getPer2());//二次折扣
xjquotMaterials.setMatQuotPrice(op.getSetPrice());//报价单价
xjquotMaterials.setMatQuotAllPrice(op.getAllPrice());//报价金额
File directory = new File("xjQuotFile/"); xjquotMaterials.setIndex(op.getIndex());
materials.add(xjquotMaterials);
}
xjquot.setQuotMaterialList(materials);
iQuotService.insertQuot(xjquot);
/** ===================================插入询价单明细表==================================*/
/** ===================================产品明细生成附件==================================*/
/**File directory = new File("xjQuotFile/");
// 如果文件夹不存在则创建文件夹 // 如果文件夹不存在则创建文件夹
if (!directory.exists()) { if (!directory.exists()) {
directory.mkdir(); directory.mkdir();
@ -292,7 +315,7 @@ public class RedBookController extends BaseController
File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list); File file = excelUtil.exportXjQuotExcel(response,excelFile,xjquot,list);
MultipartFile multipartFile = convert(file); MultipartFile multipartFile = convert(file);
/** 上传清单附件 **/ // 上传清单附件
String relation_id = xjquot.getQuotId(); String relation_id = xjquot.getQuotId();
if(!StringUtils.isEmpty(relation_id)){ if(!StringUtils.isEmpty(relation_id)){
if (!multipartFile.isEmpty()) if (!multipartFile.isEmpty())
@ -320,8 +343,9 @@ public class RedBookController extends BaseController
}else{ }else{
return error("系统异常,询价单号为空!"); return error("系统异常,询价单号为空!");
} }
/** 上传清单附件 **/ // 上传清单附件
FileUtils.delete(excelFile); FileUtils.delete(excelFile);*/
/** ===================================产品明细生成附件==================================*/
}catch(Exception e){ }catch(Exception e){
return error("系统异常"); return error("系统异常");
} }

View File

@ -85,6 +85,9 @@ public class Quot extends BaseEntity
/** 明细条数 */ /** 明细条数 */
private Integer quotMaterialsCount; private Integer quotMaterialsCount;
/** 调价日期 */
private String quotRbDateUid;
/** 铝价 */ /** 铝价 */
private String quotLvPrice; private String quotLvPrice;
@ -301,6 +304,9 @@ public class Quot extends BaseEntity
public Integer getQuotMaterialsCount() { return quotMaterialsCount; } public Integer getQuotMaterialsCount() { return quotMaterialsCount; }
public void setQuotMaterialsCount(Integer quotMaterialsCount) { this.quotMaterialsCount = quotMaterialsCount; } public void setQuotMaterialsCount(Integer quotMaterialsCount) { this.quotMaterialsCount = quotMaterialsCount; }
public String getQuotRbDateUid() { return quotRbDateUid; }
public void setQuotRbDateUid(String quotRbDateUid) { this.quotRbDateUid = quotRbDateUid; }
public String getQuotLvPrice() { return quotLvPrice; } public String getQuotLvPrice() { return quotLvPrice; }
public void setQuotLvPrice(String quotLvPrice) { this.quotLvPrice = quotLvPrice; } public void setQuotLvPrice(String quotLvPrice) { this.quotLvPrice = quotLvPrice; }

View File

@ -53,6 +53,12 @@ public class QuotMaterial extends BaseEntity
/** 红本价 */ /** 红本价 */
private BigDecimal matPrice; private BigDecimal matPrice;
/** 一次折扣 */
private BigDecimal matPerc;
/** 二次折扣 */
private BigDecimal matPerc2;
/** 报价 */ /** 报价 */
private BigDecimal matQuotPrice; private BigDecimal matQuotPrice;
@ -138,6 +144,12 @@ public class QuotMaterial extends BaseEntity
public void setMatMatprice(BigDecimal matMatprice) { this.matMatprice = matMatprice; } public void setMatMatprice(BigDecimal matMatprice) { this.matMatprice = matMatprice; }
public BigDecimal getMatPrice() { return matPrice; } public BigDecimal getMatPrice() { return matPrice; }
public BigDecimal getMatPerc() { return matPerc; }
public void setMatPerc(BigDecimal matPerc) { this.matPerc = matPerc; }
public BigDecimal getMatPerc2() { return matPerc2; }
public void setMatPerc2(BigDecimal matPerc2) { this.matPerc2 = matPerc2; }
public void setMatPrice(BigDecimal matPrice) { this.matPrice = matPrice; } public void setMatPrice(BigDecimal matPrice) { this.matPrice = matPrice; }
public BigDecimal getMatQuotPrice() { return matQuotPrice; } public BigDecimal getMatQuotPrice() { return matQuotPrice; }

View File

@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="quotCheckUserNickname" column="quot_check_user_nickname" /> <result property="quotCheckUserNickname" column="quot_check_user_nickname" />
<result property="quotApprovalStatus" column="quot_approval_status" /> <result property="quotApprovalStatus" column="quot_approval_status" />
<result property="quotMaterialsCount" column="quot_materials_count" /> <result property="quotMaterialsCount" column="quot_materials_count" />
<result property="quotRbDateUid" column="quot_rbDateUid" />
<result property="quotLvPrice" column="quot_lv_price" /> <result property="quotLvPrice" column="quot_lv_price" />
<result property="quotTongPrice" column="quot_tong_price" /> <result property="quotTongPrice" column="quot_tong_price" />
<result property="quotMatpriceDiff" column="quot_matprice_diff" /> <result property="quotMatpriceDiff" column="quot_matprice_diff" />
@ -90,6 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="matMatprice" column="sub_mat_matprice" /> <result property="matMatprice" column="sub_mat_matprice" />
<result property="matPrice" column="sub_mat_price" /> <result property="matPrice" column="sub_mat_price" />
<result property="matPerc" column="sub_mat_perc" />
<result property="matPerc2" column="sub_mat_perc2" />
<result property="matQuotPrice" column="sub_mat_quot_price" /> <result property="matQuotPrice" column="sub_mat_quot_price" />
<result property="matQuotTp" column="sub_mat_quot_tp" /> <result property="matQuotTp" column="sub_mat_quot_tp" />
<result property="matQuotAllPrice" column="sub_mat_quot_allPrice" /> <result property="matQuotAllPrice" column="sub_mat_quot_allPrice" />
@ -114,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts, a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts,
a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from,
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price, a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_materials_count,a.quot_rbDateUid,
a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName, a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle, a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle,
@ -161,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.quot_id, a.quot_code,a.quot_jsw_code, a.quot_salesman_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm,a.quot_customer_name, select a.quot_id, a.quot_code,a.quot_jsw_code, a.quot_salesman_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_bm,a.quot_customer_name,
a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts, a.quot_phone, a.quot_inquiry_date, a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_contacts, a.quot_phone, a.quot_inquiry_date,
a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation,
a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status, a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status,a.quot_rbDateUid,
a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName, a.quot_materials_count,a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName,
a.create_by, a.create_time, a.update_by, a.update_time,a.quot_handle, a.create_by, a.create_time, a.update_by, a.update_time,a.quot_handle,
@ -184,6 +187,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.mat_remark as sub_mat_remark, b.mat_remark as sub_mat_remark,
b.mat_matprice as sub_mat_matprice, b.mat_matprice as sub_mat_matprice,
b.mat_price as sub_mat_price, b.mat_price as sub_mat_price,
b.mat_perc as sub_mat_perc,
b.mat_perc2 as sub_mat_perc2,
b.mat_quot_price as sub_mat_quot_price, b.mat_quot_price as sub_mat_quot_price,
b.mat_quot_tp as sub_mat_quot_tp, b.mat_quot_tp as sub_mat_quot_tp,
@ -239,6 +244,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name,</if> <if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name,</if>
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status,</if> <if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status,</if>
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count,</if> <if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count,</if>
<if test="quotRbDateUid != null and quotRbDateUid != ''">quot_rbDateUid,</if>
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price,</if> <if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price,</if>
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price,</if> <if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price,</if>
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff,</if> <if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff,</if>
@ -288,6 +294,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotCheckUserName != null and quotCheckUserName != ''">#{quotCheckUserName},</if> <if test="quotCheckUserName != null and quotCheckUserName != ''">#{quotCheckUserName},</if>
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">#{quotApprovalStatus},</if> <if test="quotApprovalStatus != null and quotApprovalStatus != ''">#{quotApprovalStatus},</if>
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">#{quotMaterialsCount},</if> <if test="quotMaterialsCount != null and quotMaterialsCount != ''">#{quotMaterialsCount},</if>
<if test="quotRbDateUid != null and quotRbDateUid != ''">#{quotRbDateUid},</if>
<if test="quotLvPrice != null and quotLvPrice != ''">#{quotLvPrice},</if> <if test="quotLvPrice != null and quotLvPrice != ''">#{quotLvPrice},</if>
<if test="quotTongPrice != null and quotTongPrice != ''">#{quotTongPrice},</if> <if test="quotTongPrice != null and quotTongPrice != ''">#{quotTongPrice},</if>
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">#{quotMatpriceDiff},</if> <if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">#{quotMatpriceDiff},</if>
@ -392,6 +399,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name = #{quotCheckUserName},</if> <if test="quotCheckUserName != null and quotCheckUserName != ''">quot_check_user_name = #{quotCheckUserName},</if>
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status = #{quotApprovalStatus},</if> <if test="quotApprovalStatus != null and quotApprovalStatus != ''">quot_approval_status = #{quotApprovalStatus},</if>
<if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count = #{quotMaterialsCount},</if> <if test="quotMaterialsCount != null and quotMaterialsCount != ''">quot_materials_count = #{quotMaterialsCount},</if>
<if test="quotRbDateUid != null and quotRbDateUid != ''">quot_rbDateUid = #{quotRbDateUid},</if>
<if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price = #{quotLvPrice},</if> <if test="quotLvPrice != null and quotLvPrice != ''">quot_lv_price = #{quotLvPrice},</if>
<if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price = #{quotTongPrice},</if> <if test="quotTongPrice != null and quotTongPrice != ''">quot_tong_price = #{quotTongPrice},</if>
<if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff = #{quotMatpriceDiff},</if> <if test="quotMatpriceDiff != null and quotMatpriceDiff != ''">quot_matprice_diff = #{quotMatpriceDiff},</if>
@ -442,9 +450,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<insert id="batchQuotMaterial"> <insert id="batchQuotMaterial">
insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany,mat_standard, mat_danw, mat_sl,mat_remark, quot_id,xh,number,mat_matprice,mat_price,mat_quot_price,mat_quot_tp,mat_quot_allPrice,mat_matprice_diff) values insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany,mat_standard, mat_danw, mat_sl,mat_remark, quot_id,xh,number,mat_matprice,mat_price,mat_perc,mat_perc2,mat_quot_price,mat_quot_tp,mat_quot_allPrice,mat_matprice_diff) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matStandard}, #{item.matDanw}, cast(#{item.matSl,jdbcType=DECIMAL} as decimal(18,3)),#{item.matRemark}, #{item.quotId}, #{item.xh}, #{item.index}, cast(#{item.matMatprice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matQuotPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matQuotTp,jdbcType=DECIMAL} as decimal(18,3)),cast(#{item.matQuotAllPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matMatpriceDiff,jdbcType=DECIMAL} as decimal(18,3))) ( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matStandard}, #{item.matDanw}, cast(#{item.matSl,jdbcType=DECIMAL} as decimal(18,3)),#{item.matRemark}, #{item.quotId}, #{item.xh}, #{item.index}, cast(#{item.matMatprice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matPerc,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.matPerc2,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.matQuotPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matQuotTp,jdbcType=DECIMAL} as decimal(18,3)),cast(#{item.matQuotAllPrice,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.matMatpriceDiff,jdbcType=DECIMAL} as decimal(18,3)))
</foreach> </foreach>
</insert> </insert>

View File

@ -526,6 +526,15 @@
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-if="(this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null) || checkRole(['QUOT','PRICE_VERIFICATION'])">导入</el-button> <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-if="(this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null) || checkRole(['QUOT','PRICE_VERIFICATION'])">导入</el-button>
</el-col>--> </el-col>-->
<el-col :span="1.5">
<el-select v-model="form.quotRbDateUid" :disabled="true">
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])"> <el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button> <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col> </el-col>
@ -538,32 +547,32 @@
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="型号" prop="matXingh" width="180"> <el-table-column label="型号" prop="matXingh" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matXingh" placeholder="型号" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/> <el-input v-model="scope.row.matXingh" placeholder="型号" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="matGuig" width="150"> <el-table-column label="规格" prop="matGuig" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matGuig" placeholder="规格" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/> <el-input v-model="scope.row.matGuig" placeholder="规格" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="电压" prop="matDiany" width="130"> <el-table-column label="电压" prop="matDiany" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matDiany" placeholder="电压" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/> <el-input v-model="scope.row.matDiany" placeholder="电压" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" prop="matDanw" width="100"> <el-table-column label="单位" prop="matDanw" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matDanw" placeholder="单位" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/> <el-input v-model="scope.row.matDanw" placeholder="单位" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" prop="matSl" width="100"> <el-table-column label="数量" prop="matSl" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matSl" placeholder="数量" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/> <el-input v-model="scope.row.matSl" placeholder="数量" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="matRemark" width="180"> <el-table-column label="备注" prop="matRemark" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matRemark" placeholder="备注" :disabled="form.quotApprovalStatus != '0' && form.quotApprovalStatus != null"/> <el-input v-model="scope.row.matRemark" placeholder="备注" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="料单价" prop="matMatprice" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])" width="130"> <el-table-column label="料单价" prop="matMatprice" v-if="checkRole(['QUOT_MAT_PRICE_DIFF'])" width="130">
@ -571,11 +580,21 @@
<el-input v-model="scope.row.matMatprice" :disabled="true"/> <el-input v-model="scope.row.matMatprice" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="红本单价" prop="matPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="130"> <el-table-column label="红本单价" prop="matPrice" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matPrice" :disabled="true"/> <el-input v-model="scope.row.matPrice" :disabled="true"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="一次折扣" prop="matPerc" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.matPerc" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="二次折扣" prop="matPerc2" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN','QUOT_MAT_PRICE_DIFF'])" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.matPerc2" :disabled="true"/>
</template>
</el-table-column>
<el-table-column label="特批下点" prop="matQuotTp" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="100"> <el-table-column label="特批下点" prop="matQuotTp" v-if="checkRole(['QUOT','PRICE_VERIFICATION','QUOT_MAT_PRICE_DIFF'])" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.matQuotTp" :disabled="true"/> <el-input v-model="scope.row.matQuotTp" :disabled="true"/>
@ -1060,6 +1079,8 @@
</style> </style>
<script> <script>
import { NumberAdd } from '@/utils/number';// import { NumberAdd } from '@/utils/number';//
import { versionList } from "@/api/redBook/redBook";
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot"; import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { checkPermi,checkRole } from '@/utils/permission';// import { checkPermi,checkRole } from '@/utils/permission';//
@ -1113,6 +1134,8 @@ export default {
quotList: [], quotList: [],
// - // -
quotMaterialList: [], quotMaterialList: [],
//
versionList: [], //
// //
productUpload: { productUpload: {
// //
@ -1271,6 +1294,7 @@ export default {
quotPrintUserName: null, quotPrintUserName: null,
quotPrintUserNickName: null, quotPrintUserNickName: null,
quotMaterialsCount: null, quotMaterialsCount: null,
quotRbDateUid: null,
quotTongPrice: null, quotTongPrice: null,
quotLvPrice: null, quotLvPrice: null,
quotMatpriceDiff: null, quotMatpriceDiff: null,
@ -1326,6 +1350,13 @@ export default {
}); });
}, },
//
async getVersionList(){
await versionList(this.queryParams).then(response => {
this.versionList = response.versionList;
});
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -1357,6 +1388,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.getVersionList();
const quotId = row.quotId || this.ids const quotId = row.quotId || this.ids
getQuot(quotId).then(response => { getQuot(quotId).then(response => {
this.setInfo(response); this.setInfo(response);
@ -1415,9 +1447,10 @@ export default {
// //
if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){ if(checkRole(['SALES_MAN']) && !checkRole(['admin'])){
if(this.form.quotApprovalStatus!='1'){ /*if(this.form.quotApprovalStatus!='1'){
this.quotMaterialList = response.data.quotMaterialList; this.quotMaterialList = response.data.quotMaterialList;
} }*/
this.quotMaterialList = response.data.quotMaterialList;
}else{ }else{
this.quotMaterialList = response.data.quotMaterialList; this.quotMaterialList = response.data.quotMaterialList;
} }
@ -1512,13 +1545,16 @@ export default {
commitForm() { commitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if(this.quotXjFileList == 0){ /*if(this.quotXjFileList == 0){
this.$message.warning("未上传询价清单附件!"); this.$message.warning("未上传询价清单附件!");
return; return;
}*/
if(this.quotMaterialList.length == 0 && this.quotXjFileList == 0){
this.$message.warning("请上传询价清单附件或录入报价产品明细");
return;
} }
this.form.quotMaterialList = this.quotMaterialList; this.form.quotMaterialList = this.quotMaterialList;
console.log(this.form)
commitQuot(this.form).then(response => { commitQuot(this.form).then(response => {
this.$modal.msgSuccess("提交成功"); this.$modal.msgSuccess("提交成功");
this.open = false; this.open = false;
@ -1717,7 +1753,7 @@ export default {
} }
}); });
this.form.quotQuantity = sums[6]; this.form.quotQuantity = sums[6];
this.form.quotTotalPrice = this.form.quotTotalPrice?this.form.quotTotalPrice:checkRole(['QUOT_MAT_PRICE_DIFF'])? sums[12] : sums[11]; this.form.quotTotalPrice = this.form.quotTotalPrice?this.form.quotTotalPrice:checkRole(['QUOT_MAT_PRICE_DIFF'])? sums[14] : sums[13];
this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length; this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length;
return sums; return sums;
}, },