Browse Source

2023-10-07 plm报价提交

master
杨奉源 2 years ago
parent
commit
c6899b6c77
  1. 6
      src/api/quotation/quotationInformation.js
  2. 358
      src/views/modules/quotation/requestForQuote.vue

6
src/api/quotation/quotationInformation.js

@ -84,3 +84,9 @@ export const getProjectPartList = data => createAPI(`/plm/quotationInformation/g
* @returns {*}
*/
export const checkQuotationStatus = data => createAPI(`/plm/quotationInformation/checkQuotationStatus`,'post',data)
/**
* 获取项目信息
* @param data
* @returns {*}
*/
export const getProjectInformation = data => createAPI(`/plm/quotationInformation/getProjectInformation`,'post',data)

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

@ -376,9 +376,9 @@
</el-dialog>
<!-- 页签 -->
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 448px;" type="border-card" @tab-click="tabClick" class="customer-tab">
<!-- 报价详细信息页签 -->
<el-tab-pane label="报价详细信息" name="quotation_detail_information" style="height: 448px">
<el-tab-pane label="报价详细信息" name="quotation_detail_information" style="">
<el-form :inline="true" label-position="top" :model="quotationDetailData" style="margin-left: 10px;margin-top: 10px;">
<el-form-item label="技术注意事项">
<el-input
@ -403,7 +403,7 @@
</el-form>
</el-tab-pane>
<!-- 报价结果页签 -->
<el-tab-pane label="报价结果" name="quotation_result" style="height: 454px">
<el-tab-pane label="报价结果" name="quotation_result" style="">
<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>
@ -489,13 +489,135 @@
</el-form-item>
</el-form>
</el-tab-pane>
<!-- 报价详细信息页签 -->
<el-tab-pane label="项目信息" name="project_information">
<el-form :inline="true" label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;">
<el-row :gutter="20">
<el-col :span="8">
<div class="grid-content bg-purple">
<el-form-item label="项目号">
<el-input v-model="projectInformationData.projectId" 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="projectInformationData.projectName" 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="projectInformationData.projectType" 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="projectInformationData.projectSourceDesc" 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="projectInformationData.priorityDesc" 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="projectInformationData.status" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="grid-content bg-purple">
<el-form-item label="项目描述">
<el-input v-model="projectInformationData.projectDesc" 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="projectInformationData.projectManagerName" 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="projectInformationData.projectOwnerName" 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="projectInformationData.userRoleName" readonly></el-input>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="grid-content bg-purple">
<el-form-item label="其它特殊要求">
<el-input v-model="projectInformationData.remark" 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="projectInformationData.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="projectInformationData.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="projectInformationData.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="projectInformationData.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="getFileContentData()" v-drag></quotationUploadFile>
<quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentList()" v-drag></quotationUploadFile>
</div>
</template>
@ -513,7 +635,8 @@
saveSubmitResult, //
saveCustomerResponse, //
getProjectPartList, //
checkQuotationStatus //
checkQuotationStatus, //
getProjectInformation //
} from '@/api/quotation/quotationInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import quotationUploadFile from "./quotation_upload_file"
@ -610,6 +733,7 @@
confirmResults: '',
confirmBy: '',
confirmInformation: '',
quotationResultStatus: '',
createDate: '',
createBy: '',
updateDate: '',
@ -665,6 +789,19 @@
testPartNo: '',
partName: ''
},
projectInformationData: {
projectId: '',
projectName: '',
projectType: '',
projectSourceDesc: '',
priorityDesc: '',
status: '',
projectDesc: '',
projectManagerName: '',
projectOwnerName: '',
userRoleName: '',
remark: ''
},
// ======== ========
dataList: [],
fileContentList: [],
@ -1355,6 +1492,8 @@
refreshCurrentTabTable () {
if (this.activeTable === 'quotation_result') {
this.getQuotationResult()
} else if (this.activeTable === 'project_information') {
this.getProjectInformation()
}
},
@ -1402,6 +1541,23 @@
//
this.getFileContentData()
},
/**
* 获取项目信息
*/
getProjectInformation () {
let tempData = {
site: this.$store.state.user.site,
projectId: this.quotationCurrentRow.projectId
}
//
getProjectInformation(tempData).then(({data}) => {
if (data && data.code === 0) {
this.projectInformationData = data.rows[0]
} else {
this.projectInformationData = {}
}
})
},
// ======== / ========
/**
@ -1440,6 +1596,7 @@
confirmResults: '',
confirmBy: '',
confirmInformation: '',
quotationResultStatus: 'C',
createBy: this.$store.state.user.name
}
this.modalDisableFlag = false
@ -1482,6 +1639,7 @@
confirmResults: row.confirmResults,
confirmBy: row.confirmBy,
confirmInformation: row.confirmInformation,
quotationResultStatus: row.quotationResultStatus,
updateBy: this.$store.state.user.name
}
this.modalDisableFlag = true
@ -1518,7 +1676,7 @@
/**
* 确认多选产品
*/
confirmProjectPart(){
confirmProjectPart () {
if(this.projectPartListSelections.length === 0){
this.$message.warning('请勾选产品!')
return
@ -1702,17 +1860,7 @@
this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
}
//
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 = []
}
})
this.getFileContentList()
this.enterResultModalFlag = true
},
/**
@ -1730,10 +1878,8 @@
if (data && data.code === 0) {
if (data.flag === 1) { //
this.packQuotationResultModal()
} else if (data.flag === 2) { //
this.$message.warning('进度有误,请再次点击选中行!')
} else {
this.$message.warning('请选择进度一致的报价单进行操作!')
} else { //
this.$message.warning('选中的报价单进度有误,请确认!')
}
} else {
this.$alert(data.msg, '错误', {
@ -1765,7 +1911,7 @@
}).then(() => {
saveQuotationResult(this.enterResultData).then(({data}) => {
if (data && data.code === 0) {
this.getQuotationResult()
this.getDataList()
this.enterResultModalFlag = false
this.$message({
message: '操作成功',
@ -1785,7 +1931,7 @@
} else {
saveQuotationResult(this.enterResultData).then(({data}) => {
if (data && data.code === 0) {
this.getQuotationResult()
this.getDataList()
this.enterResultModalFlag = false
this.$message({
message: '操作成功',
@ -1809,12 +1955,21 @@
packSubmitQuotationModal () {
this.submitResultData = {
site: this.$store.state.user.site,
quotationNo: this.quotationCurrentRow.quotationNo,
quotationNo: '',
actualityQuotationDate: '',
quotationResultInformation: '',
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
}
this.submitResultModalFlag = true
},
/**
@ -1832,10 +1987,8 @@
if (data && data.code === 0) {
if (data.flag === 1) { //
this.packSubmitQuotationModal()
} else if (data.flag === 2) { //
this.$message.warning('进度有误,请再次点击选中行!')
} else {
this.$message.warning('请选择进度一致的报价单进行操作!')
} else { //
this.$message.warning('选中的报价单进度有误,请确认!')
}
} else {
this.$alert(data.msg, '错误', {
@ -1859,23 +2012,50 @@
this.$message.warning('请选择提交方式!')
return
}
saveSubmitResult(this.submitResultData).then(({data}) => {
if (data && data.code === 0) {
this.getQuotationResult()
this.submitResultModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
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: '确定'
})
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
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: '确定'
})
}
})
}
},
/**
@ -1884,7 +2064,7 @@
packCustomerResponseModal () {
this.customerResponseData = {
site: this.$store.state.user.site,
quotationNo: this.quotationCurrentRow.quotationNo,
quotationNo: '',
actualityReplyDate: '',
confirmResults: '',
confirmBy: '',
@ -1892,6 +2072,15 @@
quotationResultStatus: 'R',
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
}
this.customerResponseModalFlag = true
},
/**
@ -1909,10 +2098,8 @@
if (data && data.code === 0) {
if (data.flag === 1) { //
this.packCustomerResponseModal()
} else if (data.flag === 2) { //
this.$message.warning('进度有误,请再次点击选中行!')
} else {
this.$message.warning('请选择进度一致的报价单进行操作!')
} else { //
this.$message.warning('选中的报价单进度有误,请确认!')
}
} else {
this.$alert(data.msg, '错误', {
@ -1940,23 +2127,50 @@
this.$message.warning('请填写客户确认人!')
return
}
saveCustomerResponse(this.customerResponseData).then(({data}) => {
if (data && data.code === 0) {
this.getQuotationResult()
this.customerResponseModalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
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: '确定'
})
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
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: '确定'
})
}
})
}
},
// ======== ========
@ -1976,6 +2190,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 = []
}
})
},
/**
* 上传文件
*/
@ -2011,7 +2241,7 @@
}).then(() => {
deleteQuotationFile(row).then(({data}) => {
if (data && data.code === 0) {
this.getFileContentData();
this.getFileContentList();
this.$message({
message: '操作成功',
type: 'success',

Loading…
Cancel
Save