Commit 4814c50a authored by jingnan's avatar jingnan 👀

实物构型管理功能开发

parent 7c8f03c9
<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>
......@@ -4,21 +4,23 @@
v-model="nameOrNum"
clearable
placeholder="请输入内容"
@change="nameOrNumChange"
/>
<el-tree
ref="tree"
class="tree"
:data="treeData"
node-key="id"
lazy
:lazy="lazyTree"
:load="loadNode"
accordion
:data="treeData"
:default-expanded-keys="defaultExpandedKeys"
:props="defaultProps"
:highlight-current="true"
:expand-on-click-node="false"
@node-click="handleNodeClick"
>
<!-- :filter-node-method="filterNode" -->
<span
slot-scope="{ data, node }"
class="custom-tree-node changeText"
......@@ -57,52 +59,11 @@ export default {
children: 'dxProcessPlanVos',
label: 'serialNumber',
isLeaf: 'isLeaf'
}
}
},
watch: {
nameOrNum: {
handler: function(keyword) {
// this.getExtPosition()
// const spans = document.getElementsByClassName('changeText')
// if (spans.length > 0) {
// for (let i = 0; i < spans.length; i++) {
// var labelText = spans[i].textContent
// const reg = keyword
// .replace(/\(/g, '\\(')
// .replace(/\)/g, '\\)')
// .replace(/\./g, '\\.')
// const allVal = labelText.match(new RegExp(reg, 'ig'))
// if (allVal) {
// const newAllVal = [...new Set(allVal)]
// for (let j = 0; j < newAllVal.length; j++) {
// if (newAllVal[j]) {
// const tp = newAllVal[j]
// .replace(/\(/g, '\\(')
// .replace(/\)/g, '\\)')
// .replace(/\./g, '\\.')
// labelText = labelText.replace(
// new RegExp(tp, 'g'),
// '*' + newAllVal[j] + '*'
// )
// }
// }
// for (let k = 0; k < allVal.length; k++) {
// if (allVal[k]) {
// labelText = labelText.replace(
// '*' + allVal[k] + '*',
// '<span style="color:blue">' +
// allVal[k] +
// '</span>'
// )
// }
// }
// }
// spans[i].innerHTML = labelText
// }
// }
lazyTree: true
}
},
watch: {
rowData: {
immediate: true,
deep: true,
......@@ -113,26 +74,25 @@ export default {
},
mounted() {},
methods: {
nameOrNumChange(keyword) {
if (keyword && keyword.trim() !== '') {
this.lazyTree = false // 如果输入查询的时候关闭书结构懒加载,一次返回查到的所有结果
} else {
this.lazyTree = true
}
this.getExtPosition()
},
handleNodeClick(data, node, options) {
const cnode = this.$refs.tree.getNode(this.rowData.id)
const assembly = this.$parent.$parent.$parent.$parent.$refs.right
const table = assembly && assembly.$refs[assembly.activeName].$refs.table
if (
assembly.activeName === 'BRecord' ||
assembly.activeName === 'CRecord' ||
assembly.activeName === 'ERecord'
) {
if (node.level < 3) {
node.isCurrent = false
cnode.isCurrent = true
} else {
const assembly = this.$parent.$parent.$parent.$parent.$refs.right
if (assembly.activeName === 'BRecord' || assembly.activeName === 'CRecord' || assembly.activeName === 'ERecord') {
cnode.isCurrent = false
node.isCurrent = true
this.rowData = data
table.tablePagination.currentPage = 1
table.tablePagination.pageSize = 10
table.init()
}
this.rowData = { ...data, nodeLevel: node.level }
} else {
if (node.level < 4) {
node.isCurrent = false
......@@ -140,27 +100,27 @@ export default {
} else {
cnode.isCurrent = false
node.isCurrent = true
this.rowData = data
if (this.$parent.$parent.$parent.$parent.$refs.right.activeName === 'FPreview') {
assembly.$refs[assembly.activeName].init()
} else {
table.tablePagination.currentPage = 1
table.tablePagination.pageSize = 10
table.init()
this.rowData = { ...data, nodeLevel: node.level }
}
}
}
},
getCurVal(data) {
if (data.length && data[0].dxProcessPlanVos) {
if (data.length && data[0].dxProcessPlanVos && data[0].dxProcessPlanVos.length) {
this.defaultExpandedKeys.push(data[0].id)
this.getCurVal(data[0].dxProcessPlanVos)
} else {
if (!data || !data[0] || !data[0].id) return
this.$nextTick(() => {
const node = this.$refs.tree.getNode(data[0].id)
if (this.rowData && this.rowData.id || !this.rowData.id && node.parent) {
const cnode = this.$refs.tree.getNode(this.rowData.id || node.parent)
cnode.isCurrent = false
}
node.isCurrent = true
this.rowData = data[0]
if (node.level > 2) {
this.rowData = { ...data[0], nodeLevel: node.level }
}
})
}
},
......@@ -168,16 +128,21 @@ export default {
const node = this.$refs.tree.getNode(this.rowData.id)
if (node && node.level === 3) {
node.isCurrent = false
if (!node.childNodes || !node.childNodes.length) return this.$utils.showMessageWarning('请选择指令进行操作!')
node.childNodes[0].isCurrent = true
this.rowData = node.childNodes[0].data
this.rowData = { ...node.childNodes[0].data, level: 4 }
}
},
loadNode(node, resolve) {
this.requestUrl = ''
if (node.level === 0) {
this.getExtPosition(resolve)
// return resolve(this.treeData)
return resolve(this.treeData)
}
if (!this.lazyTree) {
if (node.level >= 1) {
return resolve(node.data.dxProcessPlanVos)
}
} else {
if (node.level === 1) {
return resolve(node.data.dxProcessPlanVos)
} else if (node.level === 2) {
......@@ -189,12 +154,45 @@ export default {
this.getJoExecutePlan(node, resolve)
}
}
}
},
/**
* 获取树结站位数据
* 获取树结构——站位数据
*/
getExtPosition(resolve) {
const params = {
if (!this.searchForm.sorties) return
let params = {}
if (this.lazyTree) {
params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'aircraftSortiesId',
'operator': 'EQ',
'value': this.searchForm.sorties || ''
}
],
'operator': 'AND'
},
{
'items': [
],
'operator': 'OR'
}
]
},
'openProps': [],
'sortItem': [
{
'fieldName': 'serialNumber',
'sortOrder': 'desc'
}
]
}
} else {
params = {
'searchItems': {
'children': [
{
......@@ -224,7 +222,109 @@ export default {
}
]
},
'openProps': [],
'openProps': [
{
'name': 'extPositionLinks',
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'target.sourceExtProcessUsageLink.target.sourceExtProcessUsageLink.target.serialNumber',
'operator': 'LIKE',
'value': this.nameOrNum || ''
},
{
'fieldName': 'target.sourceExtProcessUsageLink.target.sourceExtProcessUsageLink.target.sourceExtProcessUsageLink.target.serialNumber',
'operator': 'LIKE',
'value': this.nameOrNum || ''
}
],
'operator': 'OR'
}
]
},
'openProps': [
{
'name': 'target',
'openProps': [
{
'name': 'wrProduction'
},
{
'name': 'sourceExtProcessUsageLink',
'openProps': [
{
'name': 'target',
'openProps': [
{
'name': 'sourceExtProcessUsageLink',
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'target.serialNumber',
'operator': 'LIKE',
'value': this.nameOrNum || ''
},
{
'fieldName': 'target.sourceExtProcessUsageLink.target.serialNumber',
'operator': 'LIKE',
'value': this.nameOrNum || ''
}
],
'operator': 'OR'
}
]
},
'openProps': [
{
'name': 'target',
'openProps': [
{
'name': 'joExecutePlan'
},
{
'name': 'sourceExtProcessUsageLink',
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'target.serialNumber',
'operator': 'LIKE',
'value': this.nameOrNum || ''
}
],
'operator': 'AND'
}
]
},
'openProps': [
{
'name': 'target',
'openProps': [
{
'name': 'joExecutePlan'
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
],
'sortItem': [
{
'fieldName': 'serialNumber',
......@@ -232,22 +332,30 @@ export default {
}
]
}
}
this.$api.searchApi('ExtPosition', params).then((res) => {
if (!res || !res.items || !res.items.content) return
const data = res.items.content || []
data.map((item) => {
const processedData = data.map(item => {
let dxProcessPlanVos = []
if (item.extPositionLinks) {
item.dxProcessPlanVos = item.extPositionLinks.map(es => {
return {
dxProcessPlanVos = item.extPositionLinks.map(es => ({
serialNumber: es.target.serialNumber,
name: es.target.name,
id: es.id,
id: es.target.id,
gaceVersion: es.target.gaceVersion,
dxProcessPlanVos: this.lazyTree ? [] : this.findAndCollectExtProcessPlanInfo(es, []),
state: es.isOk ? 'Delivery' : 'Finish'
}))
}
})
}
let state = ''
if (item.extPositionPlans && item.extPositionPlans.length) {
item.state = item.extPositionPlans[0].planState || null
state = item.extPositionPlans[0].planState || null
}
return {
...item, // 假设你不需要修改item的其他属性,否则应该选择性地复制
dxProcessPlanVos,
state
}
})
this.treeData = [
......@@ -255,28 +363,48 @@ export default {
serialNumber: `BBOM-${this.searchForm.modelName}-${this.searchForm.sortiesName}`,
name: '',
gaceVersion: '',
dxProcessPlanVos: data,
dxProcessPlanVos: processedData,
state: ''
}
]
this.defaultExpandedKeys = []
this.treeData.length && this.getCurVal(this.treeData)
return resolve(this.treeData)
if (this.treeData.length) {
this.getCurVal(this.treeData)
}
})
.catch(err => {
console.error('Error fetching ExtPosition data:', err)
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
const assembly = this.$parent.$parent.$parent.$parent.$refs.right
if (assembly.activeName === 'FPreview') {
assembly.$refs[assembly.activeName].init()
} else {
assembly.$refs[assembly.activeName].$refs.table.init()
}
})
},
findAndCollectExtProcessPlanInfo(startVal, resultVal = []) {
if (!Array.isArray(resultVal)) {
throw new Error('resultVal must be an array')
}
if (!startVal || !startVal.target) {
return resultVal // 提前返回,避免后续的错误
}
const target = startVal.target
if (target.subTypeName === 'ExtProcessPlanAOR' || target.subTypeName === 'ExtProcessPlanAssembly') {
resultVal.push({
serialNumber: target.serialNumber,
name: target.name,
id: target.id,
isLeaf: true,
gaceVersion: target.gaceVersion,
state: target.joExecutePlan && target.joExecutePlan.length && target.joExecutePlan[0].planState
})
}
if (target.sourceExtProcessUsageLink) {
for (const child of target.sourceExtProcessUsageLink) {
this.findAndCollectExtProcessPlanInfo(child, resultVal)
}
}
return resultVal
},
/**
* 获取树结CAS数据
* 获取树结构-CAS数据(第三层)
*/
getCASData(node, resolve) {
const params = {
......@@ -333,6 +461,7 @@ export default {
}
this.$api.searchApi('ExtProcessPlan', params)
.then((res) => {
if (!res || !res.items || !res.items.content) return
res.items.content.forEach(element => {
if (element.wrProduction && element.wrProduction.length) {
element.state = element.wrProduction[0].planState || null
......@@ -340,6 +469,7 @@ export default {
element.level = 3
element.dxProcessPlanVos = []
})
res.items.content.length && this.getCurVal(res.items.content)
return resolve(res.items.content)
})
.catch((err) => {
......@@ -349,10 +479,9 @@ export default {
.finally(() => {})
},
/**
* 获取树结CAS数据
* 获取树结构-指令数据
*/
getJoExecutePlan(node, resolve) {
console.log('🚀 node:', node)
const params = {
'searchItems': {
'children': [
......@@ -444,20 +573,13 @@ export default {
background: #dcdfe6;
}
.physicalConfigurationManagement-left-tree {
// margin-top: 20px;
// border: 1px solid #ccc;
border-radius: 7px;
box-sizing: border-box;
width: 100%;
height: calc(100% - 66px);
// height: 20px;
// flex-grow: 1;
// display: flex;
// flex-direction: column;
> .el-input {
padding: 10px;
width: -webkit-fill-available;
// border-bottom: 1px solid #ccc;
}
> .tree {
overflow: auto;
......@@ -489,7 +611,6 @@ export default {
}
}
.el-tree-node {
// margin: 20px 0 !important;
.el-tree-node__content {
height: 40px !important;
// &:hover {
......
......@@ -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 {
this.sortiesData = res.items.content.map(p => ({
id: p.id,
defCode: p.defCode
}
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.sortiesData && this.sortiesData.length) {
}))
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+下载
// 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
// })
// }
})
.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>
<template>
<section>
<!-- 表格 -->
<!-- <dee-table
ref="table"
:loading="loading"
:index-row="indexRow"
:columns="tableColums"
:data="tableData"
:options="tableOptions"
:pagination="tablePagination"
:selection-row="selectionRow"
@cell-class-name="cellClassName"
@cell-click="cellClick"
@selection-change="selectionChange"
@pagination-size-change="paginationSizeChange"
@pagination-current-change="paginationCurrentChange"
> -->
<el-table
ref="table"
v-loading="loading"
:data="tableData"
height="100%"
border
size="mini"
highlight-current-row
:cell-class-name="cellClassName"
@cell-click="cellClick"
>
<el-table-column type="index" :width="80" label="序号" align="center" />
<el-table-column
v-for="item in tableColums"
:key="item.key"
:prop="item.key"
align="center"
:label="item.title"
:width="item.width"
:min-width="item.minWidth"
show-overflow-tooltip
:formatter="item.formatter"
sortable
/>
</el-table>
<el-pagination
:current-page="tablePagination.currentPage"
:page-sizes="tablePagination.pageSizes"
:page-size="tablePagination.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="tablePagination.total"
@size-change="setPage"
@current-change="setPage($event, true)"
/>
</section>
</template>
<script>
import { downloadPdfHandle } from '@/api/inventory.js'
import axios from 'axios'
export default {
name: 'IntegrationWithWaveTable',
props: {},
data() {
return {
// 加载中
loading: false,
// 工具栏
tools: [],
// 选中表格列
selectionRow: [],
// 分页
tablePagination: {
currentPage: 1,
pageSize: 10,
total: 0,
pageSizes: [10, 20, 50]
},
// 序号
indexRow: { title: '序号', align: 'center', width: '70' },
// 器材验收单动态配置的表格列
colums: [
{
title: '浏览',
show: true,
key: 'fname',
align: 'center',
width: 220
},
{
align: 'center',
minWidth: '120',
title: '验收单',
show: true,
key: 'testNo',
sortable: true
},
{
align: 'center',
minWidth: '110',
title: '是否合格',
show: true,
key: 'isPassCode',
sortable: true,
formatter: (row, column, cellValue, index) => {
if (cellValue === 'Y') {
return '是'
} else {
return '否'
}
}
},
{
align: 'center',
minWidth: '120',
title: '物料类型',
show: true,
key: 'jobOrder.dxProcessMaterial.resType2.typeCode',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '编码',
show: true,
key: 'jobOrder.dxProcessMaterial.resCode',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '名称',
show: true,
key: 'jobOrder.dxProcessMaterial.resName',
sortable: true
},
{
align: 'center',
minWidth: '150',
title: '型号/牌号/件号',
show: true,
key: 'jobOrder.dxProcessMaterial.modelNo',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '技术条件',
show: true,
key: 'jobOrder.dxProcessMaterial.techSpec',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '规格',
show: true,
key: 'jobOrder.dxProcessMaterial.spec',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '供应状态',
show: true,
key: 'jobOrder.dxProcessMaterial.supplyStatus',
sortable: true
},
{
align: 'center',
minWidth: '150',
title: '热处理/炉/批号',
show: true,
key: 'jobOrder.lotNo',
sortable: true
},
{
align: 'center',
minWidth: '170',
title: '系列号',
show: true,
key: 'jobOrder.serialNo',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '机型',
show: true,
key: 'jobOrder.airModel',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '架次',
show: true,
key: 'jobOrder.sorties',
sortable: true
},
{
align: 'center',
minWidth: '130',
title: '入库单位',
show: true,
key: 'jobOrder.reqUnit',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '库存数量',
show: true,
key: 'storageAmount',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '库房',
show: true,
key: 'jobOrder.storageName',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '库位',
show: true,
key: 'jobOrder.storageUnitName',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '供应商',
show: true,
key: 'jobOrder.supplier.supplierName',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '制造商',
show: true,
key: 'jobOrder.manufacturer',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '到货日期',
show: true,
key: 'jobOrder.arrivalDate',
sortable: true,
formatter: (row, column, cellValue, index) =>
cellValue && cellValue.split(' ').length > 1
? cellValue.split(' ')[0]
: '/'
},
{
align: 'center',
minWidth: '120',
title: '生产日期',
show: true,
key: 'jobOrder.producedTime',
sortable: true,
formatter: (row, column, cellValue, index) =>
cellValue && cellValue.split(' ').length > 1
? cellValue.split(' ')[0]
: '/'
},
{
align: 'center',
minWidth: '150',
title: '保质期/贮存期',
show: true,
key: 'jobOrder.qualityPeriod',
sortable: true,
formatter: (row, column, cellValue, index) =>
cellValue && cellValue.split(' ').length > 1
? cellValue.split(' ')[0]
: '/'
},
{
align: 'center',
minWidth: '120',
title: '最长期',
show: true,
key: 'jobOrder.longPeriod',
sortable: true,
formatter: (row, column, cellValue, index) =>
cellValue && cellValue.split(' ').length > 1
? cellValue.split(' ')[0]
: '/'
},
{
align: 'center',
minWidth: '120',
title: '抽查期',
show: true,
key: 'jobOrder.spotCheckPeriodMounch',
sortable: true
},
{
align: 'center',
minWidth: '150',
title: '到货标准/图号',
show: true,
key: 'jobOrder.arrivedDrawNo',
sortable: true
},
{
align: 'center',
minWidth: '150',
title: '到货版次',
show: true,
key: 'jobOrder.arrivalVer',
sortable: true
},
{
align: 'center',
title: '入库单价',
show: true,
key: 'jobOrder.stockUnitPrice',
sortable: true,
minWidth: 120
},
{
align: 'center',
minWidth: '120',
title: '入库金额',
show: true,
key: 'jobOrder.stockPrice',
sortable: true
}, // 固定 8
{
align: 'center',
minWidth: '120',
title: '含税单价',
show: true,
key: 'jobOrder.taxUnitPrice',
sortable: true
},
{
align: 'center',
minWidth: '120',
title: '含税金额',
show: true,
key: 'jobOrder.taxPrice',
sortable: true
},
{
align: 'center',
title: '报检人',
show: true,
key: 'jobOrder.itemUserName',
sortable: true,
minWidth: 100
},
{
align: 'center',
title: '合同号',
show: true,
key: 'jobOrder.contractNo',
sortable: true,
minWidth: 100
},
{
align: 'center',
title: '备注',
show: true,
key: '',
sortable: true,
minWidth: 100
}
],
// 默认展示的表格列
tableColums: [],
// 表格数据
tableData: [],
// 表格样式配置
tableOptions: {
stripe: true,
border: true,
height: '100%'
}
}
},
watch: {},
created() {
this.setDefaultColums()
},
mounted() {},
methods: {
// 设置默认展示列
setDefaultColums() {
this.tableColums = this.colums.filter((item) => item.show)
},
// 初始化数据
init() {
// 设置数据
this.loading = true
this.tableData = []
var id = this.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs
.tree.rowData.id
var number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) {
return
}
const params = {
id: id,
number: number,
pageFrom: this.tablePagination.currentPage,
pageSize: this.tablePagination.pageSize,
numberOrName: this.$parent.search
}
// 发送请求
this.HttpRequest(
'/DxProcessPlan/planDetails',
params,
'post'
)
.then((res) => {
this.tableData = res.items.jobResponseInStorageVoDxPage.content
this.tablePagination.total =
res.items.jobResponseInStorageVoDxPage.totalElements
})
.catch((err) => console.error(err))
.finally(() => {
this.loading = false
})
},
cellClick(row, column, cell, event) {
if (column.property === 'fname') {
this.handleExport(row)
}
},
/**
* 页码触发
*/
setPage($event, state) {
if (state) {
this.tablePagination.currentPage = $event
} else {
this.tablePagination.currentPage = 1
this.tablePagination.pageSize = $event
}
this.init()
},
// 选择项发生改变
selectionChange(val) {
this.selectionRow = val
this.$emit('selectionRow', val)
},
cellClassName({ row, column, rowIndex, columnIndex }) {
if (column.property === 'fname') {
return 'see-excel'
}
return 'asdasf'
},
handleExport(row) {
const baseURl = downloadPdfHandle()
axios({
method: 'get',
url: `/dfs/fileManager/downloadio?fileId=${row.fileId}`,
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 = row.fname
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.disabled = false
this.loading = false
})
}
}
}
</script>
<!--
* @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