|
@@ -10,6 +10,12 @@
|
|
type="DEVICE"
|
|
type="DEVICE"
|
|
></select-supplier>
|
|
></select-supplier>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #user="{ item, params }">
|
|
|
|
+ <select-filter-user
|
|
|
|
+ v-model="params[item.prop]"
|
|
|
|
+ clearable
|
|
|
|
+ ></select-filter-user>
|
|
|
|
+ </template>
|
|
</SearchForm>
|
|
</SearchForm>
|
|
<div class="flex-1 page-wrap">
|
|
<div class="flex-1 page-wrap">
|
|
<t-table
|
|
<t-table
|
|
@@ -28,7 +34,16 @@
|
|
current: pagination.pageNumber,
|
|
current: pagination.pageNumber,
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- <template #create-time="{ col, row }">
|
|
|
|
|
|
+ <template #usage="{ col, row }">
|
|
|
|
+ {{ deviceUsageTypeFilter(row[col.colKey]) }}
|
|
|
|
+ </template>
|
|
|
|
+ <template #status="{ col, row }">
|
|
|
|
+ {{ runningStatusFilter(row[col.colKey]) }}
|
|
|
|
+ </template>
|
|
|
|
+ <template #inout="{ col, row }">
|
|
|
|
+ {{ inoutTypeFilter(row[col.colKey]) }}
|
|
|
|
+ </template>
|
|
|
|
+ <template #inout-time="{ col, row }">
|
|
{{ timestampFilter(row[col.colKey]) }}
|
|
{{ timestampFilter(row[col.colKey]) }}
|
|
</template>
|
|
</template>
|
|
</t-table>
|
|
</t-table>
|
|
@@ -43,8 +58,13 @@ import { omit } from 'lodash';
|
|
import { registrationQueryListApi } from '@/api/resource-guard';
|
|
import { registrationQueryListApi } from '@/api/resource-guard';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
-import { INOUT_TYPE } from '@/config/constants';
|
|
|
|
-import { timestampFilter } from '@/utils/filter';
|
|
|
|
|
|
+import { DEVICE_USAGE_TYPE, RUNNING_STATUS } from '@/config/constants';
|
|
|
|
+import {
|
|
|
|
+ deviceUsageTypeFilter,
|
|
|
|
+ inoutTypeFilter,
|
|
|
|
+ runningStatusFilter,
|
|
|
|
+ timestampFilter,
|
|
|
|
+} from '@/utils/filter';
|
|
|
|
|
|
const fields = ref([
|
|
const fields = ref([
|
|
{
|
|
{
|
|
@@ -56,31 +76,29 @@ const fields = ref([
|
|
cell: 'service',
|
|
cell: 'service',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'inout',
|
|
|
|
- label: '出库/入库',
|
|
|
|
|
|
+ prop: 'usageType',
|
|
|
|
+ label: '用途类型',
|
|
type: 'select',
|
|
type: 'select',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
colSpan: 5,
|
|
colSpan: 5,
|
|
- options: dictToOptionList(INOUT_TYPE),
|
|
|
|
|
|
+ options: dictToOptionList(DEVICE_USAGE_TYPE),
|
|
attrs: {
|
|
attrs: {
|
|
clearable: true,
|
|
clearable: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'deviceNo',
|
|
|
|
- label: '设备编号',
|
|
|
|
|
|
+ prop: 'userId',
|
|
|
|
+ label: '登记人',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
colSpan: 5,
|
|
colSpan: 5,
|
|
- attrs: {
|
|
|
|
- clearable: true,
|
|
|
|
- },
|
|
|
|
|
|
+ cell: 'user',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'createTime',
|
|
|
|
- label: '出/入库时间',
|
|
|
|
- type: 'daterange',
|
|
|
|
|
|
+ prop: 'deviceStatus',
|
|
|
|
+ label: '运行状态',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
- colSpan: 7,
|
|
|
|
|
|
+ colSpan: 5,
|
|
|
|
+ options: dictToOptionList(RUNNING_STATUS),
|
|
attrs: {
|
|
attrs: {
|
|
clearable: true,
|
|
clearable: true,
|
|
},
|
|
},
|
|
@@ -99,15 +117,26 @@ const fields = ref([
|
|
],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'supplierId',
|
|
|
|
- label: '供应商',
|
|
|
|
- type: 'select',
|
|
|
|
|
|
+ prop: 'inOutTime',
|
|
|
|
+ label: '出/入库时间',
|
|
|
|
+ type: 'daterange',
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ colSpan: 10,
|
|
|
|
+ attrs: {
|
|
|
|
+ clearable: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'deviceNo',
|
|
|
|
+ label: '设备编号',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
colSpan: 5,
|
|
colSpan: 5,
|
|
- cell: 'supplier',
|
|
|
|
|
|
+ attrs: {
|
|
|
|
+ clearable: true,
|
|
|
|
+ },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- prop: 'custom',
|
|
|
|
|
|
+ prop: 'customName',
|
|
label: '客户名称',
|
|
label: '客户名称',
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
colSpan: 5,
|
|
colSpan: 5,
|
|
@@ -115,37 +144,72 @@ const fields = ref([
|
|
clearable: true,
|
|
clearable: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ prop: 'location',
|
|
|
|
+ label: '当前地',
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ colSpan: 5,
|
|
|
|
+ attrs: {
|
|
|
|
+ clearable: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'address',
|
|
|
|
+ label: '发往地',
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ colSpan: 5,
|
|
|
|
+ attrs: {
|
|
|
|
+ clearable: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ prop: 'serialNo',
|
|
|
|
+ label: '登记流水号',
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ colSpan: 5,
|
|
|
|
+ attrs: {
|
|
|
|
+ clearable: true,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
]);
|
|
]);
|
|
const params = reactive({
|
|
const params = reactive({
|
|
serviceUnitId: '',
|
|
serviceUnitId: '',
|
|
- inout: '',
|
|
|
|
|
|
+ usageType: '',
|
|
|
|
+ userId: '',
|
|
|
|
+ deviceStatus: '',
|
|
deviceNo: '',
|
|
deviceNo: '',
|
|
- createTime: [],
|
|
|
|
|
|
+ inOutTime: [],
|
|
supplierId: '',
|
|
supplierId: '',
|
|
- custom: '',
|
|
|
|
|
|
+ customName: '',
|
|
|
|
+ location: '',
|
|
|
|
+ address: '',
|
|
|
|
+ serialNo: '',
|
|
});
|
|
});
|
|
|
|
|
|
const computedParams = computed(() => {
|
|
const computedParams = computed(() => {
|
|
- let data = omit(params, ['createTime']);
|
|
|
|
- data.startTime = params.createTime[0];
|
|
|
|
- data.endTime = params.createTime[1];
|
|
|
|
|
|
+ let data = omit(params, ['inOutTime']);
|
|
|
|
+ data.inOutTimeStart = params.inOutTime[0];
|
|
|
|
+ data.inOutTimeEnd = params.inOutTime[1];
|
|
return data;
|
|
return data;
|
|
});
|
|
});
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
- { colKey: 'serviceUnitName', title: '服务单元名称' },
|
|
|
|
|
|
+ { colKey: 'serialNo', title: '登记流水号', width: 200 },
|
|
|
|
+ { colKey: 'serviceUnitName', title: '服务单元名称', width: 160 },
|
|
|
|
+ { colKey: 'usageType', title: '用途类型', width: 100, cell: 'usage' },
|
|
|
|
+ { colKey: 'deviceNo', title: '设备编号', width: 120 },
|
|
|
|
+ { colKey: 'deviceStatus', title: '运行状态', width: 100, cell: 'status' },
|
|
{
|
|
{
|
|
- colKey: 'createTime',
|
|
|
|
|
|
+ colKey: 'inOutTime',
|
|
title: '出/入库时间',
|
|
title: '出/入库时间',
|
|
- cell: 'create-time',
|
|
|
|
|
|
+ cell: 'inout-time',
|
|
width: 180,
|
|
width: 180,
|
|
},
|
|
},
|
|
- { colKey: 'creator', title: '登记人' },
|
|
|
|
- { colKey: 'custom', title: '客户名称' },
|
|
|
|
- { colKey: 'inout', title: '出库/入库', width: 100 },
|
|
|
|
- { colKey: 'deviceNo', title: '设备编号' },
|
|
|
|
- { colKey: 'supplier', title: '供应商' },
|
|
|
|
- { colKey: 'toArea', title: '发往地' },
|
|
|
|
|
|
+ { colKey: 'userName', title: '登记人' },
|
|
|
|
+ { colKey: 'customName', title: '客户名称' },
|
|
|
|
+ { colKey: 'inOutType', title: '出库/入库', width: 100, cell: 'inout' },
|
|
|
|
+ { colKey: 'location', title: '当前地' },
|
|
|
|
+ { colKey: 'address', title: '发往地' },
|
|
];
|
|
];
|
|
const { pagination, tableData, search, onChange } = useFetchTable(
|
|
const { pagination, tableData, search, onChange } = useFetchTable(
|
|
registrationQueryListApi,
|
|
registrationQueryListApi,
|