4 changed files with 554 additions and 2 deletions
-
2src/api/quote/quotationInformation.js
-
2src/api/quote/quote.js
-
4src/views/modules/quote/primary/quoteSearch.vue
-
548src/views/modules/quote/quotes.vue
@ -0,0 +1,548 @@ |
|||||
|
<script> |
||||
|
import DictDataSelect from "../sys/dict-data-select.vue"; |
||||
|
import {queryQuotationInformationByPage} from "@/api/quote/quotationInformation"; |
||||
|
import {batchSaveQuote} from "../../../api/quote/quote"; |
||||
|
|
||||
|
export default { |
||||
|
name: "quotes", |
||||
|
components: {DictDataSelect}, |
||||
|
data(){ |
||||
|
return{ |
||||
|
no:1, |
||||
|
size:50, |
||||
|
total:0, |
||||
|
queryForm: { |
||||
|
customerNo:'', |
||||
|
quotationBatchNo:'', |
||||
|
customerDesc:'', |
||||
|
partNo:'', |
||||
|
partDesc:'', |
||||
|
startDate:null, |
||||
|
endDate:null, |
||||
|
quotationItemNo:undefined, |
||||
|
projectNo:'', |
||||
|
projectDesc:'', |
||||
|
quoterName:'', |
||||
|
priorityLevel:'', |
||||
|
quotationStatus:'下达', |
||||
|
}, |
||||
|
dataList:[], |
||||
|
queryLoading:false, |
||||
|
selectionList:[], |
||||
|
columns:[ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1QuotationNo', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'quotationNo', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1QuotationBatchNo', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'quotationBatchNo', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1QuotationItemNo', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'quotationItemNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'right', |
||||
|
columnLabel: '序号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 60 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1CustomerNo', |
||||
|
tableId: '5012Table1', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1CustomerDesc', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'customerDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '客户名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1ProjectId', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'projectNo', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1ProjectDesc', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'projectDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '项目名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1ProjectManagerName', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'projectManagerName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: 'PM/Sales', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1ProjectOwnerName', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'projectOwnerName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: 'PjM', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1QuoterName', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'quoterName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '报价专员', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1TestPartNo', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'testPartNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '项目料号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 160 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1PartDesc', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'partDesc', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '物料描述', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1PriorityLevel', |
||||
|
tableId: '5012Table1', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1RequiredCompletionDate', |
||||
|
tableId: '5012Table1', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1quotationStatus', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'quotationStatus', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1CreateDate', |
||||
|
tableId: '5012Table1', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1CreateBy', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'createBy', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '创建人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 5012, |
||||
|
serialNumber: '5012Table1UpdateDate', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'updateDate', |
||||
|
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: 5012, |
||||
|
serialNumber: '5012Table1UpdateBy', |
||||
|
tableId: '5012Table1', |
||||
|
tableName: '询价信息表', |
||||
|
columnProp: 'updateBy', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '更新人', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 80 |
||||
|
} |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
handleQuery(){ |
||||
|
let params = { |
||||
|
...this.queryForm, |
||||
|
no: this.no, |
||||
|
size: this.size, |
||||
|
createBy: this.$store.state.user.name, |
||||
|
} |
||||
|
this.queryLoading = true |
||||
|
queryQuotationInformationByPage(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.dataList = data.rows.map((item)=>{ |
||||
|
item.projectManagerName = item.projectManager.split('-')[1] |
||||
|
item.projectOwnerName = item.projectOwner.split('-')[1] |
||||
|
return item |
||||
|
}) |
||||
|
this.total = data.total |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
this.queryLoading = false |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error); |
||||
|
this.queryLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
handleSizeChange(val){ |
||||
|
this.size = val |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
handlePageChange(val){ |
||||
|
this.no = val |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
handleSelectionChange(val) { |
||||
|
this.selectionList = val; |
||||
|
}, |
||||
|
handleQuote(){ |
||||
|
if (this.selectionList.length === 0){ |
||||
|
this.$message.warning("请选择需要报价的单据"); |
||||
|
return; |
||||
|
} |
||||
|
let params = this.selectionList.map((item)=>{ |
||||
|
item.createBy = this.$store.state.user.name |
||||
|
return item |
||||
|
}) |
||||
|
batchSaveQuote(params).then(({data})=>{ |
||||
|
if (data && data.code === 0){ |
||||
|
this.$message.success(data.msg); |
||||
|
}else { |
||||
|
this.$message.warning(data.msg); |
||||
|
} |
||||
|
}).catch((error)=>{ |
||||
|
this.$message.error(error); |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div> |
||||
|
<el-form :model="queryForm" label-position="top" label-width="100px" style="width: 1100px"> |
||||
|
<el-row :gutter="15"> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="申请批次号"> |
||||
|
<el-input v-model="queryForm.quotationBatchNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="客户编码"> |
||||
|
<el-input v-model="queryForm.customerNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="客户名称"> |
||||
|
<el-input v-model="queryForm.customerDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="项目料号"> |
||||
|
<el-input v-model="queryForm.partNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="物料描述"> |
||||
|
<el-input v-model="queryForm.partDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="6"> |
||||
|
<el-form-item label="要求完成日期"> |
||||
|
<div style="display: flex"> |
||||
|
<el-date-picker style="width: 47%" v-model="queryForm.startDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker> |
||||
|
<div style="width: 6%;text-align: center">-</div> |
||||
|
<el-date-picker style="width: 47%" v-model="queryForm.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker> |
||||
|
</div> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row :gutter="15"> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="批次序号"> |
||||
|
<el-input-number :controls="false" :min="0" style="width: 100%" v-model="queryForm.quotationItemNo"></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="项目编码"> |
||||
|
<el-input v-model="queryForm.projectNo"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="项目名称"> |
||||
|
<el-input v-model="queryForm.projectDesc"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="报价专员"> |
||||
|
<el-input v-model="queryForm.quoterName"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="3"> |
||||
|
<el-form-item label="优先等级"> |
||||
|
<dict-data-select v-model="queryForm.priorityLevel" clearable :use-default-value="false" dict-type="priority_Level"/> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="3">--> |
||||
|
<!-- <el-form-item :label="'状态'">--> |
||||
|
<!-- <el-select v-model="queryForm.quotationStatus" style="width: 100%">--> |
||||
|
<!-- <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="3"> |
||||
|
<el-form-item label=" "> |
||||
|
<el-button type="primary" @click="handleQuery">查询</el-button> |
||||
|
<el-button type="primary" @click="handleQuote">报价</el-button> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<el-table :data="dataList" border v-loading="queryLoading" height="75vh" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columns" :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> |
||||
|
<el-pagination @size-change="handleSizeChange" |
||||
|
@current-change="handlePageChange" |
||||
|
:current-page="no" |
||||
|
:page-sizes="[ 50, 100, 200, 500]" |
||||
|
:page-size="size" |
||||
|
:total="total" |
||||
|
layout="total,sizes, prev, pager, next, jumper"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue