Browse Source

WMS bug:HL-5876 库存余额详情页增加一个tab页

hella_online_20240911
gaojs 2 months ago
parent
commit
df7f98be02
  1. 4
      src/api/wms/balance/index.ts
  2. 163
      src/views/wms/inventoryManage/balance/balance.data.ts
  3. 11
      src/views/wms/inventoryManage/balance/index.vue

4
src/api/wms/balance/index.ts

@ -42,6 +42,10 @@ export const getBalancePage = async (params) => {
} }
} }
export const getTransactionBalancePage = async (params) => {
return await request.get({ url: `/wms/transaction/page_balance`, params })
}
// 查询库存余额列表(包括已冻结,已失效的物料) // 查询库存余额列表(包括已冻结,已失效的物料)
export const getBalancePageAll = async (params) => { export const getBalancePageAll = async (params) => {
if (params.isSearch) { if (params.isSearch) {

163
src/views/wms/inventoryManage/balance/balance.data.ts

@ -501,6 +501,169 @@ export const Balance = useCrudSchemas(
]) ])
) )
export const TransactionTab = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isTable: true,
isForm: true,
isDetail:true,
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '事务类型',
field: 'transactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存动作',
field: 'inventoryAction',
dictType: DICT_TYPE.INVENTORY_ACTION,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务记录号',
field: 'recordNumber',
sort: 'custom',
isTable: true,
isSearch: true,
table: {
width: 180
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '事务号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
}
]))
// 表单校验 // 表单校验
export const BalanceRules = reactive({ export const BalanceRules = reactive({
packingNumber: [ packingNumber: [

11
src/views/wms/inventoryManage/balance/index.vue

@ -55,13 +55,10 @@
<Detail <Detail
ref="detailRef" ref="detailRef"
:isBasic="false" :isBasic="false"
:allSchemas="Balance.allSchemas" :allSchemas="TransactionTab.allSchemas"
:detailAllSchemas="Balance.allSchemas" :detailAllSchemas="TransactionTab.allSchemas"
:detailAllSchemasRules="BalanceRules" :detailAllSchemasRules="BalanceRules"
:apiCreate="BalanceApi.createBalance" :apiPage="BalanceApi.getTransactionBalancePage"
:apiUpdate="BalanceApi.updateBalance"
:apiPage="BalanceApi.getBalancePage"
:apiDelete="BalanceApi.deleteBalance"
:isShowAddBtn="false" :isShowAddBtn="false"
:detailButtonIsShow="true" :detailButtonIsShow="true"
:tabs="[{ :tabs="[{
@ -80,7 +77,7 @@ import download from '@/utils/download'
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Balance, BalanceRules } from './balance.data' import { Balance,TransactionTab, BalanceRules } from './balance.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'

Loading…
Cancel
Save