'123'
This commit is contained in:
parent
172aa3ec5e
commit
7dc1605bee
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.constant.WebsocketConst;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
@ -14,6 +15,7 @@ import com.ruoyi.customer.domain.Customer;
|
|||
import com.ruoyi.priceVerification.domain.QuotHj;
|
||||
import com.ruoyi.priceVerification.service.IQuotHjService;
|
||||
import com.ruoyi.quot.domain.QuotFile;
|
||||
import com.ruoyi.quot.domain.QuotMaterial;
|
||||
import com.ruoyi.quot.service.IQuotFileService;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
import com.ruoyi.technicalConfirm.domain.QuotJsqr;
|
||||
|
@ -94,6 +96,32 @@ public class QuotController extends BaseController
|
|||
return success(quotService.selectQuotByQuotId(quotId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品明细模板
|
||||
* @param response
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
ExcelUtil<QuotMaterial> util = new ExcelUtil<QuotMaterial>(QuotMaterial.class);
|
||||
util.importTemplateExcel(response, "产品数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入产品明细
|
||||
* @param file
|
||||
* @param updateSupport
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
ExcelUtil<QuotMaterial> util = new ExcelUtil<QuotMaterial>(QuotMaterial.class);
|
||||
List<QuotMaterial> userList = util.importExcel(file.getInputStream());
|
||||
return success(userList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报价
|
||||
*/
|
||||
|
|
|
@ -4,7 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
|||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel.Type;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
|
@ -21,18 +21,23 @@ public class QuotMaterial extends BaseEntity
|
|||
private String matId;
|
||||
|
||||
/** 型号 */
|
||||
@Excel(name = "型号")
|
||||
private String matXingh;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String matGuig;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private String matDiany;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String matDanw;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal matSl;
|
||||
|
||||
/** */
|
||||
|
|
|
@ -96,10 +96,14 @@
|
|||
let noticeEventType = this.noticeEventType;
|
||||
data.noticeEventType = noticeEventType;
|
||||
data.userName = item.userName;
|
||||
|
||||
this.$modal.confirm('是否确认删除该发送对象:'+item.nickName+'?').then(function() {
|
||||
}).then(() => {
|
||||
delNoticeEventUser(data).then(response => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.selectEvent(noticeEventType)
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
//打开选人弹窗
|
||||
|
|
|
@ -144,7 +144,10 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改报价对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1050px" append-to-body>
|
||||
<el-dialog :visible.sync="open" width="1050px" append-to-body>
|
||||
<template slot="title">
|
||||
报价单信息(<span style="color:red">注:此报价单数据,型号规格电压等如需下单或签订合同引用,请再次自行核对,责任自负</span>)
|
||||
</template>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-tabs v-model="activeName" tab-position="left" style="margin-left: 15px; margin-right: 15px;height: 480px;">
|
||||
<el-tab-pane label="报价信息" name="quotInfo">
|
||||
|
@ -236,6 +239,18 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="8" v-if="this.form.quotApprovalStatus != '0' && this.form.quotApprovalStatus != null">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总数量" prop="quotQuantity">
|
||||
<el-input v-model="form.quotQuantity"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总价" prop="quotTotalPrice">
|
||||
<el-input v-model="form.quotTotalPrice"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="产品" name="matInfo">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
@ -245,6 +260,9 @@
|
|||
<el-col :span="1.5">
|
||||
<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 :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-col>
|
||||
</el-row>
|
||||
<el-table :data="quotMaterialList" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
||||
<el-table-column type="selection" width="80" align="center" />
|
||||
|
@ -689,6 +707,33 @@
|
|||
|
||||
<!-- 核价单详情对话框 -->
|
||||
<hjDialog ref="hjDialog"></hjDialog>
|
||||
|
||||
<!-- 产品导入对话框 -->
|
||||
<el-dialog :title="productUpload.title" :visible.sync="productUpload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="productUpload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="productUpload.headers"
|
||||
:action="productUpload.url"
|
||||
:disabled="productUpload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="productUpload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
|
@ -768,6 +813,21 @@ export default {
|
|||
quotList: [],
|
||||
// 报价单-产品表格数据
|
||||
quotMaterialList: [],
|
||||
// 产品表格数据导入参数
|
||||
productUpload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/quot/quot/importData"
|
||||
},
|
||||
|
||||
|
||||
// 报价单-询价附件列表数据
|
||||
quotXjFileList: [],
|
||||
// 报价单-反馈附件列表数据
|
||||
|
@ -941,7 +1001,6 @@ export default {
|
|||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "报价信息";
|
||||
this.activeName = "quotInfo";
|
||||
this.form.quotSalesmanName = this.$store.state.user.sapUserName;
|
||||
this.form.quotSalesmanBm = this.$store.state.user.sapBm;
|
||||
|
@ -957,7 +1016,6 @@ export default {
|
|||
this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
|
||||
this.quotMaterialList = response.data.quotMaterialList;
|
||||
this.open = true;
|
||||
this.title = "报价信息";
|
||||
this.activeName = "quotInfo";
|
||||
|
||||
var quotJsxzGroup = this.form.quotJsxzGroupValues;
|
||||
|
@ -985,6 +1043,34 @@ export default {
|
|||
this.getQuotFkFileList();
|
||||
});
|
||||
},
|
||||
|
||||
/** 产品数据导入按钮操作 */
|
||||
handleImport() {
|
||||
this.productUpload.title = "产品数据导入";
|
||||
this.productUpload.open = true;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download('quot/quot/importTemplate', {
|
||||
}, `product_template_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.productUpload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.productUpload.open = false;
|
||||
this.productUpload.isUploading = false;
|
||||
this.$refs.productUpload.clearFiles();
|
||||
this.$message.warning("产品数据导入成功!");
|
||||
this.quotMaterialList = this.quotMaterialList.concat(response.data)
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.productUpload.submit();
|
||||
},
|
||||
|
||||
/** 保存按钮 */
|
||||
saveForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
|
Loading…
Reference in New Issue