Compare commits

..

No commits in common. "a6d884454b95b729796ebbbb3590e58c5f257278" and "dc84e89bcdb4a6b745e727db50b21699adf7d08d" have entirely different histories.

3 changed files with 80 additions and 262 deletions

View File

@ -129,24 +129,11 @@ export const constantRoutes = [
{ {
path: '', path: '',
component: () => import('@/views/mobile/quoteMobile/operation/add'), component: () => import('@/views/mobile/quoteMobile/operation/add'),
name: 'quoteMobileAdd', name: 'quoteMobile',
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' }
}
]
},
] ]
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载

View File

@ -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)">编辑</el-button> <el-button style="float: right; padding: 3px 0" type="text" @click="handleEdit(quote.quotCode)">编辑</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,10 +70,8 @@ export default {
handleAdd() { handleAdd() {
this.$router.push('/quoteMobile/add'); this.$router.push('/quoteMobile/add');
}, },
handleEdit(quote) { handleEdit(quotCode) {
const quotId = quote.quotId console.log(quotCode)
this.$router.push("/quoteMobile/edit/edit/" + quotId);
console.log(quote)
} }
}, },

View File

@ -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.formData.quotApprovalStatus == 0"> v-if="this.form.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="formData.quotApprovalStatus == 0"> <el-button :key="Math.random()" size="small" type="text" v-if="form.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.formData.quotApprovalStatus === '0'"> v-if="this.form.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="formData.quotApprovalStatus == '0'"> <el-button :key="Math.random()" size="small" type="text" v-if="form.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.formData.quotApprovalStatus == '0'"> v-if="this.form.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,13 +122,14 @@
<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="formData.quotApprovalStatus == '0'"> <el-button :key="Math.random()" size="small" type="text" v-if="form.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>
@ -144,18 +145,6 @@ 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: {
// //
@ -167,24 +156,15 @@ 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: {
@ -232,22 +212,53 @@ 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
@ -291,33 +302,34 @@ export default {
setInfo(response){ setInfo(response){
console.log(response) console.log(response)
this.formData = response.data; this.formData = response.data;
this.$set(this.formData, "quotJsxzGroup", (this.formData.quotJsxzGroupValues==''||this.formData.quotJsxzGroupValues==null)?[]:this.formData.quotJsxzGroupValues.split(',')); // this.$set(this.form, "quotJsxzGroup", (this.form.quotJsxzGroupValues==''||this.form.quotJsxzGroupValues==null)?[]:this.form.quotJsxzGroupValues.split(','));
this.open = true; // this.quotMaterialList = response.data.quotMaterialList;
this.activeName = "quotInfo"; // this.open = true;
// this.activeName = "quotInfo";
const quotJsxzGroup = this.form.quotJsxzGroupValues; //
if(quotJsxzGroup){ // const quotJsxzGroup = this.form.quotJsxzGroupValues;
if(quotJsxzGroup.indexOf("TL")!==-1){ // if(quotJsxzGroup){
this.showTl = true; // if(quotJsxzGroup.indexOf("TL")!==-1){
this.getQuotJsqrFileList('quotJsqrTlFkFile'); // this.showTl = true;
} // this.getQuotJsqrFileList('quotJsqrTlFkFile');
if(quotJsxzGroup.indexOf("DY")!==-1){ // }
this.showDy = true; // if(quotJsxzGroup.indexOf("DY")!==-1){
this.getQuotJsqrFileList('quotJsqrDyFkFile'); // this.showDy = true;
} // this.getQuotJsqrFileList('quotJsqrDyFkFile');
if(quotJsxzGroup.indexOf("ZY")!==-1){ // }
this.showZy = true; // if(quotJsxzGroup.indexOf("ZY")!==-1){
this.getQuotJsqrFileList('quotJsqrZyFkFile'); // this.showZy = true;
} // this.getQuotJsqrFileList('quotJsqrZyFkFile');
if(quotJsxzGroup.indexOf("QT")!==-1){ // }
this.showQt = true; // if(quotJsxzGroup.indexOf("QT")!==-1){
this.getQuotJsqrFileList('quotJsqrQtFkFile'); // this.showQt = true;
} // this.getQuotJsqrFileList('quotJsqrQtFkFile');
} // }
this.getQuotXjFileList(); // }
this.getQuotJsgfFileList(); // this.getQuotXjFileList();
this.getQuotHjFileList(); // this.getQuotJsgfFileList();
this.getQuotFkFileList(); // this.getQuotHjFileList();
// this.getQuotFkFileList();
}, },
/** 保存按钮 */ /** 保存按钮 */
@ -339,185 +351,6 @@ 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;
})
}
},
}, },
} }