Commit f8fc96b4 authored by jingnan's avatar jingnan 👀

实物构型管理功能开发

parent 2ad96102
<template>
<section>
<div class="physicalConfigurationManagement-from">
<div class="icon-wrapper">
<img src="/icons/r-access.png" class="icon">
<span>架次查询</span>
</div>
<el-form ref="ruleForm" :model="form" label-width="70px">
<el-form-item label="机型:" prop="model">
<el-select v-model="form.model" clearable @change="getAddRecursion">
<el-option
v-for="item in dataModel"
:key="item.id"
:label="item.resName"
:value="item.resCode"
/>
</el-select>
</el-form-item>
<el-form-item label="架次:" prop="sortie">
<el-select v-model="form.sortie" filterable clearable :loading="sortiesLoading" @change="getTreeData">
<el-option
v-for="item in dataSortie"
:key="item.id"
:label="item.serialNo"
:value="item.serialNo"
/>
</el-select>
</el-form-item>
</el-form>
</div>
</section>
</template>
<script>
export default {
data() {
return {
form: {
model: '',
sortie: ''
},
dataModel: [],
sortiesLoading: true,
dataSortie: [],
isCollapse: false
}
},
mounted() {
this.getModelData()
},
methods: {
/**
* 获取机型
*/
getModelData() {
this.modelData = []
const params = { 'searchItems': { 'items': [] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
this.$api.searchApi('AircraftType', params).then((res) => {
if (res.items && res.items.content && res.items.content.length) {
this.dataModel = res.items.content.map(p => {
return {
id: p.id,
resCode: p.defCode,
resName: p.defName
}
})
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
this.form.model = this.dataModel[0].resCode
this.getAddRecursion()
})
})
},
/**
* 获取架次数据
*/
getAddRecursion() {
this.sortiesLoading = true
const params = {
'searchItems': {
'items': [{
'fieldName': 'aircraftTypeId',
'operator': 'EQ',
'value': this.dataModel.filter(p => p.resCode === this.form.model)[0].id
}]
},
sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }]
}
this.dataSortie = []
this.$api.searchApi('AircraftSorties', params)
.then((res) => {
if (res.items && res.items.content && res.items.content.length) {
this.dataSortie = res.items.content.map(p => {
return {
id: p.id,
serialNo: p.defCode
}
})
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.dataSortie.length) this.form.sortie = this.dataSortie[0].serialNo
this.sortiesLoading = false
this.$parent.$parent.$refs.right.handleClick()
this.getTreeData()
})
})
},
getTreeData() {
this.$parent.$refs.tree.getTreeData()
}
}
}
</script>
<style lang="scss" >
.physicalConfigurationManagement-from {
border: 1px solid #ccc;
border-radius: 8px;
box-sizing: border-box;
padding: 20px;
.el-select {
width: 100%;
}
.el-form-item:last-child {
margin-bottom: 0px;
}
.form-btn {
text-align: center;
}
.icon-wrapper {
.icon,
span {
vertical-align: middle;
}
margin-bottom: 10px;
}
}
</style>
......@@ -15,7 +15,7 @@
</div>
<div class="row">
<label>架次:</label>
<el-select v-model="form.sorties" filterable clearable size="mini" placeholder="请选择" :loading="sortiesLoading">
<el-select v-model="form.sorties" filterable clearable size="mini" placeholder="请选择">
<el-option
v-for="item in sortiesData"
:key="item.id"
......@@ -46,7 +46,6 @@ export default {
sorties: ''
},
modelData: [],
sortiesLoading: true,
sortiesData: [],
defaultProps: {
children: 'children',
......@@ -67,6 +66,7 @@ export default {
const model = this.modelData.find((r) => r.id === val)
this.$set(this.form, 'modelName', (model && model.defName) || '')
this.$set(this.form, 'sorties', '')
this.updateForm()
this.getSortiesData()
}
},
......@@ -78,6 +78,7 @@ export default {
}
const sorties = this.sortiesData.find((r) => r.id === val)
this.$set(this.form, 'sortiesName', (sorties && sorties.defCode) || '')
this.updateForm()
this.getExtPosition()
}
}
......@@ -91,33 +92,33 @@ export default {
*/
getModelData() {
this.modelData = []
const params = { 'searchItems': { 'items': [] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
this.$api.searchApi('AircraftType', params).then((res) => {
if (res.items && res.items.content && res.items.content.length) {
this.modelData = res.items.content.map(p => {
return {
const params = {
'searchItems': { 'items': [] },
'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }]
}
this.$api.searchApi('AircraftType', params)
.then(res => {
if (res && res.items && res.items.content && res.items.content.length) {
this.modelData = res.items.content.map(p => ({
id: p.id,
defCode: p.defCode,
defName: p.defName
}
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.modelData && this.modelData.length) {
}))
// 如果modelData不为空,则设置form.model为第一个元素的id
if (this.modelData.length) {
this.form.model = this.modelData[0].id
}
this.getSortiesData()
})
}
})
.catch(err => {
console.error('Failed to fetch aircraft types:', err)
})
},
/**
* 获取架次数据
*/
getSortiesData() {
this.sortiesLoading = true
const params = {
'searchItems': {
'items': [{
......@@ -126,123 +127,35 @@ export default {
'value': this.form.model || ''
}]
},
sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }]
'sortItem': [{ 'fieldName': 'defCode', 'sortOrder': 'asc' }]
}
this.sortiesData = []
this.$api.searchApi('AircraftSorties', params)
.then((res) => {
if (res.items && res.items.content && res.items.content.length) {
this.sortiesData = res.items.content.map(p => {
return {
id: p.id,
defCode: p.defCode
}
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.sortiesData && this.sortiesData.length) {
this.sortiesData = res.items.content.map(p => ({
id: p.id,
defCode: p.defCode
}))
if (this.sortiesData.length) {
this.form.sorties = this.sortiesData[0].id
this.$set(this.form, 'sortiesName', (this.sortiesData[0].defCode) || '')
}
this.sortiesLoading = false
// this.$parent.$parent.$refs.right.handleClick()
this.getExtPosition()
})
}
})
.catch((err) => {
console.error('Failed to fetch aircraft sorties:', err)
})
},
updateForm() {
this.$emit('formChange', this.form)
},
/**
* 初始化树结构
*/
getExtPosition() {
this.$refs.tree.getExtPosition()
// this.reloadTreeData()
},
// 加载数据
// getExtPosition(level = -1) {
// this.treeLoading = true
// const params = {
// pageFrom: 1,
// pageSize: 9999,
// searchItems: {
// children: [
// {
// items: [
// {
// fieldName: 'aircraftSortiesId', // 架次ID
// operator: 'EQ',
// value: this.form.sorties || ''
// }
// ],
// operator: 'AND'
// }
// ],
// items: [],
// operator: 'AND'
// },
// openProps: [
// {
// name: 'extPositionPlans'
// },
// {
// name: 'extPositionLinks',
// openProps: [
// {
// name: 'target',
// openProps: [
// {
// name: 'wrProduction'
// }
// ]
// }
// ]
// }
// ],
// sortItem: [
// {
// 'fieldName': 'serialNumber',
// 'sortOrder': 'desc'
// }
// ]
// }
// this.$api.searchApi('ExtPosition', params)
// .then((res) => {
// res.items && res.items.content && res.items.content.forEach(element => {
// element.workingStatus = element.extPositionPlans && element.extPositionPlans.length > 0 ? element.extPositionPlans[0].planState : null
// })
// this.treeData = [
// {
// serialNumber: `BBOM-${this.form.modelName}-${this.form.sortiesName}`,
// materName: '',
// gaceVersio: '',
// state: '',
// id: 1,
// children: res.items.content || [],
// level: 0
// }
// ]
// this.defaultExpandedKeys = [1]
// })
// .catch((err) => console.log(err))
// .finally(() => {
// this.treeLoading = false
// })
// },
loadNode(node, resolve) {
if (node.level === 0) {
return resolve([{ name: 'region' }])
}
if (node.level > 1) return resolve([])
setTimeout(() => {
const data = [{
name: 'leaf',
leaf: true
}, {
name: 'zone'
}]
resolve(data)
}, 500)
}
}
}
......@@ -250,7 +163,6 @@ export default {
<style lang="scss" >
.physicalConfigurationManagement_left {
// margin: 4px;
height: 100%;
overflow: hidden;
}
......
<!--
* @Author:ljm
* @Date: 2021-04-25
* @LastEditTime:
* @LastEditTime: 2024-07-12 15:07:23
* @Description: 架次实物构型-记实
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/physicalDocumentationOfSorties/index.vue'
-->
<template>
<section class="physical-documentation-of-sorties-material">
......@@ -54,7 +51,7 @@
<div class="logo" style="margin: 20px 20px 10px 0px">
<img src="/icons/u212.svg" alt=""><span>装配记实</span>
</div>
<div class="dee-tools">
<!-- <div class="dee-tools">
<div class="tools-block">
<div
class="tool-item"
......@@ -67,7 +64,7 @@
<i v-show="preserveDisabled" class="el-icon-loading" />
</div>
</div>
</div>
</div> -->
</div>
<div class="right">
<div class="legnd">
......@@ -101,9 +98,10 @@
</template>
<script>
import { post } from '@/utils/http'
import Table from './table'
import { downloadPdfHandle } from '@/api/inventory.js'
import axios from 'axios'
// import { downloadPdfHandle } from '@/api/inventory.js'
// import axios from 'axios'
export default {
name: 'Material',
components: {
......@@ -125,22 +123,20 @@ export default {
mounted() {},
methods: {
getComprehensive() {
var { model, sortie } =
this.$parent.$parent.$parent.$parent.$refs.left.$refs.form.form
var activeName = this.$parent.$parent.$parent.activeName
const { modelName, sortiesName } = this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
const activeName = this.$parent.$parent.$parent.activeName
this.comprehensive = []
this.HttpRequest(
`DxProcessPlan/comprehensive?sorties=${sortie}&planType=${model}&number=${activeName}`,
{},
'post'
post(
`ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`,
{}
)
.then((res) => {
if (res.items) {
this.comprehensive = {
scrapQuantity: res.items['报废单'].countCarry || 0,
scrapCount: res.items['报废单'].countAO || 0,
materialsQuantity: res.items['代料单'].countCarry || 0,
materialsCount: res.items['代料单'].countAO || 0,
materialsQuantity: res.items['器材代料'].countCarry || 0,
materialsCount: res.items['器材代料'].countAO || 0,
stringQuantity: res.items['串件单'].countCarry || 0,
stringCount: res.items['串件单'].countAO || 0
}
......@@ -148,49 +144,49 @@ export default {
})
.catch((err) => console.error(err))
.finally(() => {})
},
exportTable() {
this.preserveDisabled = true
const baseURl = downloadPdfHandle()
var { model, sortie } =
this.$parent.$parent.$parent.$parent.$refs.left.$refs.form.form
axios({
method: 'get',
url: `/DifferenceExcel/download/excel?planType=${model}&sorties=${sortie}`,
baseURL: baseURl,
params: {
},
headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
responseType: 'arraybuffer'
})
.then((res) => {
const blob = new Blob([res.data], {
type:
'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob)
} else {
const elink = document.createElement('a')
elink.download = 'MBOM差异表' + '.xlsx'
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
document.body.removeChild(elink)
}
// } else {
// // IE10+下载
// navigator.msSaveBlob(blob)
// }
})
.catch((err) => {
console.error(err)
})
.finally(() => {
this.preserveDisabled = false
})
}
// exportTable() {
// this.preserveDisabled = true
// const baseURl = downloadPdfHandle()
// var { model, sortie } =
// this.$parent.$parent.$parent.$parent.$refs.left.$refs.form.form
// axios({
// method: 'get',
// url: `/DifferenceExcel/download/excel?planType=${model}&sorties=${sortie}`,
// baseURL: baseURl,
// params: {
// },
// headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
// responseType: 'arraybuffer'
// })
// .then((res) => {
// const blob = new Blob([res.data], {
// type:
// 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
// })
// if (window.navigator.msSaveOrOpenBlob) {
// navigator.msSaveBlob(blob)
// } else {
// const elink = document.createElement('a')
// elink.download = 'MBOM差异表' + '.xlsx'
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// document.body.removeChild(elink)
// }
// // } else {
// // // IE10+下载
// // navigator.msSaveBlob(blob)
// // }
// })
// .catch((err) => {
// console.error(err)
// })
// .finally(() => {
// this.preserveDisabled = false
// })
// }
}
}
</script>
......@@ -233,8 +229,7 @@ export default {
img {
width: 50px;
height: 58px;
margin-bottom: 5px;
// height: ;
// margin-bottom: 5px;
}
}
.right {
......
<template>
<section class="physical-documentation-of-sorties-material-table">
<section class="physical-documentation-of-sorties-material-table dee-table">
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
height="calc(100% - 40px)"
border
......@@ -45,12 +44,11 @@
</section>
</template>
<script>
import { post } from '@/utils/http'
export default {
components: {},
data() {
return {
// 加载中
loading: false,
// 所有可动态配置的表格列
colums1: [
{
......@@ -91,13 +89,6 @@ export default {
sortable: true,
width: 180
}
// {
// title: '软件版本记实',
// show: true,
// key: 'recordSoftware',
// sortable: true,
// width: 180
// },
],
colums2: [
{
......@@ -110,7 +101,7 @@ export default {
{
title: '代料单',
show: true,
key: 'totalMinutes',
key: 'recordSubstitute',
sortable: true,
width: 120
},
......@@ -152,14 +143,13 @@ export default {
// 初始化数据
init() {
this.tableData = []
var id =
this.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
const id =
this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.id
var number = this.$parent.$parent.$parent.$parent.activeName
const number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) {
return
}
this.loading = true
const params = {
id: id,
number: number,
......@@ -168,22 +158,21 @@ export default {
numberOrName: this.$parent.search
}
// 发送请求
this.HttpRequest('/DxProcessPlan/planDetails', params, 'post')
post('/ExtProcessPlan/planDetails', params)
.then((res) => {
if (
res.items &&
res.items.physicalRecordDDxPage &&
res.items.physicalRecordDDxPage &&
res.items.physicalRecordDDxPage.content &&
res.items.physicalRecordDDxPage.content.length
res.items.physicalRecordDS &&
res.items.physicalRecordDS &&
res.items.physicalRecordDS.content &&
res.items.physicalRecordDS.content.length
) {
this.tableData = res.items.physicalRecordDDxPage.content
this.tablePagination.total = res.items.physicalRecordDDxPage.totalElements
this.tableData = res.items.physicalRecordDS.content
this.tablePagination.total = res.items.physicalRecordDS.totalElements
}
})
.catch((err) => console.log(err))
.finally(() => {
this.loading = false
})
},
setPage($event, state) {
......
<!--
* @Author:ljm
* @Date: 2021-04-25
* @LastEditTime: 2024-07-09 16:18:32
* @LastEditTime: 2024-07-12 18:03:48
* @Description: 架次实物构型-预览
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/sortiesPhysicalConfigurationsSame/index.vue'
-->
<template>
<section
v-loading="loading"
class="physical-documentation-of-sorties-preview"
>
<label v-show="showTitle" :title="title">{{ title }}</label>
......@@ -16,8 +12,6 @@
</template>
<script>
// import { downloadPdfHandle } from '@/api/inventory.js'
// import axios from 'axios'
import { get } from '@/utils/http'
export default {
name: 'Preview',
......@@ -25,8 +19,7 @@ export default {
return {
showTitle: false,
title: '',
openUrl: '',
loading: false
openUrl: ''
}
},
mounted() {},
......@@ -38,19 +31,7 @@ export default {
if (!id || !number) {
return
}
this.loading = true
this.showTitle = false
// const baseURl = VUE_APP_BASE_API || process.env.VUE_APP_BASE_API // eslint-disable-line
// axios({
// method: 'POST',
// url: 'ExtProcessPlan/createPDF',
// baseURL: baseURl,
// params: {
// id: id
// },
// headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
// responseType: 'arraybuffer'
// })
get(`ExtProcessPlan/createPDF?id=${id}`).then((res) => {
const blob = new Blob([res.data], {
type: 'application/pdf'
......@@ -60,7 +41,6 @@ export default {
} else {
this.openUrl = URL.createObjectURL(blob)
this.$nextTick(() => {
this.loading = false
this.title = this.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.serialNumber
setTimeout(() => {
......@@ -69,7 +49,6 @@ export default {
})
}
}).catch(() => {
this.loading = false
})
}
}
......
<!--
* @Author:ljm
* @Date: 2021-04-25
* @LastEditTime: 2024-07-09 15:12:05
* @LastEditTime: 2024-07-12 10:21:15
* @Description: 架次实物构型-质量控制
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/sortiesPhysicalConfigurationsSame/index.vue'
-->
<template>
<section class="physical-documentation-of-sorties-quality">
......@@ -50,6 +47,7 @@
</template>
<script>
import { post } from '@/utils/http'
import * as echarts from 'echarts'
import Table from './table'
export default {
......@@ -139,12 +137,12 @@ export default {
},
methods: {
initEcharts() {
var chartDom = document.getElementById('main')
var that = this
var elementResizeDetectorMaker = require('element-resize-detector') // 引入监听dom变化的组件
var erd = elementResizeDetectorMaker()
const chartDom = document.getElementById('main')
const that = this
const elementResizeDetectorMaker = require('element-resize-detector') // 引入监听dom变化的组件
const erd = elementResizeDetectorMaker()
// 用于使chart自适应高度和宽度,通过窗体高宽计算容器高宽
// var resizeWorldMapContainer = function() {
// let resizeWorldMapContainer = function() {
// // eslint-disable-line
// chartDom.style.width = chartDom.scrollWidth + 'px'
// chartDom.style.height = chartDom.clientHeight + 'px'
......@@ -159,9 +157,8 @@ export default {
})
},
getComprehensive() {
var { model, sortie } =
this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
var activeName = this.$parent.$parent.$parent.activeName
const { modelName, sortiesName } = this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
const activeName = this.$parent.$parent.$parent.activeName
this.myChart.setOption({
series: [
{
......@@ -175,36 +172,35 @@ export default {
}
]
})
this.HttpRequest(
`DxProcessPlan/comprehensive?sorties=${sortie}&planType=${model}&number=${activeName}`,
{},
'post'
post(
`ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`,
{}
)
.then((res) => {
if (res.items) {
// 发起
var launch = [
res.items['报废'].countAO,
res.items['不合格'].countAO,
res.items['质量问题'].countAO,
const launch = [
res.items['报废'].countAO,
res.items['不合格审理单'].countAO,
res.items['质量预审单'].countAO,
res.items['器材代料'].countAO,
res.items['串件申请单'].countAO
res.items['串件单'].countAO
]
// 完成
var Finish = [
res.items['报废'].countNotOk,
res.items['不合格'].countNotOk,
res.items['质量问题'].countNotOk,
const Finish = [
res.items['报废'].countNotOk,
res.items['不合格审理单'].countNotOk,
res.items['质量预审单'].countNotOk,
res.items['器材代料'].countNotOk,
res.items['串件申请单'].countNotOk
res.items['串件单'].countNotOk
]
// 审理
var hear = [
res.items['报废'].countCarry,
res.items['不合格'].countCarry,
res.items['质量问题'].countCarry,
const hear = [
res.items['报废'].countCarry,
res.items['不合格审理单'].countCarry,
res.items['质量预审单'].countCarry,
res.items['器材代料'].countCarry,
res.items['串件申请单'].countCarry
res.items['串件单'].countCarry
]
this.myChart.setOption({
series: [
......
<template>
<section class="sorties-physical-configurations-same-table">
<section class="sorties-physical-configurations-same-table dee-table">
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
height="calc(100% - 40px)"
border
......@@ -32,12 +31,13 @@
</section>
</template>
<script>
import { post } from '@/utils/http'
export default {
components: {},
data() {
return {
// 加载中
loading: false,
// loading: false,
// 分页
tablePagination: {
currentPage: 1,
......@@ -65,12 +65,13 @@ export default {
// 初始化数据
init() {
this.tableData = []
var id = this.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree.rowData.id
var number = this.$parent.$parent.$parent.$parent.activeName
const id = this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.id
const number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) {
return
}
this.loading = true
// this.loading = true
const params = {
id: id,
number: number,
......@@ -79,18 +80,18 @@ export default {
numberOrName: this.$parent.search
}
// 发送请求
this.HttpRequest('/DxProcessPlan/planDetails', params, 'post')
post('/ExtProcessPlan/planDetails', params)
.then((res) => {
if (res.items && res.items.qualityRecordDxPage &&
res.items.qualityRecordDxPage.content &&
res.items.qualityRecordDxPage.content.length) {
this.tableData = res.items.qualityRecordDxPage.content
this.tablePagination.total = res.items.qualityRecordDxPage.totalElements
if (res.items && res.items.quality &&
res.items.quality.content &&
res.items.quality.content.length) {
this.tableData = res.items.quality.content
this.tablePagination.total = res.items.quality.totalElements
}
})
.catch((err) => console.log(err))
.finally(() => {
this.loading = false
// this.loading = false
})
},
setPage($event, state) {
......
......@@ -12,9 +12,6 @@
<el-tab-pane label="实物记实" name="DRecord">
<Material ref="DRecord" />
</el-tab-pane>
<!-- <el-tab-pane label="供应商记实" name="ERecord">
<Supplier ref="ERecord" />
</el-tab-pane> -->
<el-tab-pane label="预览" name="FPreview">
<Preview ref="FPreview" />
</el-tab-pane>
......@@ -31,71 +28,67 @@ import Schedule from './schedule'
import Material from './material'
// 质量记实
import Quality from './quality'
// 供应商记实
// import Supplier from './supplier'
export default {
components: {
Preview,
Material,
Quality,
Schedule
// Supplier
},
props: {
collapse: {
type: Boolean,
default: () => true
leftSearchForm: {
type: Object,
default: () => {}
}
},
data() {
return {
activeName: '',
activeName: 'BRecord',
tabPaneData: []
}
},
watch: {
activeName: {
handler(val) {
if (val && val !== 'FPreview' && this.leftSearchForm.sorties && this.leftSearchForm.model) {
this.$nextTick(() => {
this.$refs[this.activeName].getComprehensive()
})
}
}
},
leftSearchForm: {
deep: true,
handler(val) {
if (val && val.sorties && val.model) {
this.$nextTick(() => {
this.$refs[this.activeName].getComprehensive()
})
}
}
}
},
created() {
this.$bus.$on('treeCurrentRowData', (data) => {
this.treeRowData = JSON.parse(JSON.stringify(data))
if (data && data.id && data.nodeLevel > 2) {
this.handleClick()
}
})
this.getTabs()
},
methods: {
handleClick() {
if (this.activeName === 'FPreview') {
this.$parent.$parent.$parent.$refs.left.$refs.tree.setBRecordOrCRecord()
this.$refs[this.activeName].init()
} else if (this.activeName === 'ERecord') {
this.$refs[this.activeName].$refs.table.init()
} else {
if (this.activeName === 'DRecord') {
this.$parent.$refs.left.$refs.tree.setBRecordOrCRecord()
this.$parent.$parent.$parent.$refs.left.$refs.tree.setBRecordOrCRecord()
}
this.$refs[this.activeName].getComprehensive()
this.$refs[this.activeName].$refs.table.tablePagination.currentPage = 1
this.$refs[this.activeName].$refs.table.tablePagination.pageSize = 10
this.$refs[this.activeName].$refs.table.init()
}
},
getTabs() {
this.tabPaneData = []
this.HttpRequest('DxProcessPlan/rightMenu', {}, 'post')
.then((res) => {
if (res.items) {
for (var key in res.items) {
this.tabPaneData.push({
key: key,
value: res.items[key]
})
}
}
})
.catch((err) => console.log(err))
.finally(() => {
this.tabPaneData.length &&
this.$nextTick(() => {
this.activeName = this.tabPaneData[0].key
this.handleClick()
})
})
},
previewPDF() {
this.$refs.FPreview.getPdf()
}
......
<!--
* @Author:ljm
* @Date: 2021-04-25
* @LastEditTime: 2024-07-09 14:51:34
* @LastEditTime: 2024-07-12 10:05:03
* @Description: 架次实物构型-进度
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/SortiesPhysicalConfigurationsSchedule/index.vue'
-->
<template>
<section class="physical-documentation-of-sorties-schedule">
......@@ -64,7 +61,7 @@
</div>
</div>
</div>
<Table ref="table" :tree-row-data="treeRowData" />
<Table ref="table" />
</section>
</template>
......@@ -76,12 +73,6 @@ export default {
components: {
Table
},
props: {
treeRowData: {
type: Object,
default: () => {}
}
},
data() {
return {
comprehensive: [
......@@ -107,14 +98,17 @@ export default {
search: '',
colors: [{ color: '#5cb87a', percentage: 100 }]
}
},
watch: {
},
created() {
},
mounted() {},
methods: {
getComprehensive() {
const { modelName, sortiesName } =
this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
const { modelName, sortiesName } = this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
const activeName = this.$parent.$parent.$parent.activeName
console.log('🚀 activeName:', activeName)
this.comprehensive = [
{
key: 1,
......@@ -137,8 +131,7 @@ export default {
]
post(
`ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`,
{},
'post'
{}
)
.then((res) => {
if (res.items) {
......
......@@ -37,15 +37,9 @@ import { post } from '@/utils/http'
export default {
components: {},
props: {
treeRowData: {
type: Object,
default: () => {}
}
},
data() {
return {
// 加载中
loading: false,
// 分页
tablePagination: {
currentPage: 1,
......@@ -95,10 +89,10 @@ export default {
// 初始化数据
init() {
this.tableData = []
var id =
const id =
this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.id
var number = this.$parent.$parent.$parent.$parent.activeName
const number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) {
return
}
......@@ -110,7 +104,7 @@ export default {
numberOrName: this.$parent.search
}
// 发送请求
post('/ExtProcessPlan/planDetails', params, 'post')
post('/ExtProcessPlan/planDetails', params)
.then((res) => {
if (
res.items &&
......
<template>
<dee-dialog
title="附件浏览"
:dialog-visible.sync="visible"
width="50%"
:before-close="handleClose"
class="sorties-physical-configurations-supplier-dialog"
>
<div>
<!-- <upload-files v-if="uploadVisble" v-model="form.objFileLinks" /> -->
</div>
</dee-dialog>
</template>
<script>
// import UploadFiles from '@/components/Lean/UploadFiles'
export default {
// components: { UploadFiles },
data() {
return {
visible: false,
disabled: false,
uploadVisble: true,
form: {
results: '',
objFileLinks: []
},
row: {},
loading: false
}
},
created() {},
methods: {
// 打开弹出框
open(row = {}) {
this.form = {
results: '',
objFileLinks: []
}
this.row = row
this.form.results = row.results
this.visible = true
this.getList(row.id)
},
getList(sourceId) {
this.loading = true
this.uploadVisble = false
const params = {
indices: ['ObjFileLink'],
searchItems: {
items: [
{
fieldName: 'sourceId',
operator: 'EQ',
value: sourceId
}
],
operator: 'AND'
},
openProps: [
{
pageFrom: 1,
pageSize: 1,
name: 'target'
}
]
}
this.HttpRequest('/FileUtil/checkFile', params, 'post')
.then((res) => {
this.form.objFileLinks = res.items.content[0].objFileLinks
})
.catch((err) => console.log(err))
.finally(() => {
this.loading = false
this.uploadVisble = true
})
},
/**
* 保存功能
* 根据是否有id处理创建和编辑逻辑
*/
save() {
this.updateFile()
this.removeFile()
},
removeFile() {
var result = []
var index = []
this.form.objFileLinks.forEach((item, i) => {
if (item.operator === 'REMOVE') {
result.push({ id: item.id })
index.push(i)
}
})
index.forEach((item) => {
this.$delete(this.form.objFileLinks, item)
})
// 发送请求
this.HttpRequest('/FileUtil/removeFile', result, 'post')
.then((res) => {
})
.catch((err) => console.log(err))
.finally(() => {})
},
// 上传附件
updateFile() {
var result = []
this.form.objFileLinks.forEach((item) => {
result.push({
targetId: item.target.id, // fileId
targetIdType: 'Papers',
sourceId: this.row.id, // 处理单id
sourceIdType: 'ExamineRecord'
})
})
this.disabled = true
this.HttpRequest('/FileUtil/upload', result, 'post')
.then((res) => {
this.reset('上传')
})
.catch((err) => console.log(err))
.finally(() => {
this.disabled = false
})
},
// 重置弹出框
reset(message) {
this.visible = false
this.$message({
message: `${message}成功`,
type: 'success'
})
this.$emit('reload')
this.form = {
results: '',
objFileLinks: []
}
},
handleClose() {
this.visible = false
}
}
}
</script>
<style lang="scss">
.view-dialog {
.el-form-item__label,
.dee-table-header {
display: none !important;
}
}
</style>
<template>
<div class="sorties-physical-configurations-supplier">
<Table ref="table" @open="(row) => $refs.dialog.open(row)" />
<!-- 弹出框 -->
<Dialog ref="dialog" />
</div>
</template>
<script>
import Table from './table'
import Dialog from './dialog.vue'
export default {
name: 'Supplier',
components: {
Table,
Dialog
},
data() {
return {}
},
created() {},
methods: {
getComprehensive() {}
}
}
</script>
<style lang="scss">
.sorties-physical-configurations-supplier {
height: 100%;
display: flex;
flex-direction: column;
> section {
height: 20px;
flex-grow: 1;
display: flex;
flex-direction: column;
> .el-table {
height: 20px;
flex-grow: 1;
}
.el-pagination {
text-align: right;
padding-top: 10px;
}
}
.el-table thead th {
color: #2e2e2e;
font-weight: 700;
font-size: 14px;
padding: 0;
background-color: #f3f6f7;
line-height: 46px !important;
}
.el-table .see-excel {
color: #3a8ee6;
cursor: pointer;
}
}
.sorties-physical-configurations-supplier-dialog .upload-files {
.dee-upload-page,
.el-form-item--small.el-form-item {
margin-bottom: 0 !important;
}
.dee-table-header,
.dee-form2 .el-form-item--small .el-form-item__label {
display: none;
}
.el-form-item__content {
padding-left: 0 !important;
}
}
</style>
<!--
* @LastEditTime: 2024-07-09 10:09:20
* @LastEditTime: 2024-07-12 15:38:19
* @Description: 实物构型管理
-->
<template>
......@@ -12,13 +12,12 @@
>
<template slot="paneL">
<div class="left-container">
<Left ref="left" />
<Left ref="left" @formChange="formChangeHandle" />
</div>
</template>
<template slot="paneR">
<div class="right-container">
<!-- 223333 -->
<Right ref="right" :collapse="collapse" />
<Right ref="right" :left-search-form="leftSearchForm" />
</div>
</template>
</dee-fold-pane>
......@@ -37,12 +36,13 @@ export default {
},
data() {
return {
collapse: true
collapse: true,
leftSearchForm: {}
}
},
methods: {
handleCollapse(val) {
// this.collapse = val
formChangeHandle(val) {
this.leftSearchForm = JSON.parse(JSON.stringify(val))
}
}
}
......@@ -94,14 +94,11 @@ export default {
justify-content:flex-start;
padding: 6px 0px;
.search-input{
// width: calc(100% - 150px);
// flex:1;
margin-right:10px;
}
}
}
.box {
// width: 100%;
margin: 4px;
border: 1px solid #d8d8d8;
border-radius: 8px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment