no message
parent
c8d976c554
commit
4c6688f182
|
|
@ -24,4 +24,12 @@ export function edit(data) {
|
|||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function returnPick(data) {
|
||||
return request({
|
||||
url: 'api/pick/returnPick',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, returnPick }
|
||||
|
|
|
|||
|
|
@ -307,7 +307,6 @@ export default {
|
|||
return this.crud.notify('容器未顶升,需顶升之后在做操作!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
}
|
||||
this.missionStatus = (data.type === 'ASN' || data.type === 'FB_RETURN') ? 'FORK_DOWN' : 'COMPLETED'
|
||||
console.log(this.missionStatus)
|
||||
crudKmres.missionStateCallback({
|
||||
missionCode: data.id,
|
||||
containerCode: data.stockCode,
|
||||
|
|
|
|||
|
|
@ -4,35 +4,58 @@
|
|||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label">工单编码</label>
|
||||
<el-input v-model="query.gdCode" clearable placeholder="工单编码" style="width: 180px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
|
||||
<label class="el-form-item-label">工单状态</label>
|
||||
<el-select v-model="query.status" filterable clearable placeholder="请选择" class="filter-item"
|
||||
style="width: 180px;">
|
||||
<el-option
|
||||
v-for="item in dict.pick_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
<div>
|
||||
<label class="el-form-item-label">创建日期</label>
|
||||
<date-range-picker v-model="query.createTime" class="date-item" style="width: 100px"/>
|
||||
<label class="el-form-item-label">需求工位</label>
|
||||
<el-input v-model="query.station" clearable placeholder="需求工位" style="width: 180px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<label class="el-form-item-label">成品代码/单品代码</label>
|
||||
<el-input v-model="query.cpCodeOrDpCode" clearable placeholder="成品代码/单品代码" style="width: 180px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<label class="el-form-item-label">单据类型</label>
|
||||
<el-select v-model="query.orderType" filterable clearable placeholder="请选择" class="filter-item"
|
||||
style="width: 180px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.gd_type"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<label class="el-form-item-label">需求工位</label>
|
||||
<el-input v-model="query.station" clearable placeholder="需求工位" style="width: 160px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<label class="el-form-item-label">成品代码/单品代码</label>
|
||||
<el-input v-model="query.cpCodeOrDpCode" clearable placeholder="成品代码/单品代码" style="width: 180px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
|
||||
|
||||
<rrOperation :crud="crud"/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="el-form-item-label">工单编码</label>
|
||||
<el-input v-model="query.gdCode" clearable placeholder="工单编码" style="width: 230px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation :crud="crud"/>
|
||||
<!-- 重置-->
|
||||
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="statusButton" style="border-bottom: solid lightgray 1px;">
|
||||
<el-radio-group v-model="radio3" @change="clickChange" size="small">
|
||||
<el-radio-button label="全部"> 全部</el-radio-button>
|
||||
<el-radio-button label="打开">打开</el-radio-button>
|
||||
<el-radio-button label="部分分配">部分分配</el-radio-button>
|
||||
<el-radio-button label="已分配">已分配</el-radio-button>
|
||||
<el-radio-button label="备料中">备料中</el-radio-button>
|
||||
<el-radio-button label="备料完成">备料完成</el-radio-button>
|
||||
<el-radio-button label="叫料中">叫料中</el-radio-button>
|
||||
<el-radio-button label="已关闭">已关闭</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" :tableKey="this.$options.name"/>
|
||||
|
|
@ -123,12 +146,18 @@
|
|||
<el-table-column prop="orderQty" label="订单数量" align="center"/>
|
||||
<el-table-column prop="allocatedQty" label="分配数量" align="center"/>
|
||||
<el-table-column prop="pickedQty" label="拣货数量" align="center"/>
|
||||
<el-table-column prop="sourceId" label="回传状态">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ dict.label.return_status[scope.row.sourceId] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sourceName" label="返回报文" v-element-table-tooltip/>
|
||||
</el-table>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xh" label="序号" type="index"/>
|
||||
<el-table-column prop="code" label="出库单编码" width="180" v-element-table-tooltip/>
|
||||
<el-table-column prop="gdCode" label="工单编码" v-element-table-tooltip/>
|
||||
<el-table-column prop="lineNo" label="顺序号"/>
|
||||
<el-table-column
|
||||
|
|
@ -139,8 +168,8 @@
|
|||
{ text: '打开', value: 'OPEN' },
|
||||
{ text: '部分分配', value: 'ASSIGN' },
|
||||
{ text: '已分配', value: 'ALLOCATE' },
|
||||
{ text: '拣货中', value: 'PICKUP' },
|
||||
{ text: '拣货完成', value: 'PICK_ALL' },
|
||||
{ text: '备料中', value: 'PICKUP' },
|
||||
{ text: '备料完成', value: 'PICK_ALL' },
|
||||
{ text: '叫料中', value: 'SHIP_PART' },
|
||||
{ text: '已关闭', value: 'CLOSE' }
|
||||
]"
|
||||
|
|
@ -162,15 +191,28 @@
|
|||
<el-table-column prop="stock.code" label="翻包容器"/>
|
||||
<el-table-column prop="callPoint.code" label="叫料点位"/>
|
||||
<el-table-column prop="orderType" label="单据类型"/>
|
||||
<el-table-column prop="sourceId" label="回传状态">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ dict.label.return_status[scope.row.sourceId] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column v-if="checkPer(['admin','pick:edit','pick:del'])" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:showDle="false"
|
||||
/>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-s-promotion"
|
||||
align="center"
|
||||
size="mini"
|
||||
@click="returnPick(scope.row)"
|
||||
>
|
||||
手工回传
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
|
@ -184,16 +226,17 @@
|
|||
|
||||
<script>
|
||||
import crudPick from '@/api/pick'
|
||||
import crudPickDetail, {findByAllPickDetail} from '@/api/pickDetail'
|
||||
import crudPickDetail, { findByAllPickDetail } from '@/api/pickDetail'
|
||||
import crudItem from '@/api/item'
|
||||
import crudBigItem from '@/api/bigItem'
|
||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
import {none} from 'html-webpack-plugin/lib/chunksorter'
|
||||
import { none } from 'html-webpack-plugin/lib/chunksorter'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
|
|
@ -209,21 +252,24 @@ const defaultForm = {
|
|||
}
|
||||
export default {
|
||||
name: 'Pick',
|
||||
dicts: ['pick_status'],
|
||||
components: {pagination, crudOperation, rrOperation, udOperation},
|
||||
dicts: ['pick_status', 'gd_type', 'return_status'],
|
||||
components: { DateRangePicker, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '出库单',
|
||||
url: 'api/pick',
|
||||
query: {
|
||||
status: 'OPEN'
|
||||
},
|
||||
idField: 'id',
|
||||
sort: ['lineNo,asc'],
|
||||
crudMethod: {...crudPick},
|
||||
sort: ['createTime,asc', 'lineNo,asc'],
|
||||
crudMethod: { ...crudPick },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
reset: false,
|
||||
download: true
|
||||
},
|
||||
queryOnPresenterCreated: true
|
||||
|
|
@ -231,6 +277,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
radio3: '打开',
|
||||
gds: [],
|
||||
itemAndBigItem: [],
|
||||
pickDetails: [],
|
||||
|
|
@ -242,19 +289,19 @@ export default {
|
|||
},
|
||||
rules: {
|
||||
gdCode: [
|
||||
{required: true, message: '请选择工单编码', trigger: 'blur'}
|
||||
{ required: true, message: '请选择工单编码', trigger: 'blur' }
|
||||
],
|
||||
lineNo: [
|
||||
{required: true, message: '请输入顺序号', trigger: 'blur'}
|
||||
{ required: true, message: '请输入顺序号', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{required: true, message: '请选择状态', trigger: 'blur'}
|
||||
{ required: true, message: '请选择状态', trigger: 'blur' }
|
||||
],
|
||||
cpCodeOrDpCode: [
|
||||
{required: true, message: '请选择成品代码/单品代码', trigger: 'blur'}
|
||||
{ required: true, message: '请选择成品代码/单品代码', trigger: 'blur' }
|
||||
],
|
||||
station: [
|
||||
{required: true, message: '请输入需求工位', trigger: 'blur'}
|
||||
{ required: true, message: '请输入需求工位', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -270,17 +317,17 @@ export default {
|
|||
// 清空数组,防止重复添加
|
||||
this.itemAndBigItem = []
|
||||
|
||||
crudItem.queryItemAll({enabled: true}).then(res => {
|
||||
crudItem.queryItemAll({ enabled: true }).then(res => {
|
||||
res.forEach(item => {
|
||||
const cpCodeAndDpCode = {code: null}
|
||||
const cpCodeAndDpCode = { code: null }
|
||||
cpCodeAndDpCode.code = item.code
|
||||
this.itemAndBigItem.push(cpCodeAndDpCode)
|
||||
})
|
||||
})
|
||||
|
||||
crudBigItem.queryBigItemAll({enabled: true}).then(res => {
|
||||
crudBigItem.queryBigItemAll({ enabled: true }).then(res => {
|
||||
res.forEach(item => {
|
||||
const cpCodeAndDpCode = {code: null}
|
||||
const cpCodeAndDpCode = { code: null }
|
||||
cpCodeAndDpCode.code = item.code
|
||||
this.itemAndBigItem.push(cpCodeAndDpCode)
|
||||
})
|
||||
|
|
@ -292,7 +339,7 @@ export default {
|
|||
// 展开的时候expandedRows有值,收起的时候为空.
|
||||
this.loading = true
|
||||
if (expandedRows.length > 0) {
|
||||
crudPickDetail.findByAllPickDetail({pickId: row.id}).then(res => {
|
||||
crudPickDetail.findByAllPickDetail({ pickId: row.id }).then(res => {
|
||||
// 遍历当前页面表
|
||||
this.$set(row, 'pickDetails', res)
|
||||
setTimeout(() => {
|
||||
|
|
@ -319,8 +366,8 @@ export default {
|
|||
case '部分分配':
|
||||
case '已分配':
|
||||
return 'warning'
|
||||
case '拣货中':
|
||||
case '拣货完成':
|
||||
case '备料中':
|
||||
case '备料完成':
|
||||
return 'primary'
|
||||
case '叫料中':
|
||||
case '已关闭':
|
||||
|
|
@ -333,6 +380,56 @@ export default {
|
|||
},
|
||||
filterTag(value, row) {
|
||||
return row.status === value
|
||||
},
|
||||
clickChange(lab) {
|
||||
if (lab === '全部') {
|
||||
this.query.status = ''
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '打开') {
|
||||
this.query.status = 'OPEN'
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '部分分配') {
|
||||
this.query.status = 'ASSIGN'
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '已分配') {
|
||||
this.query.status = 'ALLOCATE'
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '备料中') {
|
||||
this.query.status = 'PICKUP'
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '备料完成') {
|
||||
this.query.status = 'PICK_ALL'
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '叫料中') {
|
||||
this.query.status = 'SHIP_PART'
|
||||
this.crud.toQuery()
|
||||
} else if (lab === '已关闭') {
|
||||
this.query.status = 'CLOSE'
|
||||
this.crud.toQuery()
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.radio3 = '打开'
|
||||
this.crud.resetQuery()
|
||||
},
|
||||
returnPick(data) {
|
||||
if (data.status != 'CLOSE') {
|
||||
return this.crud.notify('已关闭的工单才允许回传', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
}
|
||||
if (data.sourceId == 1) {
|
||||
return this.crud.notify('工单已回传', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
}
|
||||
crudPick.returnPick(
|
||||
data.id
|
||||
).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
} else {
|
||||
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ export default {
|
|||
name: 'PickDetail',
|
||||
components: { DateRangePicker, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['pick_status'],
|
||||
dicts: ['pick_status','return_status'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '出库明细',
|
||||
|
|
|
|||
Loading…
Reference in New Issue