Commit 8617c1cb authored by jingnan's avatar jingnan 👀

批量签审生产准备工人联调

parent 92c23df7
<template>
<div class="proPreConfirmLeft" style="padding-right: 15px; height: 100%; overflow: scroll;">
<!-- 搜索 -->
<el-form
ref="form"
:model="form"
size="small"
label-width="68px"
>
<el-form-item label="架次">
<el-input
v-model="form.sorties"
clearable
type="input"
placeholder="请输入"
/>
</el-form-item>
<el-form-item label="AO号">
<el-input
v-model="form.serialNumber"
clearable
type="input"
placeholder="请输入"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchForm()">查询</el-button>
<el-button @click="resetForm()">重置</el-button>
</el-form-item>
</el-form>
<!-- 分类展示 -->
<el-collapse
v-model="collapse.active"
v-loading="loading"
accordion
>
<el-collapse-item
v-for="(request, index) in requests"
:key="index"
:name="(index + 1).toString()"
>
<template slot="title">
<section class="collapse-title">| {{ request.name }}{{ request.lists.length }}</section>
</template>
<ul v-if="request.lists.length">
<template v-for="(item, subIndex) in request.lists">
<li
:key="item.id"
class="blue"
:class="{active: subIndex === active,'active-background':item.activeBackground}"
@click="currentAoClick(item,subIndex)"
>
<i class="el-icon-document" />
{{ item.sorties }} ,{{ item.serialNumber || '暂无' }},
{{ item.plannerName }}
</li>
</template>
</ul>
<span v-else class="empty">暂无数据</span>
</el-collapse-item>
</el-collapse>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'MatchConfirmLeft',
components: {
},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
loading: false,
// 搜索表单
form: {
reqNo: '',
reqBill: '',
ao: '',
resCode: '',
modelNo: ''
},
// 手风琴默认高亮
active: 0,
// 手风琴组件
collapse: {
active: ['1']
},
// 申请列表
requests: [
{ name: '配套出库', lists: [] }
]
}
},
mounted() {
this.init()
this.$bus.$on('reloadModuleList', (hasFlag) => {
this.$nextTick(() => {
this.init()
})
})
},
methods: {
// 加载左侧申请表
init() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'serialNumber',
'operator': 'LIKE',
'value': this.form.serialNumber || ''
},
{
'fieldName': 'sorties',
'operator': 'LIKE',
'value': this.form.sorties || ''
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'joExecutePlan'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
this.loading = true
// 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
}
})
this.requests.find(item => item.name === '配套出库').lists = data
}).catch(err => console.log(err)).finally(() => {
this.loading = false
})
},
searchForm() {
this.init()
},
// 重置表单
resetForm() {
this.form = {}
this.init()
},
currentAoClick(item, subIndex) {
this.active = subIndex
this.$emit('currentAo:click', item)
},
// 阻止事件冒泡
stopDefault(e) {
e.stopPropagation()
}
}
}
</script>
<style lang="scss" scoped>
ul {
margin: -10px 0;
padding: 5px 0 0 0;
li {
margin-top: 5px;
padding: 0 5px 0 8px;
height: 25px;
line-height: 25px;
list-style: none;
cursor: pointer;
font-size: 14px;
color: #606266;
opacity: .85;
white-space: nowrap;
&.black{
color: black;
}
&.active-background{background-color: #67C23A;}
&.blue { color: blue; }
&.red { color: red; }
i { font-size: 14px; }
&:hover, &.active {
opacity: 1;
font-weight: 500;
background-color: #edf0f5;
}
}
}
.empty { margin-left: 10px; color: #666; }
.el-date-editor { width: 100%; }
.collapse-title { font-size: 14px; color: #666; }
.is-active .collapse-title { font-size: 15px; font-weight: 600; color: #222; }
</style>
<template>
<div class="proPreConfirmRight">
<dee-as-com
ref="outStorageMatch"
:basic-data=" { selectData: selectData }"
:lay-config="{ typeName: 'ExtSupportingItem', layKey: 'batchSign_proPreConfirm_rightTop'}"
table-height="calc(50vh - 80px)"
/>
<dee-as-com
ref="outStorageMatchItem"
:lay-config="{ typeName: 'OutStorageMatchItem', layKey: 'batchSign_proPreConfirm_rightBottom'}"
table-height="calc(50vh - 80px)"
:basic-data=" { selectData,selectionRows }"
@selectionChange="selectionChange"
/>
</div>
</template>
<script>
export default {
name: 'MatchConfirmRight',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: []
}
},
computed: {},
watch: {},
created() {},
mounted() {
this.$bus.$on('reloadModuleList', (hasFlag) => {
this.$nextTick(() => {
this.init()
})
})
},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
},
init(currentAo) {
this.$refs.outStorageMatch && this.$refs.outStorageMatch.$refs.asCom.getData(currentAo && currentAo.id || 0)
this.$refs.outStorageMatch && this.$refs.outStorageMatchItem.$refs.asCom.getData(currentAo && currentAo.id || 0)
}
}
}
</script>
<style lang='scss'>
.proPreConfirmRight{
overflow: auto;
width: 100%;
height: 100%;
box-sizing: border-box;
padding-left: 8px;
.sub-title{
padding-top: 0px!important;
}
.dee-table{
.dee-tools {
margin: 2px 0!important;
}
.dee-table-config-bar{
margin: 2px 0!important;
}
.dee-table-pagination {
margin-top: 12px!important;
}
}
}
</style>
...@@ -5,20 +5,41 @@ ...@@ -5,20 +5,41 @@
--> -->
<template> <template>
<div class="proPreparatWorkerConfirm"> <div class="proPreparatWorkerConfirm">
<dee-as-com <dee-fold-pane
ref="applyTable" :min-percent="18"
class="list-table" :default-percent="18"
:basic-data=" { selectData,selectionRows }" split="vertical"
:lay-config="{ typeName: 'ProdTask', layKey: 'batchSign_workerConfirm'}" class="detail-pane"
@selectionChange="selectionChange" >
<template slot="paneL">
<Left
ref="left"
:select-data="selectData"
@currentAo:click="currentAoClick"
/> />
</template>
<template slot="paneR">
<Right
v-show="subTypeName === '1'"
ref="right"
:select-data="selectData"
@left:init="() => this.$refs.left.init()"
/>
<!-- empty -->
<section v-if="!subTypeName" style="padding-left: 15px;">
请先选择左侧请求单
</section>
</template>
</dee-fold-pane>
</div> </div>
</template> </template>
<script> <script>
import Left from './components/left.vue'
import Right from './components/right.vue'
export default { export default {
name: 'ProPreparatWorkerConfirm', name: 'ProPreparatWorkerConfirm',
components: {}, components: { Left, Right },
props: { props: {
selectData: { selectData: {
type: Object, type: Object,
...@@ -27,7 +48,7 @@ export default { ...@@ -27,7 +48,7 @@ export default {
}, },
data() { data() {
return { return {
selectionRows: [] subTypeName: ''
} }
}, },
computed: {}, computed: {},
...@@ -37,8 +58,9 @@ export default { ...@@ -37,8 +58,9 @@ export default {
}, },
// 组件方法 // 组件方法
methods: { methods: {
selectionChange(val) { currentAoClick(currentAo) {
this.selectionRows = val this.subTypeName = '1'
this.$refs.right.init(currentAo)
} }
} }
} }
...@@ -47,7 +69,7 @@ export default { ...@@ -47,7 +69,7 @@ export default {
<style lang='scss'> <style lang='scss'>
.proPreparatWorkerConfirm{ .proPreparatWorkerConfirm{
width: 100%; width: 100%;
height: 100%; height: 103%;
box-sizing: border-box; box-sizing: border-box;
padding:0 4px; padding:0 4px;
......
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