This commit is contained in:
xd 2024-06-13 17:06:27 +08:00
parent 748302fcde
commit 359e00003f
12 changed files with 264 additions and 84 deletions

View File

@ -1,5 +1,5 @@
#for tests only ! #for tests only !
#Wed Jun 12 17:04:18 CST 2024 #Thu Jun 13 17:04:23 CST 2024
jco.destination.pool_capacity=10 jco.destination.pool_capacity=10
jco.client.lang=ZH jco.client.lang=ZH
jco.client.ashost=172.19.0.120 jco.client.ashost=172.19.0.120
@ -7,5 +7,5 @@ jco.client.saprouter=
jco.client.user=RFC jco.client.user=RFC
jco.client.sysnr=00 jco.client.sysnr=00
jco.destination.peak_limit=10 jco.destination.peak_limit=10
jco.client.passwd=gR+@VS{@vcSt}PE/DW_]@6@mm8UiFKt|ELFuvqDg@R+lSEZZ jco.client.passwd=654321
jco.client.client=300 jco.client.client=300

View File

@ -163,7 +163,9 @@ public class CustomerController extends BaseController
public AjaxResult add(@RequestBody Customer customer) public AjaxResult add(@RequestBody Customer customer)
{ {
customer.setCusId(UUID.fastUUID().toString()); customer.setCusId(UUID.fastUUID().toString());
customer.setCusCode(IdUtils.createNo("KH_",0)); //customer.setCusCode(IdUtils.createNo("KH_",0));
String cusCode = customerService.getCode("KH");
customer.setCusCode(cusCode);
customer.setCreateBy(getUsername()); customer.setCreateBy(getUsername());
return toAjax(customerService.insertCustomer(customer)); return toAjax(customerService.insertCustomer(customer));
} }
@ -199,7 +201,9 @@ public class CustomerController extends BaseController
if(StringUtils.isEmpty(cus_id)){ if(StringUtils.isEmpty(cus_id)){
customer.setCusId(UUID.fastUUID().toString()); customer.setCusId(UUID.fastUUID().toString());
customer.setCusCode(IdUtils.createNo("KH_",0)); //customer.setCusCode(IdUtils.createNo("KH_",0));
String cusCode = customerService.getCode("KH");
customer.setCusCode(cusCode);
customer.setCreateBy(getUsername()); customer.setCreateBy(getUsername());
customerService.insertCustomer(customer); customerService.insertCustomer(customer);
sendNotice(customer);//发送消息至数据组 sendNotice(customer);//发送消息至数据组
@ -247,7 +251,9 @@ public class CustomerController extends BaseController
customer.setUpdateBy(getUsername()); customer.setUpdateBy(getUsername());
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核 customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
}else{// 数据组创建的客户数据提交SAP }else{// 数据组创建的客户数据提交SAP
customer.setCusCode(IdUtils.createNo("KH_",0)); //customer.setCusCode(IdUtils.createNo("KH_",0));
String cusCode = customerService.getCode("KH");
customer.setCusCode(cusCode);
customer.setCreateBy(getUsername()); customer.setCreateBy(getUsername());
customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核 customer.setCusApprovalStatus("2");//客户提交 状态设置为 已审核
} }

View File

@ -99,6 +99,18 @@ public class QuotController extends BaseController
util.exportExcel(response, list, "报价数据"); util.exportExcel(response, list, "报价数据");
} }
/**
* 导出报价明细列表
*/
@PostMapping("/exportMaterial")
public void exportMaterial(HttpServletResponse response, Quot quot)
{
Quot q = quotService.selectQuotByQuotId(quot.getQuotId());
List<QuotMaterial> list = q.getQuotMaterialList();
ExcelUtil<QuotMaterial> util = new ExcelUtil<QuotMaterial>(QuotMaterial.class);
util.exportExcel(response, list, "报价明细数据");
}
/** /**
* 报价单打印状态修改 * 报价单打印状态修改
*/ */
@ -184,7 +196,7 @@ public class QuotController extends BaseController
String quotCode = quotService.getCode("BJD"); String quotCode = quotService.getCode("BJD");
quot.setQuotCode(quotCode); quot.setQuotCode(quotCode);
quot.setCreateBy(getUsername()); quot.setCreateBy(getUsername());
quot.setQuotSalesmanCode(getUsername()); //quot.setQuotSalesmanCode(getUsername());
quot.setUpdateBy(getUsername()); quot.setUpdateBy(getUsername());
quotService.insertQuot(quot); quotService.insertQuot(quot);
return success(quot); return success(quot);
@ -343,7 +355,7 @@ public class QuotController extends BaseController
String quotCode = quotService.getCode("BJD"); String quotCode = quotService.getCode("BJD");
quot.setQuotCode(quotCode); quot.setQuotCode(quotCode);
quot.setCreateBy(getUsername()); quot.setCreateBy(getUsername());
quot.setQuotSalesmanCode(getUsername()); //quot.setQuotSalesmanCode(getUsername());
quotService.insertQuot(quot); quotService.insertQuot(quot);
sendNoticeToBjz(quot); sendNoticeToBjz(quot);
return success(); return success();

View File

@ -265,29 +265,30 @@ public class excelUtil {
wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false); wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false);
wff_merge = new WritableCellFormat(wf_merge); wff_merge = new WritableCellFormat(wf_merge);
wff_merge.setAlignment(Alignment.LEFT); wff_merge.setAlignment(Alignment.LEFT);
wff_merge.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
wff_merge.setBorder(Border.RIGHT, BorderLineStyle.THIN); wff_merge.setBorder(Border.RIGHT, BorderLineStyle.THIN);
label = new Label(1, i, "3、分支电缆为多芯分支价格不包其它附件不含安装费数量以供方实际测量为准",wff_merge); label = new Label(1, i, "3、分支电缆为多芯分支价格不包其它附件不含安装费数量以供方实际测量为准",wff_merge);
wsheet.addCell(label); wsheet.addCell(label);
/*i++;
i++;
wsheet.setRowView(i,390); wsheet.setRowView(i,390);
wsheet.mergeCells(1,i,7,i);
wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false); wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false);
wff_merge = new WritableCellFormat(wf_merge); wff_merge = new WritableCellFormat(wf_merge);
wff_merge.setAlignment(jxl.format.Alignment.LEFT); wff_merge.setAlignment(Alignment.LEFT);
wff_merge.setBorder(jxl.format.Border.BOTTOM,jxl.format.BorderLineStyle.THIN); wff_merge.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
wff_merge.setBorder(jxl.format.Border.RIGHT,jxl.format.BorderLineStyle.THIN); wff_merge.setBorder(Border.RIGHT, BorderLineStyle.THIN);
wsheet.mergeCells(1,i,7,i); label = new Label(1, i, "4、低厂价预付30%,款清发货;",wff_merge);
// label = new Label(1, i, "4、产品交货总数和单根交货长度允许有±1%公差,如有不符对方要求,需重制作报价单。",wff_merge); wsheet.addCell(label);
wsheet.addCell(label);*/
wsheet.mergeCells(0,i-3,0,i); wsheet.mergeCells(0,i-4,0,i);
wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false); wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false);
wff_merge = new WritableCellFormat(wf_merge); wff_merge = new WritableCellFormat(wf_merge);
wff_merge.setAlignment(Alignment.CENTRE); wff_merge.setAlignment(Alignment.CENTRE);
wff_merge.setVerticalAlignment(VerticalAlignment.CENTRE); wff_merge.setVerticalAlignment(VerticalAlignment.CENTRE);
wff_merge.setBorder(Border.ALL, BorderLineStyle.THIN); wff_merge.setBorder(Border.ALL, BorderLineStyle.THIN);
label = new Label(0, i-3, "备注",wff_merge); label = new Label(0, i-4, "备注",wff_merge);
wsheet.addCell(label); wsheet.addCell(label);
InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream(); InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream();
@ -580,29 +581,30 @@ public class excelUtil {
wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false); wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false);
wff_merge = new WritableCellFormat(wf_merge); wff_merge = new WritableCellFormat(wf_merge);
wff_merge.setAlignment(Alignment.LEFT); wff_merge.setAlignment(Alignment.LEFT);
wff_merge.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
wff_merge.setBorder(Border.RIGHT, BorderLineStyle.THIN); wff_merge.setBorder(Border.RIGHT, BorderLineStyle.THIN);
label = new Label(1, i, "3、分支电缆为多芯分支价格不包其它附件不含安装费数量以供方实际测量为准",wff_merge); label = new Label(1, i, "3、分支电缆为多芯分支价格不包其它附件不含安装费数量以供方实际测量为准",wff_merge);
wsheet.addCell(label); wsheet.addCell(label);
/*i++;
i++;
wsheet.setRowView(i,390); wsheet.setRowView(i,390);
wsheet.mergeCells(1,i,7,i);
wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false); wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false);
wff_merge = new WritableCellFormat(wf_merge); wff_merge = new WritableCellFormat(wf_merge);
wff_merge.setAlignment(jxl.format.Alignment.LEFT); wff_merge.setAlignment(Alignment.LEFT);
wff_merge.setBorder(jxl.format.Border.BOTTOM,jxl.format.BorderLineStyle.THIN); wff_merge.setBorder(Border.BOTTOM, BorderLineStyle.THIN);
wff_merge.setBorder(jxl.format.Border.RIGHT,jxl.format.BorderLineStyle.THIN); wff_merge.setBorder(Border.RIGHT, BorderLineStyle.THIN);
wsheet.mergeCells(1,i,7,i); label = new Label(1, i, "4、低厂价预付30%,款清发货;",wff_merge);
// label = new Label(1, i, "4、产品交货总数和单根交货长度允许有±1%公差,如有不符对方要求,需重制作报价单。",wff_merge); wsheet.addCell(label);
wsheet.addCell(label);*/
wsheet.mergeCells(0,i-3,0,i); wsheet.mergeCells(0,i-4,0,i);
wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false); wf_merge = new WritableFont(WritableFont.ARIAL,11,WritableFont.NO_BOLD,false);
wff_merge = new WritableCellFormat(wf_merge); wff_merge = new WritableCellFormat(wf_merge);
wff_merge.setAlignment(Alignment.CENTRE); wff_merge.setAlignment(Alignment.CENTRE);
wff_merge.setVerticalAlignment(VerticalAlignment.CENTRE); wff_merge.setVerticalAlignment(VerticalAlignment.CENTRE);
wff_merge.setBorder(Border.ALL, BorderLineStyle.THIN); wff_merge.setBorder(Border.ALL, BorderLineStyle.THIN);
label = new Label(0, i-3, "备注",wff_merge); label = new Label(0, i-4, "备注",wff_merge);
wsheet.addCell(label); wsheet.addCell(label);
InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream(); InputStream fileInputStream = new ClassPathResource("/jnlogo.png").getInputStream();

View File

@ -84,4 +84,11 @@ public interface CustomerMapper
* @return 结果 * @return 结果
*/ */
public int deleteBankByCusId(String cusId); public int deleteBankByCusId(String cusId);
/**
* 获取单据编号
* @param type
* @return
*/
String getCode(String type);
} }

View File

@ -65,4 +65,11 @@ public interface ICustomerService
* @return * @return
*/ */
int changCusStatus(Customer customer); int changCusStatus(Customer customer);
/**
* 获取单据编号
* @param type
* @return
*/
String getCode(String type);
} }

View File

@ -122,6 +122,16 @@ public class CustomerServiceImpl implements ICustomerService
return customerMapper.updateCustomer(customer); return customerMapper.updateCustomer(customer);
} }
/**
* 获取单据编号
* @param type
* @return
*/
@Override
public String getCode(String type) {
return customerMapper.getCode(type);
}
/** /**
* 新增银行信息 * 新增银行信息
* *

View File

@ -257,4 +257,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
( #{item.bankId}, #{item.bankName}, #{item.bankAccount}, #{item.cusId}, #{item.bankCode}, #{item.bankCountry}) ( #{item.bankId}, #{item.bankName}, #{item.bankAccount}, #{item.cusId}, #{item.bankCode}, #{item.bankCountry})
</foreach> </foreach>
</insert> </insert>
<select id="getCode" resultType="String" statementType="CALLABLE">
{call GetSerialNo(#{type,mode=IN,jdbcType=VARCHAR})}
</select>
</mapper> </mapper>

View File

@ -126,6 +126,28 @@
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-divider content-position="center">技术附件</el-divider>
<el-table class="down" :data="quotJsgfFileList" border stripe style="width: 100%;" height="200px">
<el-table-column prop="fileName" label="文件名称" width="450px"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="100px">
<template slot-scope="scope">
<span v-if="scope.row.fileSize / 1024 / 1024 < 1">{{(scope.row.fileSize / 1024).toFixed(2) + 'KB'}}</span>
<span v-else>{{(scope.row.fileSize / 1024 / 1024).toFixed(2) + 'MB'}}</span>
</template>
</el-table-column>
<el-table-column prop="fileTime" label="上传时间"></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button :key="Math.random()" size="small" type="text">
<a @click="downloadFile(scope.row.fileUrl)">下载</a>
</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="24"> <el-col :span="24">
<el-divider content-position="center">核价附件</el-divider> <el-divider content-position="center">核价附件</el-divider>
@ -136,6 +158,7 @@
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotHjId,file_type: 'quotHjFile' }" :data="{ relation_id: this.form.quotHjId,file_type: 'quotHjFile' }"
:before-upload="beforeAvatarUpload"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
@ -147,7 +170,7 @@
</el-row> </el-row>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="24"> <el-col :span="24">
<el-table class="down" :data="quotHjFileList" border stripe style="width: 100%;" height="200px"> <el-table class="down" v-loading="quotHjFileLoading" :data="quotHjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称"></el-table-column> <el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -377,7 +400,10 @@ export default {
quotMaterialList: [], quotMaterialList: [],
// - // -
quotXjFileList: [], quotXjFileList: [],
// -
quotJsgfFileList: [],
// - // -
quotHjFileLoading: false,
quotHjFileList: [], quotHjFileList: [],
//- //-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile", uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
@ -422,6 +448,7 @@ export default {
}; };
this.quotMaterialList = []; this.quotMaterialList = [];
this.quotXjFileList = []; this.quotXjFileList = [];
this.quotJsgfFileList = [];
this.quotHjFileList = []; this.quotHjFileList = [];
this.showTl = false; this.showTl = false;
@ -452,6 +479,7 @@ export default {
this.open = true; this.open = true;
this.title = "核价单信息"; this.title = "核价单信息";
this.getQuotXjFileList(); this.getQuotXjFileList();
this.getQuotJsgfFileList();
this.getQuotHjFileList(); this.getQuotHjFileList();
const quotJsxzGroup = this.form.quotJsxzGroupValues; const quotJsxzGroup = this.form.quotJsxzGroupValues;
@ -549,6 +577,13 @@ export default {
this.quotXjFileList = response.rows; this.quotXjFileList = response.rows;
}); });
}, },
//-
getQuotJsgfFileList(){
const param = {relationId:this.form.quotId,fileType:'quotJsgfFile'}
quotFileList(param).then(response => {
this.quotJsgfFileList = response.rows;
});
},
//- //-
getQuotHjFileList(){ getQuotHjFileList(){
const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'} const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'}
@ -556,7 +591,10 @@ export default {
this.quotHjFileList = response.rows; this.quotHjFileList = response.rows;
}); });
}, },
//
beforeAvatarUpload(file){
this.quotHjFileLoading = true;
},
// //
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
// //
@ -566,6 +604,7 @@ export default {
} else { } else {
this.$modal.msgError(res.msg); this.$modal.msgError(res.msg);
} }
this.quotHjFileLoading = false;
this.$refs.upload.clearFiles(); //**** this.$refs.upload.clearFiles(); //****
}, },
@ -577,8 +616,10 @@ export default {
// //
deleteFile(fileId){ deleteFile(fileId){
let activeName = this.activeName; let activeName = this.activeName;
this.quotHjFileLoading = true;
quotFileDelete(fileId).then(response => { quotFileDelete(fileId).then(response => {
this.getQuotHjFileList(); this.getQuotHjFileList();
this.quotHjFileLoading = false;
}); });
}, },

View File

@ -132,6 +132,26 @@
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/> <el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/> <el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/> <el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="金思维提交状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="OA提交状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="技术协助状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsxzApprovalStatus" v-if="scope.row.quotJsxzApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="核价协助状态" align="center" prop="quotHjApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_hj_approval_status" :value="scope.row.quotHjApprovalStatus" v-if="scope.row.quotHjApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="金思维报价单号" align="center" prop="quotJswCode" width="280px" v-if="checkRole(['QUOT'])"/> <el-table-column label="金思维报价单号" align="center" prop="quotJswCode" width="280px" v-if="checkRole(['QUOT'])"/>
<el-table-column label="是否打印" align="center" prop="quotPrint" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"> <el-table-column label="是否打印" align="center" prop="quotPrint" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')">
<template slot-scope="scope"> <template slot-scope="scope">
@ -157,26 +177,6 @@
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" prop="quotQuantity" width="100"/> <el-table-column label="数量" align="center" prop="quotQuantity" width="100"/>
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/> <el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/>
<el-table-column label="金思维提交状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="OA提交状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="技术协助状态" align="center" prop="quotJsxzApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsxz_approval_status" :value="scope.row.quotJsxzApprovalStatus" v-if="scope.row.quotJsxzApprovalStatus!=0"/>
</template>
</el-table-column>
<el-table-column label="核价协助状态" align="center" prop="quotHjApprovalStatus" width="150px" v-if="checkRole(['QUOT'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_hj_approval_status" :value="scope.row.quotHjApprovalStatus" v-if="scope.row.quotHjApprovalStatus!=0"/>
</template>
</el-table-column>
<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">
@ -233,15 +233,18 @@
<el-divider content-position="left" class="customer_divider_text">报价信息</el-divider> <el-divider content-position="left" class="customer_divider_text">报价信息</el-divider>
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="10"> <el-col :span="8">
<el-form-item label="报价单号" prop="quotCode"> <el-form-item label="报价单号" prop="quotCode">
<el-input v-model="form.quotCode" placeholder="系统自动生成" :disabled="true"/> <el-input v-model="form.quotCode" placeholder="系统自动生成" :disabled="true"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="8">
<el-form-item label="业务员" prop="quotSalesmanName"> <el-form-item label="业务员" prop="quotSalesmanName">
<el-input v-model="form.quotSalesmanName" :disabled="true"/> <el-input v-model="form.quotSalesmanName" :disabled="true" style="width: 60%"/>
<el-input v-model="form.quotSalesmanBm" v-if="false"/> <el-input v-model="form.quotSalesmanBm" v-if="false"/>
<el-input v-model="form.quotSalesmanCode" v-if="false"/>
<el-button type="primary" icon="el-icon-search" style="margin-left: 10px" @click="openPeopleSelect" size="mini" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -386,6 +389,7 @@
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }" :data="{ relation_id: this.form.quotId,file_type: 'quotFkFile' }"
:before-upload="beforeAvatarUploadQuotFkFile"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
@ -393,7 +397,7 @@
<el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotFkFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px"> <el-table class="down" v-loading="quotFkFileLoading" :data="quotFkFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称"></el-table-column> <el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -423,6 +427,9 @@
<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">导入</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">导入</el-button>
</el-col> </el-col>
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleExportMaterial">导出</el-button>
</el-col>
</el-row> </el-row>
<el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial"> <el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
<el-table-column type="selection" width="80" align="center" /> <el-table-column type="selection" width="80" align="center" />
@ -497,7 +504,7 @@
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }" :data="{ relation_id: this.form.quotId,file_type: 'quotXjFile' }"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUploadQuotXjFile"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
@ -505,7 +512,7 @@
<el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotXjFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px"> <el-table class="down" v-loading="quotXjFileLoading" :data="quotXjFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column> <el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -526,7 +533,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-divider content-position="left" class="customer_divider_text">技术附件(先保存再上传)</el-divider> <el-divider content-position="left" class="customer_divider_text">技术附件(先保存再上传,如包含清单附件则不受理)</el-divider>
<div v-hasPermi="['quot:quot:quotJsgfFile']"> <div v-hasPermi="['quot:quot:quotJsgfFile']">
<el-upload class="upload-demo" <el-upload class="upload-demo"
ref="quotJsgfFileUpload" ref="quotJsgfFileUpload"
@ -534,6 +541,7 @@
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }" :data="{ relation_id: this.form.quotId,file_type: 'quotJsgfFile' }"
:before-upload="beforeAvatarUploadQuotJsgfFile"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
@ -541,7 +549,7 @@
<el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button> <el-button size="small" type="primary" @click="uploadFile('quotJsgfFile')">上传文件</el-button>
</el-upload> </el-upload>
</div> </div>
<el-table class="down" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px"> <el-table class="down" v-loading="quotJsgfFileLoading" :data="quotJsgfFileList" border stripe style="width: 100%;margin-top: 10px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column> <el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -890,6 +898,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<PeopleSelect v-if="checkRole(['QUOT','PRICE_VERIFICATION'])" ref="peopleSelect" :type="'single'" :isCheck="true" :open="peopleOpen" @cancel="peopleOpen=false" @submit="submitPeople"></PeopleSelect>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<div style="height: 25px;"> <div style="height: 25px;">
@ -998,6 +1008,8 @@ import CustomerSelect from "@/views/components/Tools/CustomerSelect/index.vue";
import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue'; import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue';
/** 导入核价单详情组件*/ /** 导入核价单详情组件*/
import hjDialog from '@/views/priceVerification/priceVerification/hjInfo.vue'; import hjDialog from '@/views/priceVerification/priceVerification/hjInfo.vue';
/** 导入选人组件 */
import PeopleSelect from "@/views/components/Tools/PeopleSelect/index.vue";
/** 弹窗放大、拖拽 */ /** 弹窗放大、拖拽 */
import elDragDialog from "@/directive/dialog/dragDialog"; import elDragDialog from "@/directive/dialog/dragDialog";
@ -1011,7 +1023,8 @@ export default {
// //
'CustomerSelect': CustomerSelect, 'CustomerSelect': CustomerSelect,
'jsqrDialog': jsqrDialog, 'jsqrDialog': jsqrDialog,
'hjDialog': hjDialog 'hjDialog': hjDialog,
'PeopleSelect': PeopleSelect
}, },
dicts: ['quot_print', 'quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status','quot_jsw_approval_status','quot_oa_approval_status'], dicts: ['quot_print', 'quot_approval_status','quot_jsxz_group','quot_jsxz_chapter','quot_jsxz_approval_status','quot_jsxz_standard','quot_hj_approval_status','quot_jsw_approval_status','quot_oa_approval_status'],
data() { data() {
@ -1052,10 +1065,13 @@ export default {
}, },
// - // -
quotXjFileLoading: false,
quotXjFileList: [], quotXjFileList: [],
// - // -
quotFkFileLoading: false,
quotFkFileList: [], quotFkFileList: [],
// - // -
quotJsgfFileLoading: false,
quotJsgfFileList: [], quotJsgfFileList: [],
//- //-
uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile", uploadUrl: process.env.VUE_APP_BASE_API + "/quot/quot/quotFile",
@ -1116,7 +1132,11 @@ export default {
showTl: false, showTl: false,
showDy: false, showDy: false,
showZy: false, showZy: false,
showQt: false showQt: false,
//
peopleOpen:false,
selectedPeoples:[]
}; };
}, },
created() { created() {
@ -1157,6 +1177,7 @@ export default {
quotCode: null, quotCode: null,
quotSalesmanName: null, quotSalesmanName: null,
quotSalesmanBm: null, quotSalesmanBm: null,
quotSalesmanCode: null,
quotSalesmanDeptName: null, quotSalesmanDeptName: null,
quotSalesmanDeptId: null, quotSalesmanDeptId: null,
quotCustomerBm: null, quotCustomerBm: null,
@ -1250,7 +1271,8 @@ export default {
this.activeName = "quotInfo"; this.activeName = "quotInfo";
this.form.quotSalesmanName = this.$store.state.user.nickName; this.form.quotSalesmanName = this.$store.state.user.nickName;
//this.form.quotSalesmanName = this.$store.state.user.sapUserName; //this.form.quotSalesmanName = this.$store.state.user.sapUserName;
//this.form.quotSalesmanBm = this.$store.state.user.sapBm; this.form.quotSalesmanBm = this.$store.state.user.sapBm;
this.form.quotSalesmanCode = this.$store.state.user.name;
this.form.quotSalesmanDeptId = this.$store.state.user.deptId; this.form.quotSalesmanDeptId = this.$store.state.user.deptId;
this.form.quotSalesmanDeptName = this.$store.state.user.deptName; this.form.quotSalesmanDeptName = this.$store.state.user.deptName;
}, },
@ -1314,6 +1336,13 @@ export default {
this.productUpload.title = "产品数据导入"; this.productUpload.title = "产品数据导入";
this.productUpload.open = true; this.productUpload.open = true;
}, },
/** 产品数据导出按钮操作 */
handleExportMaterial() {
const quot = {"quotId":this.form.quotId};
this.download('quot/quot/exportMaterial', {
...quot
}, this.form.quotCode +".xlsx")
},
/** 产品数据下载模板操作 */ /** 产品数据下载模板操作 */
importTemplate() { importTemplate() {
this.download('quot/quot/importTemplate', { this.download('quot/quot/importTemplate', {
@ -1425,7 +1454,7 @@ export default {
/** 报价组报价单提交反馈按钮 */ /** 报价组报价单提交反馈按钮 */
feedbackQuotForm() { feedbackQuotForm() {
var quotFkFileNum = this.quotFkFileList.length; const quotFkFileNum = this.quotFkFileList.length;
if(quotFkFileNum==0){ if(quotFkFileNum==0){
this.$modal.msgError("反馈附件必须上传"); this.$modal.msgError("反馈附件必须上传");
return; return;
@ -1639,19 +1668,31 @@ export default {
uploadFile(activeName){ uploadFile(activeName){
this.activeName = activeName this.activeName = activeName
}, },
// //-
beforeAvatarUpload(file) { beforeAvatarUploadQuotFkFile(file) {
this.quotFkFileLoading = true;
},
//-
beforeAvatarUploadQuotXjFile(file) {
this.quotXjFileLoading = true;
let activeName = this.activeName; let activeName = this.activeName;
if(activeName=='quotXjFile'){ if(activeName=='quotXjFile'){
if(file.name.split('.')[1].toLowerCase() != 'xls' && file.name.split('.')[1].toLowerCase() != 'xlsx'){ if(file.name.split('.')[1].toLowerCase() != 'xls' && file.name.split('.')[1].toLowerCase() != 'xlsx'){
this.$modal.msgError("清单附件必须是Excel格式"); this.$modal.msgError("清单附件必须是Excel格式");
this.quotXjFileLoading = false;
return false; return false;
} }
} }
/*const isLt2M = file.size / 1024 / 1024 < 2; // 2M },
if ( !isLt2M ) { //-
console.log('文件大小超出2M'); beforeAvatarUploadQuotJsgfFile(file){
}*/ this.quotJsgfFileLoading = true;
const maxSize = 100 * 1024 * 1024; // 100MB
if (file.size > maxSize) {
this.$modal.msgError("文件大小超过了"+maxSize / (1024 * 1024)+"MB的限制");
this.quotJsgfFileLoading = false;
return false;
}
}, },
// //
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
@ -1661,18 +1702,27 @@ export default {
this.$modal.msgSuccess(res.msg); this.$modal.msgSuccess(res.msg);
if(activeName=='quotXjFile'){ if(activeName=='quotXjFile'){
this.getQuotXjFileList(); this.getQuotXjFileList();
this.quotXjFileLoading = false;
this.$refs.quotXjFileUpload.clearFiles(); //****
}else if(activeName=='quotJsgfFile'){ }else if(activeName=='quotJsgfFile'){
this.getQuotJsgfFileList(); this.getQuotJsgfFileList();
this.quotJsgfFileLoading = false;
this.$refs.quotJsgfFileUpload.clearFiles(); //****
}else if(activeName=='quotFkFile'){ }else if(activeName=='quotFkFile'){
this.getQuotFkFileList(); this.getQuotFkFileList();
this.quotFkFileLoading = false;
this.$refs.quotFkFileUpload.clearFiles(); //****
} }
} else { } else {
this.$modal.msgError(res.msg); this.$modal.msgError(res.msg);
if(activeName=='quotXjFile'){ if(activeName=='quotXjFile'){
this.quotXjFileLoading = false;
this.$refs.quotXjFileUpload.clearFiles(); //**** this.$refs.quotXjFileUpload.clearFiles(); //****
}else if(activeName=='quotJsgfFile'){ }else if(activeName=='quotJsgfFile'){
this.quotJsgfFileLoading = false;
this.$refs.quotJsgfFileUpload.clearFiles(); //**** this.$refs.quotJsgfFileUpload.clearFiles(); //****
}else if(activeName=='quotFkFile'){ }else if(activeName=='quotFkFile'){
this.quotFkFileLoading = false;
this.$refs.quotFkFileUpload.clearFiles(); //**** this.$refs.quotFkFileUpload.clearFiles(); //****
} }
} }
@ -1685,18 +1735,39 @@ export default {
// //
deleteFile(fileId,activeName){ deleteFile(fileId,activeName){
//let activeName = this.activeName;
console.log(fileId)
console.log(activeName)
quotFileDelete(fileId).then(response => {
if(activeName=='quotXjFile'){ if(activeName=='quotXjFile'){
this.quotXjFileLoading = true;
quotFileDelete(fileId).then(response => {
this.getQuotXjFileList(); this.getQuotXjFileList();
this.quotXjFileLoading = false;
})
}else if(activeName=='quotJsgfFile'){ }else if(activeName=='quotJsgfFile'){
this.quotJsgfFileLoading = true;
quotFileDelete(fileId).then(response => {
this.getQuotJsgfFileList(); this.getQuotJsgfFileList();
this.quotJsgfFileLoading = false;
})
}else if(activeName=='quotFkFile'){ }else if(activeName=='quotFkFile'){
this.quotFkFileLoading = true;
quotFileDelete(fileId).then(response => {
this.getQuotFkFileList(); this.getQuotFkFileList();
this.quotFkFileLoading = false;
})
} }
}); },
//
openPeopleSelect(){
this.peopleOpen=true;
},
// submitPeople(nikeNamelist) submitPeople(peopleList,nikeNamelist)
submitPeople(peopleList,nickNameList){
this.selectedPeoples = this.selectedPeoples.concat(nickNameList)
this.selectedPeoples = this.unique(this.selectedPeoples)
this.form.quotSalesmanName = this.selectedPeoples[0].nickName;
this.form.quotSalesmanBm = this.selectedPeoples[0].sapUserBm;
this.form.quotSalesmanCode = this.selectedPeoples[0].userName;
this.peopleOpen=false;
}, },
/*********************************附件列表数据展示、上传*****************************************/ /*********************************附件列表数据展示、上传*****************************************/
@ -1708,7 +1779,12 @@ export default {
// //
showHjDialog(){ showHjDialog(){
this.$refs.hjDialog.getInfo("报价单-核价单",true,false,this.form.quotHjId); this.$refs.hjDialog.getInfo("报价单-核价单",true,false,this.form.quotHjId);
} },
//
unique(arr) {
const res = new Map();
return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1));
},
} }
}; };
</script> </script>

View File

@ -138,6 +138,7 @@
:value="item.value" :value="item.value"
@click.native="selectRbDate(item.value)"/> @click.native="selectRbDate(item.value)"/>
</el-select> </el-select>
<el-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -814,6 +815,11 @@
this.$refs.productUpload.submit(); this.$refs.productUpload.submit();
}, },
//
handleExport(){
this.$modal.msgWarning("功能还未开放");
},
// //
getVersionList(){ getVersionList(){
versionList(this.queryParams).then(response => { versionList(this.queryParams).then(response => {

View File

@ -714,13 +714,14 @@
:action="uploadUrl" :action="uploadUrl"
:headers="headers" :headers="headers"
:data="{ relation_id: this.form.quotJsqrId,file_type: fileType }" :data="{ relation_id: this.form.quotJsqrId,file_type: fileType }"
:before-upload="beforeAvatarUpload"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
v-if="uploadDis"> v-if="uploadDis">
<el-button size="small" type="primary">上传文件</el-button> <el-button size="small" type="primary">上传文件</el-button>
</el-upload> </el-upload>
<el-table class="down" :data="quotJsqrFileList" border stripe style="width: 100%;margin-top: 20px;" height="200px"> <el-table class="down" v-loading="quotJsqrFileLoading" :data="quotJsqrFileList" border stripe style="width: 100%;margin-top: 20px;" height="200px">
<el-table-column prop="fileName" label="文件名称" ></el-table-column> <el-table-column prop="fileName" label="文件名称" ></el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="150px"> <el-table-column prop="fileSize" label="文件大小" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -809,6 +810,7 @@
// //
uploadDis: false, uploadDis: false,
// //
quotJsqrFileLoading: false,
quotJsqrFileList: [], quotJsqrFileList: [],
quotJsqrTlFileNum: 0, quotJsqrTlFileNum: 0,
quotJsqrDyFileNum: 0, quotJsqrDyFileNum: 0,
@ -1150,8 +1152,10 @@
// //
deleteFile(fileId){ deleteFile(fileId){
this.quotJsqrFileLoading = true;
quotFileDelete(fileId).then(response => { quotFileDelete(fileId).then(response => {
this.getQuotJsqrFileList(this.fileType); this.getQuotJsqrFileList(this.fileType);
this.quotJsqrFileLoading = false;
}); });
}, },
@ -1412,6 +1416,10 @@
// //
this.getQuotJsqrFileList(this.fileType); this.getQuotJsqrFileList(this.fileType);
}, },
//
beforeAvatarUpload(file){
this.quotJsqrFileLoading = true;
},
// //
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
// //
@ -1421,6 +1429,7 @@
} else { } else {
this.$modal.msgError(res.msg); this.$modal.msgError(res.msg);
} }
this.quotJsqrFileLoading = false;
this.$refs.upload.clearFiles(); //**** this.$refs.upload.clearFiles(); //****
}, },
// //