|
|
|
@ -231,7 +231,7 @@ |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="200" |
|
|
|
:data="fileContentList" |
|
|
|
:data="enterResultData.fileContentList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%"> |
|
|
|
@ -405,7 +405,7 @@ |
|
|
|
<!-- 报价结果页签 --> |
|
|
|
<el-tab-pane label="报价结果" name="quotation_result" style="height: 454px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 5px;"> |
|
|
|
<el-button v-if="quotationResultData.quotationResultStatus === '' || quotationResultData.quotationResultStatus == null" type="primary" @click="quotationResultModal()">录入报价结果</el-button> |
|
|
|
<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> |
|
|
|
<el-button v-if="quotationResultData.quotationResultStatus === 'S'" type="primary" @click="customerResponseModal()">客户回复</el-button> |
|
|
|
</el-form> |
|
|
|
@ -513,6 +513,7 @@ |
|
|
|
saveSubmitResult, // 保存提交结果 |
|
|
|
saveCustomerResponse, // 保存客户回复 |
|
|
|
getProjectPartList, // 获取产品列表 |
|
|
|
checkQuotationStatus // 检查报价进度 |
|
|
|
} from '@/api/quotation/quotationInformation.js' |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import quotationUploadFile from "./quotation_upload_file" |
|
|
|
@ -637,7 +638,8 @@ |
|
|
|
actualityQuotationDate: '', |
|
|
|
quotationResultInformation: '', |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
quotationResultStatus: '' |
|
|
|
quotationResultStatus: '', |
|
|
|
fileContentList: [] |
|
|
|
}, |
|
|
|
submitResultData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -1662,7 +1664,7 @@ |
|
|
|
* @param row |
|
|
|
*/ |
|
|
|
quotationClickRow (row) { |
|
|
|
this.$refs.quotationTable.toggleRowSelection(row); |
|
|
|
// this.$refs.quotationTable.toggleRowSelection(row) |
|
|
|
this.quotationCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
this.quotationDetailData = row |
|
|
|
}, |
|
|
|
@ -1677,24 +1679,72 @@ |
|
|
|
|
|
|
|
// ======== 报价结果相关方法 ======== |
|
|
|
/** |
|
|
|
* 录入报价结果 |
|
|
|
* 封装录入方法 |
|
|
|
*/ |
|
|
|
quotationResultModal () { |
|
|
|
packQuotationResultModal () { |
|
|
|
// 重置对象 |
|
|
|
this.enterResultData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
// quotationNo: this.quotationCurrentRow.quotationNo, |
|
|
|
quotationNo: '', |
|
|
|
actualityQuotationDate: '', |
|
|
|
quotationResultInformation: '', |
|
|
|
quotationResultStatus: 'E', |
|
|
|
fileContentList: [], |
|
|
|
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 |
|
|
|
} |
|
|
|
// 获得这些报价号的全部附件 |
|
|
|
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.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 if (data.flag === 2) { // 状态不同 |
|
|
|
this.$message.warning('进度有误,请再次点击选中行!') |
|
|
|
} else { |
|
|
|
this.$message.warning('请选择进度一致的报价单进行操作!') |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { // 没有选中报价单,则根据当前点击行报价单操作 |
|
|
|
this.packQuotationResultModal() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 保存报价结果 |
|
|
|
*/ |
|
|
|
@ -1752,10 +1802,11 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 提交客户报价 |
|
|
|
* 封装提交方法 |
|
|
|
*/ |
|
|
|
submitQuotationModal () { |
|
|
|
packSubmitQuotationModal () { |
|
|
|
this.submitResultData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
quotationNo: this.quotationCurrentRow.quotationNo, |
|
|
|
@ -1766,6 +1817,36 @@ |
|
|
|
} |
|
|
|
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 if (data.flag === 2) { // 状态不同 |
|
|
|
this.$message.warning('进度有误,请再次点击选中行!') |
|
|
|
} else { |
|
|
|
this.$message.warning('请选择进度一致的报价单进行操作!') |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { // 没有选中报价单,则根据当前点击行报价单操作 |
|
|
|
this.packSubmitQuotationModal() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 保存提交结果 |
|
|
|
*/ |
|
|
|
@ -1796,10 +1877,11 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 客户回复 |
|
|
|
* 封装回复方法 |
|
|
|
*/ |
|
|
|
customerResponseModal () { |
|
|
|
packCustomerResponseModal () { |
|
|
|
this.customerResponseData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
quotationNo: this.quotationCurrentRow.quotationNo, |
|
|
|
@ -1812,6 +1894,36 @@ |
|
|
|
} |
|
|
|
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 if (data.flag === 2) { // 状态不同 |
|
|
|
this.$message.warning('进度有误,请再次点击选中行!') |
|
|
|
} else { |
|
|
|
this.$message.warning('请选择进度一致的报价单进行操作!') |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { // 没有选中报价单,则根据当前点击行报价单操作 |
|
|
|
this.packCustomerResponseModal() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 保存客户回复 |
|
|
|
*/ |
|
|
|
@ -1858,9 +1970,9 @@ |
|
|
|
} |
|
|
|
getFileContentList(currentData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.fileContentList = data.rows; |
|
|
|
this.fileContentList = data.rows |
|
|
|
} else { |
|
|
|
this.fileContentList = []; |
|
|
|
this.fileContentList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -1872,10 +1984,16 @@ |
|
|
|
titleCon: '报价附件上传', |
|
|
|
site: this.$store.state.user.site, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
quotationNo: this.enterResultData.quotationNo, |
|
|
|
quotationNo: '', |
|
|
|
fileRemark: '', |
|
|
|
folder: 'quotationFile', |
|
|
|
}; |
|
|
|
options: [] |
|
|
|
} |
|
|
|
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); |
|
|
|
|