Browse Source

2023-10-12 plm报价提交

master
杨奉源 2 years ago
parent
commit
06cf40719a
  1. 93
      src/api/proofing/proofingInformation.js
  2. 18
      src/api/quotation/quotationInformation.js
  3. 1431
      src/views/modules/proofing/batchRequestForProofing.vue
  4. 136
      src/views/modules/proofing/proofing_upload_file.vue
  5. 2677
      src/views/modules/proofing/requestForProofing.vue
  6. 1412
      src/views/modules/quotation/batchRequestForQuote.vue
  7. 31
      src/views/modules/quotation/quotation_upload_file.vue
  8. 681
      src/views/modules/quotation/requestForQuote.vue

93
src/api/proofing/proofingInformation.js

@ -0,0 +1,93 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* 打样信息列表查询
* @param data
* @returns {*}
*/
export const proofingInformationSearch = data => createAPI(`/plm/proofingInformation/proofingInformationSearch`,'post',data)
/**
* 打样信息新增
* @param data
* @returns {*}
*/
export const proofingInformationSave = data => createAPI(`/plm/proofingInformation/proofingInformationSave`,'post',data)
/**
* 打样信息编辑
* @param data
* @returns {*}
*/
export const proofingInformationEdit = data => createAPI(`/plm/proofingInformation/proofingInformationEdit`,'post',data)
/**
* 打样信息删除
* @param data
* @returns {*}
*/
export const proofingInformationDelete = data => createAPI(`/plm/proofingInformation/proofingInformationDelete`,'post',data)
/**
* 获取产品列表
* @param data
* @returns {*}
*/
export const getProjectPartList = data => createAPI(`/plm/proofingInformation/getProjectPartList`,'post',data)
/**
* 获取打样结果对象
* @param data
* @returns {*}
*/
export const proofingResultSearch = data => createAPI(`/plm/proofingInformation/proofingResultSearch`,'post',data)
/**
* 检查打样进度
* @param data
* @returns {*}
*/
export const checkProofingStatus = data => createAPI(`/plm/proofingInformation/checkProofingStatus`,'post',data)
/**
* 获取打样单附件列表
* @param data
* @returns {*}
*/
export const getFileContentList = data => createAPI(`/plm/proofingInformation/getFileContentList`,'post',data)
/**
* 文件删除
* @param data
* @returns {*}
*/
export const deleteProofingFile = data => createAPI(`/plm/proofingInformation/deleteProofingFile`,'post',data)
/**
* 保存打样结果
* @param data
* @returns {*}
*/
export const saveProofingResult = data => createAPI(`/plm/proofingInformation/saveProofingResult`,'post',data)
/**
* 保存送样结果
* @param data
* @returns {*}
*/
export const saveSubmitResult = data => createAPI(`/plm/proofingInformation/saveSubmitResult`,'post',data)
/**
* 保存客户回复
* @param data
* @returns {*}
*/
export const saveCustomerResponse = data => createAPI(`/plm/proofingInformation/saveCustomerResponse`,'post',data)
/**
* 获取项目信息
* @param data
* @returns {*}
*/
export const getProjectInformation = data => createAPI(`/plm/proofingInformation/getProjectInformation`,'post',data)
/**
* 获取客户信息
* @param data
* @returns {*}
*/
export const getCustomerInformation = data => createAPI(`/plm/proofingInformation/getCustomerInformation`,'post',data)
/**
* 关闭模态框删除文件
* @param data
* @returns {*}
*/
export const closeModalDeleteFile = data => createAPI(`/plm/proofingInformation/closeModalDeleteFile`,'post',data)

18
src/api/quotation/quotationInformation.js

@ -90,3 +90,21 @@ export const checkQuotationStatus = data => createAPI(`/plm/quotationInformation
* @returns {*}
*/
export const getProjectInformation = data => createAPI(`/plm/quotationInformation/getProjectInformation`,'post',data)
/**
* 获取客户信息
* @param data
* @returns {*}
*/
export const getCustomerInformation = data => createAPI(`/plm/quotationInformation/getCustomerInformation`,'post',data)
/**
* 批量文件删除
* @param data
* @returns {*}
*/
export const batchDeleteQuotationFile = data => createAPI(`/plm/quotationInformation/batchDeleteQuotationFile`,'post',data)
/**
* 关闭模态框删除文件
* @param data
* @returns {*}
*/
export const closeModalDeleteFile = data => createAPI(`/plm/quotationInformation/closeModalDeleteFile`,'post',data)

1431
src/views/modules/proofing/batchRequestForProofing.vue
File diff suppressed because it is too large
View File

136
src/views/modules/proofing/proofing_upload_file.vue

@ -0,0 +1,136 @@
<template>
<div class="customer-css">
<el-dialog :title="pageData.titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="打样单号:" >
<el-input v-model="pageData.proofingNo" readonly style="width: 120px"></el-input>
<!-- <el-select v-model="pageData.proofingNo" placeholder="请选择" style="width: 120px;">-->
<!-- <el-option-->
<!-- v-for = "item in options"-->
<!-- :key = "item.key"-->
<!-- :label = "item.value"-->
<!-- :value = "item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-upload class="customer-upload" drag
action="javascript:void(0);" ref="uploadFile" :limit="1"
:before-upload="beforeUploadHandle" :on-change="onChange"
accept="*" :auto-upload="false"
style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="margin-bottom: 30px;">
<el-form-item class="customer-item" label="备注:" >
<el-input type="textarea" style="width: 360px;" placeholder="请输入内容" v-model="pageData.fileRemark"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveUploadFile()">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
uploadFile //
} from '@/api/quotation/quotationInformation.js'
export default {
data() {
return {
folder: '',
visible: false,
fileList: [],
pageData: {
titleCon: '',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
proofingNo: '',
fileRemark: '',
folder: '',
// options: []
},
// options: [],
dataListLoading: false,
}
},
methods: {
//
init(currentRow) {
//
this.pageData = JSON.parse(JSON.stringify(currentRow))
// this.options = this.pageData.options
this.folder = this.pageData.folder
//
this.visible = true
},
//
beforeUploadHandle(file) {},
/*选择上传文件时*/
onChange(file){
this.fileList.push(file)
},
/*关闭modal*/
closeDialog(){
this.fileList = []
//
this.$emit('refreshPageTables')
//
this.visible = false
},
/*保修当前的数据*/
saveUploadFile(){
let remark = this.pageData.fileRemark
if(remark == null || remark == undefined){
remark = ''
}
/*判断文件是否上传*/
if(this.fileList == null || this.fileList.length === 0){
this.$message.error("请先上传文件!")
return false
}
// if(this.pageData.proofingNo === '' || this.pageData.proofingNo == null){
// this.$message.error("!")
// return false
// }
const formData = new FormData()
//
formData.append("file", this.fileList[0].raw)
formData.append("folder", this.folder)
formData.append("orderRef1", this.pageData.site)
formData.append("orderRef2", this.pageData.proofingNo)
formData.append("fileRemark", remark)
uploadFile(formData).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg)
//
this.$refs.uploadFile.clearFiles()
this.pageData.fileRemark = ''
this.fileList = []
}else {
this.$message.warning(data.msg)
}
})
}
},
}
</script>
<style scoped lang="scss">
</style>

2677
src/views/modules/proofing/requestForProofing.vue
File diff suppressed because it is too large
View File

1412
src/views/modules/quotation/batchRequestForQuote.vue
File diff suppressed because it is too large
View File

31
src/views/modules/quotation/quotation_upload_file.vue

@ -5,14 +5,15 @@
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="申请单号:" >
<el-select v-model="pageData.quotationNo" placeholder="请选择" style="width: 120px;">
<el-option
v-for = "item in options"
:key = "item.key"
:label = "item.value"
:value = "item.value">
</el-option>
</el-select>
<el-input v-model="pageData.quotationNo" readonly style="width: 120px"></el-input>
<!-- <el-select v-model="pageData.quotationNo" placeholder="请选择" style="width: 120px;">-->
<!-- <el-option-->
<!-- v-for = "item in options"-->
<!-- :key = "item.key"-->
<!-- :label = "item.value"-->
<!-- :value = "item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
</el-row>
@ -63,9 +64,9 @@ export default {
quotationNo: '',
fileRemark: '',
folder: '',
options: []
// options: []
},
options: [],
// options: [],
dataListLoading: false,
}
},
@ -74,7 +75,7 @@ export default {
init(currentRow) {
//
this.pageData = JSON.parse(JSON.stringify(currentRow))
this.options = this.pageData.options
// this.options = this.pageData.options
this.folder = this.pageData.folder
//
this.visible = true
@ -104,10 +105,10 @@ export default {
this.$message.error("请先上传文件!")
return false
}
if(this.pageData.quotationNo === '' || this.pageData.quotationNo == null){
this.$message.error("请选择申请单号!")
return false
}
// if(this.pageData.quotationNo === '' || this.pageData.quotationNo == null){
// this.$message.error("!")
// return false
// }
const formData = new FormData()
//
formData.append("file", this.fileList[0].raw)

681
src/views/modules/quotation/requestForQuote.vue

@ -167,7 +167,7 @@
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="partName" :rules="rules.partName">
<span slot="label" @click="getProjectPartList()"><a>产品</a></span>
<span slot="label" @click="getProjectPartList()"><a>项目物料</a></span>
<el-input v-model="modalData.partName" readonly @focus="getProjectPartList()" style="width: 221px"></el-input>
</el-form-item>
<el-form-item label="优先等级" prop="priorityLevel" :rules="rules.priorityLevel">
@ -231,7 +231,7 @@
</el-form>
<el-table
:height="200"
:data="enterResultData.fileContentList"
:data="fileContentList"
border
v-loading="dataListLoading"
style="width: 100%">
@ -403,7 +403,7 @@
</el-form>
</el-tab-pane>
<!-- 报价结果页签 -->
<el-tab-pane label="报价结果" name="quotation_result" style="">
<el-tab-pane label="报价结果" name="quotation_result">
<el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 5px;">
<el-button v-if="quotationResultData.quotationResultStatus === 'C'" type="primary" @click="quotationResultModal()">录入报价结果</el-button>
<el-button v-if="quotationResultData.quotationResultStatus === 'E'" type="primary" @click="submitQuotationModal()">提交客户报价</el-button>
@ -611,13 +611,172 @@
</el-row>
</el-form>
</el-tab-pane>
<!-- 客户信息页签 -->
<el-tab-pane label="客户信息" name="customer_information">
<el-form label-position="top" :model="customerInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户代码">
<el-input v-model="customerInformationData.customerNo" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户名称">
<el-input v-model="customerInformationData.customerDesc" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="关键客户">
<el-input v-model="customerInformationData.importantCustomer" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户币种">
<el-input v-model="customerInformationData.customerCurrency" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="年营业额">
<el-input v-model="customerInformationData.turnoverOfYear" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="年潜在收入">
<el-input v-model="customerInformationData.potentialRevenueOfYear" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户状态">
<el-input v-model="customerInformationData.customerStatus" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="行业">
<el-input v-model="customerInformationData.customerIndustry" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="公司名称">
<el-input v-model="customerInformationData.companyName" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="客户联系人">
<el-input v-model="customerInformationData.contactName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="联系人电话">
<el-input v-model="customerInformationData.contactPhoneNumber1" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="联系人职务">
<el-input v-model="customerInformationData.position" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="岗位描述">
<el-input v-model="customerInformationData.jobDescription" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="备注信息">
<el-input v-model="customerInformationData.remark" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="客户联系地址">
<el-input v-model="customerInformationData.addressName" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<div class="grid-content bg-purple">
<el-form-item label="地址类型">
<el-input v-model="customerInformationData.addressType" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="创建时间">
<el-input v-model="customerInformationData.createDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="创建人">
<el-input v-model="customerInformationData.createBy" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="更新时间">
<el-input v-model="customerInformationData.updateDate" readonly></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="6">
<div class="grid-content bg-purple">
<el-form-item label="更新人">
<el-input v-model="customerInformationData.updateBy" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
<quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentList()" v-drag></quotationUploadFile>
<quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentData()" v-drag></quotationUploadFile>
</div>
</template>
@ -636,7 +795,8 @@
saveCustomerResponse, //
getProjectPartList, //
checkQuotationStatus, //
getProjectInformation //
getProjectInformation, //
getCustomerInformation //
} from '@/api/quotation/quotationInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import quotationUploadFile from "./quotation_upload_file"
@ -802,6 +962,28 @@
userRoleName: '',
remark: ''
},
customerInformationData: {
customerNo: '',
customerDesc: '',
importantCustomer: '',
customerCurrency: '',
turnoverOfYear: '',
potentialRevenueOfYear: '',
customerStatus: '',
customerIndustry: '',
companyName: '',
jobDescription: '',
remark: '',
contactName: '',
contactPhoneNumber1: '',
position: '',
addressName: '',
addressType: '',
createDate: '',
createBy: '',
updateDate: '',
updateBy: ''
},
// ======== ========
dataList: [],
fileContentList: [],
@ -943,7 +1125,25 @@
columnProp: 'testPartNo',
headerAlign: 'center',
align: 'center',
columnLabel: '产品编码',
columnLabel: '项目料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1PartName',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'partName',
headerAlign: 'center',
align: 'center',
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1494,6 +1694,8 @@
this.getQuotationResult()
} else if (this.activeTable === 'project_information') {
this.getProjectInformation()
} else if (this.activeTable === 'customer_information') {
this.getCustomerInformation()
}
},
@ -1558,6 +1760,23 @@
}
})
},
/**
* 获取客户信息
*/
getCustomerInformation () {
let tempData = {
site: this.$store.state.user.site,
customerNo: this.quotationCurrentRow.customerNo
}
//
getCustomerInformation(tempData).then(({data}) => {
if (data && data.code === 0) {
this.customerInformationData = data.rows[0]
} else {
this.customerInformationData = {}
}
})
},
// ======== / ========
/**
@ -1851,45 +2070,47 @@
updateBy: this.$store.state.user.name
}
//
if (this.quotationSelections.length > 0) {
this.quotationSelections.forEach(val => {
this.enterResultData.quotationNo += ';' + val.quotationNo
})
this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
} else {
this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
}
//
this.getFileContentList()
// if (this.quotationSelections.length > 0) {
// this.quotationSelections.forEach(val => {
// this.enterResultData.quotationNo += ';' + val.quotationNo
// })
// this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
// } else {
// this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
// }
this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
// //
// this.getFileContentList()
this.enterResultModalFlag = true
},
/**
* 录入报价结果
*/
quotationResultModal () {
//
if (this.quotationSelections != null && this.quotationSelections.length > 0) {
let tempData = {
currentStatus: 'C',
informationList: this.quotationSelections,
}
//
checkQuotationStatus(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.flag === 1) { //
this.packQuotationResultModal()
} else { //
this.$message.warning('选中的报价单进度有误,请确认!')
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else { //
this.packQuotationResultModal()
}
// //
// if (this.quotationSelections != null && this.quotationSelections.length > 0) {
// let tempData = {
// currentStatus: 'C',
// informationList: this.quotationSelections,
// }
// //
// checkQuotationStatus(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.flag === 1) { //
// this.packQuotationResultModal()
// } else { //
// this.$message.warning('')
// }
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// } else { //
// this.packQuotationResultModal()
// }
this.packQuotationResultModal()
},
/**
* 保存报价结果
@ -1903,32 +2124,32 @@
this.$message.warning('请填写报价结果信息!')
return
}
if (this.quotationSelections.length > 1) {
this.$confirm(`是否录入多条报价结果?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveQuotationResult(this.enterResultData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.enterResultModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
// if (this.quotationSelections.length > 1) {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// saveQuotationResult(this.enterResultData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.enterResultModalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
saveQuotationResult(this.enterResultData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@ -1937,8 +2158,7 @@
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
@ -1946,7 +2166,7 @@
})
}
})
}
// }
},
/**
@ -1956,49 +2176,52 @@
this.submitResultData = {
site: this.$store.state.user.site,
quotationNo: '',
actualityQuotationDate: '',
quotationResultInformation: '',
actualitySubmissionDate: '',
submissionMethod: '',
submissionRemark: '',
quotationResultStatus: 'S',
updateBy: this.$store.state.user.name
}
//
if (this.quotationSelections.length > 0) {
this.quotationSelections.forEach(val => {
this.submitResultData.quotationNo += ';' + val.quotationNo
})
this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
} else {
this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
}
// if (this.quotationSelections.length > 0) {
// this.quotationSelections.forEach(val => {
// this.submitResultData.quotationNo += ';' + val.quotationNo
// })
// this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
// } else {
// this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
// }
this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
this.submitResultModalFlag = true
},
/**
* 提交客户报价
*/
submitQuotationModal () {
//
if (this.quotationSelections != null && this.quotationSelections.length > 0) {
let tempData = {
currentStatus: 'E',
informationList: this.quotationSelections,
}
//
checkQuotationStatus(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.flag === 1) { //
this.packSubmitQuotationModal()
} else { //
this.$message.warning('选中的报价单进度有误,请确认!')
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else { //
this.packSubmitQuotationModal()
}
// //
// if (this.quotationSelections != null && this.quotationSelections.length > 0) {
// let tempData = {
// currentStatus: 'E',
// informationList: this.quotationSelections,
// }
// //
// checkQuotationStatus(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.flag === 1) { //
// this.packSubmitQuotationModal()
// } else { //
// this.$message.warning('')
// }
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// } else { //
// this.packSubmitQuotationModal()
// }
this.packSubmitQuotationModal()
},
/**
* 保存提交结果
@ -2012,32 +2235,32 @@
this.$message.warning('请选择提交方式!')
return
}
if (this.quotationSelections.length > 1) {
this.$confirm(`是否提交多条客户报价?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveSubmitResult(this.submitResultData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.submitResultModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
// if (this.quotationSelections.length > 1) {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// saveSubmitResult(this.submitResultData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.submitResultModalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
saveSubmitResult(this.submitResultData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@ -2046,8 +2269,7 @@
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
@ -2055,7 +2277,7 @@
})
}
})
}
// }
},
/**
@ -2073,43 +2295,45 @@
updateBy: this.$store.state.user.name
}
//
if (this.quotationSelections.length > 0) {
this.quotationSelections.forEach(val => {
this.customerResponseData.quotationNo += ';' + val.quotationNo
})
this.customerResponseData.quotationNo = this.customerResponseData.quotationNo.substring(1)
} else {
this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
}
// if (this.quotationSelections.length > 0) {
// this.quotationSelections.forEach(val => {
// this.customerResponseData.quotationNo += ';' + val.quotationNo
// })
// this.customerResponseData.quotationNo = this.customerResponseData.quotationNo.substring(1)
// } else {
// this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
// }
this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
this.customerResponseModalFlag = true
},
/**
* 客户回复
*/
customerResponseModal () {
//
if (this.quotationSelections != null && this.quotationSelections.length > 0) {
let tempData = {
currentStatus: 'S',
informationList: this.quotationSelections,
}
//
checkQuotationStatus(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.flag === 1) { //
this.packCustomerResponseModal()
} else { //
this.$message.warning('选中的报价单进度有误,请确认!')
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else { //
this.packCustomerResponseModal()
}
// //
// if (this.quotationSelections != null && this.quotationSelections.length > 0) {
// let tempData = {
// currentStatus: 'S',
// informationList: this.quotationSelections,
// }
// //
// checkQuotationStatus(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.flag === 1) { //
// this.packCustomerResponseModal()
// } else { //
// this.$message.warning('')
// }
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// } else { //
// this.packCustomerResponseModal()
// }
this.packCustomerResponseModal()
},
/**
* 保存客户回复
@ -2127,32 +2351,32 @@
this.$message.warning('请填写客户确认人!')
return
}
if (this.quotationSelections.length > 1) {
this.$confirm(`是否提交多条客户回复?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveCustomerResponse(this.customerResponseData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.customerResponseModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
// if (this.quotationSelections.length > 1) {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// saveCustomerResponse(this.customerResponseData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.customerResponseModalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
saveCustomerResponse(this.customerResponseData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@ -2161,8 +2385,7 @@
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
@ -2170,7 +2393,7 @@
})
}
})
}
// }
},
// ======== ========
@ -2190,22 +2413,22 @@
}
})
},
/**
* 获得这些报价号的全部附
*/
getFileContentList () {
let currentData = {
orderRef1: this.$store.state.user.site,
orderRef2: this.enterResultData.quotationNo
}
getFileContentList(currentData).then(({data}) => {
if (data && data.code === 0) {
this.enterResultData.fileContentList = data.rows
} else {
this.enterResultData.fileContentList = []
}
})
},
// /**
// *
// */
// getFileContentList () {
// let currentData = {
// orderRef1: this.$store.state.user.site,
// orderRef2: this.enterResultData.quotationNo
// }
// getFileContentList(currentData).then(({data}) => {
// if (data && data.code === 0) {
// this.enterResultData.fileContentList = data.rows
// } else {
// this.enterResultData.fileContentList = []
// }
// })
// },
/**
* 上传文件
*/
@ -2214,16 +2437,16 @@
titleCon: '报价附件上传',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
quotationNo: '',
quotationNo: this.enterResultData.quotationNo,
fileRemark: '',
folder: 'quotationFile',
options: []
// options: []
}
let num = 0
let arr = this.enterResultData.quotationNo.split(';')
arr.forEach(val => {
currentData.options.push({key: num++, value: val})
})
// let num = 0
// let arr = this.enterResultData.quotationNo.split(';')
// arr.forEach(val => {
// currentData.options.push({key: num++, value: val})
// })
//
this.$nextTick(() => {
this.$refs.quotationUploadFile.init(currentData);
@ -2376,37 +2599,7 @@
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
.el-transfer-panel {
border: 2px solid #17b3a3;
border-radius: 4px;
overflow: hidden;
background: #fff;
display: inline-block;
vertical-align: middle;
width: 200px;
max-height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
.el-transfer-panel .el-transfer-panel__header {
height: 40px;
line-height: 40px;
background: #17b3a3;
margin: 0;
padding-left: 15px;
border-bottom: 1px solid #17b3a3;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #000;
}
.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
font-size: 14px;
color: #303133;
font-weight: 400;
height: 459px;
}
</style>
Loading…
Cancel
Save