Commit 76e32b9a authored by jingnan's avatar jingnan 👀

ERP相关_物料分拣,准备工出库调整及操作工确认界面开发及接口联调

parent f8fc96b4
<!--
* @Author: gjn
* @Date: 2024-07-15 14:18:47
* @Description:物料分拣明细查看
-->
<template>
<div class="sortingItemView">
<dee-as-com
ref="erpSortingItemCom"
:lay-config="{ typeName: 'ErpSortingItem', layKey: 'defaultResult'}"
:basic-data="basicData"
@selectionChange="selectionChange_item"
/>
<dee-as-com
ref="jobResponseSortingCom"
:lay-config="{ typeName: 'JobResponseSorting', layKey: 'defaultResult'}"
@selectionChange="selectionChange_jobRes"
/>
</div>
</template>
<script>
export default {
name: 'SortingItemView',
components: {},
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionItemRows: [],
selectionJobResRows: []
}
},
computed: {},
watch: {},
created() {},
mounted() {
},
// 组件方法
methods: {
selectionChange_item(val) {
this.selectionItemRows = val
const itemIds = val && val.map(item => item.id)
this.$refs.jobResponseSortingCom.$refs.asCom.getData({
'fieldName': 'erpSortingItemId',
'operator': 'IN',
'value': itemIds || []
})
},
selectionChange_jobRes(val) {
this.selectionJobResRows = val
}
}
}
</script>
<style lang='scss'>
</style>
...@@ -5,13 +5,7 @@ ...@@ -5,13 +5,7 @@
--> -->
<template> <template>
<div class="materialSorting"> <div class="materialSorting">
<!-- <dee-as-com <el-tabs v-model="active" type="border-card" class="detailTabs" @tab-click="tabClick">
ref="search"
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'warehouse_search'}"
@searchEvent="searchEvent"
/> -->
<!-- tab页签 -->
<el-tabs v-model="active" type="border-card" class="detailTabs">
<el-tab-pane label="未分拣" name="noSort"> <el-tab-pane label="未分拣" name="noSort">
<dee-as-com <dee-as-com
ref="noSortTable" ref="noSortTable"
...@@ -56,6 +50,12 @@ export default { ...@@ -56,6 +50,12 @@ export default {
this.searchItems = val.items this.searchItems = val.items
this.getTableData() this.getTableData()
}, },
tabClick(tab, event) {
const el = this.$refs[tab.name + 'Table']
if (el && el.$refs.asCom) {
el.$refs.asCom.getData(this.searchItems)
}
},
getTableData() { getTableData() {
this.tabNames.forEach(item => { this.tabNames.forEach(item => {
this['loading' + item] = true this['loading' + item] = true
...@@ -72,13 +72,8 @@ export default { ...@@ -72,13 +72,8 @@ export default {
<style lang='scss'> <style lang='scss'>
.materialSorting{ .materialSorting{
width: 100%; width: 100%;
// height: calc(100% - 50px);
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
// padding:0 4px;
// .search-form-box-com .search-box-col{
// width: 100%!important;
// }
.detailTabs { .detailTabs {
height: calc(100% - 0px); height: calc(100% - 0px);
border: 0; border: 0;
......
<template>
<div class="MaterialSortingAdjustLeft" style="padding-right: 15px; height: 100%; overflow: scroll;">
<!-- 搜索 -->
<el-form
ref="form"
:model="form"
size="small"
label-width="100px"
>
<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 label="计划开始时间">
<el-date-picker
v-model="form.scheduledStart"
type="daterange"
size="mini"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
/>
</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>
<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.plannerName }},
{{ 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: 'MaterialSortingAdjustLeft',
components: {
},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
loading: false,
// 搜索表单
form: {
reqNo: '',
reqBill: '',
ao: '',
resCode: '',
modelNo: ''
},
// 手风琴默认高亮
active: '',
// 手风琴组件
collapse: {
active: ['1']
},
// 申请列表
requests: [
{ name: '配套出库', lists: [] }
],
checkedAll: false,
isIndeterminate: false,
checkedLists: []
}
},
watch: {
checkedLists: {
// immediate: true,
deep: true,
handler(val) {
this.$emit('checkbox:change', val)
}
}
},
mounted() {
this.init()
this.$bus.$on('reloadModuleList', (hasFlag) => {
this.$nextTick(() => {
this.init()
})
})
},
methods: {
// 加载左侧申请表
init() {
const items = []
if (this.form.scheduledStart) {
items.push({
fieldName: 'extProcessPlan.joExecutePlan.scheduledStart',
operator: 'BTWN',
searchItemType: 'Date',
value: this.form.scheduledStart[0] + ' 00:00:00',
value1: this.form.scheduledStart[1] + ' 23:59:59'
})
}
if (this.form.serialNumber) {
items.push({
'fieldName': 'extProcessPlan.serialNumber',
'operator': 'LIKE',
'value': this.form.serialNumber || ''
})
}
if (this.form.sorties) {
items.push({
'fieldName': 'sorties',
'operator': 'LIKE',
'value': this.form.sorties || ''
})
}
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
...items
],
'operator': 'AND'
},
'openProps': [
{
'name': 'extProcessPlan',
'openProps': [
{
'name': 'joExecutePlan'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
this.loading = true
this.checkedAll = false
this.isIndeterminate = false
this.checkedLists = []
post(`/ErpSorting/prepareTask/AO/search`, params).then(res => {
const data = res.items.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 = {
reqNo: '',
reqBill: '',
ao: ''
}
this.init()
},
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="MaterialSortingAdjustRight">
<dee-as-com
ref="erpSortingCon"
table-height="auto"
:basic-data=" { selectData,selectionRows }"
:lay-config="{ typeName: 'ErpSorting', layKey: 'defaultResult'}"
@selectionChange="selectionChange"
/>
<dee-as-com
ref="erpSortingItemCon"
:lay-config="{ typeName: 'ErpSortingItem', layKey: 'defaultResult'}"
table-height="auto"
@selectionChange="selectionChange_item"
/>
<dee-as-com
ref="jobResponseSortingCon"
table-height="auto"
:lay-config="{ typeName: 'JobResponseSorting', layKey: 'defaultResult'}"
@selectionChange="selectionChange_jobRes"
/>
</div>
</template>
<script>
export default {
name: 'MaterialSortingAdjustRight',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: [],
selectionItemRows: [],
selectionJobResRows: []
}
},
computed: {},
watch: {},
created() {},
mounted() {
this.$bus.$on('refreshMaterialSortingAdjust', (hasFlag) => {
this.$nextTick(() => {
this.selectionChange(this.selectionRows)
this.selectionChange_item(this.selectionItemRows)
})
})
},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
const requestIds = val && val.map(item => item.id)
this.$refs.erpSortingItemCon && this.$refs.erpSortingItemCon.$refs.asCom.getData({
'fieldName': 'erpSortingId',
'operator': 'IN',
'value': requestIds || []
})
},
selectionChange_item(val) {
this.selectionItemRows = val
const itemIds = val && val.map(item => item.id)
this.$refs.jobResponseSortingCon && this.$refs.jobResponseSortingCon.$refs.asCom.getData({
'fieldName': 'erpSortingItemId',
'operator': 'IN',
'value': itemIds || []
})
},
selectionChange_jobRes(val) {
this.selectionJobResRows = val
},
init(checkList) {
const aoIds = checkList && checkList.map(item => item.id)
if (aoIds && aoIds.length) {
this.$refs.erpSortingCon.$refs.asCom.getData({ 'fieldName': 'extProcessPlanId', 'operator': 'IN', 'value': aoIds })
} else {
setTimeout(() => {
this.$refs.erpSortingCon && (this.$refs.erpSortingCon.$refs.asCom.pagination.total = 0)
this.$refs.erpSortingItemCon && (this.$refs.erpSortingItemCon.$refs.asCom.pagination.total = 0)
this.$refs.jobResponseSortingCon && (this.$refs.jobResponseSortingCon.$refs.asCom.pagination.total = 0)
this.$refs.erpSortingCon && (this.$refs.erpSortingCon.$refs.asCom.showData = [])
this.$refs.erpSortingItemCon && (this.$refs.erpSortingItemCon.$refs.asCom.showData = [])
this.$refs.jobResponseSortingCon && (this.$refs.jobResponseSortingCon.$refs.asCom.showData = [])
}, 500)
}
}
}
}
</script>
<style lang='scss'>
.MaterialSortingAdjustRight{
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>
<!--
* @Author: gjn
* @LastEditTime: 2024-07-16 10:56:27
* @Description:ERP_分拣调整
-->
<template>
<div class="materialSortingAdjust">
<dee-fold-pane
:min-percent="18"
:default-percent="18"
split="vertical"
class="detail-pane"
>
<template slot="paneL">
<Left
ref="left"
:select-data="selectData"
@checkbox:change="checkboxChange"
/>
</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>
</template>
<script>
import Left from './components/left.vue'
import Right from './components/right.vue'
export default {
name: 'MaterialSortingAdjust',
componentName: 'ERP_分拣调整',
components: { Left, Right },
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
subTypeName: ''
}
},
computed: {},
watch: {},
created() {},
mounted() {
},
// 组件方法
methods: {
checkboxChange(checkList) {
this.subTypeName = '1'
this.$refs.right && this.$refs.right.init(checkList)
}
}
}
</script>
<style lang='scss'>
.outStorageMatchConfirm{
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
}
</style>
<template>
<div class="operatorConfirmLeft" 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> -->
<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)"
>
<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: 'OperatorConfirmLeft',
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 items = []
if (this.form.serialNumber) {
items.push({
'fieldName': 'extProcessPlan.serialNumber',
'operator': 'LIKE',
'value': this.form.serialNumber || ''
})
}
if (this.form.sorties) {
items.push({
'fieldName': 'sorties',
'operator': 'LIKE',
'value': this.form.sorties || ''
})
}
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': items,
'operator': 'AND'
},
'openProps': [
{
'name': 'extProcessPlan',
'openProps': [
{
'name': 'joExecutePlan'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
this.loading = true
// return new Promise((resolve, reject) => {
post(`/ErpSorting/operationTask/AO/search`, params).then(res => {
const data = res.items.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
this.currentAoClick(data[0], 0)
}).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="operatorConfirmRight">
<div class="table-box">
<dee-as-com
:basic-data=" {...(currentAo&&currentAo.joExecutePlan&&currentAo.joExecutePlan[0]||{})}"
:lay-config="{ typeName: 'JoExecutePlan', layKey: 'batchSign_proPreConfirm_aoInfo'}"
/>
<dee-as-com
ref="outStorageMatch"
:basic-data=" { selectData: selectData }"
:lay-config="{ typeName: 'ExtSupportingItem', layKey: 'batchSign_proPreConfirm_rightTop'}"
table-height="300px"
/>
</div>
<div class="detail">
<dee-as-com
ref="outStorageMatchItem"
:lay-config="{ typeName: 'ErpSortingItem', layKey: 'sortingOutStorageItem'}"
table-height="480px"
:basic-data=" { selectData,selectionRows }"
@selectionChange="selectionChange"
/>
</div>
</div>
</template>
<script>
export default {
name: 'OperatorConfirmRight',
components: {},
props: {
selectData: {
type: Object,
default: () => {}
},
currentAo: {
type: Object,
default: () => {}
}
},
data() {
return {
selectionRows: [],
autoBottomHeight: '100%',
autoTopHeight: '480px'
}
},
computed: {},
watch: {},
created() {},
mounted() {
this.$bus.$on('reloadModuleList', (hasFlag) => {
this.$nextTick(() => {
this.init()
})
})
},
// 组件方法
methods: {
selectionChange(val) {
this.selectionRows = val
},
init(currentAo) {
setTimeout(() => {
this.$refs.outStorageMatch && this.$refs.outStorageMatch.$refs.asCom.getData(currentAo && currentAo.id || 0)
this.$refs.outStorageMatchItem && this.$refs.outStorageMatchItem.$refs.asCom.getData({
'fieldName': 'erpSorting.extProcessPlanId',
'operator': 'EQ',
'value': currentAo && currentAo.id || 0
})
}, 100)
}
}
}
</script>
<style lang='scss'>
.operatorConfirmRight{
overflow-y: auto;
overflow-x: hidden;
padding-left: 8px;
.sub-title{
padding-top: 10px!important;
}
}
</style>
<!--
* @Author: gjn
* @LastEditTime: 2024-07-16 10:57:53
* @Description:ERP——操作工确认
-->
<template>
<div class="operatorConfirm">
<dee-fold-pane
:min-percent="18"
:default-percent="18"
split="vertical"
class="detail-pane"
>
<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"
:current-ao="currentAo"
@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 {
name: 'OperatorConfirm',
componentName: 'ERP_操作工确认',
components: { Left, Right },
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
subTypeName: '',
currentAo: null
}
},
computed: {},
watch: {},
created() {},
mounted() {
},
// 组件方法
methods: {
currentAoClick(currentAo) {
this.subTypeName = '1'
this.currentAo = currentAo
this.$refs.right.init(currentAo)
}
}
}
</script>
<style lang='scss'>
.operatorConfirm{
width: 100%;
height: 103%;
box-sizing: border-box;
padding:0 4px;
}
</style>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<DeeAsCom <DeeAsCom
ref="adjustOccupyJobResponse" ref="adjustOccupyJobResponse"
:basic-data="selectDatas[0]||basicData" :basic-data="selectDatas[0]||basicData"
:lay-config="bottomLayCoinfig" :lay-config="bottomConfig"
table-height="300px" table-height="300px"
@selectionChange="jobResponseSelectionChange" @selectionChange="jobResponseSelectionChange"
@requestSuccess="onRequestSuccess" @requestSuccess="onRequestSuccess"
...@@ -70,7 +70,18 @@ export default { ...@@ -70,7 +70,18 @@ export default {
isRefresh: false isRefresh: false
} }
}, },
computed: {}, computed: {
bottomConfig() {
if (this.basicData && this.basicData.fromPage === 'MaterialSortingAdjust') {
return {
typeName: 'JobResponseSorting',
layKey: 'adjustOccupyBottom'
}
} else {
return this.bottomLayCoinfig
}
}
},
created() { created() {
// 初始化数据 // 初始化数据
}, },
...@@ -86,13 +97,24 @@ export default { ...@@ -86,13 +97,24 @@ export default {
if (this.jobResponseSelection.length === 0) { if (this.jobResponseSelection.length === 0) {
return this.$utils.showMessageWarning('请选择响应数据!') return this.$utils.showMessageWarning('请选择响应数据!')
} }
const ids = this.jobResponseSelection.map(item => item.id).join(',') const ids = this.jobResponseSelection.map(item => item.id)
post('InStorageRequestItem/adjust/cancelTake?jobResponseIds=' + ids).then(res => {
if (this.basicData && this.basicData.fromPage === 'MaterialSortingAdjust') {
// ERP_分拣调整使用
post('/ErpSortingItem/adjust/cancelTake', ids).then(res => {
this.$utils.showMessageSuccess('解除占用成功!') this.$utils.showMessageSuccess('解除占用成功!')
this.refresh() this.refresh()
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
} else {
post('InStorageRequestItem/adjust/cancelTake?jobResponseIds=' + ids.join(',')).then(res => {
this.$utils.showMessageSuccess('解除占用成功!')
this.refresh()
}).catch((err) => {
console.log(err)
})
}
}, },
// 手动占用 // 手动占用
occupy() { occupy() {
...@@ -109,7 +131,8 @@ export default { ...@@ -109,7 +131,8 @@ export default {
}) })
const id = this.selectDatas[0] ? this.selectDatas[0].id : this.basicData.id || '' const id = this.selectDatas[0] ? this.selectDatas[0].id : this.basicData.id || ''
if (!param.includes(undefined)) { if (!param.includes(undefined)) {
post('InStorageRequestItem/adjust/reTake?itemId=' + id, param).then(res => { const requestUrl = this.basicData && this.basicData.fromPage === 'MaterialSortingAdjust' ? '/ErpSortingItem/adjust/reTake' : 'InStorageRequestItem/adjust/reTake'
post(`${requestUrl}?itemId=${id}`, param).then(res => {
this.$utils.showMessageSuccess('调整占用成功!') this.$utils.showMessageSuccess('调整占用成功!')
this.refresh() this.refresh()
}).catch((err) => { }).catch((err) => {
...@@ -119,12 +142,14 @@ export default { ...@@ -119,12 +142,14 @@ export default {
}, },
refresh() { refresh() {
this.isRefresh = true this.isRefresh = true
this.$refs.adjustOccupyInfo.$refs.asCom.getData() this.$refs.adjustOccupyInfo && this.$refs.adjustOccupyInfo.$refs.asCom.getData()
this.$refs.adjustOccupyJobResponse.$refs.asCom.getData() this.$refs.adjustOccupyJobResponse && this.$refs.adjustOccupyJobResponse.$refs.asCom.getData()
if (this.basicData && (this.basicData.fromPage === 'OutStorageUseConfirm' || this.basicData.fromPage === 'OutStorageOutConfirm')) { // 领用出库确认流程节点展示 if (this.basicData && (this.basicData.fromPage === 'OutStorageUseConfirm' || this.basicData.fromPage === 'OutStorageOutConfirm')) { // 领用出库确认流程节点展示
this.$bus.$emit('refreshUseItemConfirm') this.$bus.$emit('refreshUseItemConfirm')
} else if (this.basicData && this.basicData.fromPage === 'OutStorageMatchConfirm') { // 批量签审——配套出库确认流程节点使用 } else if (this.basicData && this.basicData.fromPage === 'OutStorageMatchConfirm') { // 批量签审——配套出库确认流程节点使用
this.$bus.$emit('refreshMatchConfirm') this.$bus.$emit('refreshMatchConfirm')
} else if (this.basicData && this.basicData.fromPage === 'MaterialSortingAdjust') { // ERP_分拣调整使用
this.$bus.$emit('refreshMaterialSortingAdjust')
} else if (this.basicData && (this.basicData.fromPage === 'MatchRequestItems')) { } else if (this.basicData && (this.basicData.fromPage === 'MatchRequestItems')) {
this.$bus.$emit('refreshMatchItems') this.$bus.$emit('refreshMatchItems')
} }
......
...@@ -93,7 +93,11 @@ export default { ...@@ -93,7 +93,11 @@ export default {
tbPrintCode(selectRows) { tbPrintCode(selectRows) {
const selection = selectRows const selection = selectRows
const selectSubTypeName = selection && selection[0] && selection[0].subTypeName const selectSubTypeName = selection && selection[0] && selection[0].subTypeName
if (selectSubTypeName === 'OutStorageMatchItem') { // 打印AO标签 if (selectSubTypeName === 'ErpSorting') { // ERP_打印分拣单二维码
this.printErpSortLabel(selection)
} else if (selectSubTypeName === 'JobResponseSorting') { // ERP_打印实物二维码
this.printErpJobResSortLabel(selection)
} else if (selectSubTypeName === 'OutStorageMatchItem') { // 打印AO标签
this.printAoLabel(selection) this.printAoLabel(selection)
} else if (selectSubTypeName === 'InventoryFlow') { // 打印流水标签 } else if (selectSubTypeName === 'InventoryFlow') { // 打印流水标签
this.printFlowLable(selection) this.printFlowLable(selection)
...@@ -107,6 +111,61 @@ export default { ...@@ -107,6 +111,61 @@ export default {
this.printInStorageLabel(selection) this.printInStorageLabel(selection)
} }
}, },
printErpSortLabel(selection) {
this.config.prints = []
selection.forEach((item) => {
this.config = Object.assign({}, this.config, {
visible: true
})
this.config.prints.push({
text: item.id || '',
propertys: [
{ label: 'CAS号', value: item.casCode || '' },
{ label: 'AO号', value: item.extProcessPlan && item.extProcessPlan.serialNumber || '' },
{ label: '机型', value: item.airModel || '' },
{ label: '架次', value: item.sorties || '' },
{ label: '站位', value: item.positionNumber || '' },
{ label: '分拣单号', value: item.reqNo || '' }
]
})
})
this.print()
},
printErpJobResSortLabel(selection) {
// 获取需要打印的数据
this.config.prints = []
selection.forEach((item) => {
this.config = Object.assign({}, this.config, {
visible: true
})
const erpSortingData = item.erpSortingItem && item.erpSortingItem.erpSorting || {}
const erpInventoryData = item.erpInventory || {}
const extMaterialData = erpInventoryData && erpInventoryData.extMaterial || {}
this.config.prints.push({
text: item.id || '',
propertys: [
{ label: 'CAS号', value: erpSortingData.casCode || '' },
{ label: 'AO号', value: erpSortingData.extProcessPlan && erpSortingData.extProcessPlan.serialNumber || '' },
{ label: '编码', value: extMaterialData.resCode || '' },
{ label: '名称', value: extMaterialData.resName || '' },
{
label: '型号/牌号/件号',
value: extMaterialData.modelNo || ''
},
{ label: '规格', value: extMaterialData.spec || '' },
{ label: '批号', value: erpInventoryData.batchNumber || '' },
{ label: '系列号/序列号', value: erpInventoryData.serialNo || '' },
{ label: '站位', value: erpSortingData.positionNumber || '' },
{ label: '出库数量', value: item.outsideAmount || '' },
{ label: '计量单位', value: erpInventoryData.unit || '' },
{ label: '机型', value: erpSortingData.airModel || '' },
{ label: '架次', value: erpSortingData.sorties || '' },
{ label: '库位号', value: erpInventoryData.workerUnit || '' }
]
})
})
this.print()
},
printAoLabel(selection) { printAoLabel(selection) {
const ids = selection.map((item) => item.outStorageRequestId) || [] const ids = selection.map((item) => item.outStorageRequestId) || []
const params = { const params = {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
import { showIcon } from '@/utils/util' import { showIcon } from '@/utils/util'
import { getTemps } from '@/api/workflow/userSettings.js' import { getTemps } from '@/api/workflow/userSettings.js'
import { getAllApplication } from '@/api/workflow/config' import { getAllApplication } from '@/api/workflow/config'
import { get } from '@/utils/http' import { get, post } from '@/utils/http'
export default { export default {
name: 'MyTask', name: 'MyTask',
...@@ -109,6 +109,16 @@ export default { ...@@ -109,6 +109,16 @@ export default {
taskType: '执行派工', taskType: '执行派工',
type: 'Dispatch', type: 'Dispatch',
appId: 'myExecutDispatch' appId: 'myExecutDispatch'
},
{
taskType: '操作工确认',
type: 'ERP_operatorConfirm',
appId: 1626782774851
},
{
taskType: '准备工出库调整',
type: 'ERP_SortAdjust',
appId: 1626782774851
} }
] ]
} }
...@@ -200,6 +210,11 @@ export default { ...@@ -200,6 +210,11 @@ export default {
get(`/indexTask/task/ProdTask`, {}).then(res => { get(`/indexTask/task/ProdTask`, {}).then(res => {
this.$set(this.quickAccessList[index], 'taskCount', res.items.count) this.$set(this.quickAccessList[index], 'taskCount', res.items.count)
}) })
} if (item.type === 'ERP_SortAdjust' || item.type === 'ERP_operatorConfirm') {
post(`/ErpSorting/currentUserSortingTaskCount`, {}).then(res => {
const resKey = item.type === 'ERP_SortAdjust' ? '准备工任务数量' : '操作工任务数量'
this.$set(this.quickAccessList[index], 'taskCount', res.items[resKey])
})
} else { } else {
const params = { const params = {
type: this.quickAccessList[index].type type: this.quickAccessList[index].type
...@@ -237,6 +252,23 @@ export default { ...@@ -237,6 +252,23 @@ export default {
} }
}) })
this.$store.dispatch('app/closeSideBar', false) this.$store.dispatch('app/closeSideBar', false)
} else if (item.taskType === '准备工出库调整' || item.taskType === '操作工确认') {
const pageNo = item.taskType === '准备工出库调整' ? '101cb379-db51-4fd5-8a1f-eace2ca8dcc6' : '038a430e-facf-4fcb-9b98-2bf75c226681'
this.$router.push({
path: `/page/${pageNo}`,
query: {
title: item.taskType,
showMenu: false
}
})
this.$store.dispatch('menu/activeModel', {
appId: item.appId,
pageInfo: {
title: item.taskType,
path: `/page/${pageNo}`
}
})
this.$store.dispatch('app/closeSideBar', false)
} else { } else {
this.$router.push({ this.$router.push({
path: `/dee-task-center/workflow/task-center/home/${item.taskKey}`, path: `/dee-task-center/workflow/task-center/home/${item.taskKey}`,
......
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