2024-06-11 11:44:05 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<div v-if="crud.props.searchToggle">
|
|
|
|
|
|
<!-- 搜索 -->
|
2024-12-12 23:51:34 +08:00
|
|
|
|
<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"
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<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.cpCodeOrDpCode" clearable placeholder="成品代码/单品代码" style="width: 180px;"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
@keyup.enter.native="crud.toQuery"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
/>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
2024-07-17 16:48:41 +08:00
|
|
|
|
|
2024-12-12 23:51:34 +08:00
|
|
|
|
</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>
|
2024-07-17 16:48:41 +08:00
|
|
|
|
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
2024-12-12 23:51:34 +08:00
|
|
|
|
</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>
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
|
|
|
|
<crudOperation :permission="permission" :tableKey="this.$options.name"/>
|
|
|
|
|
|
<!--表单组件-->
|
2024-06-24 15:58:14 +08:00
|
|
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:title="crud.status.title" width="500px"
|
|
|
|
|
|
>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="85px">
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="工单编码" prop="gdCode">
|
|
|
|
|
|
<el-select v-model="form.gdCode" @focus="getGd()" filterable clearable placeholder="请选择"
|
|
|
|
|
|
style="width: 350px;"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
class="filter-item"
|
|
|
|
|
|
>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="gd in gds"
|
|
|
|
|
|
:key="gd.id"
|
|
|
|
|
|
:label="gd.code"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:value="gd.code"
|
|
|
|
|
|
/>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
</el-select>
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</el-form-item>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="顺序号" prop="lineNo">
|
|
|
|
|
|
<el-input v-model="form.lineNo" style="width: 350px;" oninput="value=value.replace(/^0|[^0-9]/g,'')"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
min="1"
|
|
|
|
|
|
/>
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</el-form-item>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
|
|
|
<el-select v-model="form.status" filterable placeholder="请选择" style="width: 350px;">
|
2024-06-17 16:10:20 +08:00
|
|
|
|
<el-option
|
2024-06-24 15:58:14 +08:00
|
|
|
|
v-for="item in dict.pick_status"
|
2024-06-24 18:07:44 +08:00
|
|
|
|
v-if="item.value==='OPEN'"
|
2024-06-24 15:58:14 +08:00
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
2024-06-17 16:10:20 +08:00
|
|
|
|
</el-select>
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</el-form-item>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="成品代码/单品代码" prop="cpCodeOrDpCode">
|
|
|
|
|
|
<el-select v-model="form.cpCodeOrDpCode" @focus="getItemAndBigItem()" filterable placeholder="请选择"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
style="width: 350px;"
|
|
|
|
|
|
>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in itemAndBigItem"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.code"
|
2024-11-01 17:58:26 +08:00
|
|
|
|
:value="item.code"
|
|
|
|
|
|
/>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="需求工位" prop="station">
|
|
|
|
|
|
<el-input v-model="form.station" style="width: 350px;"/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</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>
|
|
|
|
|
|
<!--表格渲染-->
|
2024-07-23 16:29:00 +08:00
|
|
|
|
<el-table ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
height="63vh"
|
|
|
|
|
|
row-key="id"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
@row-click="handleRowClick"
|
|
|
|
|
|
@expand-change="expandChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="expand">
|
|
|
|
|
|
<template slot-scope="props">
|
|
|
|
|
|
<!-- <el-card shadow="never" class="nested-table-card">
|
|
|
|
|
|
|
|
|
|
|
|
</el-card>-->
|
2024-11-01 17:58:26 +08:00
|
|
|
|
<el-table :data="props.row.pickDetails" class="table2" show-summary v-loading="loading"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
2024-07-23 16:29:00 +08:00
|
|
|
|
<el-table-column prop="xh" label="序号" type="index" width="80"/>
|
|
|
|
|
|
<el-table-column prop="item.code" label="物料编码" align="center"/>
|
2025-02-12 11:27:52 +08:00
|
|
|
|
<el-table-column prop="propC3" label="MES拆分物料" v-if="hasPropC3Value(props.row.pickDetails)"
|
|
|
|
|
|
align="center"/>
|
2024-07-23 16:29:00 +08:00
|
|
|
|
<el-table-column prop="item.name" label="物料名称" align="center"/>
|
|
|
|
|
|
<el-table-column prop="orderQty" label="订单数量" align="center"/>
|
|
|
|
|
|
<el-table-column prop="allocatedQty" label="分配数量" align="center"/>
|
|
|
|
|
|
<el-table-column prop="pickedQty" label="拣货数量" align="center"/>
|
2024-12-12 23:51:34 +08:00
|
|
|
|
<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/>
|
2024-07-23 16:29:00 +08:00
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="xh" label="序号" type="index"/>
|
2024-08-20 12:04:22 +08:00
|
|
|
|
<el-table-column prop="gdCode" label="工单编码" v-element-table-tooltip/>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
<el-table-column prop="lineNo" label="顺序号"/>
|
2024-11-12 10:56:40 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="status"
|
|
|
|
|
|
label="状态"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
:filters="[
|
|
|
|
|
|
{ text: '打开', value: 'OPEN' },
|
|
|
|
|
|
{ text: '部分分配', value: 'ASSIGN' },
|
|
|
|
|
|
{ text: '已分配', value: 'ALLOCATE' },
|
2024-12-12 23:51:34 +08:00
|
|
|
|
{ text: '备料中', value: 'PICKUP' },
|
|
|
|
|
|
{ text: '备料完成', value: 'PICK_ALL' },
|
2024-11-12 10:56:40 +08:00
|
|
|
|
{ text: '叫料中', value: 'SHIP_PART' },
|
|
|
|
|
|
{ text: '已关闭', value: 'CLOSE' }
|
|
|
|
|
|
]"
|
|
|
|
|
|
:filter-method="filterTag"
|
|
|
|
|
|
filter-placement="bottom-end"
|
|
|
|
|
|
>
|
2024-06-17 16:10:20 +08:00
|
|
|
|
<template slot-scope="scope">
|
2024-11-12 10:56:40 +08:00
|
|
|
|
<el-tag
|
|
|
|
|
|
:type="getStatusType(scope.row.status)"
|
|
|
|
|
|
disable-transitions
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ dict.label.pick_status[scope.row.status] }}
|
|
|
|
|
|
</el-tag>
|
2024-06-17 16:10:20 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-24 18:07:44 +08:00
|
|
|
|
<el-table-column prop="cpCodeOrDpCode" label="成品代码/单品代码"/>
|
|
|
|
|
|
<el-table-column prop="station" label="需求工位"/>
|
|
|
|
|
|
<el-table-column prop="point.code" label="翻包点位"/>
|
2025-02-18 14:49:23 +08:00
|
|
|
|
<el-table-column prop="stock" label="翻包容器"/>
|
2025-02-16 18:21:21 +08:00
|
|
|
|
<el-table-column prop="callPoint" label="叫料点位"/>
|
2024-08-12 16:32:05 +08:00
|
|
|
|
<el-table-column prop="orderType" label="单据类型"/>
|
2024-12-12 23:51:34 +08:00
|
|
|
|
<el-table-column prop="sourceId" label="回传状态">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
|
|
|
|
{{ dict.label.return_status[scope.row.sourceId] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-24 15:58:14 +08:00
|
|
|
|
<el-table-column prop="createTime" label="创建时间"/>
|
2024-06-26 10:30:11 +08:00
|
|
|
|
<el-table-column v-if="checkPer(['admin','pick:edit','pick:del'])" label="操作" align="center">
|
2024-06-11 11:44:05 +08:00
|
|
|
|
<template slot-scope="scope">
|
2024-12-12 23:51:34 +08:00
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
icon="el-icon-s-promotion"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="returnPick(scope.row)"
|
|
|
|
|
|
>
|
|
|
|
|
|
手工回传
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</template>
|
2024-12-12 23:51:34 +08:00
|
|
|
|
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</el-table-column>
|
2024-07-23 16:29:00 +08:00
|
|
|
|
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页组件-->
|
2024-06-26 10:30:11 +08:00
|
|
|
|
<div style="float: right;">
|
|
|
|
|
|
<pagination/>
|
|
|
|
|
|
</div>
|
2024-06-11 11:44:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import crudPick from '@/api/pick'
|
2025-02-12 11:27:52 +08:00
|
|
|
|
import crudPickDetail, {findByAllPickDetail} from '@/api/pickDetail'
|
2024-11-01 17:58:26 +08:00
|
|
|
|
import crudItem from '@/api/item'
|
|
|
|
|
|
import crudBigItem from '@/api/bigItem'
|
2025-02-12 11:27:52 +08:00
|
|
|
|
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
2024-06-11 11:44:05 +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-11-01 17:58:26 +08:00
|
|
|
|
|
2025-02-12 11:27:52 +08:00
|
|
|
|
import {none} from 'html-webpack-plugin/lib/chunksorter'
|
2024-12-12 23:51:34 +08:00
|
|
|
|
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
2024-06-11 11:44:05 +08:00
|
|
|
|
|
2024-06-24 15:58:14 +08:00
|
|
|
|
const defaultForm = {
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
createBy: null,
|
|
|
|
|
|
updateBy: null,
|
|
|
|
|
|
createTime: null,
|
|
|
|
|
|
updateTime: null,
|
|
|
|
|
|
deptId: null,
|
|
|
|
|
|
code: null,
|
|
|
|
|
|
lineNo: null,
|
|
|
|
|
|
status: null,
|
|
|
|
|
|
beCall: null
|
|
|
|
|
|
}
|
2024-06-11 11:44:05 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'Pick',
|
2024-12-12 23:51:34 +08:00
|
|
|
|
dicts: ['pick_status', 'gd_type', 'return_status'],
|
2025-02-12 11:27:52 +08:00
|
|
|
|
components: {DateRangePicker, pagination, crudOperation, rrOperation, udOperation},
|
2024-06-11 11:44:05 +08:00
|
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
|
|
|
|
cruds() {
|
2024-06-24 18:07:44 +08:00
|
|
|
|
return CRUD({
|
|
|
|
|
|
title: '出库单',
|
|
|
|
|
|
url: 'api/pick',
|
2024-12-12 23:51:34 +08:00
|
|
|
|
query: {
|
|
|
|
|
|
status: 'OPEN'
|
|
|
|
|
|
},
|
2024-06-24 18:07:44 +08:00
|
|
|
|
idField: 'id',
|
2024-12-12 23:51:34 +08:00
|
|
|
|
sort: ['createTime,asc', 'lineNo,asc'],
|
2025-02-12 11:27:52 +08:00
|
|
|
|
crudMethod: {...crudPick},
|
2024-06-24 18:07:44 +08:00
|
|
|
|
optShow: {
|
2024-07-17 16:48:41 +08:00
|
|
|
|
add: false,
|
2024-06-24 18:07:44 +08:00
|
|
|
|
edit: false,
|
|
|
|
|
|
del: false,
|
2024-12-12 23:51:34 +08:00
|
|
|
|
reset: false,
|
2024-06-24 18:07:44 +08:00
|
|
|
|
download: true
|
2024-06-27 18:10:04 +08:00
|
|
|
|
},
|
|
|
|
|
|
queryOnPresenterCreated: true
|
2024-06-24 18:07:44 +08:00
|
|
|
|
})
|
2024-06-11 11:44:05 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-12-12 23:51:34 +08:00
|
|
|
|
radio3: '打开',
|
2024-06-24 18:07:44 +08:00
|
|
|
|
gds: [],
|
|
|
|
|
|
itemAndBigItem: [],
|
2024-11-01 17:58:26 +08:00
|
|
|
|
pickDetails: [],
|
2024-07-23 16:29:00 +08:00
|
|
|
|
loading: true,
|
2024-06-11 11:44:05 +08:00
|
|
|
|
permission: {
|
|
|
|
|
|
add: ['admin', 'pick:add'],
|
|
|
|
|
|
edit: ['admin', 'pick:edit'],
|
|
|
|
|
|
del: ['admin', 'pick:del']
|
|
|
|
|
|
},
|
2024-06-24 18:07:44 +08:00
|
|
|
|
rules: {
|
|
|
|
|
|
gdCode: [
|
2025-02-12 11:27:52 +08:00
|
|
|
|
{required: true, message: '请选择工单编码', trigger: 'blur'}
|
2024-06-24 18:07:44 +08:00
|
|
|
|
],
|
|
|
|
|
|
lineNo: [
|
2025-02-12 11:27:52 +08:00
|
|
|
|
{required: true, message: '请输入顺序号', trigger: 'blur'}
|
2024-06-24 18:07:44 +08:00
|
|
|
|
],
|
|
|
|
|
|
status: [
|
2025-02-12 11:27:52 +08:00
|
|
|
|
{required: true, message: '请选择状态', trigger: 'blur'}
|
2024-06-24 18:07:44 +08:00
|
|
|
|
],
|
|
|
|
|
|
cpCodeOrDpCode: [
|
2025-02-12 11:27:52 +08:00
|
|
|
|
{required: true, message: '请选择成品代码/单品代码', trigger: 'blur'}
|
2024-06-24 18:07:44 +08:00
|
|
|
|
],
|
|
|
|
|
|
station: [
|
2025-02-12 11:27:52 +08:00
|
|
|
|
{required: true, message: '请输入需求工位', trigger: 'blur'}
|
2024-06-24 18:07:44 +08:00
|
|
|
|
]
|
2024-11-01 17:58:26 +08:00
|
|
|
|
}
|
2024-06-11 11:44:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-07-23 16:29:00 +08:00
|
|
|
|
none,
|
2024-06-11 11:44:05 +08:00
|
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
return true
|
2024-06-24 18:07:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getItemAndBigItem() {
|
|
|
|
|
|
// 清空数组,防止重复添加
|
2024-11-01 17:58:26 +08:00
|
|
|
|
this.itemAndBigItem = []
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
2025-02-12 11:27:52 +08:00
|
|
|
|
crudItem.queryItemAll({enabled: true}).then(res => {
|
2024-06-24 18:07:44 +08:00
|
|
|
|
res.forEach(item => {
|
2025-02-12 11:27:52 +08:00
|
|
|
|
const cpCodeAndDpCode = {code: null}
|
2024-11-01 17:58:26 +08:00
|
|
|
|
cpCodeAndDpCode.code = item.code
|
|
|
|
|
|
this.itemAndBigItem.push(cpCodeAndDpCode)
|
|
|
|
|
|
})
|
2024-06-24 18:07:44 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
2025-02-12 11:27:52 +08:00
|
|
|
|
crudBigItem.queryBigItemAll({enabled: true}).then(res => {
|
2024-06-24 18:07:44 +08:00
|
|
|
|
res.forEach(item => {
|
2025-02-12 11:27:52 +08:00
|
|
|
|
const cpCodeAndDpCode = {code: null}
|
2024-11-01 17:58:26 +08:00
|
|
|
|
cpCodeAndDpCode.code = item.code
|
|
|
|
|
|
this.itemAndBigItem.push(cpCodeAndDpCode)
|
|
|
|
|
|
})
|
2024-06-24 18:07:44 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
2024-07-23 16:29:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
expandChange(row, expandedRows) {
|
|
|
|
|
|
// 该处是用于判断是展开还是收起行,只有展开的时候做请求,避免多次请求!
|
|
|
|
|
|
// 展开的时候expandedRows有值,收起的时候为空.
|
2024-11-01 17:58:26 +08:00
|
|
|
|
this.loading = true
|
2024-07-23 16:29:00 +08:00
|
|
|
|
if (expandedRows.length > 0) {
|
2025-02-12 11:27:52 +08:00
|
|
|
|
crudPickDetail.findByAllPickDetail({pickId: row.id}).then(res => {
|
2024-07-23 16:29:00 +08:00
|
|
|
|
// 遍历当前页面表
|
2024-11-01 17:58:26 +08:00
|
|
|
|
this.$set(row, 'pickDetails', res)
|
2024-07-24 17:56:49 +08:00
|
|
|
|
setTimeout(() => {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
this.loading = false
|
2024-07-24 17:56:49 +08:00
|
|
|
|
}, 200)
|
|
|
|
|
|
|
2024-07-23 16:29:00 +08:00
|
|
|
|
}).catch(() => {
|
2024-11-01 17:58:26 +08:00
|
|
|
|
this.crud.notify('获取明细数据异常!', CRUD.NOTIFICATION_TYPE.ERROR)
|
2024-07-23 16:29:00 +08:00
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
handleRowClick(row, column, event) {
|
2024-08-20 12:04:22 +08:00
|
|
|
|
/* //点编辑按钮的时候不触发展开行
|
|
|
|
|
|
if (!event.target.classList.contains('el-button')) {
|
|
|
|
|
|
this.$refs.table.toggleRowExpansion(row)
|
|
|
|
|
|
}
|
|
|
|
|
|
*/
|
2024-11-12 10:56:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
getStatusType(status) {
|
|
|
|
|
|
switch (this.dict.label.pick_status[status]) {
|
|
|
|
|
|
case '打开':
|
|
|
|
|
|
return 'info'
|
|
|
|
|
|
case '部分分配':
|
|
|
|
|
|
case '已分配':
|
|
|
|
|
|
return 'warning'
|
2024-12-12 23:51:34 +08:00
|
|
|
|
case '备料中':
|
|
|
|
|
|
case '备料完成':
|
2024-11-12 10:56:40 +08:00
|
|
|
|
return 'primary'
|
|
|
|
|
|
case '叫料中':
|
|
|
|
|
|
case '已关闭':
|
|
|
|
|
|
return 'success'
|
|
|
|
|
|
case '已取消':
|
|
|
|
|
|
return 'danger'
|
|
|
|
|
|
default:
|
|
|
|
|
|
return ''
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
filterTag(value, row) {
|
|
|
|
|
|
return row.status === value
|
2024-12-12 23:51:34 +08:00
|
|
|
|
},
|
|
|
|
|
|
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)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2025-02-12 11:27:52 +08:00
|
|
|
|
},
|
|
|
|
|
|
hasPropC3Value(childData) {
|
|
|
|
|
|
// 检查子表数据中是否有 propC3 有值的数据项
|
|
|
|
|
|
return Array.isArray(childData) && childData.some(item => item.propC3);
|
2024-06-11 11:44:05 +08:00
|
|
|
|
}
|
2024-06-24 18:07:44 +08:00
|
|
|
|
|
2024-07-23 16:29:00 +08:00
|
|
|
|
}
|
2024-06-11 11:44:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
2024-07-23 16:29:00 +08:00
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*.nested-table-card {
|
|
|
|
|
|
background: linear-gradient(135deg, #f7f9fc, #eef1f7) !important;
|
|
|
|
|
|
border: 1px solid #dfe4ed !important;
|
|
|
|
|
|
border-radius: 10px !important;
|
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
.table2 {
|
|
|
|
|
|
background-color: white !important;
|
|
|
|
|
|
border-radius: 8px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table2 th {
|
|
|
|
|
|
background-color: #f2f6fc !important;
|
|
|
|
|
|
color: #333 !important;
|
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table2 td {
|
|
|
|
|
|
color: #666 !important;
|
|
|
|
|
|
font-size: 13px !important;
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table2 .el-table__row {
|
|
|
|
|
|
transition: background-color 0.3s !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table2 .el-table__row:hover {
|
|
|
|
|
|
background-color: #f5f7fa !important;
|
|
|
|
|
|
cursor: pointer !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table2 .el-table__body-wrapper {
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.table2 .el-table__footer-wrapper {
|
|
|
|
|
|
background-color: #F6F9FC !important;
|
|
|
|
|
|
color: #333 !important;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
|
border: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-11 11:44:05 +08:00
|
|
|
|
|
|
|
|
|
|
</style>
|