|
|
|
@ -134,19 +134,19 @@ |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
prop="templateId" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="模板编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="templateName" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
label="模板名称" |
|
|
|
:width="flexColumnWidth2('模板名称','templateName')"> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- prop="templateId"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- label="模板编码">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- prop="templateName"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="left"--> |
|
|
|
<!-- label="模板名称"--> |
|
|
|
<!-- :width="flexColumnWidth2('模板名称','templateName')">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnDetailList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
@ -162,24 +162,24 @@ |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="operation" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="工序"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="resourceID" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="机台"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="manufacturerName" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="供应商"> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- prop="operation"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- label="工序">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- prop="resourceID"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- label="机台">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- prop="manufacturerName"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- label="供应商">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
@ -572,6 +572,10 @@ |
|
|
|
getManufacturerList, // 查询供应商列表 |
|
|
|
getAllResourceList // 查询机台列表 |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import { |
|
|
|
getTableDefaultListLanguage, |
|
|
|
getTableUserListLanguage, |
|
|
|
} from "@/api/table.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
import qcUpload from "./qc_upload"; |
|
|
|
@ -636,6 +640,12 @@ |
|
|
|
}, |
|
|
|
columnList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1PartNo', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 146, |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -648,6 +658,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1PartDesc', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'partDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
@ -660,6 +676,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1FamilyName', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'familyName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -672,6 +694,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1Umid', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'umid', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -683,19 +711,13 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
// { |
|
|
|
// columnProp: 'supplierDesc', |
|
|
|
// headerAlign: "center", |
|
|
|
// align: "center", |
|
|
|
// columnLabel: '供应商', |
|
|
|
// columnHidden: false, |
|
|
|
// columnImage: false, |
|
|
|
// columnSortable: false, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: '', |
|
|
|
// }, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1ExemptInspection', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'exemptInspection', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -708,6 +730,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1AttributeRemark', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'attributeRemark', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -720,6 +748,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1CreateTime', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'createTime', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -732,6 +766,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1CreateBy', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'createBy', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -744,6 +784,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1UpdateDate', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'updateDate', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -756,6 +802,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table1UpdateBy', |
|
|
|
tableId: "301003Table1", |
|
|
|
tableName: "物料属性设置表", |
|
|
|
columnWidth: 144, |
|
|
|
columnProp: 'updateBy', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -775,6 +827,48 @@ |
|
|
|
// 展示列集 |
|
|
|
columnDetailList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2TemplateId', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'templateId', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '模板编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2TemplateName', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 137, |
|
|
|
columnProp: 'templateName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '模板名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2InspectionTypeName', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'inspectionTypeName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -787,6 +881,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2TemplateVersion', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'templateVersion', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
@ -799,6 +899,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2DefaultSamplingQuantity', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'defaultSamplingQuantity', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -811,6 +917,12 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2DefaultSamplingProportion', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'defaultSamplingProportion', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
@ -822,6 +934,60 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2OperationDesc', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'operationDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '工序', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2ResourceDesc', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'resourceDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '机台', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 301003, |
|
|
|
serialNumber: '301003Table2ManufacturerName', |
|
|
|
tableId: "301003Table2", |
|
|
|
tableName: "检验模板清单表", |
|
|
|
columnWidth: 80, |
|
|
|
columnProp: 'manufacturerName', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '供应商', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
], |
|
|
|
// 快速添加 |
|
|
|
fastAddFlag:false, |
|
|
|
@ -890,6 +1056,9 @@ |
|
|
|
this.getDataList(); |
|
|
|
this.favoriteIsOk(); |
|
|
|
this.inspectionTypeSearch(); |
|
|
|
// 动态列 |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table2',2) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
@ -1560,7 +1729,72 @@ |
|
|
|
this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID) |
|
|
|
} |
|
|
|
this.manufacturerModelFlag = false |
|
|
|
} |
|
|
|
}, |
|
|
|
// 动态列开始 获取 用户保存的 格式列 |
|
|
|
async getTableUserColumn(tableId, columnId) { |
|
|
|
let queryTableUser = { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
status: true, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableUserListLanguage(queryTableUser).then(({data}) => { |
|
|
|
if (data.rows.length > 0) { |
|
|
|
//this.columnList1 = [] |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.columnList = data.rows |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
this.columnDetailList = data.rows |
|
|
|
break; |
|
|
|
// case 3: |
|
|
|
// this.columnList2 = data.rows |
|
|
|
// break; |
|
|
|
// case 4: |
|
|
|
// this.columnList3 = data.rows |
|
|
|
// break; |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.getColumnList(tableId, columnId) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取 tableDefault 列 |
|
|
|
async getColumnList(tableId, columnId) { |
|
|
|
this.queryTable.tableId = tableId |
|
|
|
let queryTable= { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableDefaultListLanguage(queryTable).then(({data}) => { |
|
|
|
if (!data.rows.length == 0) { |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.columnList = data.rows |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
this.columnDetailList = data.rows |
|
|
|
break; |
|
|
|
// case 3: |
|
|
|
// this.columnList2 = data.rows |
|
|
|
// break; |
|
|
|
// case 4: |
|
|
|
// this.columnList3 = data.rows |
|
|
|
// break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
// this.showDefault = true. |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
//动态列结束 |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |