Browse Source

产品文件

master
han\hanst 1 month ago
parent
commit
2de7d69e2b
  1. 6
      src/views/modules/oss/ossComponents.vue
  2. 85
      src/views/modules/part/partInformation.vue
  3. 86
      src/views/modules/project/projectPart/searchProjectPart.vue

6
src/views/modules/oss/ossComponents.vue

@ -142,8 +142,8 @@ export default {
this.uploadLoading = false;
}).catch((error)=>{
console.error('文件上传失败:', error);
const errorMsg = error.response && error.response.data && error.response.data.msg
? error.response.data.msg
const errorMsg = error.response && error.response.data && error.response.data.msg
? error.response.data.msg
: (error.message || '文件上传失败');
this.$message.error(errorMsg);
this.uploadLoading = false;
@ -265,6 +265,7 @@ export default {
},
watch:{
params:{
immediate: true,
handler(){
this.ossForm.orderRef2 = this.orderRef2;
this.ossForm.orderRef3 = this.orderRef3;
@ -280,7 +281,6 @@ export default {
}
},
mounted() {
this.ossForm.orderRef2 = this.orderRef2;
}
}
</script>

85
src/views/modules/part/partInformation.vue

@ -154,7 +154,7 @@
</el-pagination>
<!-- 物料新增/编辑模态框 -->
<el-dialog :title="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" @close="handleDialogClose" width="1000px">
<el-dialog :title="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" @close="handleDialogClose" width="1050px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="modalData.site" disabled style="width: 60px"></el-input>
@ -637,6 +637,20 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane v-if="modalDisableFlag && !copyFlag2" style="margin-top: -10px" label="产品文件" name="ProductFile">
<oss-components
ref="productFileOss"
:order-ref1="modalData.site"
:order-ref2="modalData.plmPartNo"
:order-ref3="'inventoryPart'"
:columns="columnProductFileList"
height="355px"
title="产品文件"
label="物料编码"
:disabled="modalData.flag === '4'">
</oss-components>
</el-tab-pane>
</el-tabs>
<el-container v-if="modalData.flag === '3'">
<el-aside style="width: 485px">
@ -2966,6 +2980,68 @@
fixed: '',
},
],
columnProductFileList: [
{
columnProp: 'fileName',
headerAlign: "center",
align: "left",
columnLabel: '文件名',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
columnWidth: '200',
status: true,
fixed: '',
},
{
columnProp: 'fileType',
headerAlign: "center",
align: "center",
columnLabel: '文件类型',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
columnWidth: '80',
status: true,
fixed: '',
},
{
columnProp: 'createBy',
headerAlign: "center",
align: "center",
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
columnWidth: '100',
status: true,
fixed: '',
},
{
columnProp: 'createDate',
headerAlign: "center",
align: "center",
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
columnWidth: '150',
status: true,
fixed: '',
},
{
columnProp: 'fileRemark',
headerAlign: "center",
align: "left",
columnLabel: '备注',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
columnWidth: '150',
status: true,
fixed: '',
},
],
columnUnitCostList: [
{
columnProp: 'lotBatchNo',
@ -3495,6 +3571,13 @@
if (this.inventoryPartTable === 'Revisions') {
this.queryPartRevisionList()
}
if (this.inventoryPartTable === 'ProductFile') {
this.$nextTick(() => {
if (this.$refs.productFileOss) {
this.$refs.productFileOss.handleQuery()
}
})
}
},
//

86
src/views/modules/project/projectPart/searchProjectPart.vue

@ -205,6 +205,21 @@
<el-tab-pane label="变更记录" v-if="isAuth('101002002:change')" name="changeRecord">
<change-record :data-list="changeRecordList" :height="240" :columns="columnChangeRecord"></change-record>
</el-tab-pane>
<el-tab-pane label="产品文件" name="productFile">
<oss-components
v-if="currentRow.testPartNo"
ref="productFileOss"
:order-ref1="currentRow.site"
:order-ref2="currentRow.testPartNo"
:order-ref3="'inventoryPart'"
:columns="columnProductFileList"
height="240px"
title="产品文件"
label="PLM物料编码"
:disabled="false">
</oss-components>
<div v-else style="text-align:center;color:#909399;padding:20px;">请在上方表格中选择一条物料记录</div>
</el-tab-pane>
</el-tabs>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -239,6 +254,7 @@
technicalSpecificationListSearchByAnyField
} from "../../../../api/sampleManagement/technicalSpecificationList";
import {projectPartSearchByAnyField} from "../../../../api/project/project";
import OssComponents from "../../oss/ossComponents.vue";
export default {
components: {
FilterSearch,
@ -251,6 +267,7 @@
projectQuotation,
sample,
test,
OssComponents,
},
name: "searchProjectPart",
data() {
@ -755,6 +772,68 @@
columnWidth: 100
},
],
columnProductFileList: [
{
columnProp: 'fileName',
headerAlign: 'center',
align: 'left',
columnLabel: '文件名',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
status: true,
fixed: '',
columnWidth: 200
},
{
columnProp: 'fileType',
headerAlign: 'center',
align: 'center',
columnLabel: '文件类型',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
status: true,
fixed: '',
columnWidth: 80
},
{
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '上传人',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
status: true,
fixed: '',
columnWidth: 100
},
{
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '上传时间',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
status: true,
fixed: '',
columnWidth: 150
},
{
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'left',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
showOverflowTooltip: true,
status: true,
fixed: '',
columnWidth: 150
},
],
}
},
@ -980,6 +1059,13 @@
if (this.activeName === 'changeRecord') {
this.getChangeRecordList()
}
if (this.activeName === 'productFile') {
this.$nextTick(() => {
if (this.$refs.productFileOss) {
this.$refs.productFileOss.handleQuery()
}
})
}
},
refreshTable (type) {
let inData = {

Loading…
Cancel
Save