|
@@ -1,148 +1,203 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div >
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <div>
|
|
|
<transition appear enter-active-class="animated fadeIn">
|
|
<transition appear enter-active-class="animated fadeIn">
|
|
|
- <q-table class="my-sticky-header-column-table shadow-24" :data="table_list" row-key="id" :separator="separator"
|
|
|
|
|
- :loading="loading" :columns="columns" hide-bottom :pagination.sync="pagination" no-data-label="No data"
|
|
|
|
|
- no-results-label="No data you want" :table-style="{ height: height }" flat bordered>
|
|
|
|
|
|
|
+ <q-table
|
|
|
|
|
+ class="my-sticky-header-column-table shadow-24"
|
|
|
|
|
+ :data="table_list"
|
|
|
|
|
+ row-key="id"
|
|
|
|
|
+ :separator="separator"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ hide-bottom
|
|
|
|
|
+ :pagination.sync="pagination"
|
|
|
|
|
+ no-data-label="No data"
|
|
|
|
|
+ no-results-label="No data you want"
|
|
|
|
|
+ :table-style="{ height: height }"
|
|
|
|
|
+ flat
|
|
|
|
|
+ bordered
|
|
|
|
|
+ >
|
|
|
<template v-slot:top>
|
|
<template v-slot:top>
|
|
|
<q-btn-group push>
|
|
<q-btn-group push>
|
|
|
-
|
|
|
|
|
<q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
|
|
<q-btn :label="$t('refresh')" icon="refresh" @click="reFresh()">
|
|
|
- <q-tooltip content-class="bg-amber text-black shadow-4" :offset="[10, 10]"
|
|
|
|
|
- content-style="font-size: 12px">{{ $t('refreshtip') }}</q-tooltip>
|
|
|
|
|
|
|
+ <q-tooltip
|
|
|
|
|
+ content-class="bg-amber text-black shadow-4"
|
|
|
|
|
+ :offset="[10, 10]"
|
|
|
|
|
+ content-style="font-size: 12px"
|
|
|
|
|
+ >{{ $t("refreshtip") }}</q-tooltip
|
|
|
|
|
+ >
|
|
|
</q-btn>
|
|
</q-btn>
|
|
|
-
|
|
|
|
|
|
|
+ <!-- <q-btn :label="'日志'" icon="logout" @click="getlog()"> </q-btn> -->
|
|
|
</q-btn-group>
|
|
</q-btn-group>
|
|
|
|
|
|
|
|
<q-space />
|
|
<q-space />
|
|
|
|
|
|
|
|
<div class="flex items-center">
|
|
<div class="flex items-center">
|
|
|
<div class="q-mr-md">{{ $t("download_center.createTime") }}</div>
|
|
<div class="q-mr-md">{{ $t("download_center.createTime") }}</div>
|
|
|
- <q-input readonly outlined dense v-model="createDate2" :placeholder="interval">
|
|
|
|
|
|
|
+ <q-input
|
|
|
|
|
+ readonly
|
|
|
|
|
+ outlined
|
|
|
|
|
+ dense
|
|
|
|
|
+ v-model="createDate2"
|
|
|
|
|
+ :placeholder="interval"
|
|
|
|
|
+ >
|
|
|
<template v-slot:append>
|
|
<template v-slot:append>
|
|
|
<q-icon name="event" class="cursor-pointer">
|
|
<q-icon name="event" class="cursor-pointer">
|
|
|
- <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
|
|
|
|
|
|
|
+ <q-popup-proxy
|
|
|
|
|
+ ref="qDateProxy"
|
|
|
|
|
+ transition-show="scale"
|
|
|
|
|
+ transition-hide="scale"
|
|
|
|
|
+ >
|
|
|
<q-date v-model="createDate1" range>
|
|
<q-date v-model="createDate1" range>
|
|
|
<div class="row items-center justify-end q-gutter-sm">
|
|
<div class="row items-center justify-end q-gutter-sm">
|
|
|
- <q-btn :label="$t('index.cancel')" color="primary" flat v-close-popup />
|
|
|
|
|
- <q-btn :label="$t('index.clear')" color="primary" @click="createDate2 = ''; createDate1 = '';"
|
|
|
|
|
- v-close-popup />
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <q-btn
|
|
|
|
|
+ :label="$t('index.cancel')"
|
|
|
|
|
+ color="primary"
|
|
|
|
|
+ flat
|
|
|
|
|
+ v-close-popup
|
|
|
|
|
+ />
|
|
|
|
|
+ <q-btn
|
|
|
|
|
+ :label="$t('index.clear')"
|
|
|
|
|
+ color="primary"
|
|
|
|
|
+ @click="
|
|
|
|
|
+ createDate2 = '';
|
|
|
|
|
+ createDate1 = '';
|
|
|
|
|
+ "
|
|
|
|
|
+ v-close-popup
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</q-date>
|
|
</q-date>
|
|
|
</q-popup-proxy>
|
|
</q-popup-proxy>
|
|
|
</q-icon>
|
|
</q-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</q-input>
|
|
</q-input>
|
|
|
- <q-btn-group push class="q-ml-md">
|
|
|
|
|
- </q-btn-group>
|
|
|
|
|
- <q-input outlined rounded dense debounce="300" color="primary" v-model="filter" :placeholder="$t('search')"
|
|
|
|
|
- @input="getSearchList()" @keyup.enter="getSearchList()">
|
|
|
|
|
|
|
+ <q-btn-group push class="q-ml-md"> </q-btn-group>
|
|
|
|
|
+ <q-input
|
|
|
|
|
+ outlined
|
|
|
|
|
+ rounded
|
|
|
|
|
+ dense
|
|
|
|
|
+ debounce="300"
|
|
|
|
|
+ color="primary"
|
|
|
|
|
+ v-model="filter"
|
|
|
|
|
+ :placeholder="$t('search')"
|
|
|
|
|
+ @input="getSearchList()"
|
|
|
|
|
+ @keyup.enter="getSearchList()"
|
|
|
|
|
+ >
|
|
|
<template v-slot:append>
|
|
<template v-slot:append>
|
|
|
<q-icon name="search" @click="getSearchList()" />
|
|
<q-icon name="search" @click="getSearchList()" />
|
|
|
</template>
|
|
</template>
|
|
|
</q-input>
|
|
</q-input>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
<template v-slot:body="props">
|
|
<template v-slot:body="props">
|
|
|
<q-tr :props="props">
|
|
<q-tr :props="props">
|
|
|
- <template >
|
|
|
|
|
- <q-td key="document_date" :props="props">{{ props.row.batch_detail.bound_list.bound_date }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="document_number" :props="props">{{ props.row.batch_detail.bound_list.bound_code }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="document_type" :props="props">{{ props.row.batch_detail.bound_list.bound_code_type }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="business_type" :props="props">{{ props.row.batch_detail.bound_list.bound_bs_type }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="iout_type" :props="props">{{ props.row.batch_detail.bound_list.bound_type }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="department" :props="props">{{ props.row.batch_detail.bound_list.bound_department }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="warehouse_code" :props="props">{{ props.row.batch_detail.bound_batch.warehouse_code }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="warehouse_name" :props="props">{{ props.row.batch_detail.bound_batch.warehouse_name }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_code" :props="props">{{ props.row.batch_detail.bound_batch.goods_code }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_desc" :props="props">{{ props.row.batch_detail.bound_batch.goods_desc }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_std" :props="props">{{ props.row.batch_detail.bound_batch.goods_std }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_batch" :props="props">{{ props.row.container_detail.batch.bound_number }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="in_batch" :props="props">{{ props.row.container_detail.batch.goods_code}}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="out_batch" :props="props">{{ props.row.batch_detail.bound_batch.out_batch }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_unit" :props="props">{{ props.row.batch_detail.bound_batch.goods_unit }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_in" :props="props">{{ props.row.container_detail.goods_qty }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="container_number" :props="props">{{ props.row.container_detail.container.container_code }}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="goods_notes" :props="props">{{ props.row.task_wcs.message}}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template >
|
|
|
|
|
- <q-td key="creator" :props="props">{{ props.row.container_detail.creater}}</q-td>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <q-td auto-width>
|
|
|
|
|
+ <q-btn
|
|
|
|
|
+ size="sm"
|
|
|
|
|
+ round
|
|
|
|
|
+ :icon="props.row.expand ? 'remove' : 'ballot'"
|
|
|
|
|
+ @click="handle_row_expand(props.row)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </q-td>
|
|
|
|
|
+ <q-td
|
|
|
|
|
+ v-for="col in columns.filter((c) => c.name !== 'expand')"
|
|
|
|
|
+ :key="col.name"
|
|
|
|
|
+ :props="props"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ col.field ? props.row[col.field] : props.row[col.name] }}
|
|
|
|
|
+ </q-td>
|
|
|
|
|
+ </q-tr>
|
|
|
|
|
|
|
|
|
|
+ <!-- 第二级:时间轴 -->
|
|
|
|
|
+ <q-tr v-show="props.row.expand" :props="props" class="expanded-row">
|
|
|
|
|
+ <q-td colspan="100%">
|
|
|
|
|
+ <div class="q-pa-md timeline-wrapper">
|
|
|
|
|
+ <q-timeline
|
|
|
|
|
+ color="#e0e0e0"
|
|
|
|
|
+ v-if="props.row.containers?.length"
|
|
|
|
|
+ >
|
|
|
|
|
+ <q-timeline-entry
|
|
|
|
|
+ v-for="(container, index) in props.row.containers"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ class="custom-node"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:title>
|
|
|
|
|
+ <span>
|
|
|
|
|
+ <div>托盘 {{ container.container_code }}</div>
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="custom-title">
|
|
|
|
|
+ {{ container.goods_desc }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="custom-title">
|
|
|
|
|
+ 容纳数量:{{ container.goods_qty }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="custom-title">
|
|
|
|
|
+ 当前位置:{{ container.current_location }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="col">
|
|
|
|
|
+ <div class="custom-title">
|
|
|
|
|
+ 托盘属性:{{ class_to_name(container.class) }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </q-timeline-entry>
|
|
|
|
|
+ </q-timeline>
|
|
|
|
|
+ <div v-else-if="props.row.loading" class="text-center q-pa-md">
|
|
|
|
|
+ <q-spinner color="primary" size="2em" />
|
|
|
|
|
+ <div class="q-mt-sm">正在加载托盘信息...</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </q-td>
|
|
|
</q-tr>
|
|
</q-tr>
|
|
|
</template>
|
|
</template>
|
|
|
</q-table>
|
|
</q-table>
|
|
|
</transition>
|
|
</transition>
|
|
|
<template>
|
|
<template>
|
|
|
<div v-show="max !== 0" class="q-pa-lg flex flex-center">
|
|
<div v-show="max !== 0" class="q-pa-lg flex flex-center">
|
|
|
- <div>{{ total }} </div>
|
|
|
|
|
- <q-pagination v-model="current" color="black" :max="max" :max-pages="6" boundary-links
|
|
|
|
|
- @click="getSearchList(current); paginationIpt = current" />
|
|
|
|
|
|
|
+ <div>{{ total }}</div>
|
|
|
|
|
+ <q-pagination
|
|
|
|
|
+ v-model="current"
|
|
|
|
|
+ color="black"
|
|
|
|
|
+ :max="max"
|
|
|
|
|
+ :max-pages="6"
|
|
|
|
|
+ boundary-links
|
|
|
|
|
+ @click="
|
|
|
|
|
+ getSearchList(current);
|
|
|
|
|
+ paginationIpt = current;
|
|
|
|
|
+ "
|
|
|
|
|
+ />
|
|
|
<div>
|
|
<div>
|
|
|
- <input v-model="paginationIpt" @blur="changePageEnter" @keyup.enter="changePageEnter"
|
|
|
|
|
- style="width: 60px; text-align: center" />
|
|
|
|
|
|
|
+ <input
|
|
|
|
|
+ v-model="paginationIpt"
|
|
|
|
|
+ @blur="changePageEnter"
|
|
|
|
|
+ @keyup.enter="changePageEnter"
|
|
|
|
|
+ style="width: 60px; text-align: center"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-show="max === 0" class="q-pa-lg flex flex-center">
|
|
<div v-show="max === 0" class="q-pa-lg flex flex-center">
|
|
|
<q-btn flat push color="dark" :label="$t('no_data')"></q-btn>
|
|
<q-btn flat push color="dark" :label="$t('no_data')"></q-btn>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<router-view />
|
|
<router-view />
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { getauth, postauth, putauth, deleteauth } from 'boot/axios_request'
|
|
import { getauth, postauth, putauth, deleteauth } from 'boot/axios_request'
|
|
|
-import { date, exportFile, LocalStorage } from 'quasar'
|
|
|
|
|
-
|
|
|
|
|
|
|
+import { date, LocalStorage } from 'quasar'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'PageTask',
|
|
name: 'PageTask',
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
createDate1: '',
|
|
createDate1: '',
|
|
|
createDate2: '',
|
|
createDate2: '',
|
|
@@ -155,8 +210,7 @@ export default {
|
|
|
login_name: '',
|
|
login_name: '',
|
|
|
authin: '0',
|
|
authin: '0',
|
|
|
searchUrl: '',
|
|
searchUrl: '',
|
|
|
- pathname: 'container/task/',
|
|
|
|
|
-
|
|
|
|
|
|
|
+ pathname: 'bound/batch/',
|
|
|
pathname_previous: '',
|
|
pathname_previous: '',
|
|
|
pathname_next: '',
|
|
pathname_next: '',
|
|
|
separator: 'cell',
|
|
separator: 'cell',
|
|
@@ -166,23 +220,77 @@ export default {
|
|
|
|
|
|
|
|
table_list: [],
|
|
table_list: [],
|
|
|
columns: [
|
|
columns: [
|
|
|
- { name: 'document_date', required: true, label: '入库时间', align: 'center', field: 'document_date' },
|
|
|
|
|
- { name: 'document_number', label: '单据编号', field: 'document_number', align: 'center' },
|
|
|
|
|
- { name: 'department', label: '部门', field: 'department', align: 'center' },
|
|
|
|
|
-
|
|
|
|
|
- { name: 'goods_code', label: '存货编码', field: 'goods_code', align: 'center' },
|
|
|
|
|
- { name: 'goods_desc', label: '存货', field: 'goods_desc', align: 'center' },
|
|
|
|
|
- { name: 'goods_std', label: '规格型号', field: 'goods_std', align: 'center' },
|
|
|
|
|
- { name: 'goods_batch', label: '入库批号', field: 'goods_batch', align: 'center' },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- { name: 'goods_in', label: '入库数目', field: 'goods_in', align: 'center' },
|
|
|
|
|
- { name: 'container_number', label: '托盘编码', field: 'container_number', align: 'center' },
|
|
|
|
|
-
|
|
|
|
|
- // { name: 'goods_notes', label: '备注', field: 'goods_notes', align: 'center' },
|
|
|
|
|
- { name: 'creator', label: '创建人', field: 'creator', align: 'center' },
|
|
|
|
|
-
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'expand',
|
|
|
|
|
+ label: '',
|
|
|
|
|
+ align: 'left',
|
|
|
|
|
+ headerStyle: 'width: 50px'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'bound_number',
|
|
|
|
|
+ label: '管理批次',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ field: 'bound_number'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_code',
|
|
|
|
|
+ label: '存货编码',
|
|
|
|
|
+ field: 'goods_code',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_desc',
|
|
|
|
|
+ label: '存货名称',
|
|
|
|
|
+ field: 'goods_desc',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'bound_batch_order',
|
|
|
|
|
+ label: '批号',
|
|
|
|
|
+ field: 'bound_batch_order',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_qty',
|
|
|
|
|
+ label: '计划数目',
|
|
|
|
|
+ field: 'goods_qty',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_in_qty',
|
|
|
|
|
+ label: '已分拣数目',
|
|
|
|
|
+ field: 'goods_in_qty',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_std',
|
|
|
|
|
+ label: '规格型号',
|
|
|
|
|
+ field: 'goods_std',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ headerStyle: 'width: 20px'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_unit',
|
|
|
|
|
+ label: '单位',
|
|
|
|
|
+ field: 'goods_unit',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ headerStyle: 'width: 20px'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'goods_package',
|
|
|
|
|
+ label: '包装',
|
|
|
|
|
+ field: 'goods_package',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ headerStyle: 'width: 20px'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'create_time',
|
|
|
|
|
+ label: '创建时间',
|
|
|
|
|
+ field: 'create_time',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ headerStyle: 'width: 40px'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
filter: '',
|
|
filter: '',
|
|
|
pagination: {
|
|
pagination: {
|
|
|
page: 1,
|
|
page: 1,
|
|
@@ -192,18 +300,54 @@ export default {
|
|
|
max: 0,
|
|
max: 0,
|
|
|
total: 0,
|
|
total: 0,
|
|
|
paginationIpt: 1,
|
|
paginationIpt: 1,
|
|
|
- current: 1,
|
|
|
|
|
-
|
|
|
|
|
|
|
+ containers: {},
|
|
|
|
|
+ timer: null
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
- interval() {
|
|
|
|
|
- return this.$t('download_center.start') + ' - ' + this.$t('download_center.end')
|
|
|
|
|
|
|
+ interval () {
|
|
|
|
|
+ return (
|
|
|
|
|
+ this.$t('download_center.start') +
|
|
|
|
|
+ ' - ' +
|
|
|
|
|
+ this.$t('download_center.end')
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getList(params = {}) {
|
|
|
|
|
|
|
+ class_to_name (class_id) {
|
|
|
|
|
+ const class_map = {
|
|
|
|
|
+ 1: '整盘',
|
|
|
|
|
+ 2: '托盘组',
|
|
|
|
|
+ 3: '零盘'
|
|
|
|
|
+ }
|
|
|
|
|
+ return class_map[class_id]
|
|
|
|
|
+ },
|
|
|
|
|
+ handle_row_expand (row) {
|
|
|
|
|
+ const _this = this
|
|
|
|
|
+ row.expand = !row.expand
|
|
|
|
|
+ if (row.expand) {
|
|
|
|
|
+ // 添加行级 loading 状态
|
|
|
|
|
+ _this.$set(row, 'loading', true)
|
|
|
|
|
+ postauth('bound/batch/container/', { batch_id: row.id })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ // 将数据存储到当前行的 containers 属性
|
|
|
|
|
+
|
|
|
|
|
+ _this.$set(row, 'containers', res.data)
|
|
|
|
|
+ console.log('当前的', row.containers)
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ _this.$q.notify({ message: err.detail, color: 'negative' })
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ row.loading = false // 关闭加载状态
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ getlog () {
|
|
|
|
|
+ // console.log(this.table_list)
|
|
|
|
|
+ console.log('当前loading状态:', this.loading)
|
|
|
|
|
+ },
|
|
|
|
|
+ getList (params = {}) {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
_this.loading = true
|
|
_this.loading = true
|
|
|
// 合并基础参数
|
|
// 合并基础参数
|
|
@@ -226,14 +370,27 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
getauth(`${_this.pathname}?${queryParams}`)
|
|
getauth(`${_this.pathname}?${queryParams}`)
|
|
|
- .then(res => {
|
|
|
|
|
- _this.table_list = res.results
|
|
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ _this.table_list = res.results.map((item) => ({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ expand: false,
|
|
|
|
|
+ containers: [
|
|
|
|
|
+ // {
|
|
|
|
|
+ // id: 0,
|
|
|
|
|
+ // container_code: 0,
|
|
|
|
|
+ // current_location: '0',
|
|
|
|
|
+ // goods_qty: 0,
|
|
|
|
|
+ // class: 0
|
|
|
|
|
+ // }
|
|
|
|
|
+ ],
|
|
|
|
|
+ loading: false
|
|
|
|
|
+ }))
|
|
|
_this.total = res.count
|
|
_this.total = res.count
|
|
|
_this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
|
|
_this.max = Math.ceil(res.count / _this.pagination.rowsPerPage) || 0
|
|
|
_this.pathname_previous = res.previous
|
|
_this.pathname_previous = res.previous
|
|
|
_this.pathname_next = res.next
|
|
_this.pathname_next = res.next
|
|
|
})
|
|
})
|
|
|
- .catch(err => {
|
|
|
|
|
|
|
+ .catch((err) => {
|
|
|
_this.$q.notify({
|
|
_this.$q.notify({
|
|
|
message: err.detail,
|
|
message: err.detail,
|
|
|
icon: 'close',
|
|
icon: 'close',
|
|
@@ -244,7 +401,7 @@ export default {
|
|
|
_this.loading = false
|
|
_this.loading = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- changePageEnter() {
|
|
|
|
|
|
|
+ changePageEnter () {
|
|
|
if (Number(this.paginationIpt) < 1) {
|
|
if (Number(this.paginationIpt) < 1) {
|
|
|
this.current = 1
|
|
this.current = 1
|
|
|
this.paginationIpt = 1
|
|
this.paginationIpt = 1
|
|
@@ -258,7 +415,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 带搜索条件加载
|
|
// 带搜索条件加载
|
|
|
- getSearchList(page = 1) {
|
|
|
|
|
|
|
+ getSearchList (page = 1) {
|
|
|
this.current = page
|
|
this.current = page
|
|
|
this.paginationIpt = page
|
|
this.paginationIpt = page
|
|
|
this.getList({
|
|
this.getList({
|
|
@@ -267,16 +424,16 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- getListPrevious() {
|
|
|
|
|
|
|
+ getListPrevious () {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
if (LocalStorage.has('auth')) {
|
|
if (LocalStorage.has('auth')) {
|
|
|
getauth(_this.pathname_previous, {})
|
|
getauth(_this.pathname_previous, {})
|
|
|
- .then(res => {
|
|
|
|
|
|
|
+ .then((res) => {
|
|
|
_this.table_list = res.results
|
|
_this.table_list = res.results
|
|
|
_this.pathname_previous = res.previous
|
|
_this.pathname_previous = res.previous
|
|
|
_this.pathname_next = res.next
|
|
_this.pathname_next = res.next
|
|
|
})
|
|
})
|
|
|
- .catch(err => {
|
|
|
|
|
|
|
+ .catch((err) => {
|
|
|
_this.$q.notify({
|
|
_this.$q.notify({
|
|
|
message: err.detail,
|
|
message: err.detail,
|
|
|
icon: 'close',
|
|
icon: 'close',
|
|
@@ -286,17 +443,17 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- getListNext() {
|
|
|
|
|
|
|
+ getListNext () {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
if (LocalStorage.has('auth')) {
|
|
if (LocalStorage.has('auth')) {
|
|
|
getauth(_this.pathname_next, {})
|
|
getauth(_this.pathname_next, {})
|
|
|
- .then(res => {
|
|
|
|
|
|
|
+ .then((res) => {
|
|
|
_this.table_list = res.results
|
|
_this.table_list = res.results
|
|
|
|
|
|
|
|
_this.pathname_previous = res.previous
|
|
_this.pathname_previous = res.previous
|
|
|
_this.pathname_next = res.next
|
|
_this.pathname_next = res.next
|
|
|
})
|
|
})
|
|
|
- .catch(err => {
|
|
|
|
|
|
|
+ .catch((err) => {
|
|
|
_this.$q.notify({
|
|
_this.$q.notify({
|
|
|
message: err.detail,
|
|
message: err.detail,
|
|
|
icon: 'close',
|
|
icon: 'close',
|
|
@@ -305,19 +462,17 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- reFresh() {
|
|
|
|
|
|
|
+ reFresh () {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
_this.getSearchList()
|
|
_this.getSearchList()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- updateProxy() {
|
|
|
|
|
|
|
+ updateProxy () {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
_this.proxyDate = _this.date
|
|
_this.proxyDate = _this.date
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
if (LocalStorage.has('openid')) {
|
|
if (LocalStorage.has('openid')) {
|
|
|
_this.openid = LocalStorage.getItem('openid')
|
|
_this.openid = LocalStorage.getItem('openid')
|
|
@@ -342,19 +497,22 @@ export default {
|
|
|
_this.authin = '0'
|
|
_this.authin = '0'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
|
|
+ mounted () {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
if (_this.$q.platform.is.electron) {
|
|
if (_this.$q.platform.is.electron) {
|
|
|
_this.height = String(_this.$q.screen.height - 290) + 'px'
|
|
_this.height = String(_this.$q.screen.height - 290) + 'px'
|
|
|
} else {
|
|
} else {
|
|
|
_this.height = _this.$q.screen.height - 290 + '' + 'px'
|
|
_this.height = _this.$q.screen.height - 290 + '' + 'px'
|
|
|
}
|
|
}
|
|
|
|
|
+ // _this.timer = setInterval(() => {
|
|
|
|
|
+ // _this.getlog()
|
|
|
|
|
+ // }, 1000)
|
|
|
},
|
|
},
|
|
|
- updated() { },
|
|
|
|
|
- destroyed() { },
|
|
|
|
|
|
|
+ updated () {},
|
|
|
|
|
+ destroyed () {},
|
|
|
// 在 watch 或方法中添加调试代码
|
|
// 在 watch 或方法中添加调试代码
|
|
|
watch: {
|
|
watch: {
|
|
|
- createDate1(val) {
|
|
|
|
|
|
|
+ createDate1 (val) {
|
|
|
if (val) {
|
|
if (val) {
|
|
|
if (val.to) {
|
|
if (val.to) {
|
|
|
this.createDate2 = `${val.from} - ${val.to}`
|
|
this.createDate2 = `${val.from} - ${val.to}`
|
|
@@ -364,15 +522,24 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.createDate2 = `${val}`
|
|
this.createDate2 = `${val}`
|
|
|
this.dateArray = val.split('/')
|
|
this.dateArray = val.split('/')
|
|
|
- this.searchUrl = this.pathname + '?' + 'document_date__year=' + this.dateArray[0] + '&' + 'document_date__month=' + this.dateArray[1] + '&' + 'document_date__day=' + this.dateArray[2]
|
|
|
|
|
|
|
+ this.searchUrl =
|
|
|
|
|
+ this.pathname +
|
|
|
|
|
+ '?' +
|
|
|
|
|
+ 'document_date__year=' +
|
|
|
|
|
+ this.dateArray[0] +
|
|
|
|
|
+ '&' +
|
|
|
|
|
+ 'document_date__month=' +
|
|
|
|
|
+ this.dateArray[1] +
|
|
|
|
|
+ '&' +
|
|
|
|
|
+ 'document_date__day=' +
|
|
|
|
|
+ this.dateArray[2]
|
|
|
// this.downloadhUrl = this.pathname + 'filelist/?' + 'document_date__year=' + this.dateArray[0] + '&' + 'document_date__month=' + this.dateArray[1] + '&' + 'document_date__day=' + this.dateArray[2]
|
|
// this.downloadhUrl = this.pathname + 'filelist/?' + 'document_date__year=' + this.dateArray[0] + '&' + 'document_date__month=' + this.dateArray[1] + '&' + 'document_date__day=' + this.dateArray[2]
|
|
|
}
|
|
}
|
|
|
this.date_range = this.date_range.replace(/\//g, '-')
|
|
this.date_range = this.date_range.replace(/\//g, '-')
|
|
|
|
|
|
|
|
this.getSearchList()
|
|
this.getSearchList()
|
|
|
this.$refs.qDateProxy.hide()
|
|
this.$refs.qDateProxy.hide()
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.createDate2 = ''
|
|
this.createDate2 = ''
|
|
|
this.date_range = ''
|
|
this.date_range = ''
|
|
|
this.getSearchList()
|
|
this.getSearchList()
|
|
@@ -391,4 +558,22 @@ export default {
|
|
|
.q-date__range {
|
|
.q-date__range {
|
|
|
background-color: rgba(25, 118, 210, 0.1);
|
|
background-color: rgba(25, 118, 210, 0.1);
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+
|
|
|
|
|
+.custom-title {
|
|
|
|
|
+ font-size: 0.9rem; /* 推荐使用相对单位 */
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+}
|
|
|
|
|
+/* 添加以下样式 */
|
|
|
|
|
+.custom-timeline {
|
|
|
|
|
+ --q-timeline-color: #e0e0e0; /* 覆盖时间轴线颜色变量 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.custom-node .q-timeline__dot {
|
|
|
|
|
+ background: #485573 !important; /* 节点填充色 */
|
|
|
|
|
+ border: 2px solid #5c6b8c !important; /* 节点边框色 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.custom-node .q-timeline__content {
|
|
|
|
|
+ color: #485573; /* 文字颜色 */
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|