This commit is contained in:
xd 2024-04-07 11:16:40 +08:00
parent 9948083d9b
commit f7808ef72f
7 changed files with 487 additions and 84 deletions

View File

@ -127,18 +127,19 @@ public class CustomerController extends BaseController
{ {
String cus_id = customer.getCusId(); String cus_id = customer.getCusId();
if(StringUtils.isEmpty(cus_id)){ if(StringUtils.isEmpty(cus_id)){
customer.setCusId(UUID.fastUUID().toString());
customer.setCusCode(IdUtils.createNo("KH_",2)); customer.setCusCode(IdUtils.createNo("KH_",2));
customer.setCreateBy(getUsername()); customer.setCreateBy(getUsername());
customerService.insertCustomer(customer); customerService.insertCustomer(customer);
//提交OA中间表 TODO //提交OA中间表 TODO
//.... //....
return toAjax(customerService.insertCustomer(customer)); return success();
}else{ }else{
customer.setUpdateBy(getUsername()); customer.setUpdateBy(getUsername());
customerService.updateCustomer(customer); customerService.updateCustomer(customer);
//提交OA中间表 TODO //提交OA中间表 TODO
//.... //....
return toAjax(customerService.updateCustomer(customer)); return success();
} }
} }

View File

@ -8,6 +8,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.MinioUtil; import com.ruoyi.common.utils.file.MinioUtil;
import com.ruoyi.common.utils.uuid.UUID; import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.customer.domain.Customer;
import com.ruoyi.quot.domain.QuotFile; import com.ruoyi.quot.domain.QuotFile;
import com.ruoyi.quot.service.IQuotFileService; import com.ruoyi.quot.service.IQuotFileService;
import com.ruoyi.web.utils.IdUtils; import com.ruoyi.web.utils.IdUtils;
@ -86,6 +87,9 @@ public class QuotController extends BaseController
quot.setQuotId(UUID.fastUUID().toString()); quot.setQuotId(UUID.fastUUID().toString());
quot.setQuotCode(IdUtils.createNo("BJD_",2)); quot.setQuotCode(IdUtils.createNo("BJD_",2));
quot.setCreateBy(getUsername()); quot.setCreateBy(getUsername());
String quotJsxzGroup = quot.getQuotJsxzGroup();
System.out.println(quotJsxzGroup);
return toAjax(quotService.insertQuot(quot)); return toAjax(quotService.insertQuot(quot));
} }
@ -115,6 +119,7 @@ public class QuotController extends BaseController
/** /**
* 头像上传SysNoticeMapper * 头像上传SysNoticeMapper
*/ */
@PreAuthorize("@ss.hasPermi('quot:quot:list')")
@Log(title = "上传报价附件", businessType = BusinessType.INSERT) @Log(title = "上传报价附件", businessType = BusinessType.INSERT)
@PostMapping("/quotFile") @PostMapping("/quotFile")
public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("relation_id") String relation_id,@RequestParam("file_type") String file_type) throws Exception public AjaxResult quotFile(@RequestParam("quotFile") MultipartFile file,@RequestParam("relation_id") String relation_id,@RequestParam("file_type") String file_type) throws Exception
@ -175,4 +180,29 @@ public class QuotController extends BaseController
} }
return success(); return success();
} }
/**
* 提交报价单
*/
@PreAuthorize("@ss.hasPermi('customer:customer:commit')")
@Log(title = "报价单提交", businessType = BusinessType.OTHER)
@PostMapping("/commitQuot")
public AjaxResult commitQuot(@RequestBody Quot quot)
{
String quot_id = quot.getQuotId();
if(StringUtils.isEmpty(quot_id)){
quot.setQuotId(UUID.fastUUID().toString());
quot.setQuotCode(IdUtils.createNo("BJD_",2));
quot.setCreateBy(getUsername());
quot.setQuotApprovalStatus("1");//提交报价组
quotService.insertQuot(quot);
return success();
}else{
quot.setUpdateBy(getUsername());
quot.setQuotApprovalStatus("1");//提交报价组
quotService.updateQuot(quot);
return success();
}
}
} }

View File

@ -94,6 +94,29 @@ public class Quot extends BaseEntity
@Excel(name = "创建人") @Excel(name = "创建人")
private String createName; private String createName;
/** 技术协助 */
private String quotJsxzStandard;//技术协助-标准
private String quotJsxzApprovalStatus;//技术协助-协助状态
private String quotJsxzChapter;//技术协助-是否需要技术章
private String quotJsxzTechnicalRequirement;//技术协助-技术要求
private String quotJsxzGroup;//技术协助-分组
private String quotJsxzConfirmId;//技术协助-技术确认单id
private String quotJsxzConfirmCode;//技术协助-技术确认单号
private String quotJsxzTlApprovalStatus;//技术协助-特缆协助状态
private String quotJsxzTlRemark;//技术协助-特缆协助说明
private String quotJsxzDyApprovalStatus;//技术协助-低压协助状态
private String quotJsxzDyRemark;//技术协助-低压协助说明
private String quotJsxzZyApprovalStatus;//技术协助-中压协助状态
private String quotJsxzZyRemark;//技术协助-中压协助说明
private String quotJsxzQtApprovalStatus;//技术协助-其他协助状态
private String quotJsxzQtRemark;//技术协助-其他协助说明
/** 报价单-产品信息 */ /** 报价单-产品信息 */
private List<QuotMaterial> quotMaterialList; private List<QuotMaterial> quotMaterialList;
@ -217,19 +240,13 @@ public class Quot extends BaseEntity
{ {
return quotQuotationFrom; return quotQuotationFrom;
} }
public void setQuotQuotationRequire(String quotQuotationRequire) public void setQuotQuotationRequire(String quotQuotationRequire) { this.quotQuotationRequire = quotQuotationRequire; }
{
this.quotQuotationRequire = quotQuotationRequire;
}
public String getQuotQuotationRequire() public String getQuotQuotationRequire()
{ {
return quotQuotationRequire; return quotQuotationRequire;
} }
public void setQuotFeedbackExplanation(String quotFeedbackExplanation) public void setQuotFeedbackExplanation(String quotFeedbackExplanation) { this.quotFeedbackExplanation = quotFeedbackExplanation; }
{
this.quotFeedbackExplanation = quotFeedbackExplanation;
}
public String getQuotFeedbackExplanation() public String getQuotFeedbackExplanation()
{ {
@ -262,10 +279,7 @@ public class Quot extends BaseEntity
{ {
return quotCheckUserName; return quotCheckUserName;
} }
public void setQuotCheckUserNickname(String quotCheckUserNickname) public void setQuotCheckUserNickname(String quotCheckUserNickname) { this.quotCheckUserNickname = quotCheckUserNickname; }
{
this.quotCheckUserNickname = quotCheckUserNickname;
}
public String getQuotCheckUserNickname() public String getQuotCheckUserNickname()
{ {
@ -293,6 +307,54 @@ public class Quot extends BaseEntity
this.quotMaterialList = quotMaterialList; this.quotMaterialList = quotMaterialList;
} }
public String getQuotJsxzStandard() {return quotJsxzStandard;}
public void setQuotJsxzStandard(String quotJsxzStandard) {this.quotJsxzStandard = quotJsxzStandard; }
public String getQuotJsxzApprovalStatus() {return quotJsxzApprovalStatus; }
public void setQuotJsxzApproval_status(String quotJsxzApproval_status) {this.quotJsxzApprovalStatus = quotJsxzApprovalStatus; }
public String getQuotJsxzChapter() {return quotJsxzChapter; }
public void setQuotJsxzChapter(String quotJsxzChapter) {this.quotJsxzChapter = quotJsxzChapter; }
public String getQuotJsxzTechnicalRequirement() {return quotJsxzTechnicalRequirement; }
public void setQuotJsxzTechnicalRequirement(String quotJsxzTechnicalRequirement) {this.quotJsxzTechnicalRequirement = quotJsxzTechnicalRequirement; }
public String getQuotJsxzGroup() {return quotJsxzGroup; }
public void setQuotJsxzGroup(String quotJsxzGroup) { this.quotJsxzGroup = quotJsxzGroup; }
public String getQuotJsxzConfirmId() { return quotJsxzConfirmId; }
public void setQuotJsxzConfirmId(String quotJsxzConfirmId) { this.quotJsxzConfirmId = quotJsxzConfirmId; }
public void setQuotJsxzApprovalStatus(String quotJsxzApprovalStatus) { this.quotJsxzApprovalStatus = quotJsxzApprovalStatus; }
public String getQuotJsxzConfirmCode() { return quotJsxzConfirmCode; }
public void setQuotJsxzConfirmCode(String quotJsxzConfirmCode) { this.quotJsxzConfirmCode = quotJsxzConfirmCode; }
public String getQuotJsxzTlApprovalStatus() { return quotJsxzTlApprovalStatus; }
public void setQuotJsxzTlApprovalStatus(String quotJsxzTlApprovalStatus) { this.quotJsxzTlApprovalStatus = quotJsxzTlApprovalStatus; }
public String getQuotJsxzTlRemark() { return quotJsxzTlRemark; }
public void setQuotJsxzTlRemark(String quotJsxzTlRemark) { this.quotJsxzTlRemark = quotJsxzTlRemark; }
public String getQuotJsxzDyApprovalStatus() { return quotJsxzDyApprovalStatus; }
public void setQuotJsxzDyApprovalStatus(String quotJsxzDyApprovalStatus) { this.quotJsxzDyApprovalStatus = quotJsxzDyApprovalStatus; }
public String getQuotJsxzDyRemark() { return quotJsxzDyRemark; }
public void setQuotJsxzDyRemark(String quotJsxzDyRemark) { this.quotJsxzDyRemark = quotJsxzDyRemark; }
public String getQuotJsxzZyApprovalStatus() { return quotJsxzZyApprovalStatus; }
public void setQuotJsxzZyApprovalStatus(String quotJsxzZyApprovalStatus) { this.quotJsxzZyApprovalStatus = quotJsxzZyApprovalStatus; }
public String getQuotJsxzZyRemark() { return quotJsxzZyRemark; }
public void setQuotJsxzZyRemark(String quotJsxzZyRemark) { this.quotJsxzZyRemark = quotJsxzZyRemark; }
public String getQuotJsxzQtApprovalStatus() { return quotJsxzQtApprovalStatus; }
public void setQuotJsxzQtApprovalStatus(String quotJsxzQtApprovalStatus) { this.quotJsxzQtApprovalStatus = quotJsxzQtApprovalStatus; }
public String getQuotJsxzQtRemark() { return quotJsxzQtRemark; }
public void setQuotJsxzQtRemark(String quotJsxzQtRemark) { this.quotJsxzQtRemark = quotJsxzQtRemark; }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -31,6 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="quotJsxzStandard" column="quot_jsxz_standard" />
<result property="quotJsxzApprovalStatus" column="quot_jsxz_approval_status" />
<result property="quotJsxzChapter" column="quot_jsxz_chapter" />
<result property="quotJsxzTechnicalRequirement" column="quot_jsxz_technical_requirement" />
<result property="quotJsxzGroup" column="quot_jsxz_group" />
<result property="quotJsxzConfirmId" column="quot_jsxz_confirm_id" />
</resultMap> </resultMap>
<resultMap id="QuotQuotMaterialResult" type="Quot" extends="QuotResult"> <resultMap id="QuotQuotMaterialResult" type="Quot" extends="QuotResult">
@ -48,7 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="quotJoins"> <sql id="quotJoins">
LEFT JOIN sys_user u on u.user_name=a.create_by left join sys_user u on u.user_name=a.create_by
left join sys_dept d on u.dept_id = d.dept_id
</sql> </sql>
<sql id="selectQuotVo"> <sql id="selectQuotVo">
@ -57,7 +65,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from,
a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price, a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price,
a.quot_check_user_name, a.quot_check_user_nickname, a.quot_approval_status, a.quot_check_user_name, a.quot_check_user_nickname, a.quot_approval_status,
a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
a.quot_jsxz_technical_requirement,a.quot_jsxz_group,a.quot_jsxz_confirm_id
from quot a from quot a
<include refid="quotJoins"/> <include refid="quotJoins"/>
</sql> </sql>
@ -75,8 +86,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult"> <select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">
select a.quot_id, a.quot_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_name, a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, 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_check_user_name, a.quot_check_user_nickname, a.quot_approval_status, a.create_by, a.create_time, a.update_by, a.update_time, select a.quot_id, a.quot_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_name,
b.mat_id as sub_mat_id, b.mat_xingh as sub_mat_xingh, b.mat_guig as sub_mat_guig, b.mat_diany as sub_mat_diany, b.mat_danw as sub_mat_danw, b.mat_sl as sub_mat_sl, b.quot_id as sub_quot_id a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, 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_check_user_name, a.quot_check_user_nickname, a.quot_approval_status,
a.create_by, a.create_time, a.update_by, a.update_time,
a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter,
a.quot_jsxz_technical_requirement,a.quot_jsxz_group,a.quot_jsxz_confirm_id,
b.mat_id as sub_mat_id, b.mat_xingh as sub_mat_xingh, b.mat_guig as sub_mat_guig,
b.mat_diany as sub_mat_diany, b.mat_danw as sub_mat_danw, b.mat_sl as sub_mat_sl,
b.quot_id as sub_quot_id
from quot a from quot a
left join quot_material b on b.quot_id = a.quot_id left join quot_material b on b.quot_id = a.quot_id
where a.quot_id = #{quotId} where a.quot_id = #{quotId}
@ -110,6 +130,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="quotJsxzStandard != null">quot_jsxz_standard,</if>
<if test="quotJsxzApprovalStatus != null">quot_jsxz_approval_status,</if>
<if test="quotJsxzChapter != null">quot_jsxz_chapter,</if>
<if test="quotJsxzTechnicalRequirement != null">quot_jsxz_technical_requirement,</if>
<if test="quotJsxzGroup != null">quot_jsxz_group,</if>
<if test="quotJsxzConfirmId != null">quot_jsxz_confirm_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quotId != null and quotId != ''">#{quotId},</if> <if test="quotId != null and quotId != ''">#{quotId},</if>
@ -137,6 +164,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="quotJsxzStandard != null">#{quotJsxzStandard},</if>
<if test="quotJsxzApprovalStatus != null">#{quotJsxzApprovalStatus},</if>
<if test="quotJsxzChapter != null">#{quotJsxzChapter},</if>
<if test="quotJsxzTechnicalRequirement != null">#{quotJsxzTechnicalRequirement},</if>
<if test="quotJsxzGroup != null">#{quotJsxzGroup},</if>
<if test="quotJsxzConfirmId != null">#{quotJsxzConfirmId},</if>
</trim> </trim>
</insert> </insert>
@ -167,6 +201,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="quotJsxzStandard != null">quot_jsxz_standard = #{quotJsxzStandard},</if>
<if test="quotJsxzApprovalStatus != null">quot_jsxz_approval_status = #{quotJsxzApprovalStatus},</if>
<if test="quotJsxzChapter != null">quot_jsxz_chapter = #{quotJsxzChapter},</if>
<if test="quotJsxzTechnicalRequirement != null">quot_jsxz_technical_requirement = #{quotJsxzTechnicalRequirement},</if>
<if test="quotJsxzGroup != null">quot_jsxz_group = #{quotJsxzGroup},</if>
<if test="quotJsxzConfirmId != null">quot_jsxz_confirm_id = #{quotJsxzConfirmId},</if>
</trim> </trim>
where quot_id = #{quotId} where quot_id = #{quotId}
</update> </update>

View File

@ -44,11 +44,11 @@ export function delQuot(quotId) {
} }
// 查询附件列表 // 查询附件列表
export function quotFileList(data) { export function quotFileList(query) {
return request({ return request({
url: '/quot/quot/quotFileList', url: '/quot/quot/quotFileList',
method: 'get', method: 'get',
data: data params: query
}) })
} }
@ -61,3 +61,12 @@ export function quotFileDelete(fileId) {
}) })
} }
//提交报价信息
export function commitQuot(data) {
return request({
url: '/quot/quot/commitQuot',
method: 'post',
data: data
})
}

View File

@ -90,3 +90,11 @@
.el-submenu__icon-arrow { .el-submenu__icon-arrow {
display: none; display: none;
} }
/*el-textarea设置*/
.el-textarea__inner::placeholder {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
.el-textarea__inner {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

View File

@ -92,13 +92,19 @@
<el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/> <el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/>
<el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px"> <el-table-column fixed label="报价单号" align="center" prop="quotCode" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link v-hasPermi="['quot:quot:edit']" :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.quotCode}}</el-link> <el-link :underline="false" type="primary" @click="handleUpdate(scope.row)">{{scope.row.quotCode}}</el-link>
</template>
</el-table-column>
<el-table-column fixed label="提交状态" align="center" prop="quotApprovalStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_approval_status" :value="scope.row.quotApprovalStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/> <el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/> <el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column label="询价日期" align="center" prop="quotInquiryDate" width="150px"/>
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/> <el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="询价日期" align="center" prop="quotInquiryDate" width="150px"/>
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/>
<el-table-column label="创建人" align="center" prop="createName" width="150px"/> <el-table-column label="创建人" align="center" prop="createName" width="150px"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="160"> <el-table-column label="创建时间" align="center" prop="createTime" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
@ -106,11 +112,6 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" /> <el-table-column label="审核人" align="center" prop="quotCheckUserNickname" />
<el-table-column label="提交状态" align="center" prop="quotApprovalStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_approval_status" :value="scope.row.quotApprovalStatus"/>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -124,7 +125,7 @@
<!-- 添加或修改报价对话框 --> <!-- 添加或修改报价对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1050px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1050px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs v-model="activeName" style="margin-left: 15px; margin-right: 15px;"> <el-tabs v-model="activeName" tab-position="left" style="margin-left: 15px; margin-right: 15px;height: 380px;">
<el-tab-pane label="报价信息" name="quotInfo"> <el-tab-pane label="报价信息" name="quotInfo">
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="8"> <el-col :span="8">
@ -150,20 +151,20 @@
<el-form-item label="客户" prop="quotCustomerName"> <el-form-item label="客户" prop="quotCustomerName">
<el-input v-model="form.quotCustomerBm" v-if="false"/> <el-input v-model="form.quotCustomerBm" v-if="false"/>
<el-input v-model="form.quotCustomerName" placeholder="请输入客户" :disabled="true"> <el-input v-model="form.quotCustomerName" placeholder="请输入客户" :disabled="true">
<el-button slot="append" icon="el-icon-search" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null"></el-button> <div v-hasPermi="['quot:quot:add']"><el-button slot="append" icon="el-icon-search" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"></el-button></div>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="联系电话" prop="quotPhone"> <el-form-item label="联系电话" prop="quotPhone">
<el-input v-model="form.quotPhone" placeholder="请输入联系电话" /> <el-input v-model="form.quotPhone" placeholder="请输入联系电话" :disabled="this.form.quotApprovalStatus != '0'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="地址" prop="quotAddress"> <el-form-item label="地址" prop="quotAddress">
<el-input v-model="form.quotAddress" placeholder="请输入地址" /> <el-input v-model="form.quotAddress" placeholder="请输入地址" :disabled="this.form.quotApprovalStatus != '0'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -175,7 +176,7 @@
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="16"> <el-col :span="16">
<el-form-item label="项目名称" prop="quotProject"> <el-form-item label="项目名称" prop="quotProject">
<el-input type="textarea" autosize v-model="form.quotProject" placeholder="请输入项目名称" /> <el-input type="textarea" autosize v-model="form.quotProject" placeholder="请输入项目名称" :disabled="this.form.quotApprovalStatus != '0'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -187,7 +188,7 @@
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="报价要求" prop="quotQuotationRequire"> <el-form-item label="报价要求" prop="quotQuotationRequire">
<el-input type="textarea" autosize v-model="form.quotQuotationRequire" placeholder="请输入报价要求" /> <el-input type="textarea" autosize v-model="form.quotQuotationRequire" placeholder="请输入报价要求" :disabled="this.form.quotApprovalStatus != '0'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -202,10 +203,10 @@
<el-tab-pane label="产品" name="matInfo"> <el-tab-pane label="产品" name="matInfo">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null">添加</el-button> <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">添加</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null">删除</el-button> <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="quotMaterialList" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial" height="300px"> <el-table :data="quotMaterialList" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial" height="300px">
@ -239,6 +240,7 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="询价附件" name="quotXjFile"> <el-tab-pane label="询价附件" name="quotXjFile">
<div v-hasPermi="['quot:quot:add']">
<el-upload class="upload-demo" <el-upload class="upload-demo"
ref="upload" ref="upload"
name="quotFile" name="quotFile"
@ -248,9 +250,10 @@
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="this.form.quot_approval_status == '0'"> v-if="this.form.quotApprovalStatus == '0'">
<el-button slot="trigger" size="small" type="primary">上传文件</el-button> <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
</el-upload> </el-upload>
</div>
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px"> <el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
<el-table-column prop="fileName" label="文件名称" width="500px"></el-table-column> <el-table-column prop="fileName" label="文件名称" width="500px"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
@ -260,17 +263,205 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="fileTime" label="上传时间"></el-table-column> <el-table-column prop="fileTime" label="上传时间"></el-table-column>
<el-table-column width="150px" label="操作"> <el-table-column width="150px" label="操作" v-hasPermi="['quot:quot:add']" v-if="form.quotApprovalStatus == '0'">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" type="text"> <el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a> <a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button> </el-button>
<el-button size="small" type="text" @click="deleteFile(scope.row.fileId)">删除</el-button> <el-button :key="Math.random()" size="small" type="text">
<a @click="deleteFile(scope.row.fileId)">删除</a>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="反馈附件" name="quotFkFile"> <el-tab-pane label="技术协助" name="quotJsInfo" style="width:98%" v-if="checkPermi(['quot:quot:assist'])">
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="标准" prop="quotJsxzStandard">
<el-input v-model="form.quotJsxzStandard" placeholder="请输入标准"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="技术协助状态" prop="quotJsxzApprovalStatus">
<el-select v-model="form.quotJsxzApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否盖技术章" prop="quotJsxzChapter">
<el-select v-model="form.quotJsxzChapter">
<el-option
v-for="dict in dict.type.quot_jsxz_chapter"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="16">
<el-form-item label="技术规范要求" prop="quotJsxzStandard">
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="技术确认单号" prop="quotJsxzConfirmCode">
<el-input v-model="form.quotJsxzConfirmCode" placeholder="系统自动生成" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="技术要求" prop="quotJsxzTechnicalRequirement">
<el-input v-model="form.quotJsxzTechnicalRequirement" placeholder="请输入技术要求"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="分组" prop="quotJsxzGroup">
<el-select v-model="form.quotJsxzGroup" multiple placeholder="请选择" style="width: 100%">
<el-option
v-for="dict in dict.type.quot_jsxz_group"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">特缆协助</el-divider>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="特缆协助状态" prop="quotJsxzTlApprovalStatus">
<el-select v-model="form.quotJsxzTlApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="特缆反馈附件" prop="quotJsxzTlApprovalStatus">
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="特缆协助说明" prop="quotJsxzTlRemark">
<el-input type="textarea" autosize v-model="form.quotJsxzTlRemark" placeholder="技术部填写" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">低压协助</el-divider>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="低压协助状态" prop="quotJsxzDyApprovalStatus">
<el-select v-model="form.quotJsxzDyApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="低压反馈附件" prop="quotJsxzDyApprovalStatus">
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="低压协助说明" prop="quotJsxzDyRemark">
<el-input type="textarea" autosize v-model="form.quotJsxzDyRemark" placeholder="技术部填写" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">中压协助</el-divider>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="中压协助状态" prop="quotJsxzZyApprovalStatus">
<el-select v-model="form.quotJsxzZyApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="中压反馈附件" prop="quotJsxzZyApprovalStatus">
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="中压协助说明" prop="quotJsxzZyRemark">
<el-input type="textarea" autosize v-model="form.quotJsxzZyRemark" placeholder="技术部填写" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">其他协助</el-divider>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="其他协助状态" prop="quotJsxzQtApprovalStatus">
<el-select v-model="form.quotJsxzQtApprovalStatus" :disabled="true">
<el-option
v-for="dict in dict.type.quot_approval_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="其他反馈附件" prop="quotJsxzQtApprovalStatus">
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="其他协助说明" prop="quotJsxzQtRemark">
<el-input type="textarea" autosize v-model="form.quotJsxzQtRemark" placeholder="技术部填写" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="反馈附件" name="quotFkFile" v-if="checkPermi(['quot:quot:assist','quot:quot:add'])">
<el-upload class="upload-demo"
ref="upload"
name="quotFile"
:action="uploadUrl"
:headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }"
:on-success="handleAvatarSuccess"
:show-file-list="false"
:limit="1"
v-if="this.form.quotApprovalStatus == '1'">
<el-button slot="trigger" size="small" type="primary">上传文件</el-button>
</el-upload>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px"> <el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 20px;" height="300px">
<el-table-column prop="fileName" label="文件名称" width="500px"></el-table-column> <el-table-column prop="fileName" label="文件名称" width="500px"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
@ -292,9 +483,10 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" v-if="this.form.quot_approval_status == '0' || this.form.quot_approval_status == null"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <div v-hasPermi="['quot:quot:save']"><el-button @click="saveForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></div>
<el-button @click="cancel"> </el-button> <div v-hasPermi="['quot:quot:commit']"><el-button type="primary" plain @click="commitForm" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null"> </el-button></div>
<div v-hasPermi="['quot:quot:assist']"><el-button type="warning" plain @click="commitJsForm" v-if="this.form.quotApprovalStatus == '1'">提交技术协助</el-button></div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -307,24 +499,23 @@
font-size: 14px; font-size: 14px;
word-break: break-all; word-break: break-all;
overflow-y: auto; /* 自动显示垂直滚动条 */ overflow-y: auto; /* 自动显示垂直滚动条 */
height: 400px;
max-height: 580px; /* 设置最大高度,根据需要调整 */ max-height: 580px; /* 设置最大高度,根据需要调整 */
} }
/*Tab页设置*/
/*el-textarea设置*/ .el-tabs__content {
.el-textarea__inner::placeholder { height: 100%;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; overflow-y: auto;
} }
.el-textarea__inner {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
</style> </style>
<script> <script>
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete } from "@/api/quot/quot"; import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot } from "@/api/quot/quot";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { checkPermi } from '@/utils/permission' //
export default { export default {
name: "Quot", name: "Quot",
dicts: ['quot_approval_status'], dicts: ['quot_approval_status','quot_jsxz_group','quot_jsxz_chapter'],
data() { data() {
return { return {
// //
@ -352,15 +543,10 @@ export default {
quotXjFileList: [], quotXjFileList: [],
// - // -
quotFkFileList: [], quotFkFileList: [],
// //-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile", uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
headers: { //-
Authorization: "Bearer " + getToken() headers: {Authorization: "Bearer " + getToken()},
},
//
uploadObjs: {
quot_id:""
},
// //
title: "", title: "",
// //
@ -406,11 +592,6 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//
cancel() {
this.open = false;
this.reset();
},
// //
reset() { reset() {
this.form = { this.form = {
@ -438,7 +619,13 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null,
quotJsxzStandard: null,
quotJsxzApprovalStatus: null,
quotJsxzChapter: null,
quotJsxzTechnicalRequirement: null,
quotJsxzGroup: null
}; };
this.quotMaterialList = []; this.quotMaterialList = [];
this.quotXjFileList = []; this.quotXjFileList = [];
@ -481,6 +668,7 @@ export default {
const quotId = row.quotId || this.ids const quotId = row.quotId || this.ids
getQuot(quotId).then(response => { getQuot(quotId).then(response => {
this.form = response.data; this.form = response.data;
this.$set(this.form, "quotJsxzGroup", this.form.quotJsxzGroup.split(','));
this.quotMaterialList = response.data.quotMaterialList; this.quotMaterialList = response.data.quotMaterialList;
this.open = true; this.open = true;
this.title = "修改报价"; this.title = "修改报价";
@ -490,10 +678,21 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 保存按钮 */
submitForm() { saveForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup.length>0){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
}
quotJsxzGroups+=item;
})
}
this.form.quotJsxzGroup = quotJsxzGroups;
this.form.quotMaterialList = this.quotMaterialList; this.form.quotMaterialList = this.quotMaterialList;
if (this.form.quotId != null) { if (this.form.quotId != null) {
updateQuot(this.form).then(response => { updateQuot(this.form).then(response => {
@ -511,6 +710,57 @@ export default {
} }
}); });
}, },
/** 提交报价组按钮 */
commitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup.length>0){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
}
quotJsxzGroups+=item;
})
}
this.form.quotJsxzGroup = quotJsxzGroups;
this.form.quotMaterialList = this.quotMaterialList;
commitQuot(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
}
});
},
/** 报价组权限控制 */
checkPermi,
/** 报价组提交技术协助按钮 */
commitJsForm() {
this.$refs["form"].validate(valid => {
if (valid) {
//-
let quotJsxzGroups = '';
if(this.form.quotJsxzGroup.length>0){
this.form.quotJsxzGroup.forEach(function (item,index) {
if(index !== 0){
quotJsxzGroups+=',';
}
quotJsxzGroups+=item;
})
}
this.form.quotJsxzGroup = quotJsxzGroups;
this.form.quotMaterialList = this.quotMaterialList;
commitQuot(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const quotIds = row.quotId || this.ids; const quotIds = row.quotId || this.ids;
@ -561,14 +811,14 @@ export default {
/*********************************附件上传*****************************************/ /*********************************附件上传*****************************************/
//- //-
getQuotXjFileList(){ getQuotXjFileList(){
const param = {relation_id:this.form.quotId,file_type:'quotXjFile'} const param = {relationId:this.form.quotId,fileType:'quotXjFile'}
quotFileList(param).then(response => { quotFileList(param).then(response => {
this.quotXjFileList = response.rows; this.quotXjFileList = response.rows;
}); });
}, },
//- //-
getQuotFkFileList(){ getQuotFkFileList(){
const param = {relation_id:this.form.quotId,file_type:'quotFkFile'} const param = {relationId:this.form.quotId,fileType:'quotFkFile'}
quotFileList(param).then(response => { quotFileList(param).then(response => {
this.quotFkFileList = response.rows; this.quotFkFileList = response.rows;
}); });
@ -576,12 +826,13 @@ export default {
// //
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
debugger
// //
if (res.code == 200) { if (res.code == 200) {
this.$modal.msgSuccess(res.msg); this.$modal.msgSuccess(res.msg);
this.getQuotXjFileList(); this.getQuotXjFileList();
} else { } else {
this.$message.msgError(res.msg); this.$modal.msgError(res.msg);
} }
this.$refs.upload.clearFiles(); //**** this.$refs.upload.clearFiles(); //****
}, },
@ -597,6 +848,7 @@ export default {
this.getQuotXjFileList(); this.getQuotXjFileList();
}); });
} }
/*********************************附件上传*****************************************/
} }
}; };
</script> </script>