This commit is contained in:
xd 2024-05-21 14:32:51 +08:00
parent 172aa3ec5e
commit 7dc1605bee
4 changed files with 131 additions and 8 deletions

View File

@ -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);
}
/**
* 新增报价
*/

View File

@ -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;
/** */

View File

@ -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(() => {});
},
//

View File

@ -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>仅允许导入xlsxlsx格式文件</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 => {