|
@@ -1,24 +1,29 @@
|
|
<template>
|
|
<template>
|
|
<div class="view-CarrierListMachineryPreparation">
|
|
<div class="view-CarrierListMachineryPreparation">
|
|
- <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook">
|
|
|
|
- <MissionDetail :detail="detail" />
|
|
|
|
- <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook-btn">
|
|
|
|
- <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook-btn-right">
|
|
|
|
|
|
+ <div class="view-AerospaceCompileLineList-left">
|
|
|
|
+ <MenuTree ref="tree" nodeKey="flyTaskAircaftId" :currentNodeKey="currentNodeKey" :treedata="menuTreeData" @TreeNodeclick="treeNodeClick" v-bind="treeObj"> </MenuTree>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="view-AerospaceCompileLineList-right">
|
|
|
|
+ <!-- <MissionDetail :detail="detail" /> -->
|
|
|
|
+ <div class="view-AerospaceCompileLineList-right-btn">
|
|
|
|
+ <div class="view-AerospaceCompileLineList-right-btn-left"></div>
|
|
|
|
+ <div class="view-AerospaceCompileLineList-right-btn-right">
|
|
<el-input placeholder="请输入内容" @keyup.enter.native="getqueryCarryingMainteOrgan('searchValue')" v-model="searchValue" class="input-with-select">
|
|
<el-input placeholder="请输入内容" @keyup.enter.native="getqueryCarryingMainteOrgan('searchValue')" v-model="searchValue" class="input-with-select">
|
|
<el-button @click="getqueryCarryingMainteOrgan('searchValue')" slot="append" icon="el-icon-search"></el-button>
|
|
<el-button @click="getqueryCarryingMainteOrgan('searchValue')" slot="append" icon="el-icon-search"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="view-AerospaceCompileLineList-right-carrierAllAuditLook-table">
|
|
|
|
- <el-table :data="tableData" border style="width: 100%">
|
|
|
|
|
|
+ <div class="view-AerospaceCompileLineList-right-table">
|
|
|
|
+ <el-table :data="tableData" border style="width: 100%" height="calc(100vh - 350px)">
|
|
<el-table-column prop="avmatCatalogCode" label="航材编码"> </el-table-column>
|
|
<el-table-column prop="avmatCatalogCode" label="航材编码"> </el-table-column>
|
|
<el-table-column prop="avmatCatalogName" label="航材名称" align="center"> </el-table-column>
|
|
<el-table-column prop="avmatCatalogName" label="航材名称" align="center"> </el-table-column>
|
|
<el-table-column prop="specification" label="航材型号" align="center"> </el-table-column>
|
|
<el-table-column prop="specification" label="航材型号" align="center"> </el-table-column>
|
|
<el-table-column prop="avmatCategoriesName" label="航材分类" align="center"> </el-table-column>
|
|
<el-table-column prop="avmatCategoriesName" label="航材分类" align="center"> </el-table-column>
|
|
<el-table-column prop="unit" label="计量单位" align="center"> </el-table-column>
|
|
<el-table-column prop="unit" label="计量单位" align="center"> </el-table-column>
|
|
- <el-table-column prop="carryQuantity" label="携总带数量" align="center"> </el-table-column>
|
|
|
|
- <el-table-column prop="purchasePrice" label="单价/元" align="center"> </el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="aircaftCatalogCode" label="指向飞机" align="center"> </el-table-column>
|
|
|
|
+ <el-table-column prop="carryQuantity" label="携带数量" align="center"> </el-table-column>
|
|
|
|
+ <el-table-column prop="purchasePrice" label="单价/万元" align="center"> </el-table-column>
|
|
<el-table-column prop="createBy" label="创建人" align="center"> </el-table-column>
|
|
<el-table-column prop="createBy" label="创建人" align="center"> </el-table-column>
|
|
<el-table-column prop="updateTime" label="更新时间" align="center"> </el-table-column>
|
|
<el-table-column prop="updateTime" label="更新时间" align="center"> </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -34,56 +39,160 @@
|
|
style="padding: 20px; text-align: center"
|
|
style="padding: 20px; text-align: center"
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
|
|
+
|
|
|
|
+ <!-- 选择航材 -->
|
|
|
|
+ <AviationMaterialsModal ref="AviationMaterialsModal" avmatType="0" @select="selectAviationMaterialsModal" />
|
|
|
|
+
|
|
|
|
+ <!-- 自动生成 -->
|
|
|
|
+ <el-dialog title="数量自动计算" :visible.sync="dialogVisible" width="500px" :before-close="generationHandleClose">
|
|
|
|
+ <div class="auto-generation">
|
|
|
|
+ <span>计算模型</span>
|
|
|
|
+ <el-select v-model="formulaValue" placeholder="请选择">
|
|
|
|
+ <el-option v-for="item in formulaOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="auto-generation">
|
|
|
|
+ <span>公式展示</span>
|
|
|
|
+ <el-input v-model="formulaDisplay" placeholder="公式展示"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <div class="auto-generation">
|
|
|
|
+ <span>添加方式</span>
|
|
|
|
+ <el-radio-group v-model="addModeValue">
|
|
|
|
+ <el-radio v-for="item in addModeOptions" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </div> -->
|
|
|
|
+
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="generationHandleClose">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="generationHandelClick">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <!-- 同步生成 -->
|
|
|
|
+ <el-dialog title="同步生成" :visible.sync="fjdialogVisible" width="500px" :before-close="fjHandleClose">
|
|
|
|
+ <div class="auto-generation">
|
|
|
|
+ <span>目标飞机</span>
|
|
|
|
+ <el-select ref="onSelect" v-model="fjValue" placeholder="请选择">
|
|
|
|
+ <el-option hidden :value="fjValue" :label="fjName"></el-option>
|
|
|
|
+ <el-tree default-expand-all :data="menuTreeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="fjHandleClose">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="fjHandelClick">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { fjList, tableData } from './index'
|
|
|
|
-import { queryFlyTaskAircraft, queryCarryingMainteOrgan } from '@/api/carrierStandard/carrierListMachineryPreparation'
|
|
|
|
|
|
+import vue from 'vue'
|
|
|
|
+import { treeObj, addModeOptions } from './index'
|
|
|
|
+import { useMessage } from '@/utils/element-ui'
|
|
|
|
+import { queryFlyTaskAircraft, queryCarryingMainteOrgan, batchAddCarryingMainteOrgan, removeCarryingMainteOrgan, syncCarryingMainteOrgan } from '@/api/carrierStandard/carrierListMachineryPreparation'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
- name: 'carrierAllAuditLook',
|
|
|
|
|
|
+ name: 'CarrierListMachineryPreparationLook',
|
|
components: {},
|
|
components: {},
|
|
data() {
|
|
data() {
|
|
- // 这里存放数据
|
|
|
|
return {
|
|
return {
|
|
- fjdialogVisible: false,
|
|
|
|
detail: null,
|
|
detail: null,
|
|
taskId: this.$route.params.id,
|
|
taskId: this.$route.params.id,
|
|
- fjValue: '',
|
|
|
|
- fjList: fjList,
|
|
|
|
|
|
+ fjdialogVisible: false,
|
|
|
|
+ fjValue: '', //
|
|
|
|
+ fjName: '',
|
|
|
|
+ currentNodeKey: 'null',
|
|
|
|
+ flyTaskActive: '',
|
|
|
|
+ menuTreeData: [],
|
|
|
|
+ treeObj: treeObj,
|
|
|
|
+ defaultProps: {
|
|
|
|
+ children: 'flyTaskAircraftVos',
|
|
|
|
+ label: 'aircaftCatalogId'
|
|
|
|
+ },
|
|
searchValue: '',
|
|
searchValue: '',
|
|
modelValue: '战斗机',
|
|
modelValue: '战斗机',
|
|
- tableData: tableData,
|
|
|
|
|
|
+ modelList: [
|
|
|
|
+ { label: '战斗机', value: '战斗机' },
|
|
|
|
+ { label: '运输机', value: '运输机' },
|
|
|
|
+ { label: '轰炸机', value: '轰炸机' }
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ tableData: [],
|
|
pagination: {
|
|
pagination: {
|
|
total: 100,
|
|
total: 100,
|
|
- pageSize: 10,
|
|
|
|
|
|
+ pageSize: 20,
|
|
pageIndex: 1
|
|
pageIndex: 1
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ cache: 'fdz',
|
|
|
|
+ activeIndex: null,
|
|
|
|
+
|
|
|
|
+ dialogVisible: false,
|
|
|
|
+ formulaValue: '时长模型',
|
|
|
|
+ formulaOptions: [
|
|
|
|
+ { label: '时长模型', value: '时长模型' },
|
|
|
|
+ { label: '次数模型', value: '次数模型' }
|
|
|
|
+ ],
|
|
|
|
+ formulaDisplay: '',
|
|
|
|
+ addModeValue: '1',
|
|
|
|
+ addModeOptions: addModeOptions,
|
|
|
|
+ cacheList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.initData()
|
|
this.initData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async fjHandelClick() {
|
|
|
|
+ let postData = {
|
|
|
|
+ aircaftCatalogId: this.fjValue,
|
|
|
|
+ aimAircaftCatalogId: this.currentNodeKey
|
|
|
|
+ }
|
|
|
|
+ const { code, data } = await syncCarryingMainteOrgan(postData)
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ this.fjdialogVisible = false
|
|
|
|
+ this.fjValue = ''
|
|
|
|
+ this.fjName = ''
|
|
|
|
+ useMessage('success', '同步成功', 1000)
|
|
|
|
+ this.getqueryCarryingMainteOrgan()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ fjHandleClose() {
|
|
|
|
+ this.fjValue = ''
|
|
|
|
+ this.fjName = ''
|
|
|
|
+ this.fjdialogVisible = false
|
|
|
|
+ },
|
|
|
|
+ openfj() {
|
|
|
|
+ this.fjdialogVisible = true
|
|
|
|
+ },
|
|
|
|
+ handleNodeClick(data) {
|
|
|
|
+ const { aircaftCatalogId, flyTaskAircaftId } = data
|
|
|
|
+ this.fjValue = flyTaskAircaftId
|
|
|
|
+ this.fjName = aircaftCatalogId
|
|
|
|
+ this.$refs.onSelect.blur()
|
|
|
|
+ },
|
|
async initData() {
|
|
async initData() {
|
|
let postData = {
|
|
let postData = {
|
|
taskId: this.taskId
|
|
taskId: this.taskId
|
|
}
|
|
}
|
|
const { code, data } = await queryFlyTaskAircraft(postData)
|
|
const { code, data } = await queryFlyTaskAircraft(postData)
|
|
if (code == 200) {
|
|
if (code == 200) {
|
|
|
|
+ this.menuTreeData = data.flys
|
|
this.detail = data
|
|
this.detail = data
|
|
|
|
+ this.currentNodeKey = this.menuTreeData[0].flyTaskAircaftId
|
|
|
|
+ this.currentNode = this.menuTreeData[0]
|
|
this.getqueryCarryingMainteOrgan()
|
|
this.getqueryCarryingMainteOrgan()
|
|
this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '机务清单总体审核-查看详情', newTitle: `机务清单总体审核-查看详情-${this.detail.taskName}` })
|
|
this.$store.commit('app/updataTagsItemMetaTitle', { id: this.$route.params.id, otherTitle: '机务清单总体审核-查看详情', newTitle: `机务清单总体审核-查看详情-${this.detail.taskName}` })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
async getqueryCarryingMainteOrgan(searchValue) {
|
|
async getqueryCarryingMainteOrgan(searchValue) {
|
|
searchValue ? (this.pagination.pageIndex = 1) : (this.pagination.pageIndex = this.pagination.pageIndex)
|
|
searchValue ? (this.pagination.pageIndex = 1) : (this.pagination.pageIndex = this.pagination.pageIndex)
|
|
let postData = {
|
|
let postData = {
|
|
pageIndex: this.pagination.pageIndex,
|
|
pageIndex: this.pagination.pageIndex,
|
|
pageSize: this.pagination.pageSize,
|
|
pageSize: this.pagination.pageSize,
|
|
- queryParam: this.searchValue,
|
|
|
|
|
|
+ flyTaskAircaftId: this.currentNodeKey,
|
|
taskId: this.taskId,
|
|
taskId: this.taskId,
|
|
|
|
+ queryParam: this.searchValue,
|
|
avmatType: '0'
|
|
avmatType: '0'
|
|
}
|
|
}
|
|
const { code, data } = await queryCarryingMainteOrgan(postData)
|
|
const { code, data } = await queryCarryingMainteOrgan(postData)
|
|
@@ -92,6 +201,7 @@ export default {
|
|
this.pagination.total = data.totalCount
|
|
this.pagination.total = data.totalCount
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
handleIndexChange(val) {
|
|
handleIndexChange(val) {
|
|
this.pagination.pageIndex = val
|
|
this.pagination.pageIndex = val
|
|
this.getqueryCarryingMainteOrgan()
|
|
this.getqueryCarryingMainteOrgan()
|
|
@@ -99,6 +209,107 @@ export default {
|
|
handleSizeChange(val) {
|
|
handleSizeChange(val) {
|
|
this.pagination.pageSize = val
|
|
this.pagination.pageSize = val
|
|
this.getqueryCarryingMainteOrgan()
|
|
this.getqueryCarryingMainteOrgan()
|
|
|
|
+ },
|
|
|
|
+ treeNodeClick(node) {
|
|
|
|
+ this.pagination.pageIndex = 1
|
|
|
|
+ this.currentNodeKey = node.flyTaskAircaftId
|
|
|
|
+ this.flyTaskActive = node.aircaftCatalogCode
|
|
|
|
+ this.currentNode = node
|
|
|
|
+ this.getqueryCarryingMainteOrgan()
|
|
|
|
+ },
|
|
|
|
+ handleRemoveClick(index, row) {
|
|
|
|
+ if (row.mainteOrganId) {
|
|
|
|
+ this.$confirm('是否删除该航材', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ .then(async () => {
|
|
|
|
+ const { code, data } = await removeCarryingMainteOrgan([row.mainteOrganId])
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ this.getqueryCarryingMainteOrgan()
|
|
|
|
+ useMessage('success', '删除成功', 1000)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {})
|
|
|
|
+ } else {
|
|
|
|
+ this.tableData.splice(index, 1)
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '操作成功!'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ carryQuantityBlur(index, row) {
|
|
|
|
+ row.carryQuantity = row.carryQuantity.value
|
|
|
|
+ this.tableData[index] = row
|
|
|
|
+ },
|
|
|
|
+ addRow() {
|
|
|
|
+ let obj = {
|
|
|
|
+ avmatCatalogCode: '', //编码
|
|
|
|
+ avmatCatalogName: '', // 航材名称
|
|
|
|
+ specification: '', // 航材型号
|
|
|
|
+ avmatCategoriesName: '', // 航材分类
|
|
|
|
+ unit: '',
|
|
|
|
+ aircaftCatalogCode: this.flyTaskActive, // 指向飞机
|
|
|
|
+ flyTaskAircaftId: this.currentNodeKey, // 指向飞机的ID
|
|
|
|
+ taskId: this.taskId,
|
|
|
|
+ carryQuantity: {
|
|
|
|
+ // 携带数量
|
|
|
|
+ value: ''
|
|
|
|
+ },
|
|
|
|
+ purchasePrice: '', // 价格
|
|
|
|
+ updateTime: '' // 更新时间
|
|
|
|
+ }
|
|
|
|
+ this.tableData.unshift(obj)
|
|
|
|
+ this.cacheList.unshift(obj)
|
|
|
|
+ },
|
|
|
|
+ editCarryQuantity(index, row) {
|
|
|
|
+ let value = row.carryQuantity
|
|
|
|
+ row.carryQuantity = {}
|
|
|
|
+ vue.set(row.carryQuantity, 'value', value)
|
|
|
|
+ this.tableData[index] = row
|
|
|
|
+ },
|
|
|
|
+ sparePartsCodingClick(index, row) {
|
|
|
|
+ this.activeIndex = index
|
|
|
|
+ this.$refs.AviationMaterialsModal.openFittings()
|
|
|
|
+ },
|
|
|
|
+ closeStructureEquipping() {},
|
|
|
|
+ dialogFetchTableData() {},
|
|
|
|
+
|
|
|
|
+ selectAviationMaterialsModal(row) {
|
|
|
|
+ for (const key in this.tableData[this.activeIndex]) {
|
|
|
|
+ if (key && row[key]) {
|
|
|
|
+ vue.set(this.tableData[this.activeIndex], key, row[key])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.fittingsVisible = false
|
|
|
|
+ this.activeIndex = null
|
|
|
|
+ },
|
|
|
|
+ openDialogVisible() {
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
+ },
|
|
|
|
+ generationHandleClose() {
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ },
|
|
|
|
+ generationHandelClick() {
|
|
|
|
+ useMessage('success', '生成成功', 1000)
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ },
|
|
|
|
+ async save() {
|
|
|
|
+ for (let index = 0; index < this.tableData.length; index++) {
|
|
|
|
+ const element = this.tableData[index]
|
|
|
|
+ if (element.avmatCatalogCode == '' || element.carryQuantity == '') {
|
|
|
|
+ useMessage('error', `第${index + 1}行数据没有填写完整`, 1000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ const { code, data } = await batchAddCarryingMainteOrgan(this.tableData)
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ useMessage('success', '保存成功', 1000)
|
|
|
|
+ this.cacheList = []
|
|
|
|
+ this.getqueryCarryingMainteOrgan()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|