diff --git a/src/views/modules/quote/quotes.vue b/src/views/modules/quote/quotes.vue
index b4c7b82..c5458da 100644
--- a/src/views/modules/quote/quotes.vue
+++ b/src/views/modules/quote/quotes.vue
@@ -3,12 +3,14 @@ import DictDataSelect from "../sys/dict-data-select.vue";
import {queryQuotationInformationByPage} from "@/api/quote/quotationInformation";
import {batchSaveQuote} from "@/api/quote/quote";
import {getSiteAndBuByUserName} from "../../../api/qc/qc";
-import {searchInquiryDetailHeaderInfo} from "../../../api/inquiry/inquiryDetail";
+import {searchInquiryDetailHeaderInfo, searchInquiryDetailInfo} from "../../../api/inquiry/inquiryDetail";
import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
+import OssComponents from "../oss/ossComponents.vue";
+import {searchInquiryApplicationInfo} from "../../../api/inquiry/inquiryApplication";
export default {
name: "quotes",
- components: {DictDataSelect},
+ components: {OssComponents, DictDataSelect},
props:{
isComponent:{
type: Boolean,
@@ -25,6 +27,8 @@ export default {
pageSize: 50,
totalPage: 0,
userBuList:[],
+ // 初始页签
+ activeTable: 'inquiryPart',
queryForm: {
site: this.$store.state.user.site,
customerNo: '',
@@ -47,8 +51,9 @@ export default {
menuId: this.$route.meta.menuId,
},
dataList:[],
+ inquiryPartDataList:[],
queryLoading:false,
- selectionList:[],
+ dataListLoading:false,
columns:[
{
userId: this.$store.state.user.name,
@@ -215,31 +220,49 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5012,
- serialNumber: '5012Table2PartNo',
- tableId: '5012Table2',
- tableName: '询价产品表',
- columnProp: 'partNo',
+ serialNumber: '5012Table1Status',
+ tableId: '5012Table1',
+ tableName: '询价信息表',
+ columnProp: 'status',
headerAlign: 'center',
align: 'center',
- columnLabel: '产品编码',
+ columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120
+ columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 5012,
- serialNumber: '5012Table2PartDesc',
- tableId: '5012Table2',
+ 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: '5012Table1Remark',
+ tableId: '5012Table1',
tableName: '询价产品表',
- columnProp: 'partDesc',
+ columnProp: 'remark',
headerAlign: 'center',
align: 'center',
- columnLabel: '产品描述',
+ columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -251,31 +274,105 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5012,
- serialNumber: '5012Table1Status',
+ serialNumber: '5012Table1CreateDate',
tableId: '5012Table1',
tableName: '询价信息表',
- columnProp: 'status',
+ columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
- columnLabel: '状态',
+ columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100
+ 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: '5012Table2InquiryQty',
- tableId: '5012Table2',
+ 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
+ }
+ ],
+ inquiryPartColumnList: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 5022,
+ serialNumber: '5022Table2BuDesc',
+ tableId: '5022Table2',
tableName: '询价产品表',
- columnProp: 'inquiryQty',
+ columnProp: 'buDesc',
headerAlign: 'center',
align: 'center',
- columnLabel: '询价数量',
+ columnLabel: 'BU',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 80
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 5022,
+ serialNumber: '5022Table2PartNo',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
+ columnProp: 'partNo',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '产品编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -286,9 +383,45 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table2Unit',
- tableId: '5012Table2',
+ functionId: 5022,
+ serialNumber: '5022Table2TestPartDesc',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
+ columnProp: 'testPartDesc',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: '产品描述',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 150
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 5022,
+ serialNumber: '5022Table2InquiryQty',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
+ columnProp: 'inquiryQty',
+ headerAlign: 'center',
+ align: 'right',
+ columnLabel: '询价数量',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 5022,
+ serialNumber: '5022Table2Unit',
+ tableId: '5022Table2',
tableName: '询价产品表',
columnProp: 'umName',
headerAlign: 'center',
@@ -304,9 +437,9 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table2CodeNo',
- tableId: '5012Table2',
+ functionId: 5022,
+ serialNumber: '5022Table2CodeNo',
+ tableId: '5022Table2',
tableName: '询价产品表',
columnProp: 'codeNo',
headerAlign: 'center',
@@ -318,35 +451,35 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120
+ columnWidth: 100
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table1PriorityLevel',
- tableId: '5012Table1',
- tableName: '询价信息表',
- columnProp: 'priorityLevel',
+ functionId: 5022,
+ serialNumber: '5022Table2PartBomStatus',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
+ columnProp: 'partBomStatus',
headerAlign: 'center',
align: 'center',
- columnLabel: '优先等级',
+ columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80
+ columnWidth: 100
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table2Remark',
- tableId: '5012Table2',
+ functionId: 5022,
+ serialNumber: '5022Table2Remark',
+ tableId: '5022Table2',
tableName: '询价产品表',
columnProp: 'remark',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
@@ -354,14 +487,14 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120
+ columnWidth: 160
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table1CreateDate',
- tableId: '5012Table1',
- tableName: '询价信息表',
+ functionId: 5022,
+ serialNumber: '5022Table2CreateDate',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@@ -376,13 +509,13 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table1CreateBy',
- tableId: '5012Table1',
- tableName: '询价信息表',
+ functionId: 5022,
+ serialNumber: '5022Table2CreateBy',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
columnProp: 'createBy',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
@@ -394,10 +527,10 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table1UpdateDate',
- tableId: '5012Table1',
- tableName: '询价信息表',
+ functionId: 5022,
+ serialNumber: '5022Table2UpdateDate',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
@@ -412,13 +545,13 @@ export default {
},
{
userId: this.$store.state.user.name,
- functionId: 5012,
- serialNumber: '5012Table1UpdateBy',
- tableId: '5012Table1',
- tableName: '询价信息表',
+ functionId: 5022,
+ serialNumber: '5022Table2UpdateBy',
+ tableId: '5022Table2',
+ tableName: '询价产品表',
columnProp: 'updateBy',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
@@ -430,6 +563,8 @@ export default {
}
],
quoteLoading:false,
+ // ======== 选中的当前行数据 ========
+ inquiryCurrentRow: {},
}
},
methods:{
@@ -497,12 +632,19 @@ export default {
this.queryForm.page = this.pageIndex
this.queryForm.status = 'B'
this.queryLoading = true
- searchInquiryDetailHeaderInfo(this.queryForm).then(({data})=>{
+ searchInquiryApplicationInfo(this.queryForm).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
+ //判断是否全部存在数据
+ if (this.totalPage > 0) {
+ //设置选中行
+ this.$refs.mainTable.setCurrentRow(this.dataList[0])
+ this.refreshCurrentTabTable() //加载当前的页签的table
+ this.inquiryClickRow(this.dataList[0])
+ }
}else {
this.$message.warning(data.msg);
}
@@ -521,18 +663,13 @@ export default {
this.pageIndex = val
this.handleQuery();
},
- handleSelectionChange(val) {
- this.selectionList = val;
- },
- handleQuote(){
- if (this.selectionList.length === 0){
- this.$message.warning("请选择需要报价的单据");
- return;
+ handleQuote(row){
+ let params = {
+ inquiryPartDataList: this.inquiryPartDataList,
+ createBy: this.$store.state.user.name,
+ rfqId: row.id,
+ ...row
}
- let params = this.selectionList.map((item)=>{
- item.createBy = this.$store.state.user.name
- return item
- })
this.quoteLoading = true
batchSaveQuote(params).then(({data})=>{
this.quoteLoading = false
@@ -555,7 +692,74 @@ export default {
},
handleDblClick(row){
this.$emit('dblclick',row)
- }
+ },
+
+ // ======== 页签切换相关方法 ========
+ /**
+ * 列表表格选择替换
+ * @param tab
+ * @param event
+ */
+ tabClick(tab, event) {
+ // 刷新列表数据
+ this.refreshCurrentTabTable()
+ },
+
+ // ======== 列表操作方法 ========
+ /**
+ * 单机选中询价信息
+ * @param row
+ */
+ inquiryClickRow(row) {
+ this.inquiryCurrentRow = JSON.parse(JSON.stringify(row))
+ },
+ /**
+ * 当前值发生变化的时候修改
+ * @param row
+ * @param oldRow
+ */
+ changeCurrentRow(row, oldRow) {
+ // 判断是否是获取焦点的事件
+ if (row) {
+ this.inquiryCurrentRow = JSON.parse(JSON.stringify(row))
+ //刷新当前页表
+ this.refreshCurrentTabTable()
+ }
+ },
+ /**
+ * 刷新页签的table数据
+ */
+ refreshCurrentTabTable() {
+ if (this.activeTable === 'inquiryPart') {
+ this.searchInquiryDetailInfo()
+ }
+ },
+
+ // ======== 询价产品相关方法 ========
+ searchInquiryDetailInfo() {
+ let tempData = {
+ rfqId: this.inquiryCurrentRow.id,
+ buNo: this.inquiryCurrentRow.buNo,
+ page: this.pageIndex,
+ limit: this.pageSize
+ }
+ searchInquiryDetailInfo(tempData).then(({data}) => {
+ if (data.code === 0) {
+ this.inquiryPartDataList = data.page
+ //判断是否全部存在数据
+ if (this.inquiryPartDataList != null && this.inquiryPartDataList.length > 0) {
+ //设置选中行
+ this.$refs.secondaryTable.setCurrentRow(this.inquiryPartDataList[0])
+ }
+ }
+ })
+ },
+
+ rowStyle({row}) {
+ if (this.inquiryCurrentRow.id === row.id) {
+ return {'background-color': '#E8F7F6', cursor: 'pointer'};
+ }
+ },
},
created() {
this.handleQuery();
@@ -663,12 +867,9 @@ export default {
-
- 客户编码
-
-
-
-
+
+ PjM
+
-
- 产品编码
-
-
-
-
+
+ 客户编码
+
-
- PjM
-
+
+
报价专员
@@ -735,7 +932,6 @@ export default {
查询
- 报价
@@ -753,8 +949,11 @@ export default {
-
-
+
草稿
- 已下达
+ 下达
已报价
- 重要客户
- 潜力客户
- 一般客户
+ 普通
+ 重要
+ 紧急
+
+
+ 转报价
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
-