Commit 7d91fd7f authored by qhr's avatar qhr

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents 7d601d36 f4adf3cb
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -222,7 +222,7 @@ export default {
Object.keys(this.$store.state.tagsView.visitedViews).forEach(key => {
list = [...list, ...this.$store.state.tagsView.visitedViews[key]]
})
this.$set(this, 'visitedViews', list.filter(x => (x.path !== '/home')))
this.$set(this, 'visitedViews', list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome')))
}
}, 0)
},
......
......@@ -23,6 +23,13 @@ const disShowLadingRequestUrl = [
'/ExtProcessSkillUser/getSkillUser'
]
const disShowLadingRequestRoute = [
'/dee-task-center/workflow/task-center/home/Activity_1gsdy96', // 批量_验收入库申请
'/dee-task-center/workflow/task-center/home/Activity_1oc19vh', // 批量_验收入库审核
'/dee-task-center/workflow/task-center/home/Activity_1f9m8pv', // 批量_验收入库理化
'/dee-task-center/workflow/task-center/home/Activity_1sj6bja', // 批量_验收入库检验
'/dee-task-center/workflow/task-center/home/Activity_1rlj2pq'// 批量_退库入库检验
]
axios.defaults.baseURL = VUE_APP_BASE_API || process.env.VUE_APP_BASE_API // eslint-disable-line
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
axios.defaults.headers.post['Cache-Control'] = 'no-cache'
......@@ -37,6 +44,8 @@ axios.interceptors.request.use(
}
const disLoading = disShowLadingRequestUrl.find((el) => {
return config.url.includes(el)
}) || disShowLadingRequestRoute.find((r) => {
return router.app.$route.path.includes(r) && config.url.includes('InStorageRequestItem/search/wfcInventoryItem')
})
if (!disLoading) {
loadingInstance = Loading.service({
......
......@@ -45,6 +45,7 @@
@click="getData"
>查询</el-button>
<el-button size="mini" @click="reset">重置</el-button>
<el-button v-if="parentSortiesNo.includes(form.serialNo)" type="primary" size="mini" @click="manualAdd">手动添加</el-button>
</div>
</header>
<el-table
......@@ -92,7 +93,8 @@
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="AO号" show-overflow-tooltip align="center">
<template slot-scope="scope">
{{ scope.row.serialNumber }}
<el-input v-if="scope.row.editAo" v-model="scope.row.serialNumber" clearable placeholder="请输入AO" />
<span v-else> {{ scope.row.serialNumber }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center">
......@@ -180,7 +182,8 @@ export default {
},
rules: {
phoneNum: [{ required: true, message: '该项必填', trigger: 'blur' }]
}
},
parentSortiesNo: ['9300', '9008', '9160']
}
},
computed: {
......@@ -345,17 +348,29 @@ export default {
total = 0
this.$message({ message: '器材数量不一致', type: 'warning' })
} else {
const valid = this.determineData.find(row => !row.serialNumber || !row.num)
if (valid) return this.$message({ message: ' AO号必填且数量必须大于0', type: 'warning' })
this.$emit('add', nums)
this.visible = false
}
},
addRow(row) {
const rows = {
editAo: false,
serialNumber: row.serialNumber,
num: 0
}
this.determineData.push(rows)
},
manualAdd() {
const rows = {
editAo: true,
serialNumber: '',
num: 0
}
this.determineData.push(rows)
},
deleteRow(index, rows) {
rows.splice(index, 1)
}
......
......@@ -9,7 +9,7 @@
<div class="dee-table dee-table-dis-border">
<el-table
ref="outerTable"
:data="tableData"
:data="filterTableData"
align="center"
height="calc(100vh - 100px)"
:row-class-name="outerRowClassName"
......@@ -161,16 +161,40 @@ export default {
{ 'title': '版次', 'key': 'inventory.softConfPieceNo' }
],
tableData: [],
tools: [{
dialogTitle: '',
dialogVisible: false,
cmpOptions: {
typeName: 'Inventory',
layKey: 'matchApplyOccupy'
},
selectionRows: [],
currentRow: {},
reqStatusOptions: [],
hideMaterial: true
}
},
computed: {
filterTableData() {
let resData = []
if (this.hideMaterial) {
this.tableData.forEach(row => {
debugger
if (!row.extMaterial.resType2.typeCode.includes('金属材料') && !row.extMaterial.resType2.typeCode.includes('工装') && !row.extMaterial.resType2.typeCode.includes('工具') && !row.extMaterial.resType2.typeCode.includes('设备')) {
resData.push(row)
}
})
} else {
resData = this.tableData
}
return resData
},
tools() {
const data = [{
name: '占用',
icon: '/icons/c-creatBook.png',
handler: {
click: () => {
if (this.selectionRows.length !== 1) return this.$utils.showMessageWarning('必须且只能选择一条数据进行操作!')
if (this.selectionRows[0].reqStatus === 'Close' || this.selectionRows[0].reqStatus === '已关闭' || this.selectionRows[0].reqStatus === 'All' || this.selectionRows[0].reqStatus === '已出库') return this.$utils.showMessageWarning('当前物料不允许手动占用!')
this.dialogTitle = '占用'
this.dialogVisible = true
this.cmpOptions = { typeName: 'Inventory', layKey: 'matchApplyOccupy' }
this.HandleBeforeOccupy()
}
}
},
......@@ -182,19 +206,19 @@ export default {
this.handleSubmit()
}
}
}],
dialogTitle: '',
dialogVisible: false,
cmpOptions: {
typeName: 'Inventory',
layKey: 'matchApplyOccupy'
},
selectionRows: [],
currentRow: {},
reqStatusOptions: []
{
name: this.hideMaterial ? '显示材料' : '隐藏材料',
icon: '/icons/c-scan.png',
handler: {
click: () => {
this.hideMaterialFun()
}
}
}]
return data
}
},
computed: {},
watch: {},
created() {
this.getDicListByCode()
......@@ -226,6 +250,13 @@ export default {
// this.loading = false
})
},
HandleBeforeOccupy() {
if (this.selectionRows.length !== 1) return this.$utils.showMessageWarning('必须且只能选择一条数据进行操作!')
if (this.selectionRows[0].reqStatus === 'Close' || this.selectionRows[0].reqStatus === '已关闭' || this.selectionRows[0].reqStatus === 'All' || this.selectionRows[0].reqStatus === '已出库') return this.$utils.showMessageWarning('当前物料不允许手动占用!')
this.dialogTitle = '占用'
this.dialogVisible = true
this.cmpOptions = { typeName: 'Inventory', layKey: 'matchApplyOccupy' }
},
handleExpandChange(row, rows) {
const isExpend = rows.some(r => r.id === row.id) // 判断当前行展开状态
if (isExpend) {
......@@ -312,6 +343,9 @@ export default {
},
handleClose() {
this.dialogVisible = false
},
hideMaterialFun() {
this.hideMaterial = !this.hideMaterial
}
}
}
......
......@@ -257,20 +257,20 @@ export default {
},
lossValue: {
handler(v) {
if (v) {
// if (v) {
this.form.lossValue = v
if (this.form.subMaterialLossValue) {
// if (this.form.subMaterialLossValue) {
this.form.totalLossValue = Number(v) + Number(this.form.subMaterialLossValue)
}
}
// }
// }
},
deep: true
},
'form.subMaterialLossValue': {
handler(v) {
if (v && this.lossValue) {
// if (v && this.lossValue) {
this.form.totalLossValue = Number(v) + Number(this.lossValue)
}
// }
},
deep: true
}
......
......@@ -38,6 +38,10 @@ export default {
disabled: {
type: Boolean,
default: false
},
item: {
type: Object,
default: () => {}
}
},
data() {
......@@ -52,7 +56,9 @@ export default {
immediate: true,
deep: true,
handler(val) {
if (this.item.key !== 'position') {
this.$set(this.form, 'positionNumber', '')
}
val && this.getOptions()
}
}
......@@ -73,7 +79,7 @@ export default {
},
'openProps': [
{
'name': 'extPositionSorties',
'name': 'extPosition',
'openProps': [
{
'name': 'target'
......@@ -85,11 +91,11 @@ export default {
this.options = []
this.loading = true
this.$api.searchApi('AircraftSorties', params).then(res => {
if (res && res.items && res.items.content && res.items.content[0].extPositionSorties) {
this.options = res.items.content[0].extPositionSorties.map(v => (v.target && {
key: v.target.id,
label: v.target.name,
value: v.target.serialNumber
if (res && res.items && res.items.content && res.items.content[0].extPosition) {
this.options = res.items.content[0].extPosition.map(v => ({
key: v.id,
label: v.name,
value: v.serialNumber
}))
}
}).finally(() => {
......
......@@ -435,25 +435,25 @@ export default {
.label {
vertical-align: middle;
}
.Issued,
.Run,
.New,
.Yes,
.Delivery {
color: #0000ff;
}
.Finish {
color: #008000;
}
.Reserved {
color: #ff0000;
}
.Not {
color: #999999;
}
.Paused {
color: #ffff00;
}
// .Issued,
// .Run,
// .New,
// .Yes,
// .Delivery {
// color: #0000ff;
// }
// .Finish {
// color: #008000;
// }
// .Reserved {
// color: #ff0000;
// }
// .Not {
// color: #999999;
// }
// .Paused {
// color: #ffff00;
// }
}
}
}
......
......@@ -16,6 +16,7 @@
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com
ref="MaterialTable"
v-dee-loading="loadingMaterial"
class="list-table"
:basic-data=" {...basicData,tableType:'Material'}"
:lay-config="{ typeName: 'InStorageBackItem', layKey: 'Material_batchSign_InStorageBackInTest'}"
......@@ -26,6 +27,7 @@
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
<dee-as-com
ref="AirEquipmentTable"
v-dee-loading="loadingAirEquipment"
class="list-table"
:lay-config="{ typeName: 'InStorageBackItem', layKey: 'AirEquipment_batchSign_InStorageBackItem'}"
:basic-data=" {...basicData,tableType:'AirEquipment'}"
......@@ -36,6 +38,7 @@
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
<dee-as-com
ref="OutSourceTable"
v-dee-loading="loadingOutSource"
class="list-table"
:lay-config="{ typeName: 'InStorageBackItem', layKey: 'OutSource_batchSign_InStorageBackItem'}"
:basic-data="{...basicData,tableType:'OutSource'}"
......@@ -75,7 +78,10 @@ export default {
'OutSource'
],
selectionRows: {},
basicData: { selectData: _that.selectData, selectionRows: [] }
basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false,
loadingAirEquipment: false,
loadingOutSource: false
}
},
computed: {
......@@ -108,6 +114,7 @@ export default {
// 组件方法
methods: {
onRequestSuccess(res, tabName) {
this['loading' + tabName] = false
this.$set(this.totals, tabName + 'Total', res.items.totalElements)
},
searchEvent(val) {
......@@ -116,6 +123,7 @@ export default {
},
getTableData() {
this.tabNames.forEach(item => {
this['loading' + item] = true
const el = this.$refs[item + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
......
......@@ -16,6 +16,7 @@
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com
ref="MaterialTable"
v-dee-loading="loadingMaterial"
class="list-table"
:basic-data=" {...basicData,tableType:'Material'}"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'material_batchSign_jobResponseInExperiment'}"
......@@ -26,6 +27,7 @@
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
<dee-as-com
ref="AirEquipmentTable"
v-dee-loading="loadingAirEquipment"
class="list-table"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'airborne_batchSign_jobResponseInExperiment'}"
:basic-data=" {...basicData,tableType:'AirEquipment'}"
......@@ -36,6 +38,7 @@
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
<dee-as-com
ref="OutSourceTable"
v-dee-loading="loadingOutSource"
class="list-table"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'outsource_batchSign_jobResponseInExperiment'}"
:basic-data="{...basicData,tableType:'OutSource'}"
......@@ -75,7 +78,10 @@ export default {
'OutSource'
],
selectionRows: {},
basicData: { selectData: _that.selectData, selectionRows: [] }
basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false,
loadingAirEquipment: false,
loadingOutSource: false
}
},
computed: {
......@@ -108,6 +114,7 @@ export default {
// 组件方法
methods: {
onRequestSuccess(res, tabName) {
this['loading' + tabName] = false
this.$set(this.totals, tabName + 'Total', res.items.totalElements)
},
searchEvent(val) {
......@@ -116,6 +123,7 @@ export default {
},
getTableData() {
this.tabNames.forEach(item => {
this['loading' + item] = true
const el = this.$refs[item + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
......
......@@ -43,19 +43,21 @@
<section class="collapse-title">| {{ request.name }}{{ request.lists.length }}</section>
</template>
<ul v-if="request.lists.length">
<!-- 带复选框 -->
<template>
<li
v-for="(item, subIndex) in request.lists"
:key="item.id"
class="blue"
:class="{active: subIndex === active,'active-background':item.activeBackground}"
@click="currentAoClick(item,subIndex)"
>
<el-checkbox
v-model="checkedAll"
:indeterminate="isIndeterminate"
@change="v => handleCheckAllChange(v)"
>全选</el-checkbox>
<el-checkbox-group v-model="checkedLists" @change="handleCheckedCitiesChange">
<el-checkbox v-for="(item) in request.lists" :key="item.id" :label="item">
<i class="el-icon-document" />
{{ item.sorties }} ,{{ item.serialNumber || '暂无' }},
{{ item.sorties }},
{{ item.serialNumber || '暂无' }},
{{ item.plannerName }},
{{ item.startTime }}
</li>
{{ item.startTime }}</el-checkbox>
</el-checkbox-group>
</template>
</ul>
<span v-else class="empty">暂无数据</span>
......@@ -95,7 +97,20 @@ export default {
// 申请列表
requests: [
{ name: '配套出库', lists: [] }
]
],
checkedAll: false,
isIndeterminate: false,
checkedLists: []
}
},
watch: {
checkedLists: {
// immediate: true,
deep: true,
handler(val) {
this.$emit('currentAo:click', val)
}
}
},
mounted() {
......@@ -149,6 +164,9 @@ export default {
]
}
this.loading = true
this.checkedAll = false
this.isIndeterminate = false
this.checkedLists = []
// return new Promise((resolve, reject) => {
post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}`, params).then(res => {
const data = res.items.content.map(item => {
......@@ -158,7 +176,6 @@ export default {
}
})
this.requests.find(item => item.name === '配套出库').lists = data
this.currentAoClick(data[0], 0)
}).catch(err => console.log(err)).finally(() => {
this.loading = false
})
......@@ -171,13 +188,14 @@ export default {
this.form = {}
this.init()
},
currentAoClick(item, subIndex) {
this.active = subIndex
this.$emit('currentAo:click', item)
handleCheckAllChange(val) {
this.checkedLists = val ? this.requests[0].lists : []
this.isIndeterminate = false
},
// 阻止事件冒泡
stopDefault(e) {
e.stopPropagation()
handleCheckedCitiesChange(value) {
const checkedCount = value.length
this.checkedAll = checkedCount === this.requests[0].lists.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.requests[0].lists.length
}
}
}
......
......@@ -32,8 +32,8 @@ export default {
default: () => {}
},
currentAo: {
type: Object,
default: () => {}
type: Array,
default: () => []
}
},
data() {
......@@ -58,7 +58,7 @@ export default {
selectionChange(val) {
this.selectionRows = val
const requestIds = val && val.map(item => item.id)
this.$refs.outStorageMatchItem.$refs.asCom.getData(requestIds)
this.$refs.outStorageMatchItem && this.$refs.outStorageMatchItem.$refs.asCom.getData(requestIds)
},
selectionChange_item(val) {
this.selectionItemRows = val
......@@ -68,10 +68,20 @@ export default {
selectionChange_jobRes(val) {
this.selectionJobResRows = val
},
init(currentAo) {
init(checkList) {
const aoIds = checkList && checkList.map(item => item.id)
if (aoIds && aoIds.length) {
this.$refs.outStorageMatch && this.$refs.outStorageMatch.$refs.asCom.getData(aoIds)
} else {
setTimeout(() => {
this.$refs.outStorageMatch && this.$refs.outStorageMatch.$refs.asCom.getData(currentAo && currentAo.id || 0)
}, 100)
this.$refs.outStorageMatch && (this.$refs.outStorageMatch.$refs.asCom.pagination.total = 0)
this.$refs.outStorageMatchItem && (this.$refs.outStorageMatchItem.$refs.asCom.pagination.total = 0)
this.$refs.jobResponseOutStorageMatch && (this.$refs.jobResponseOutStorageMatch.$refs.asCom.pagination.total = 0)
this.$refs.outStorageMatch && (this.$refs.outStorageMatch.$refs.asCom.showData = [])
this.$refs.outStorageMatchItem && (this.$refs.outStorageMatchItem.$refs.asCom.showData = [])
this.$refs.jobResponseOutStorageMatch && (this.$refs.jobResponseOutStorageMatch.$refs.asCom.showData = [])
}, 500)
}
}
}
}
......
......@@ -63,7 +63,7 @@ export default {
currentAoClick(currentAo) {
this.subTypeName = '1'
this.currentAo = currentAo
this.$refs.right.init(currentAo)
this.$refs.right && this.$refs.right.init(currentAo)
}
}
}
......
......@@ -44,7 +44,6 @@
v-model="collapse.active"
v-loading="loading"
accordion
@change="collapseChange"
>
<el-collapse-item
v-for="(request, index) in requests"
......@@ -57,25 +56,19 @@
<ul v-if="request.lists.length">
<!-- 带复选框 -->
<template>
<li
v-for="(item, subIndex) in request.lists"
:key="item.id"
class="blue"
:class="{active: subIndex === active,'active-background':item.activeBackground}"
@click="checkClick(item)"
>
<!-- :style="{ color: item.pbo.hasLostItem?'blue':'red' }" -->
<el-checkbox
v-model="item.checked"
style="margin-right: 6px;"
@click.native="stopDefault($event)"
@change="v => checkboxChange(v, index, subIndex,item)"
/>
v-model="checkedAll"
:indeterminate="isIndeterminate"
@change="v => handleCheckAllChange(v)"
>全选</el-checkbox>
<el-checkbox-group v-model="checkedLists" @change="handleCheckedCitiesChange">
<el-checkbox v-for="(item) in request.lists" :key="item.id" :label="item">
<i class="el-icon-document" />
{{ item.sorties }} ,{{ item.serialNumber || '暂无' }},
{{ item.sorties }},
{{ item.serialNumber || '暂无' }},
{{ item.plannerName }},
{{ item.startTime }}
</li>
{{ item.startTime }}</el-checkbox>
</el-checkbox-group>
</template>
</ul>
<span v-else class="empty">暂无数据</span>
......@@ -115,7 +108,20 @@ export default {
// 申请列表
requests: [
{ name: '配套出库', lists: [] }
]
],
checkedAll: false,
isIndeterminate: false,
checkedLists: []
}
},
watch: {
checkedLists: {
// immediate: true,
deep: true,
handler(val) {
this.$emit('checkbox:change', val)
}
}
},
mounted() {
......@@ -182,13 +188,15 @@ export default {
]
}
this.loading = true
this.checkedAll = false
this.isIndeterminate = false
this.checkedLists = []
// return new Promise((resolve, reject) => {
post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}`, params).then(res => {
const data = res.items.content.map(item => {
return {
...item,
plannerName: item.joExecutePlan && item.joExecutePlan[0] && item.joExecutePlan[0].planner && item.joExecutePlan[0].planner.name,
checked: false
plannerName: item.joExecutePlan && item.joExecutePlan[0] && item.joExecutePlan[0].planner && item.joExecutePlan[0].planner.name
}
})
this.requests.find(item => item.name === '配套出库').lists = data
......@@ -208,29 +216,14 @@ export default {
}
this.init()
},
// 手风琴切换
collapseChange(active) {
// 三期出库
// active === '4' && this.$emit('type2:init', 'RequestOutStorageExpire')
// // 召回出库
// active === '5' && this.$emit('type2:init', 'RequestOutStorageRecall')
},
// 切换复选框
checkboxChange(v, index, subIndex, item) {
this.$set(item, 'activeBackground', v)
this.requests[index].lists[subIndex].checked = v
const checkList = this.requests.find(item => item.name === '配套出库').lists.filter(item => item.checked)
this.$emit('checkbox:change', checkList)
},
checkClick(item) {
this.$set(item, 'activeBackground', true)
item.checked = !item.checked
const checkList = this.requests.find(item => item.name === '配套出库').lists.filter(item => item.checked)
this.$emit('checkbox:change', checkList)
handleCheckAllChange(val) {
this.checkedLists = val ? this.requests[0].lists : []
this.isIndeterminate = false
},
// 阻止事件冒泡
stopDefault(e) {
e.stopPropagation()
handleCheckedCitiesChange(value) {
const checkedCount = value.length
this.checkedAll = checkedCount === this.requests[0].lists.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.requests[0].lists.length
}
}
}
......
<template>
<div class="matchConfirmRight">
<split-pane
ref="splitPane"
:min-percent="20"
:default-percent="30"
split="horizontal"
:class="['detail-pane','collapse']"
>
<template slot="paneL">
<div class="table-box">
<dee-as-com
ref="outStorageMatch"
:table-height="autoTopHeight"
:basic-data=" { selectData: selectData }"
:lay-config="{ typeName: 'OutStorageMatch', layKey: 'batchSign_OutStorageMatch'}"
@selectionChange="selectionChange"
/>
</div>
</template>
<template slot="paneR">
<div class="detail">
<split-pane
ref="splitPaneInner"
:min-percent="20"
:default-percent="30"
split="horizontal"
:class="['detail-pane','collapse']"
>
<template slot="paneL">
<div class="table-box">
<dee-as-com
ref="outStorageMatchItem"
:lay-config="{ typeName: 'OutStorageMatchItem', layKey: 'batchSign_OutStorageMatchItem'}"
:table-height="autoBottomHeight"
@selectionChange="selectionChange_item"
/>
</div>
</template>
<template slot="paneR">
<div class="detail">
<dee-as-com
ref="jobResponseOutStorageMatch"
table-height="100%"
:lay-config="{ typeName: 'JobResponseOutStorageMatch', layKey: 'batchSign_JobResOutStorageMatch'}"
@selectionChange="selectionChange_jobRes"
/>
</div>
</template>
</split-pane>
</div>
</template>
</split-pane>
</div>
</template>
<script>
export default {
name: 'MatchConfirmRight',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: [],
selectionItemRows: [],
selectionJobResRows: [],
autoBottomHeight: '280px',
autoTopHeight: '280px'
}
},
computed: {},
watch: {},
created() {},
mounted() {
this.$bus.$on('refreshMatchConfirm', (hasFlag) => {
this.$nextTick(() => {
this.selectionChange(this.selectionRows)
this.selectionChange_item(this.selectionItemRows)
})
})
this.$nextTick(function() {
const splitPane = this.$refs.splitPane
const height = document.getElementById('app').offsetHeight
if (splitPane) {
this.$watch(
function() {
return splitPane.percent
},
(val, oval) => {
this.autoTopHeight = val / 100 * height - 80 + 'px'
// this.autoBottomHeight = (100 - val) / 100 * height - 270 + 'px'
}
)
}
})
},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
const requestIds = val && val.map(item => item.id)
this.$refs.outStorageMatchItem.$refs.asCom.getData(requestIds)
},
selectionChange_item(val) {
this.selectionItemRows = val
const itemIds = val && val.map(item => item.id)
this.$refs.jobResponseOutStorageMatch.$refs.asCom.getData(itemIds)
},
selectionChange_jobRes(val) {
this.selectionJobResRows = val
},
init(checkList) {
const aoIds = checkList && checkList.map(item => item.id)
this.$refs.outStorageMatch.$refs.asCom.getData(aoIds)
}
}
}
</script>
<style lang='scss'>
.matchConfirmRight{
overflow: auto;
width: 100%;
height: 100%;
box-sizing: border-box;
padding-left: 8px;
// .sub-title{
// padding-top: 0px!important;
// }
.splitter-pane-resizer.horizontal {
opacity: 1;
background-color: #F1F4F5;
height: 8px;
border-bottom: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
}
.detail{
height: 100%;
background-color: #fff;
}
.dee-table{
.dee-tools {
margin: 2px 0!important;
}
.dee-table-config-bar{
margin: 2px 0!important;
}
.dee-table-pagination {
margin-top: 12px!important;
}
}
}
</style>
......@@ -70,12 +70,14 @@ export default {
if (aoIds && aoIds.length) {
this.$refs.outStorageMatch.$refs.asCom.getData(aoIds)
} else {
this.$refs.outStorageMatch.$refs.asCom.pagination.total = 0
this.$refs.outStorageMatchItem.$refs.asCom.pagination.total = 0
this.$refs.jobResponseOutStorageMatch.$refs.asCom.pagination.total = 0
this.$refs.outStorageMatch.$refs.asCom.showData = []
this.$refs.outStorageMatchItem.$refs.asCom.showData = []
this.$refs.jobResponseOutStorageMatch.$refs.asCom.showData = []
setTimeout(() => {
this.$refs.outStorageMatch && (this.$refs.outStorageMatch.$refs.asCom.pagination.total = 0)
this.$refs.outStorageMatchItem && (this.$refs.outStorageMatchItem.$refs.asCom.pagination.total = 0)
this.$refs.jobResponseOutStorageMatch && (this.$refs.jobResponseOutStorageMatch.$refs.asCom.pagination.total = 0)
this.$refs.outStorageMatch && (this.$refs.outStorageMatch.$refs.asCom.showData = [])
this.$refs.outStorageMatchItem && (this.$refs.outStorageMatchItem.$refs.asCom.showData = [])
this.$refs.jobResponseOutStorageMatch && (this.$refs.jobResponseOutStorageMatch.$refs.asCom.showData = [])
}, 500)
}
}
}
......
......@@ -60,7 +60,7 @@ export default {
methods: {
checkboxChange(checkList) {
this.subTypeName = '1'
this.$refs.right.init(checkList)
this.$refs.right && this.$refs.right.init(checkList)
}
}
}
......
......@@ -43,19 +43,21 @@
<section class="collapse-title">| {{ request.name }}{{ request.lists.length }}</section>
</template>
<ul v-if="request.lists.length">
<!-- 带复选框 -->
<template>
<li
v-for="(item, subIndex) in request.lists"
:key="item.id"
class="blue"
:class="{active: subIndex === active,'active-background':item.activeBackground}"
@click="currentAoClick(item,subIndex)"
>
<el-checkbox
v-model="checkedAll"
:indeterminate="isIndeterminate"
@change="v => handleCheckAllChange(v)"
>全选</el-checkbox>
<el-checkbox-group v-model="checkedLists" @change="handleCheckedCitiesChange">
<el-checkbox v-for="(item) in request.lists" :key="item.id" :label="item">
<i class="el-icon-document" />
{{ item.sorties }} ,{{ item.serialNumber || '暂无' }},
{{ item.sorties }},
{{ item.serialNumber || '暂无' }},
{{ item.plannerName }},
{{ item.startTime }}
</li>
{{ item.startTime }}</el-checkbox>
</el-checkbox-group>
</template>
</ul>
<span v-else class="empty">暂无数据</span>
......@@ -95,7 +97,20 @@ export default {
// 申请列表
requests: [
{ name: '配套出库', lists: [] }
]
],
checkedAll: false,
isIndeterminate: false,
checkedLists: []
}
},
watch: {
checkedLists: {
immediate: true,
deep: true,
handler(val) {
this.$emit('currentAo:click', val)
}
}
},
mounted() {
......@@ -149,6 +164,9 @@ export default {
]
}
this.loading = true
this.checkedAll = false
this.isIndeterminate = false
this.checkedLists = []
// return new Promise((resolve, reject) => {
post(`OutStorageRequest/search/matchStorageExpireToAo?taskDefinitionKey=${this.selectData.taskKey}`, params).then(res => {
const data = res.items.content.map(item => {
......@@ -158,7 +176,6 @@ export default {
}
})
this.requests.find(item => item.name === '配套出库').lists = data
this.currentAoClick(data[0], 0)
}).catch(err => console.log(err)).finally(() => {
this.loading = false
})
......@@ -171,13 +188,14 @@ export default {
this.form = {}
this.init()
},
currentAoClick(item, subIndex) {
this.active = subIndex
this.$emit('currentAo:click', item)
handleCheckAllChange(val) {
this.checkedLists = val ? this.requests[0].lists : []
this.isIndeterminate = false
},
// 阻止事件冒泡
stopDefault(e) {
e.stopPropagation()
handleCheckedCitiesChange(value) {
const checkedCount = value.length
this.checkedAll = checkedCount === this.requests[0].lists.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.requests[0].lists.length
}
}
}
......
......@@ -32,8 +32,8 @@ export default {
default: () => {}
},
currentAo: {
type: Object,
default: () => {}
type: Array,
default: () => []
}
},
data() {
......@@ -58,7 +58,7 @@ export default {
selectionChange(val) {
this.selectionRows = val
const requestIds = val && val.map(item => item.id)
this.$refs.outStorageMatchItem.$refs.asCom.getData(requestIds)
this.$refs.outStorageMatchItem && this.$refs.outStorageMatchItem.$refs.asCom.getData(requestIds)
},
selectionChange_item(val) {
this.selectionItemRows = val
......@@ -68,10 +68,20 @@ export default {
selectionChange_jobRes(val) {
this.selectionJobResRows = val
},
init(currentAo) {
init(checkList) {
const aoIds = checkList && checkList.map(item => item.id)
if (aoIds && aoIds.length) {
this.$refs.outStorageMatch && this.$refs.outStorageMatch.$refs.asCom.getData(aoIds)
} else {
setTimeout(() => {
this.$refs.outStorageMatch && this.$refs.outStorageMatch.$refs.asCom.getData(currentAo && currentAo.id || 0)
}, 100)
this.$refs.outStorageMatch && (this.$refs.outStorageMatch.$refs.asCom.pagination.total = 0)
this.$refs.outStorageMatchItem && (this.$refs.outStorageMatchItem.$refs.asCom.pagination.total = 0)
this.$refs.jobResponseOutStorageMatch && (this.$refs.jobResponseOutStorageMatch.$refs.asCom.pagination.total = 0)
this.$refs.outStorageMatch && (this.$refs.outStorageMatch.$refs.asCom.showData = [])
this.$refs.outStorageMatchItem && (this.$refs.outStorageMatchItem.$refs.asCom.showData = [])
this.$refs.jobResponseOutStorageMatch && (this.$refs.jobResponseOutStorageMatch.$refs.asCom.showData = [])
}, 500)
}
}
}
}
......
......@@ -63,7 +63,7 @@ export default {
currentAoClick(currentAo) {
this.subTypeName = '1'
this.currentAo = currentAo
this.$refs.right.init(currentAo)
this.$refs.right && this.$refs.right.init(currentAo)
}
}
}
......
......@@ -16,6 +16,7 @@
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com
ref="MaterialTable"
v-dee-loading="loadingMaterial"
class="list-table"
:basic-data=" { selectData: selectData }"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'material_table'}"
......@@ -25,6 +26,7 @@
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
<dee-as-com
ref="AirEquipmentTable"
v-dee-loading="loadingAirEquipment"
class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'airEquipment_table'}"
:basic-data=" { selectData: selectData }"
......@@ -34,6 +36,7 @@
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
<dee-as-com
ref="OutSourceTable"
v-dee-loading="loadingOutSource"
class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'outSource_table'}"
:basic-data=" { selectData: selectData }"
......@@ -69,7 +72,10 @@ export default {
'Material',
'AirEquipment',
'OutSource'
]
],
loadingMaterial: false,
loadingAirEquipment: false,
loadingOutSource: false
}
},
computed: {
......@@ -101,6 +107,7 @@ export default {
// 组件方法
methods: {
onRequestSuccess(res, tabName) {
this['loading' + tabName] = false
this.$set(this.totals, tabName + 'Total', res.items.totalElements)
},
searchEvent(val) {
......@@ -109,6 +116,7 @@ export default {
},
getTableData() {
this.tabNames.forEach(item => {
this['loading' + item] = true
const el = this.$refs[item + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
......
......@@ -16,6 +16,7 @@
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com
ref="MaterialTable"
v-dee-loading="loadingMaterial"
class="list-table"
:basic-data=" basicData"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_material_table'}"
......@@ -26,6 +27,7 @@
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
<dee-as-com
ref="AirEquipmentTable"
v-dee-loading="loadingAirEquipment"
class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_airEquipment_table'}"
:basic-data=" basicData"
......@@ -36,6 +38,7 @@
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
<dee-as-com
ref="OutSourceTable"
v-dee-loading="loadingOutSource"
class="list-table"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'examine_outSource_table'}"
:basic-data=" basicData"
......@@ -75,7 +78,10 @@ export default {
'OutSource'
],
selectionRows: {},
basicData: { selectData: _that.selectData, selectionRows: [] }
basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false,
loadingAirEquipment: false,
loadingOutSource: false
}
},
computed: {
......@@ -100,6 +106,7 @@ export default {
// 组件方法
methods: {
onRequestSuccess(res, tabName) {
this['loading' + tabName] = false
this.$set(this.totals, tabName + 'Total', res.items.totalElements)
},
searchEvent(val) {
......@@ -108,6 +115,7 @@ export default {
},
getTableData() {
this.tabNames.forEach(item => {
this['loading' + item] = true
const el = this.$refs[item + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
......
......@@ -16,6 +16,7 @@
<el-tab-pane :label="'器材验收单(' + totals.MaterialTotal + ')'" name="Material">
<dee-as-com
ref="MaterialTable"
v-dee-loading="loadingMaterial"
class="list-table"
:basic-data=" {...basicData,tableType:'Material'}"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'batchSign_jobResponseInTest'}"
......@@ -26,6 +27,7 @@
<el-tab-pane :label="'机载系统设备验收单(' + totals.AirEquipmentTotal + ')'" name="AirEquipment">
<dee-as-com
ref="AirEquipmentTable"
v-dee-loading="loadingAirEquipment"
class="list-table"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'airborne_batchSign_jobResponseInTest'}"
:basic-data=" {...basicData,tableType:'AirEquipment'}"
......@@ -36,6 +38,7 @@
<el-tab-pane :label="'外包产品验收单(' + totals.OutSourceTotal + ')'" name="OutSource">
<dee-as-com
ref="OutSourceTable"
v-dee-loading="loadingOutSource"
class="list-table"
:lay-config="{ typeName: 'JobResponseInStorage', layKey: 'outsource_batchSign_jobResponseInTest'}"
:basic-data="{...basicData,tableType:'OutSource'}"
......@@ -75,7 +78,10 @@ export default {
'OutSource'
],
selectionRows: {},
basicData: { selectData: _that.selectData, selectionRows: [] }
basicData: { selectData: _that.selectData, selectionRows: [] },
loadingMaterial: false,
loadingAirEquipment: false,
loadingOutSource: false
}
},
computed: {
......@@ -108,6 +114,7 @@ export default {
// 组件方法
methods: {
onRequestSuccess(res, tabName) {
this['loading' + tabName] = false
this.$set(this.totals, tabName + 'Total', res.items.totalElements)
},
searchEvent(val) {
......@@ -116,6 +123,7 @@ export default {
},
getTableData() {
this.tabNames.forEach(item => {
this['loading' + item] = true
const el = this.$refs[item + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
......
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