2024-02-18 15:46:31 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<!-- 查询操作-->
|
|
|
|
|
|
<el-form ref="form" :inline="true" :model="form" label-width="70px">
|
|
|
|
|
|
<el-form-item label="物料编码">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<!-- <el-input v-model="query.itemCode" clearable placeholder="请输入物料编码" style="width: 140px;"-->
|
|
|
|
|
|
<!-- class="filter-item"-->
|
|
|
|
|
|
<!-- @keyup.enter.native="crud.toQuery"/>-->
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<el-select v-model="query.itemCode" placeholder="物料代码" style="width: 140px;" class="filter-item">
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in this.itemListData"
|
|
|
|
|
|
:key="item.code"
|
|
|
|
|
|
:label="item.code"
|
2024-03-12 13:08:57 +08:00
|
|
|
|
:value="item.code"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
>
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<span style="float: left">{{ item.code }}</span>
|
|
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</span>
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="物料名称">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.itemName"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="请输入物料名称"
|
|
|
|
|
|
style="width: 140px;"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2024-02-18 15:46:31 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="任务号">
|
|
|
|
|
|
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.po"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="请输入任务号"
|
|
|
|
|
|
style="width: 140px;"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
|
|
|
|
|
/>
|
2024-02-18 15:46:31 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<date-range-picker v-model="query.createTime" class="date-item" style="width: 100px" />
|
|
|
|
|
|
<!-- 搜索-->
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<rrOperation :crud="crud" />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<!-- 重置-->
|
|
|
|
|
|
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="statusButton" style="border-bottom: solid lightgray 1px;">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-radio-group v-model="radio3" size="small" @change="clickChange">
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 业务操作-->
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<crudOperation :permission="permission" :table-key="tableKey">
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
size="mini"
|
2024-03-12 16:06:53 +08:00
|
|
|
|
:disabled="crud.selections.length !== 1 || this.crud.selections[0].orderQty<=this.crud.selections[0].allocatedQty"
|
2024-02-18 15:46:31 +08:00
|
|
|
|
@click="allocate(crud.selections)"
|
|
|
|
|
|
>
|
|
|
|
|
|
分配
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:loading="crud.delAllLoading"
|
|
|
|
|
|
:disabled="show_cancelfp"
|
|
|
|
|
|
@click="cancelAllocate(crud.selections)"
|
|
|
|
|
|
>
|
|
|
|
|
|
取消分配
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:loading="crud.delAllLoading"
|
2024-03-14 09:39:08 +08:00
|
|
|
|
:disabled="crud.selections.length !== 1 || this.crud.selections[0].allocatedQty<=this.crud.selections[0].pickedQty"
|
2024-02-18 15:46:31 +08:00
|
|
|
|
@click="getPickTask(crud.selections[0].id)"
|
|
|
|
|
|
>
|
|
|
|
|
|
拣货确认
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
</crudOperation>
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-table
|
|
|
|
|
|
ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
border
|
|
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
height="58vh"
|
|
|
|
|
|
@selection-change="selectionChangeHandlerTwo"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="selection" width="50" />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="date"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
label="序号"
|
|
|
|
|
|
:resizable="false"
|
|
|
|
|
|
type="index"
|
|
|
|
|
|
width="50"
|
|
|
|
|
|
/>
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-table-column prop="pick.relatedBill1" width="120" label="系统单号" />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="itemName" label="物料编码">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<div>{{ scope.row.item.code }}</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="itemCode" label="物料名称">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<div>{{ scope.row.item.name }}</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="status" label="状态">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
{{ dict.label.pick_status[scope.row.status] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-table-column prop="propC1" label="中标批次名称" />
|
|
|
|
|
|
<el-table-column prop="propC2" label="成品物料编码" />
|
|
|
|
|
|
<el-table-column prop="propC3" :show-overflow-tooltip="true" label="序列号" />
|
|
|
|
|
|
<el-table-column prop="orderQty" label="订单数量" />
|
|
|
|
|
|
<el-table-column prop="allocatedQty" label="分配数量" />
|
|
|
|
|
|
<el-table-column prop="pickedQty" label="拣货数量" />
|
|
|
|
|
|
<el-table-column prop="remark" label="备注" />
|
|
|
|
|
|
<el-table-column prop="propC4" label="出库方式" />
|
|
|
|
|
|
<el-table-column prop="propC5" label="目标点位" />
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="createBy" label="创建人" />
|
|
|
|
|
|
<el-table-column prop="createTime" width="150px" label="创建时间" />
|
|
|
|
|
|
<el-table-column label="操作" width="150px" fixed="right" align="center">
|
2024-02-18 15:46:31 +08:00
|
|
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="scope.row.status!='OPEN'"
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
@click="editPick(scope.row)"
|
|
|
|
|
|
/>
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<el-popconfirm
|
|
|
|
|
|
title="确定删除吗?"
|
2024-03-12 13:08:57 +08:00
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
icon-color="red"
|
2024-02-18 15:46:31 +08:00
|
|
|
|
@confirm="deletePick(scope.row)"
|
|
|
|
|
|
>
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
slot="reference"
|
|
|
|
|
|
:disabled="scope.row.status!='OPEN'"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
/>
|
2024-02-18 15:46:31 +08:00
|
|
|
|
</el-popconfirm>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--拣货确认界面-->
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<PickTask ref="pickTask" />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
|
|
|
|
|
|
<!--表单组件-->
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
:before-close="crud.cancelCU"
|
|
|
|
|
|
:visible.sync="crud.status.cu > 0"
|
|
|
|
|
|
:title="crud.status.title"
|
|
|
|
|
|
width="580px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="120px">
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<el-form-item label="物料" prop="item">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.item"
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择物料"
|
|
|
|
|
|
value-key="id"
|
|
|
|
|
|
style="width: 405px;"
|
|
|
|
|
|
@focus="getItem"
|
|
|
|
|
|
>
|
2024-02-18 15:46:31 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in items"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.code"
|
|
|
|
|
|
:value="item"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="订单数量">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-input v-model="form.orderQty" style="width: 135px;" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="中标批次名称">
|
|
|
|
|
|
<el-input v-model="form.propC1" style="width: 135px;" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="成品物料编码">
|
|
|
|
|
|
<el-input v-model="form.propC2" style="width: 135px;" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="序列号">
|
|
|
|
|
|
<el-input v-model="form.propC3" style="width: 135px;" />
|
|
|
|
|
|
</el-form-item>
|
2024-03-25 11:22:32 +08:00
|
|
|
|
<el-form-item label="操作方式">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.propC4"
|
|
|
|
|
|
size="small"
|
2024-03-25 11:22:32 +08:00
|
|
|
|
placeholder="操作方式"
|
2024-03-12 13:08:57 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
style="width: 135px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.bill_type"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="目标点位">
|
|
|
|
|
|
<el-input v-model="form.propC5" style="width: 135px;" />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="备注">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<el-input v-model="form.remark" :rows="3" type="textarea" style="width: 370px;" />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
|
|
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--表格渲染-->
|
|
|
|
|
|
|
|
|
|
|
|
<!--分页组件-->
|
|
|
|
|
|
<div style="float: right;">
|
2024-03-12 13:08:57 +08:00
|
|
|
|
<pagination />
|
2024-02-18 15:46:31 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import crudPickDetail from '@/api/pickDetail'
|
2024-03-12 13:08:57 +08:00
|
|
|
|
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
2024-02-18 15:46:31 +08:00
|
|
|
|
import rrOperation from '@crud/RR.operation'
|
|
|
|
|
|
import crudOperation from '@crud/CRUD.operation'
|
|
|
|
|
|
import udOperation from '@crud/UD.operation'
|
|
|
|
|
|
import pagination from '@crud/Pagination'
|
2024-03-12 13:08:57 +08:00
|
|
|
|
import { getItems, getItemsList } from '@/api/item'
|
|
|
|
|
|
import PickTask from '@/views/business-data/pickDetail/pickTicketTask.vue'
|
|
|
|
|
|
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
2024-03-12 16:06:53 +08:00
|
|
|
|
import DonMessage from "@/utils/message";
|
2024-02-18 15:46:31 +08:00
|
|
|
|
|
|
|
|
|
|
const defaultForm = {
|
|
|
|
|
|
id: null,
|
2024-03-12 13:08:57 +08:00
|
|
|
|
pick: null,
|
2024-02-18 15:46:31 +08:00
|
|
|
|
item: null,
|
|
|
|
|
|
lineNo: null,
|
|
|
|
|
|
po: null,
|
|
|
|
|
|
status: 'OPEN',
|
|
|
|
|
|
orderQty: 0,
|
|
|
|
|
|
allocatedQty: 0,
|
|
|
|
|
|
pickedQty: 0,
|
|
|
|
|
|
shippedQty: 0,
|
|
|
|
|
|
weight: 0,
|
|
|
|
|
|
volume: 0,
|
|
|
|
|
|
remark: null,
|
|
|
|
|
|
propC1: null,
|
|
|
|
|
|
propC2: null,
|
|
|
|
|
|
propC3: null,
|
|
|
|
|
|
propC4: null,
|
|
|
|
|
|
propC5: null,
|
|
|
|
|
|
propC6: null,
|
|
|
|
|
|
propD1: null,
|
|
|
|
|
|
propD2: null,
|
|
|
|
|
|
deptId: null,
|
|
|
|
|
|
sourceName: null,
|
|
|
|
|
|
sourceId: null,
|
|
|
|
|
|
createBy: null,
|
|
|
|
|
|
updateBy: null,
|
|
|
|
|
|
createTime: null,
|
|
|
|
|
|
updateTime: null
|
|
|
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'PickDetail',
|
2024-03-12 13:08:57 +08:00
|
|
|
|
components: { DateRangePicker, PickTask, pagination, crudOperation, rrOperation, udOperation },
|
2024-02-18 15:46:31 +08:00
|
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
2024-03-12 13:08:57 +08:00
|
|
|
|
dicts: ['pick_status', 'bill_type'],
|
2024-02-18 15:46:31 +08:00
|
|
|
|
cruds() {
|
|
|
|
|
|
return CRUD({
|
|
|
|
|
|
title: '出库明细',
|
|
|
|
|
|
url: 'api/pickDetail',
|
|
|
|
|
|
idField: 'id',
|
|
|
|
|
|
sort: 'id,desc',
|
2024-03-12 13:08:57 +08:00
|
|
|
|
crudMethod: { ...crudPickDetail },
|
2024-02-18 15:46:31 +08:00
|
|
|
|
optShow: {
|
|
|
|
|
|
add: true,
|
|
|
|
|
|
edit: false,
|
|
|
|
|
|
del: false,
|
|
|
|
|
|
reset: false,
|
|
|
|
|
|
download: true
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
show_jh: true,
|
|
|
|
|
|
show_cancelfp: true,
|
|
|
|
|
|
radio3: '全部',
|
|
|
|
|
|
items: [],
|
|
|
|
|
|
permission: {
|
|
|
|
|
|
add: ['admin', 'pickDetail:add'],
|
|
|
|
|
|
edit: ['admin', 'pickDetail:edit'],
|
|
|
|
|
|
del: ['admin', 'pickDetail:del']
|
|
|
|
|
|
},
|
2024-03-12 13:08:57 +08:00
|
|
|
|
tableKey: 'api/pickDetail',
|
2024-02-18 15:46:31 +08:00
|
|
|
|
rules: {
|
|
|
|
|
|
item: [
|
2024-03-12 13:08:57 +08:00
|
|
|
|
{ required: true, message: '物料必填', trigger: 'blur' }
|
2024-02-18 15:46:31 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
queryTypeOptions: [
|
2024-03-12 13:08:57 +08:00
|
|
|
|
{ key: 'itemCode', display_name: '物料编码' },
|
|
|
|
|
|
{ key: 'itemName', display_name: '物料名称' },
|
|
|
|
|
|
{ key: 'po', display_name: '任务号' },
|
|
|
|
|
|
{ key: 'status', display_name: '状态' }
|
2024-02-18 15:46:31 +08:00
|
|
|
|
],
|
|
|
|
|
|
itemListData: []
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
// 初始化数据
|
|
|
|
|
|
this.getItem()
|
|
|
|
|
|
this.itemDataGet()
|
2024-02-18 15:46:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
return true
|
|
|
|
|
|
},
|
|
|
|
|
|
getItem() {
|
|
|
|
|
|
getItems({}).then(res => {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.items = res.content.map(function(obj) {
|
2024-02-18 15:46:31 +08:00
|
|
|
|
if (obj.hasChildren) {
|
|
|
|
|
|
obj.children = null
|
|
|
|
|
|
}
|
|
|
|
|
|
return obj
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
selectionChangeHandlerTwo(val) {
|
|
|
|
|
|
this.crud.selections = val
|
2024-03-12 13:08:57 +08:00
|
|
|
|
if (this.crud.selections.length === 0) {
|
|
|
|
|
|
this.show_jh = true
|
|
|
|
|
|
this.show_fp = true
|
|
|
|
|
|
this.show_cancelfp = true
|
|
|
|
|
|
return
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-12 13:08:57 +08:00
|
|
|
|
const status = []
|
2024-02-18 15:46:31 +08:00
|
|
|
|
for (let i = 0; i < val.length; i++) {
|
|
|
|
|
|
status.push(this.crud.selections[i].status)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-12 13:08:57 +08:00
|
|
|
|
if (this.isAllEqual(status) && status[0] == 'OPEN') {
|
|
|
|
|
|
this.show_jh = true
|
|
|
|
|
|
this.show_fp = false
|
|
|
|
|
|
return
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-03-12 13:08:57 +08:00
|
|
|
|
if (this.isAllEqual(status) && status[0] == 'ALLOCATE') {
|
|
|
|
|
|
this.show_jh = true
|
|
|
|
|
|
this.show_fp = true
|
|
|
|
|
|
this.show_cancelfp = false
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}
|
2024-03-12 13:08:57 +08:00
|
|
|
|
// 拣货
|
2024-02-18 15:46:31 +08:00
|
|
|
|
if (this.crud.selections.length == 1 && this.crud.selections[0].orderQty == this.crud.selections[0].allocatedQty) {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.show_jh = false
|
|
|
|
|
|
this.show_fp = true
|
|
|
|
|
|
return
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
allocate(datas) {
|
|
|
|
|
|
this.$confirm(`选中的${datas.length}条数据分配确认?`, '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
const ids = []
|
2024-02-18 15:46:31 +08:00
|
|
|
|
for (let i = 0; i < datas.length; i++) {
|
|
|
|
|
|
ids.push(datas[i].id)
|
|
|
|
|
|
}
|
|
|
|
|
|
crudPickDetail.allocate(ids).then(res => {
|
2024-03-12 16:06:53 +08:00
|
|
|
|
this.crud.notify(res.message, res.status)
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.toQuery()
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}).catch(() => {
|
2024-03-12 16:06:53 +08:00
|
|
|
|
this.crud.toQuery()
|
2024-02-18 15:46:31 +08:00
|
|
|
|
})
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
this.$refs.table.clearSelection()
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
|
|
|
|
})
|
2024-02-18 15:46:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
cancelAllocate(datas) {
|
|
|
|
|
|
this.$confirm(`选中的${datas.length}条数据取消分配确认?`, '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
const ids = []
|
2024-02-18 15:46:31 +08:00
|
|
|
|
for (let i = 0; i < datas.length; i++) {
|
|
|
|
|
|
ids.push(datas[i].id)
|
|
|
|
|
|
}
|
|
|
|
|
|
crudPickDetail.cancelAllocate(ids).then(res => {
|
2024-03-12 18:23:04 +08:00
|
|
|
|
this.crud.notify(res.message, res.status)
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.toQuery()
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
this.$refs.table.clearSelection()
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
|
|
|
|
})
|
2024-02-18 15:46:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
getPickTask(id) {
|
|
|
|
|
|
this.$refs.pickTask.dialog = true
|
|
|
|
|
|
this.$refs.pickTask.queryPickTask(id)
|
|
|
|
|
|
},
|
|
|
|
|
|
shuaxin() {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.toQuery()
|
2024-02-18 15:46:31 +08:00
|
|
|
|
},
|
|
|
|
|
|
clickChange(lab) {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
if (lab === '全部') {
|
|
|
|
|
|
this.crud.resetQuery()
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
} else if (lab === '打开') {
|
2024-02-18 15:46:31 +08:00
|
|
|
|
this.query.status = 'OPEN'
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
} else if (lab === '已分配') {
|
2024-02-18 15:46:31 +08:00
|
|
|
|
this.query.status = 'ALLOCATE'
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
} else if (lab === '拣货完成') {
|
2024-02-18 15:46:31 +08:00
|
|
|
|
this.query.status = 'PICK_ALL'
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.crud.toQuery()
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
resetQuery() {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.radio3 = '全部'
|
2024-02-18 15:46:31 +08:00
|
|
|
|
this.crud.resetQuery()
|
|
|
|
|
|
},
|
|
|
|
|
|
editPick(data) {
|
|
|
|
|
|
this.crud.toEdit(data)
|
|
|
|
|
|
},
|
|
|
|
|
|
deletePick(data) {
|
|
|
|
|
|
this.crud.doDelete(data)
|
|
|
|
|
|
}, isAllEqual(array) {
|
|
|
|
|
|
if (array.length > 0) {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
return !array.some(function(value, index) {
|
|
|
|
|
|
return value !== array[0]
|
|
|
|
|
|
})
|
2024-02-18 15:46:31 +08:00
|
|
|
|
} else {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
return true
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-03-12 13:08:57 +08:00
|
|
|
|
// 物料数据
|
2024-02-18 15:46:31 +08:00
|
|
|
|
itemDataGet() {
|
|
|
|
|
|
getItemsList().then(res => {
|
2024-03-12 13:08:57 +08:00
|
|
|
|
this.itemListData = res
|
2024-02-18 15:46:31 +08:00
|
|
|
|
}).catch(e => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
message: '物料加载失败',
|
|
|
|
|
|
type: 'error'
|
2024-03-12 13:08:57 +08:00
|
|
|
|
})
|
2024-02-18 15:46:31 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|