Commit b0499e97 authored by jingnan's avatar jingnan 👀

ERP相关_领用出库开发

parent 07ee9ee0
......@@ -117,7 +117,7 @@ export default {
// } else {
// this.options = dicData.filter(item => item.label !== '试验领用' && item.label !== '无指令领用' && item.label !== '紧急领用')
// }
this.options = dicData.filter(item => item.label === '材料领用' || item.label === '换件领用')
this.options = dicData.filter(item => item.label === '材料领用' || item.label === '换件领用' || item.label === '库内报废领用')
},
dataChangeHandler(val) {
if (val) {
......
......@@ -69,9 +69,9 @@ export default {
// this.maxNum = maxAmount
// }
this.$emit('input', this.reqAmount)
if (this.form.id && this.parentType_Inject !== '退库入库' && !this.form.subTypeName.includes('BackItem') && this.parentType_Inject !== 'materialUse') {
this.changeAmount()
}
// if (this.form.id && this.parentType_Inject !== '退库入库' && !this.form.subTypeName.includes('BackItem') && this.parentType_Inject !== 'materialUse' && this.parentType_Inject !== 'swapUse') {
// this.changeAmount()
// }
},
changeAmount(val) {
const params = {
......
......@@ -42,7 +42,7 @@ export default {
},
cmpOptionsItem: {
typeName: 'OutStorageUseItem',
layKey: 'edit_outStorageUseItem'
layKey: 'view_outStorageUseItem'
},
refreshKey: 1
}
......
<template>
<div class="proPreConfirmLeft" style="padding-right: 15px; height: 100%; overflow: scroll;">
<!-- 搜索 -->
<dee-as-com
:lay-config="{
typeName: 'OutStorageMaterialUse',
layKey: 'defaultQuery'
}"
@searchEvent="searchEvent"
/>
<!-- 分类展示 -->
<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>
<el-checkbox
v-model="checkedAll"
:indeterminate="isIndeterminate"
@change="v => handleCheckAllChange(v)"
>全选11</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.reqNo }},
{{ item.creator.userName || '' }},
{{ item.createTime }},
{{ item.startTime }}</el-checkbox>
</el-checkbox-group>
</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: [] }
],
searchItems: [],
checkedAll: false,
isIndeterminate: false,
checkedLists: []
}
},
computed: {},
watch: {
checkedLists: {
deep: true,
handler(val) {
this.$emit('currentLeftData:click', val)
}
}
},
mounted() {
this.init()
this.$bus.$on('reloadModuleList', (hasFlag) => {
this.$nextTick(() => {
this.init()
})
})
},
methods: {
searchEvent(data) {
this.searchItems = data && data.items || []
this.init()
},
// 加载左侧申请表
init() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'OutStorageMaterialUse'
},
{
'fieldName': 'state',
'operator': 'IN',
'value': [
'Pending_OutSide'
]
}
],
'operator': 'AND'
}
],
'items': this.searchItems,
'operator': 'AND'
},
'openProps': [
{
'name': 'extResourceType'
},
{
'name': 'creator'
},
{
'name': 'orProduction'
},
{
'name': 'objFileLinks',
'openProps': [
{
'name': 'target'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
this.loading = true
this.checkedAll = false
this.isIndeterminate = false
this.checkedLists = []
post(`/OutStorageRequest/materialUseTask/Query?taskDefinitionKey=${this.selectData.taskKey}`, params).then(res => {
const data = res.items.content.map(item => {
return {
...item.pbo,
processInstanceId: item.taskViewVO && item.taskViewVO.procInstId,
processTaskId: item.taskViewVO && item.taskViewVO.taskId,
taskDefinitionKey: item.taskViewVO && item.taskViewVO.taskKey,
processDefinitionId: item.taskViewVO && item.taskViewVO.procDefId
}
})
this.requests[0].lists = data || []
}).catch(err => console.log(err)).finally(() => {
this.loading = false
})
},
handleCheckAllChange(val) {
this.checkedLists = val ? this.requests[0].lists : []
this.isIndeterminate = false
},
handleCheckedCitiesChange(value) {
const checkedCount = value.length
this.checkedAll = checkedCount === this.requests[0].lists.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.requests[0].lists.length
}
}
}
</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="materialUseConfirmRight">
<dee-as-com
ref="requestCom"
table-height="auto"
:basic-data=" { selectData,selectionRows }"
:lay-config="{ typeName: 'OutStorageMaterialUse', layKey: 'defaultResult'}"
@selectionChange="selectionChange"
/>
<dee-as-com
ref="itemCom"
:lay-config="{ typeName: 'OutStorageMaterialUseItem', layKey: 'defaultResult'}"
table-height="auto"
:basic-data=" { selectData,selectionRowsItem,...currentLeftData }"
@selectionChange="selectionChangeItem"
/>
<dee-as-com
ref="responseTable"
:lay-config="{ typeName: 'JobResponseOutStorageMaterialUse', layKey: 'defaultResult'}"
table-height="auto"
:basic-data=" { selectData,selectionRowsRes,...currentLeftData }"
@selectionChangeRes="selectionChangeRes"
/>
</div>
</template>
<script>
export default {
name: 'MaterialUseConfirmRight',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
},
currentLeftData: {
type: Array,
default: () => []
}
},
data() {
return {
selectionRows: [],
selectionRowsItem: [],
selectionRowsRes: []
}
},
computed: {},
watch: {},
created() {},
mounted() {
},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
const requestIds = val && val.map(item => item.id)
this.$refs.itemCom && this.$refs.itemCom.$refs.asCom.getData(requestIds)
},
selectionChangeItem(val) {
this.selectionRowsItem = val
const itemIds = val && val.map(item => item.id) || []
this.$refs.responseTable && this.$refs.responseTable.$refs.asCom.getData(itemIds)
},
selectionChangeRes(val) {
this.selectionRowsRes = val
},
init(checkList) {
const aoIds = checkList && checkList.map(item => item.id)
if (aoIds && aoIds.length) {
this.$refs.requestCom && this.$refs.requestCom.$refs.asCom.getData([{
'fieldName': 'id',
'operator': 'IN',
'value': aoIds
}])
} else {
setTimeout(() => {
const requestComRef = this.$refs.requestCom && (this.$refs.requestCom.$refs.asCom) || null
const itemComRef = this.$refs.itemCom && (this.$refs.itemCom.$refs.asCom) || {}
const responseRef = this.$refs.responseTable && (this.$refs.responseTable.$refs.asCom) || {}
requestComRef && (requestComRef.pagination.total = 0)
itemComRef && (itemComRef.pagination.total = 0)
responseRef && (responseRef.pagination.total = 0)
requestComRef && (requestComRef.showData = [])
itemComRef && (itemComRef.showData = [])
responseRef && (responseRef.showData = [])
}, 800)
}
}
}
}
</script>
<style lang='scss'>
.materialUseConfirmRight{
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>
<!--
* @LastEditTime: 2024-08-19 15:08:22
* @Description:ERP_领用出库确认
-->
<template>
<div class="ERPOutStorageUseConfirm">
<dee-fold-pane
:min-percent="18"
:default-percent="18"
split="vertical"
class="detail-pane"
>
<template slot="paneL">
<Left
ref="left"
:select-data="selectData"
@currentLeftData:click="currentLeftDataClick"
/>
</template>
<template slot="paneR">
<Right
v-show="subTypeName === '1'"
ref="right"
:select-data="selectData"
:current-left-data="currentLeftData"
@left:init="() => this.$refs.left.init()"
/>
<!-- empty -->
<section v-if="!subTypeName" style="padding-left: 15px;">
请先选择左侧请求单
</section>
</template>
</dee-fold-pane>
</div>
</template>
<script>
import Left from './components/left.vue'
import Right from './components/right.vue'
export default {
componentName: 'ERP_领用出库确认',
name: 'ERPOutStorageUseConfirm',
components: { Left, Right },
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
subTypeName: '',
currentLeftData: null
}
},
computed: {},
watch: {},
created() {},
mounted() {},
// 组件方法
methods: {
currentLeftDataClick(data) {
this.subTypeName = '1'
this.currentLeftData = data
this.$refs.right && this.$refs.right.init(data)
}
}
}
</script>
<style lang='scss'>
.ERPOutStorageUseConfirm{
width: 100%;
height: 103%;
box-sizing: border-box;
padding:0 4px;
}
</style>
......@@ -173,9 +173,26 @@ export default {
this.dialogVisible = false
this.setPersonVisible = true
} else if (isUrgentUse === this.selectionRows.length) {
post('/DxWorkflowTask/apply/batchPass', this.selectionRows.map(item => ({ 'taskId': item.processTaskId, 'pboId': item.id }))).then(res => {
const taskList = this.selectionRows.map(item => (
{
'id': item.processTaskId,
'processDefinitionId': item.processDefinitionId,
'processInstId': item.processInstanceId,
'taskDefinitionKey': item.taskDefinitionKey
}
))
const params = {
'taskList': taskList,
'operationName': 'completeTask',
'routerSelect': 'pass',
'description': '',
'operator': localStorage.getItem('userId')
}
post('/workflow/template/batOperation', params).then(res => {
this.$utils.showMessageSuccess('提交成功')
this.$refs.applyTable.$refs.asCom.getData()
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}, 500)
}).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
......
......@@ -22,9 +22,9 @@ export default {
OutStorageOutExamine: () => import('./outStorageOutExamine'), // 供外出库审核
OutStorageOutApproval: () => import('./outStorageOutApproval'), // 供外出库批准
OutStorageOutConfirm: () => import('./outStorageOutConfirm'), // 供外出库确认
OutStorageUseApply: () => import('./outStorageUseApply'), // 领用出库申请
OutStorageUseExamine: () => import('./outStorageUseExamine'), // 领用出库审核
OutStorageUseConfirm: () => import('./outStorageOutConfirm'), // 领用出库确认
ERPOutStorageUseApply: () => import('./outStorageUseApply'), // 领用出库申请(申请)
ERPOutStorageUseExamine: () => import('./outStorageUseExamine'), // 领用出库审核(工艺员审核)
ERPOutStorageUseConfirm: () => import('./ERP_OutStorageUseConfirm'), // 领用出库确认(换件领用-准备工确认)
InStorageMatchBackApply: () => import('./inStorageMatchBackApply'), // 配套退库申请
InStorageMatchBackExamin: () => import('./inStorageMatchBackExamine'), // 配套退库审核
InStorageMatchBackConfirm: () => import('./inStorageMatchBackConfirm'), // 配套退库确认
......
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