Merge branch 'main' of http://jialcheerful.club:3000/xd/JNBusiness
This commit is contained in:
commit
2162f5ab42
|
@ -129,11 +129,24 @@ export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: () => import('@/views/mobile/quoteMobile/operation/add'),
|
component: () => import('@/views/mobile/quoteMobile/operation/add'),
|
||||||
name: 'quoteMobile',
|
name: 'quoteMobileAdd',
|
||||||
meta: { title: '新建报价单', activeMenu: '/mobile/quoteMobile/operation' }
|
meta: { title: '新建报价单', activeMenu: '/mobile/quoteMobile/operation' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/quoteMobile/edit',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'edit/:quotId',
|
||||||
|
component: () => import('@/views/mobile/quoteMobile/operation/add'),
|
||||||
|
name: 'quoteMobileEdit',
|
||||||
|
meta: { title: '编辑报价单', activeMenu: '/mobile/quoteMobile/operation' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
// 动态路由,基于用户权限动态去加载
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>{{quote.quotCode}}</span>
|
<span>{{quote.quotCode}}</span>
|
||||||
<el-button style="float: right; padding: 3px 0" type="text" @click="handleEdit(quote.quotCode)">编辑</el-button>
|
<el-button style="float: right; padding: 3px 0" type="text" @click="handleEdit(quote)">编辑</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
<div v-if="false">订单号Id:{{quote.quotId}}</div>
|
<div v-if="false">订单号Id:{{quote.quotId}}</div>
|
||||||
|
@ -70,8 +70,10 @@ export default {
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push('/quoteMobile/add');
|
this.$router.push('/quoteMobile/add');
|
||||||
},
|
},
|
||||||
handleEdit(quotCode) {
|
handleEdit(quote) {
|
||||||
console.log(quotCode)
|
const quotId = quote.quotId
|
||||||
|
this.$router.push("/quoteMobile/edit/edit/" + quotId);
|
||||||
|
console.log(quote)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
:on-success="handleAvatarSuccess"
|
:on-success="handleAvatarSuccess"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
v-if="this.form.quotApprovalStatus == '0'">
|
v-if="this.formData.quotApprovalStatus == 0">
|
||||||
<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>
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<el-button :key="Math.random()" 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 :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
|
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == 0">
|
||||||
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
:on-success="handleAvatarSuccess"
|
:on-success="handleAvatarSuccess"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
v-if="this.form.quotApprovalStatus == '0'">
|
v-if="this.formData.quotApprovalStatus === '0'">
|
||||||
<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>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<el-button :key="Math.random()" 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 :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
|
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == '0'">
|
||||||
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
:on-success="handleAvatarSuccess"
|
:on-success="handleAvatarSuccess"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
v-if="this.form.quotApprovalStatus == '0'">
|
v-if="this.formData.quotApprovalStatus == '0'">
|
||||||
<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>
|
||||||
|
@ -122,14 +122,13 @@
|
||||||
<el-button :key="Math.random()" 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 :key="Math.random()" size="small" type="text" v-if="form.quotApprovalStatus == '0'">
|
<el-button :key="Math.random()" size="small" type="text" v-if="formData.quotApprovalStatus == '0'">
|
||||||
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
<a @click="deleteFile(scope.row.fileId,'quotXjFile')">删除</a>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item style="margin-top: 15px">
|
<el-form-item style="margin-top: 15px">
|
||||||
<el-button @click="saveForm">保存</el-button>
|
<el-button @click="saveForm">保存</el-button>
|
||||||
<el-button style="margin: 0px 15px 0px 20px" type="primary" @click="submitForm">提交</el-button>
|
<el-button style="margin: 0px 15px 0px 20px" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
@ -145,6 +144,18 @@ import { NumberAdd } from '@/utils/number';// 数值计算
|
||||||
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot } from "@/api/quot/quot";
|
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot } from "@/api/quot/quot";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数
|
import { checkPermi,checkRole } from '@/utils/permission';// 权限判断函数
|
||||||
|
import { getDicts } from "@/api/system/dict/data";
|
||||||
|
|
||||||
|
/** 导入技术确认单详情组件*/
|
||||||
|
import jsqrDialog from '@/views/technicalConfirm/technicalConfirm/jsxzInfo.vue';
|
||||||
|
/** 导入核价单详情组件*/
|
||||||
|
import hjDialog from '@/views/priceVerification/priceVerification/hjInfo.vue';
|
||||||
|
/** 导入选人组件 */
|
||||||
|
import PeopleSelect from "@/views/components/Tools/PeopleSelect/index.vue";
|
||||||
|
|
||||||
|
/** 弹窗放大、拖拽 */
|
||||||
|
import elDragDialog from "@/directive/dialog/dragDialog";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// 注册组件
|
// 注册组件
|
||||||
|
@ -156,15 +167,24 @@ export default {
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 报价单-询价附件列表数据
|
// 报价单-询价附件列表数据
|
||||||
|
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",
|
||||||
//报价单-询价附件请求头
|
//报价单-询价附件请求头
|
||||||
headers: {Authorization: "Bearer " + getToken()},
|
headers: {Authorization: "Bearer " + getToken()},
|
||||||
|
// 技术协助附件表格数据
|
||||||
|
quotJsqrFileList: [],
|
||||||
|
quotJsqrTlFileNum: 0,
|
||||||
|
quotJsqrDyFileNum: 0,
|
||||||
|
quotJsqrZyFileNum: 0,
|
||||||
|
quotJsqrQtFileNum: 0,
|
||||||
//是否打开客户选择组件,默认不打开
|
//是否打开客户选择组件,默认不打开
|
||||||
customerOpen:false,
|
customerOpen:false,
|
||||||
formData: {
|
formData: {
|
||||||
|
@ -212,53 +232,22 @@ export default {
|
||||||
field115fileList: [],
|
field115fileList: [],
|
||||||
field116Action: 'https://jsonplaceholder.typicode.com/posts/',
|
field116Action: 'https://jsonplaceholder.typicode.com/posts/',
|
||||||
field116fileList: [],
|
field116fileList: [],
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {},
|
created() {
|
||||||
|
const quotId = this.$route.params && this.$route.params.quotId;
|
||||||
|
if (quotId !== undefined && quotId !== null) {
|
||||||
|
const row = {'quotId':quotId}
|
||||||
|
this.handleUpdate(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(quotId);
|
||||||
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
//下载附件
|
|
||||||
downloadFile(fileUrl){
|
|
||||||
window.open(fileUrl, "_blank");
|
|
||||||
},
|
|
||||||
|
|
||||||
//删除附件
|
|
||||||
deleteFile(fileId,activeName){
|
|
||||||
//let activeName = this.activeName;
|
|
||||||
quotFileDelete(fileId).then(response => {
|
|
||||||
if(activeName=='quotXjFile'){
|
|
||||||
this.getQuotXjFileList();
|
|
||||||
}else if(activeName=='quotJsInfo'){
|
|
||||||
this.getQuotJsgfFileList();
|
|
||||||
}else if(activeName=='quotFkFile'){
|
|
||||||
this.getQuotFkFileList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//点击上传附件按钮触发事件
|
|
||||||
uploadFile(activeName){
|
|
||||||
this.activeName = activeName
|
|
||||||
},
|
|
||||||
//成功回调
|
|
||||||
handleAvatarSuccess(res) {
|
|
||||||
let activeName = this.activeName;
|
|
||||||
// 如果上传成功
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$modal.msgSuccess(res.msg);
|
|
||||||
if(activeName=='quotXjFile'){
|
|
||||||
this.getQuotXjFileList();
|
|
||||||
}else if(activeName=='quotJsInfo'){
|
|
||||||
this.getQuotJsgfFileList();
|
|
||||||
}else if(activeName=='quotFkFile'){
|
|
||||||
this.getQuotFkFileList();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$modal.msgError(res.msg);
|
|
||||||
}
|
|
||||||
this.$refs.upload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
|
||||||
},
|
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['elForm'].validate(valid => {
|
this.$refs['elForm'].validate(valid => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
|
@ -302,34 +291,33 @@ export default {
|
||||||
setInfo(response){
|
setInfo(response){
|
||||||
console.log(response)
|
console.log(response)
|
||||||
this.formData = response.data;
|
this.formData = response.data;
|
||||||
// this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
|
this.$set(this.formData, "quotJsxzGroup", (this.formData.quotJsxzGroupValues==''||this.formData.quotJsxzGroupValues==null)?[]:this.formData.quotJsxzGroupValues.split(','));
|
||||||
// this.quotMaterialList = response.data.quotMaterialList;
|
this.open = true;
|
||||||
// this.open = true;
|
this.activeName = "quotInfo";
|
||||||
// this.activeName = "quotInfo";
|
|
||||||
//
|
const quotJsxzGroup = this.form.quotJsxzGroupValues;
|
||||||
// const quotJsxzGroup = this.form.quotJsxzGroupValues;
|
if(quotJsxzGroup){
|
||||||
// if(quotJsxzGroup){
|
if(quotJsxzGroup.indexOf("TL")!==-1){
|
||||||
// if(quotJsxzGroup.indexOf("TL")!==-1){
|
this.showTl = true;
|
||||||
// this.showTl = true;
|
this.getQuotJsqrFileList('quotJsqrTlFkFile');
|
||||||
// this.getQuotJsqrFileList('quotJsqrTlFkFile');
|
}
|
||||||
// }
|
if(quotJsxzGroup.indexOf("DY")!==-1){
|
||||||
// if(quotJsxzGroup.indexOf("DY")!==-1){
|
this.showDy = true;
|
||||||
// this.showDy = true;
|
this.getQuotJsqrFileList('quotJsqrDyFkFile');
|
||||||
// this.getQuotJsqrFileList('quotJsqrDyFkFile');
|
}
|
||||||
// }
|
if(quotJsxzGroup.indexOf("ZY")!==-1){
|
||||||
// if(quotJsxzGroup.indexOf("ZY")!==-1){
|
this.showZy = true;
|
||||||
// this.showZy = true;
|
this.getQuotJsqrFileList('quotJsqrZyFkFile');
|
||||||
// this.getQuotJsqrFileList('quotJsqrZyFkFile');
|
}
|
||||||
// }
|
if(quotJsxzGroup.indexOf("QT")!==-1){
|
||||||
// if(quotJsxzGroup.indexOf("QT")!==-1){
|
this.showQt = true;
|
||||||
// this.showQt = true;
|
this.getQuotJsqrFileList('quotJsqrQtFkFile');
|
||||||
// this.getQuotJsqrFileList('quotJsqrQtFkFile');
|
}
|
||||||
// }
|
}
|
||||||
// }
|
this.getQuotXjFileList();
|
||||||
// this.getQuotXjFileList();
|
this.getQuotJsgfFileList();
|
||||||
// this.getQuotJsgfFileList();
|
this.getQuotHjFileList();
|
||||||
// this.getQuotHjFileList();
|
this.getQuotFkFileList();
|
||||||
// this.getQuotFkFileList();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 保存按钮 */
|
/** 保存按钮 */
|
||||||
|
@ -351,6 +339,185 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*********************************附件列表数据展示、上传*****************************************/
|
||||||
|
//获取报价单-询价附件列表
|
||||||
|
getQuotXjFileList(){
|
||||||
|
const param = {relationId:this.form.quotId,fileType:'quotXjFile'}
|
||||||
|
quotFileList(param).then(response => {
|
||||||
|
this.quotXjFileList = response.rows;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取报价单-反馈附件列表
|
||||||
|
getQuotFkFileList(){
|
||||||
|
const param = {relationId:this.form.quotId,fileType:'quotFkFile'}
|
||||||
|
|
||||||
|
//协助中状态不显示反馈附件
|
||||||
|
if(this.form.quotApprovalStatus!='1' && checkRole(['SALES_MAN'])){
|
||||||
|
quotFileList(param).then(response => {
|
||||||
|
this.quotFkFileList = response.rows;
|
||||||
|
});
|
||||||
|
}else if(checkRole(['QUOT'])){
|
||||||
|
quotFileList(param).then(response => {
|
||||||
|
this.quotFkFileList = response.rows;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取报价单-技术规范附件列表
|
||||||
|
getQuotJsgfFileList(){
|
||||||
|
console.log(this.form.quotId)
|
||||||
|
const param = {relationId:this.form.quotId,fileType:'quotJsgfFile'}
|
||||||
|
quotFileList(param).then(response => {
|
||||||
|
this.quotJsgfFileList = response.rows;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取报价单-技术确认-反馈附件上传
|
||||||
|
getQuotJsqrFileList(fileType){
|
||||||
|
const param = {relationId:this.form.quotJsxzConfirmId,fileType:fileType}
|
||||||
|
quotFileList(param).then(response => {
|
||||||
|
this.quotJsqrFileList = response.rows;
|
||||||
|
if('quotJsqrTlFkFile' == fileType){
|
||||||
|
this.quotJsqrTlFileNum = response.rows.length;
|
||||||
|
}else if('quotJsqrDyFkFile' == fileType){
|
||||||
|
this.quotJsqrDyFileNum = response.rows.length;
|
||||||
|
}else if('quotJsqrZyFkFile' == fileType){
|
||||||
|
this.quotJsqrZyFileNum = response.rows.length;
|
||||||
|
}else if('quotJsqrQtFkFile' == fileType){
|
||||||
|
this.quotJsqrQtFileNum = response.rows.length;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//获取报价单-核价附件列表
|
||||||
|
getQuotHjFileList(){
|
||||||
|
const param = {relationId:this.form.quotHjId,fileType:'quotHjFile'}
|
||||||
|
quotFileList(param).then(response => {
|
||||||
|
this.quotHjFileList = response.rows;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//特缆、低压、中压、其他 反馈附件显示窗口
|
||||||
|
handleAddFile(group){
|
||||||
|
this.addFileOpen = true;
|
||||||
|
this.quotJsqrFileList = [];
|
||||||
|
if("quotJsqrTl"==group){
|
||||||
|
this.addFileTitle = '特缆反馈附件'
|
||||||
|
this.fileType = 'quotJsqrTlFkFile';
|
||||||
|
this.uploadDis = (this.form.quotJsqrTlOperateState == 0 ? true : false);
|
||||||
|
}else if('quotJsqrDy'==group){
|
||||||
|
this.addFileTitle = '低压反馈附件'
|
||||||
|
this.fileType = 'quotJsqrDyFkFile';
|
||||||
|
this.uploadDis = (this.form.quotJsqrDyOperateState == 0 ? true : false);
|
||||||
|
}else if('quotJsqrZy'==group){
|
||||||
|
this.addFileTitle = '中压反馈附件'
|
||||||
|
this.fileType = 'quotJsqrZyFkFile';
|
||||||
|
this.uploadDis = (this.form.quotJsqrZyOperateState == 0 ? true : false);
|
||||||
|
}else if('quotJsqrQt'==group){
|
||||||
|
this.addFileTitle = '其他反馈附件'
|
||||||
|
this.fileType = 'quotJsqrQtFkFile';
|
||||||
|
this.uploadDis = (this.form.quotJsqrQtOperateState == 0 ? true : false);
|
||||||
|
}
|
||||||
|
// 获取反馈附件
|
||||||
|
this.getQuotJsqrFileList(this.fileType);
|
||||||
|
},
|
||||||
|
|
||||||
|
//点击上传附件按钮触发事件
|
||||||
|
uploadFile(activeName){
|
||||||
|
this.activeName = activeName
|
||||||
|
},
|
||||||
|
//上传前校验-反馈附件
|
||||||
|
beforeAvatarUploadQuotFkFile(file) {
|
||||||
|
this.quotFkFileLoading = true;
|
||||||
|
},
|
||||||
|
//上传前校验-清单附件
|
||||||
|
beforeAvatarUploadQuotXjFile(file) {
|
||||||
|
this.quotXjFileLoading = true;
|
||||||
|
let activeName = this.activeName;
|
||||||
|
if(activeName=='quotXjFile'){
|
||||||
|
if(file.name.split('.')[1].toLowerCase() != 'xls' && file.name.split('.')[1].toLowerCase() != 'xlsx'){
|
||||||
|
this.$modal.msgError("清单附件必须是Excel格式");
|
||||||
|
this.quotXjFileLoading = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//上传前校验-清单附件
|
||||||
|
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) {
|
||||||
|
let activeName = this.activeName;
|
||||||
|
// 如果上传成功
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
if(activeName=='quotXjFile'){
|
||||||
|
this.getQuotXjFileList();
|
||||||
|
this.quotXjFileLoading = false;
|
||||||
|
this.$refs.quotXjFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||||||
|
}else if(activeName=='quotJsgfFile'){
|
||||||
|
this.getQuotJsgfFileList();
|
||||||
|
this.quotJsgfFileLoading = false;
|
||||||
|
this.$refs.quotJsgfFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||||||
|
}else if(activeName=='quotFkFile'){
|
||||||
|
this.getQuotFkFileList();
|
||||||
|
this.quotFkFileLoading = false;
|
||||||
|
this.$refs.quotFkFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
if(activeName=='quotXjFile'){
|
||||||
|
this.quotXjFileLoading = false;
|
||||||
|
this.$refs.quotXjFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||||||
|
}else if(activeName=='quotJsgfFile'){
|
||||||
|
this.quotJsgfFileLoading = false;
|
||||||
|
this.$refs.quotJsgfFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||||||
|
}else if(activeName=='quotFkFile'){
|
||||||
|
this.quotFkFileLoading = false;
|
||||||
|
this.$refs.quotFkFileUpload.clearFiles(); //上传成功之后清除历史记录**加粗样式**
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 产品数据文件上传成功处理 */
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
this.productUpload.open = false;
|
||||||
|
this.productUpload.isUploading = false;
|
||||||
|
this.$refs.productUpload.clearFiles();
|
||||||
|
this.$message.success("产品数据导入成功!");
|
||||||
|
this.quotMaterialList = this.quotMaterialList.concat(response.data)
|
||||||
|
},
|
||||||
|
//下载附件
|
||||||
|
downloadFile(fileUrl){
|
||||||
|
window.open(fileUrl, "_blank");
|
||||||
|
},
|
||||||
|
|
||||||
|
//删除附件
|
||||||
|
deleteFile(fileId,activeName){
|
||||||
|
if(activeName=='quotXjFile'){
|
||||||
|
this.quotXjFileLoading = true;
|
||||||
|
quotFileDelete(fileId).then(response => {
|
||||||
|
this.getQuotXjFileList();
|
||||||
|
this.quotXjFileLoading = false;
|
||||||
|
})
|
||||||
|
}else if(activeName=='quotJsgfFile'){
|
||||||
|
this.quotJsgfFileLoading = true;
|
||||||
|
quotFileDelete(fileId).then(response => {
|
||||||
|
this.getQuotJsgfFileList();
|
||||||
|
this.quotJsgfFileLoading = false;
|
||||||
|
})
|
||||||
|
}else if(activeName=='quotFkFile'){
|
||||||
|
this.quotFkFileLoading = true;
|
||||||
|
quotFileDelete(fileId).then(response => {
|
||||||
|
this.getQuotFkFileList();
|
||||||
|
this.quotFkFileLoading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue