You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

186 lines
4.2 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem} from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
// 表单校验
export const SettlementReportRules = reactive({
})
export const SettlementReport = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
},
{
label: '累计收货量',
field: 'totalReceiptQty',
sort: 'custom',
},
{
label: '已结算数量',
field: 'totalSettledQty',
sort: 'custom',
},
{
label: '未结算数量',
field: 'totalOutstandingSettleQty',
sort: 'custom',
isForm: false
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
export const SettlementReportSelection = useCrudSchemas(reactive<CrudSchema[]>([
{
label: ' ',
field: 'hahaha',
table: {
width: 180
},
isTable:false,
isDetail:false,
form: {
componentProps: {
type: 'slot',
}
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
},
{
label: '批次',
field: 'batch',
sort: 'custom',
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
},
{
label: '库存数量',
field: 'qty',
sort: 'custom',
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
}
]))
//表单校验
export const SettlementReportSelectionRules = reactive({
// fromWarehouseCode: [
// { required: true, message: '请选择来源仓库', trigger: 'change' }
// ],
})
export const SettlementReportSelectionForm = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '结算库位',
field: 'toLocationCode',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择结算库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}], // 失去焦点校验参数
}
}
}
]))
export const SettlementReportSelectionFormRules = reactive({
toLocationCode: [
{ required: true, message: '请选择结算库位', trigger: 'change' }
],
})