Browse Source

2024-07-12 更新

master
fengyuan_yang 2 years ago
parent
commit
5de97278dd
  1. 40
      src/views/modules/changeManagement/changeRecord.vue
  2. 26
      src/views/modules/part/bomManagement.vue
  3. 84
      src/views/modules/part/partCatalogInformation.vue
  4. 8
      src/views/modules/part/partInformation.vue
  5. 21
      src/views/modules/part/routingManagement.vue
  6. 2
      src/views/modules/project/projectInfo/com_project_info_part.vue

40
src/views/modules/changeManagement/changeRecord.vue

@ -646,7 +646,7 @@
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="">预览</el-link>
<el-link style="cursor: pointer" @click="previewFile(scope.row)">预览</el-link>
<el-link style="cursor: pointer" @click="downloadFile(scope.row)">下载</el-link>
</template>
</el-table-column>
@ -3458,6 +3458,44 @@
})
},
//
previewFile (row) {
//
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
let type = ''
if (image.includes(row.fileType.toLowerCase())) {
type = 'image/' + row.fileType
}
let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
if (video.includes(row.fileType.toLowerCase())) {
type = 'video/' + row.fileType
}
let txt = ['txt']
if (txt.includes(row.fileType.toLowerCase())) {
type = 'text/plain'
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
if (office.includes(row.fileType.toLowerCase())) {
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return
}
let pdf = ['pdf']
if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
}
if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return;
}
downLoadQuotationFile(row).then(({data}) => {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
const newTab = window.open(fileURL, '_blank')
})
},
// ======== chooseList ========
// S

26
src/views/modules/part/bomManagement.vue

@ -156,6 +156,7 @@
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input>
</el-form-item>
</el-form>
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%; min-height: 120px" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<!-- BOM明细信息页签 -->
<el-tab-pane label="Product Structure" name="bom_detail">
@ -167,7 +168,7 @@
<el-button v-if="modalData.flag === '2'" type="primary" @click="copyBomAlternative()">Copy</el-button>
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete">Retire</el-button>
<!-- <el-button v-if="modalData.flag === '2' && modalData.offFlag === 'Y' && detailData.officialFlag === 'Y'" type="primary" @click="toBecomeOfficialBom">转正式BOM</el-button>-->
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialBom">转正式BOM</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -198,6 +199,7 @@
</el-form>
</el-tab-pane>
</el-tabs>
<el-tabs v-model="subDetailTable" style="width: 100%; min-height: 330px" type="border-card" @tab-click="tabSubDetailClick" class="sub_detail-tab">
<!-- BOM子明细信息页签 -->
<el-tab-pane label="Components" name="bom_sub_detail">
@ -2476,13 +2478,12 @@ export default {
*/
getDataList () {
//
if(localStorage.getItem('bomData')!=undefined){
let data=JSON.parse(localStorage.getItem('bomData'));
this.searchData.partNo=data.partNo
this.searchData.bomType=data.bomType
this.searchData.engChgLevel=data.engChgLevel
if (localStorage.getItem('bomData') != undefined) {
let data = JSON.parse(localStorage.getItem('bomData'))
this.searchData.partNo = data.partNo
this.searchData.bomType = data.bomType
this.searchData.engChgLevel = data.engChgLevel
}
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.queryLoading = true
@ -2493,21 +2494,17 @@ export default {
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll( this.dataList.length)
if(localStorage.getItem('bomData')!=undefined){
if (localStorage.getItem('bomData') != undefined) {
this.updateModal(this.dataList[0])
}
}
this.queryLoading = false
if(localStorage.getItem('bomData')!=undefined){
if (localStorage.getItem('bomData') != undefined) {
this.$nextTick(function () {
localStorage.removeItem('bomData');
localStorage.removeItem('bomData')
})
}
})
},
/**
* 复选列表信息
@ -2588,7 +2585,6 @@ export default {
printUnit: row.printUnit,
printUnitName: row.printUnitName,
officialFlag: row.officialFlag,
offFlag: row.offFlag
}
this.subDetailTable = 'bom_sub_detail'
// bom

84
src/views/modules/part/partCatalogInformation.vue

@ -101,9 +101,9 @@
<el-checkbox v-model="modalData.multilevelTrackingDb" true-label="Y">多级跟踪</el-checkbox><br>
<el-checkbox v-model="modalData.allowAsNotConsumedDb" true-label="Y">允许为未使用</el-checkbox>
</el-form-item>
<el-form-item v-if="modalData.flag === '2' && modalData.officialFlag !== 'Y'">
<el-button type="primary" @click="toBecomeOfficialPart" style="margin-top: 62px;margin-left: 10px;width: 110px">转正式物料</el-button>
</el-form-item>
<!-- <el-form-item v-if="modalData.flag === '2' && modalData.officialFlag !== 'Y'">-->
<!-- <el-button type="primary" @click="toBecomeOfficialPart" style="margin-top: 62px;margin-left: 10px;width: 110px">转正式物料</el-button>-->
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="umName" :rules="rules.umId">
@ -427,6 +427,7 @@
queryMasterPartItem,
toBecomeOfficialMasterPart, //
} from '@/api/part/masterPartInformation.js'
import {getProjectPartNo} from '@/api/part/partInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
export default {
@ -475,7 +476,7 @@
tempCodeNo: '',
//
searchData: {
site: this.$store.state.user.site,
site: '*',
partNo: '',
partDesc: '',
page: 1,
@ -488,7 +489,6 @@
modalData: {
flag: '',
title: '',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
umId: '',
@ -522,7 +522,7 @@
itemDesc: '',
textValue: '',
numValue: '',
recordType: 'MP'
recordType: 'IP'
},
// ======== ========
dataList: [],
@ -1192,7 +1192,7 @@
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
recordType: 'MP'
recordType: 'IP'
}
getItemLists(tempData).then(({data}) => {
this.itemList1 = data.rows.row1
@ -1225,7 +1225,7 @@
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
codeDesc: this.partCurrentRow.codeDesc,
recordType: 'MP',
recordType: 'IP',
itemList: this.itemSelections1
}
addMasterPartItem(inData).then(({data}) => {
@ -1256,7 +1256,7 @@
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
codeDesc: this.partCurrentRow.codeDesc,
recordType: 'MP',
recordType: 'IP',
itemList: this.itemSelections2
}
deleteMasterPartItem(inData).then(({data}) => {
@ -1392,7 +1392,7 @@
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
codeNo: this.partCurrentRow.codeNo,
recordType: 'MP'
recordType: 'IP'
}
getMasterPartItem(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -1407,6 +1407,7 @@
* 获取数据列表
*/
getDataList () {
this.searchData.site = this.$store.state.user.site
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
masterPartSearch(this.searchData).then(({data}) => {
@ -1433,34 +1434,40 @@
* 物料信息新增模态框
*/
addModal () {
this.modalData = {
site: this.$store.state.user.site,
flag: '1',
title: '物料新增',
partNo: '',
partDesc: '',
umId: '',
umName: '',
partMainGroup: '',
groupName: '',
weightNet: '',
uomForWeightNet: '',
volumeNet: '',
uomForVolumeNet: '',
codeNo: '',
codeDesc: '',
conditionCodeUsageDb: '',
multilevelTrackingDb: '',
allowAsNotConsumedDb: '',
lotTrackingCode: 'Not Lot Tracking',
lotQuantityRule: 'One Lot Per Production Order',
subLotRule: 'No Sub Lots Allowed',
componentLotRule: 'Many Lots Allowed',
createBy: this.$store.state.user.name,
officialFlag: 'N'
}
this.modalDisableFlag = false
this.modalFlag = true
getProjectPartNo(this.searchData).then(({data}) => {
if (data && data.code === 0) {
this.modalData = {
flag: '1',
title: '物料新增',
partNo: data.partNo,
partDesc: '',
umId: '',
umName: '',
partMainGroup: '',
groupName: '',
weightNet: '',
uomForWeightNet: '',
volumeNet: '',
uomForVolumeNet: '',
codeNo: '',
codeDesc: '',
conditionCodeUsageDb: '',
multilevelTrackingDb: '',
allowAsNotConsumedDb: '',
lotTrackingCode: 'Not Lot Tracking',
lotQuantityRule: 'One Lot Per Production Order',
subLotRule: 'No Sub Lots Allowed',
componentLotRule: 'Many Lots Allowed',
createBy: this.$store.state.user.name,
officialFlag: 'N'
}
this.modalDisableFlag = false
this.modalFlag = true
} else {
this.$message.error(data.msg)
}
})
},
/**
* 物料信息编辑模态框
@ -1470,7 +1477,6 @@
this.modalData = {
flag: '2',
title: '物料编辑',
site: this.$store.state.user.site,
partNo: row.partNo,
partDesc: row.partDesc,
umId: row.umId,

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

@ -104,7 +104,7 @@
<selectDiv ref="selectDiv"></selectDiv>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
@ -118,7 +118,7 @@
<el-dialog :title="modalData.title" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
<el-input v-model="modalData.partNo" style="width: 128px" @blur="queryMasterField" disabled></el-input>
<el-input v-model="modalData.partNo" style="width: 128px" @blur="queryMasterField"></el-input>
</el-form-item>
<el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px">
<el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
@ -4473,6 +4473,10 @@
this.$message.warning('请选择属性模板!')
return
}
if (this.modalData.flag === '3' && (this.modalData.planningMethod == null || this.modalData.planningMethod === '')) {
this.$message.warning('请选择计划方法!')
return
}
if (this.modalData.flag === '1') {
partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {

21
src/views/modules/part/routingManagement.vue

@ -96,7 +96,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 5px">
<el-form-item prop="partNo" :rules="rules.partNo">
<span v-if="!modalDisableFlag" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
<span v-else="modalDisableFlag" slot="label">物料编码</span>
<span v-else slot="label">物料编码</span>
<el-input v-model="modalData.partNo" :disabled="modalDisableFlag" @blur="partNoBlur" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'" prop="partDesc" :rules="rules.partDesc">
@ -158,7 +158,7 @@
<el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button>
<el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
<el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete">Retire</el-button>
<!-- <el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialRouting">转正式Routing</el-button>-->
<el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialRouting">转正式Routing</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
@ -436,9 +436,12 @@
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item :label="'产出单位'" prop="runTimeCode" :rules="componentRules.runTimeCode">
<el-select v-model="componentData.runTimeCode" clearable style="width: 221px">
<el-option label="单位/小时" value="A"></el-option>
<el-option label="小时/单位" value="B"></el-option>
<el-option label="小时" value="C"></el-option>
<!-- <el-option label="单位/小时" value="A"></el-option>-->
<!-- <el-option label="小时/单位" value="B"></el-option>-->
<!-- <el-option label="小时" value="C"></el-option>-->
<el-option label="单位/小时" value="Units/Hour"></el-option>
<el-option label="小时/单位" value="Hours/Unit"></el-option>
<el-option label="小时" value="Hours"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="laborClassNo" :rules="componentRules.laborClassNo">
@ -1001,7 +1004,9 @@ export default {
createDate: '',
createBy: '',
updateDate: '',
updateBy: ''
updateBy: '',
ifsRowId: '',
ifsRowVersion: ''
},
partData: {
site: this.$store.state.user.site,
@ -2643,6 +2648,8 @@ export default {
overlap: '',
noteText: '',
createBy: this.$store.state.user.name,
ifsRowId: '',
ifsRowVersion: ''
}
this.queryMaxOperationNo()
this.componentDisableFlag = false
@ -2695,6 +2702,8 @@ export default {
overlap: row.overlap,
noteText: row.noteText,
updateBy: this.$store.state.user.name,
ifsRowId: row.ifsRowId,
ifsRowVersion: row.ifsRowVersion
}
this.componentDisableFlag = true
this.componentSaveModal = true

2
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -598,7 +598,7 @@
<el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
<span style="font-size: 12px" >可选物料:</span>
<el-table
height="200px"
height="200px"`
:data="partList1"
border
ref="partTable1"

Loading…
Cancel
Save