8 changed files with 667 additions and 11 deletions
-
7src/api/quotation/quotationHeader.js
-
22src/views/modules/quotation/sellForQuotation.vue
-
0src/views/modules/quotation/sellForQuotation/quotationCustomerContact.vue
-
0src/views/modules/quotation/sellForQuotation/quotationCustomerInformation.vue
-
100src/views/modules/quotation/sellForQuotation/quotationDetail.vue
-
0src/views/modules/quotation/sellForQuotation/quotationExamineAndApprove.vue
-
0src/views/modules/quotation/sellForQuotation/quotationProjectInformation.vue
-
549src/views/modules/quotation/toBeQuoted.vue
@ -0,0 +1,549 @@ |
|||
<template> |
|||
<div> |
|||
<el-form label-position="top" :model="searchData" @keyup.enter.native="getDataList"> |
|||
<el-row :gutter="15"> |
|||
<el-col :span="2"> |
|||
<el-form-item label="客户编码"> |
|||
<el-input v-model="searchData.customerNo" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="searchData.customerDesc" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="跟单员"> |
|||
<el-input v-model="searchData.trackerName" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="产品编码"> |
|||
<el-input v-model="searchData.testPartNo" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="产品名称"> |
|||
<el-input v-model="searchData.partName" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item label="要求完成日期"> |
|||
<el-date-picker |
|||
v-model="searchData.dateValue" |
|||
type="daterange" |
|||
style="width: 100%" |
|||
size="mini" |
|||
unlink-panels |
|||
format="yyyy/MM/dd" |
|||
value-format="yyyy-MM-dd" |
|||
range-separator="至" |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期" |
|||
@change="changeDateRange" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="15"> |
|||
<el-col :span="2"> |
|||
<el-form-item label="项目编码"> |
|||
<el-input v-model="searchData.projectId" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="项目名称"> |
|||
<el-input v-model="searchData.projectName" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="报价专员"> |
|||
<el-input v-model="searchData.quoterName" clearable></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label="优先等级"> |
|||
<el-select v-model="searchData.priorityLevel"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="紧急" value="紧急"></el-option> |
|||
<el-option label="一般" value="一般"></el-option> |
|||
<el-option label="不紧急" value="不紧急"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" @click="getDataList">查 询</el-button> |
|||
<el-button type="primary" :loading="saveBatchQuotationLoading" @click="batchQuotation">报 价</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<!-- 报价列表 --> |
|||
<el-table |
|||
:height="700" |
|||
:data="dataList" |
|||
border |
|||
v-loading="dataListLoading" |
|||
row-key='quotationNo' |
|||
element-loading-text = "数据正在加载中" |
|||
element-loading-spinner = "el-icon-loading" |
|||
@row-click="quotationClickRow" |
|||
@selection-change="selectionQuotation" |
|||
ref="quotationTable" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
type="selection" |
|||
header-align="center" |
|||
reserve-selection |
|||
align="center" |
|||
width="50"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed === ''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<selectDiv ref="selectDiv"></selectDiv> |
|||
|
|||
<!-- 分页插件 --> |
|||
<el-pagination style="margin-top: 0px" |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[50, 100, 200, 500]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
quotationInformationSearch, // 询价信息列表查询 |
|||
} from '@/api/quotation/quotationInformation.js' |
|||
import { |
|||
saveBatchQuotationHeader,//批量报价 |
|||
} from '@/api/quotation/quotationHeader.js'; |
|||
export default { |
|||
data(){ |
|||
return{ |
|||
// 查询条件 |
|||
searchData:{ |
|||
site: this.$store.state.user.site, |
|||
customerNo: '', |
|||
customerDesc: '', |
|||
trackerName: '', |
|||
testPartNo: '', |
|||
partName: '', |
|||
quotationStatus: '草稿', |
|||
startDate: '', |
|||
endDate: '', |
|||
projectId: '', |
|||
projectName: '', |
|||
quoterName: '', |
|||
priorityLevel: '', |
|||
limit:1, |
|||
page:0, |
|||
}, |
|||
// 分页 |
|||
pageIndex: 1,//当前页码 |
|||
pageSize:50,//每页条数 |
|||
totalPage:0,//总条数 |
|||
// 表格数据 |
|||
dataList:[],//表格数据 |
|||
quotationSelections:[],//表格选中数据 |
|||
// 表格刷新 |
|||
dataListLoading:false, |
|||
// 按钮状态 |
|||
saveBatchQuotationLoading:false, |
|||
// ======== 列表表头 ======== |
|||
columnList: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1QuotationNo', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'quotationNo', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '申请单号', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1CustomerNo', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'customerNo', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '客户编码', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1CustomerDesc', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'customerDesc', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '客户名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1ProjectId', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'projectId', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '项目编码', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1ProjectName', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'projectName', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '项目名称', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1TrackerName', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'trackerName', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '跟单员', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1QuoterName', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'quoterName', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '报价专员', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1TestPartNo', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'testPartNo', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '项目料号', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 130 |
|||
}, |
|||
{ |
|||
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, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1PriorityLevel', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'priorityLevel', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '优先等级', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1RequiredCompletionDate', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'requiredCompletionDate', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '要求完成日期', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 160 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1quotationStatus', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'quotationStatus', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '状态', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1CreateDate', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'createDate', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '创建时间', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 160 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 102001, |
|||
serialNumber: '102001Table1CreateBy', |
|||
tableId: '102001Table1', |
|||
tableName: '报价信息表', |
|||
columnProp: 'createBy', |
|||
headerAlign: 'center', |
|||
align: 'center', |
|||
columnLabel: '创建人', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: '', |
|||
columnWidth: 80 |
|||
}, |
|||
], |
|||
} |
|||
}, |
|||
created() { |
|||
this.getDataList(); |
|||
}, |
|||
methods:{ |
|||
|
|||
// 搜索条件中的时间输入框 change事件 |
|||
changeDateRange(){ |
|||
if (this.searchData.dateValue){ |
|||
this.searchData.startDate = this.searchData.dateValue[0]; |
|||
this.searchData.endDate = this.searchData.dateValue[1]; |
|||
}else { |
|||
this.searchData.startDate=""; |
|||
this.searchData.endDate=""; |
|||
} |
|||
}, |
|||
/** |
|||
* 获取数据列表 |
|||
*/ |
|||
getDataList () { |
|||
this.searchData.limit = this.pageSize |
|||
this.searchData.page = this.pageIndex |
|||
this.dataListLoading = true; |
|||
quotationInformationSearch(this.searchData).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.dataList = data.page.list |
|||
this.pageIndex = data.page.currPage |
|||
this.pageSize = data.page.pageSize |
|||
this.totalPage = data.page.totalCount |
|||
this.$refs.selectDiv.setLengthAll(this.dataList.length) |
|||
} |
|||
this.dataListLoading = false; |
|||
}) |
|||
}, |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getDataList() |
|||
}, |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.getDataList() |
|||
}, |
|||
// 表格单击事件 |
|||
quotationClickRow (row) { |
|||
this.$refs.quotationTable.toggleRowSelection(row) |
|||
}, |
|||
selectionQuotation (val) { |
|||
this.quotationSelections = val |
|||
this.$refs.selectDiv.setLengthselected(this.quotationSelections.length) |
|||
}, |
|||
// 报价 |
|||
batchQuotation(){ |
|||
if (this.quotationSelections.length === 0){ |
|||
this.$message.warning("请选择需报价的单号") |
|||
return |
|||
} |
|||
let batchInsertList = this.quotationSelections.map(item=>{ |
|||
let insertData = { |
|||
site:this.$store.state.user.site, |
|||
quotationNo:"",//客户报价单号 |
|||
quotationDate:new Date(),//报价日期 |
|||
customerNo:item.customerNo, // 客户编号 |
|||
customerName:item.customerDesc,//客户名称 |
|||
versionCode:"001", |
|||
projectId:item.projectId,//项目编码 |
|||
projectName:item.projectName,//项目名称 |
|||
tracker:item.tracker,//跟单员 |
|||
currency:item.customerCurrency,//货币 |
|||
quotationStatus:"草稿",//状态 |
|||
remark:"",//备注 |
|||
customerInquiryNo:"",//客户询价单号 |
|||
internalInquiryNo:item.quotationNo,//内部询价单号 |
|||
requireApproval:"",//需要审批 |
|||
approvalStatus:"",//审批状态 |
|||
createBy:this.$store.state.user.id,//当前登录账号 |
|||
createTime:new Date(),//当前时间 |
|||
}; |
|||
return insertData; |
|||
}) |
|||
this.saveBatchQuotationHeader(batchInsertList); |
|||
}, |
|||
// 批量新增报价信息 |
|||
saveBatchQuotationHeader(list){ |
|||
this.saveBatchQuotationLoading = true; |
|||
saveBatchQuotationHeader(list).then(({data})=>{ |
|||
this.saveBatchQuotationLoading = false; |
|||
if (data.code === 200){ |
|||
this.$message.success(data.msg); |
|||
this.$refs.quotationTable.clearSelection(); |
|||
this.getDataList(); |
|||
}else { |
|||
this.$message.error(data.msg); |
|||
} |
|||
}).catch((error)=>{ |
|||
this.saveBatchQuotationLoading = false; |
|||
}) |
|||
}, |
|||
}, |
|||
mounted() { |
|||
}, |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-range-editor--mini.el-input__inner { |
|||
height: 20px; |
|||
} |
|||
/deep/ .el-range-editor.el-input__inner{ |
|||
padding: 0px 10px; |
|||
} |
|||
/deep/ .el-date-editor .el-range-separator{ |
|||
width: auto; |
|||
} |
|||
/deep/ .el-input--mini .el-input__icon{ |
|||
line-height: 20px; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue