Browse Source

上线结算开发

hella_zhaoxuebing
王宇飞 1 month ago
committed by zhaoxuebing
parent
commit
ef925bbffb
  1. 54
      src/api/wms/onlinesettlementInfoDetail/index.ts
  2. 80
      src/api/wms/settlementReport/index.ts
  3. 18
      src/components/SearchTable/src/SearchTable.vue
  4. 244
      src/views/wms/issueManage/onlinesettlement/onlinesettlementInfoDetail/index.vue
  5. 117
      src/views/wms/issueManage/onlinesettlement/onlinesettlementInfoDetail/onlinesettlementInfoDetail.data.ts
  6. 279
      src/views/wms/issueManage/onlinesettlement/settlementReport/index.vue
  7. 186
      src/views/wms/issueManage/onlinesettlement/settlementReport/settlementReport.data.ts

54
src/api/wms/onlinesettlementInfoDetail/index.ts

@ -0,0 +1,54 @@
import request from '@/config/axios'
export interface OnlinesettlementInfoDetailVO {
id: number
number: string
masterId: number
settlementQty: number
settlementRecordNumber: string
settlementBusinessType: string
settlementDatetime: Date
concurrencyStamp: number
remark: string
}
// 查询上线结算记录信息新子表列表
export const getOnlinesettlementInfoDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/onlinesettlement-info-detail/senior', data })
} else {
return await request.get({ url: `/wms/onlinesettlement-info-detail/page`, params })
}
}
// 查询上线结算记录信息新子表详情
export const getOnlinesettlementInfoDetail = async (id: number) => {
return await request.get({ url: `/wms/onlinesettlement-info-detail/get?id=` + id })
}
// 新增上线结算记录信息新子表
export const createOnlinesettlementInfoDetail = async (data: OnlinesettlementInfoDetailVO) => {
return await request.post({ url: `/wms/onlinesettlement-info-detail/create`, data })
}
// 修改上线结算记录信息新子表
export const updateOnlinesettlementInfoDetail = async (data: OnlinesettlementInfoDetailVO) => {
return await request.put({ url: `/wms/onlinesettlement-info-detail/update`, data })
}
// 删除上线结算记录信息新子表
export const deleteOnlinesettlementInfoDetail = async (id: number) => {
return await request.delete({ url: `/wms/onlinesettlement-info-detail/delete?id=` + id })
}
// 导出上线结算记录信息新子表 Excel
export const exportOnlinesettlementInfoDetail = async (params) => {
return await request.download({ url: `/wms/onlinesettlement-info-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/onlinesettlement-info-detail/get-import-template' })
}

80
src/api/wms/settlementReport/index.ts

@ -0,0 +1,80 @@
import request from '@/config/axios'
export interface SettlementConfigurationVO {
id: number
supplierCode: string
itemCode: string
fromWarehouseCode: string
toWarehouseCode: string
remark: string
concurrencyStamp: number
}
// 查询上线结算配置列表
export const getSettlementReportPage = async (params) => {
// if (params.isSearch) {
// delete params.isSearch
// const data = {...params}
// return await request.post({ url: '/wms/onlinesettlement-info/settlementInfoReport/senior', data })
// } else {
return await request.get({ url: `/wms/onlinesettlement-info/settlementInfoReport`, params })
// }
}
// 查询上线结算配置列表
export const getSettlementReportBalance = async (params) => {
// if (params.isSearch) {
// delete params.isSearch
// const data = {...params}
// return await request.post({ url: '/wms/onlinesettlement-info/settlementInfoReport/senior', data })
// } else {
return await request.get({ url: `/wms/onlinesettlement-info/settlementInfoReportBalance`, params })
// }
}
// 批量结算
export const submitSettlementReport = async (data) => {
// if (params.isSearch) {
// delete params.isSearch
// const data = {...params}
// return await request.post({ url: '/wms/onlinesettlement-info/settlementInfoReport/senior', data })
// } else {
return await request.post({ url: `/wms/onlinesettlement-info/settlementInfoSubmit`, data })
// }
}
// // 查询上线结算配置详情
// export const getSettlementConfiguration = async (id: number) => {
// return await request.get({ url: `/wms/settlement-configuration/get?id=` + id })
// }
// export const editSettlementConfiguration = async (id: number) => {
// return await request.get({ url: `/wms/settlement-configuration/editView?id=` + id })
// }
// // 新增上线结算配置
// export const createSettlementConfiguration = async (data: SettlementConfigurationVO) => {
// return await request.post({ url: `/wms/settlement-configuration/create`, data })
// }
// // 修改上线结算配置
// export const updateSettlementConfiguration = async (data: SettlementConfigurationVO) => {
// return await request.put({ url: `/wms/settlement-configuration/update`, data })
// }
// // 删除上线结算配置
// export const deleteSettlementConfiguration = async (id: number) => {
// return await request.delete({ url: `/wms/settlement-configuration/delete?id=` + id })
// }
// // 导出上线结算配置 Excel
// export const exportSettlementConfiguration = async (params) => {
// return await request.download({ url: `/wms/settlement-configuration/export-excel`, params })
// }
// // 下载用户导入模板
// export const importTemplate = () => {
// return request.download({ url: '/wms/settlement-configuration/get-import-template' })
// }

18
src/components/SearchTable/src/SearchTable.vue

@ -37,10 +37,11 @@
/>
</ContentWrap>
<template #footer>
<div class="flex items-center">
<slot name="footerActions"></slot>
<div class="flex items-center" v-if="!hiddenFooterActions">
<slot :name="'selectionsActions'+formFieldRef" :selections="searchTableRef?searchTableRef.selections:[]"></slot>
<el-button @click="submitForm" type="primary" :disabled="formLoading">{{ t(`ts.${'确 定'}`) }}</el-button>
<el-button @click="searchDialogVisible = false">{{ t(`ts.${'取 消'}`) }}</el-button>
<el-button @click="cancleClick">{{ t(`ts.${' '}`) }}</el-button>
<slot name="actions"></slot>
</div>
@ -64,7 +65,12 @@ const props = defineProps({
isCheckStrictly:{
type:Boolean,
default:false
}
},
//
hiddenFooterActions:{
type:Boolean,
default:false
},
})
const { t } = useI18n() //
const message = useMessage() //
@ -248,7 +254,6 @@ const buttonBaseClick = (val, item) => {
}
defineExpose({ open,openData,updateData,hiddenFilterButton ,changeDialogWidth,searchFormClick}) // open
// Table ref
const searchTableRef = ref()
@ -307,6 +312,11 @@ const rowClick = (row: any, column: any, event: Event) => {
searchTableRef.value?.elTableRef?.toggleRowSelection(row, false)
}
}
const cancleClick = ()=>{
searchDialogVisible.value = false
}
defineExpose({ open,openData,updateData,hiddenFilterButton ,changeDialogWidth,searchFormClick,submitForm,cancleClick,}) // open
</script>
<style scoped lang="scss">
</style>

244
src/views/wms/issueManage/onlinesettlement/onlinesettlementInfoDetail/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="OnlinesettlementInfoDetail.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="OnlinesettlementInfoDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="OnlinesettlementInfoDetailRules"
:formAllSchemas="OnlinesettlementInfoDetail.allSchemas"
:apiUpdate="OnlinesettlementInfoDetailApi.updateOnlinesettlementInfoDetail"
:apiCreate="OnlinesettlementInfoDetailApi.createOnlinesettlementInfoDetail"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="OnlinesettlementInfoDetail.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/onlinesettlement-info-detail/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { OnlinesettlementInfoDetail,OnlinesettlementInfoDetailRules } from './onlinesettlementInfoDetail.data'
import * as OnlinesettlementInfoDetailApi from '@/api/wms/onlinesettlementInfoDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'OnlinesettlementInfoDetail' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(OnlinesettlementInfoDetail.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: OnlinesettlementInfoDetailApi.getOnlinesettlementInfoDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:onlinesettlementInfoDetail:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:onlinesettlementInfoDetail:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:onlinesettlementInfoDetail:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:onlinesettlementInfoDetail:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:onlinesettlementInfoDetail:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =OnlinesettlementInfoDetail.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await OnlinesettlementInfoDetailApi.createOnlinesettlementInfoDetail(data)
message.success(t('common.createSuccess'))
} else {
await OnlinesettlementInfoDetailApi.updateOnlinesettlementInfoDetail(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicOnlinesettlementInfoDetail')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await OnlinesettlementInfoDetailApi.deleteOnlinesettlementInfoDetail(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await OnlinesettlementInfoDetailApi.exportOnlinesettlementInfoDetail(tableObject.params)
download.excel(data, '上线结算记录信息新子表.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '上线结算记录信息新子表导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await OnlinesettlementInfoDetailApi.importTemplate()
})
</script>

117
src/views/wms/issueManage/onlinesettlement/onlinesettlementInfoDetail/onlinesettlementInfoDetail.data.ts

@ -0,0 +1,117 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const OnlinesettlementInfoDetailRules = reactive({
masterId: [required],
concurrencyStamp: [required],
})
export const OnlinesettlementInfoDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '主表ID',
field: 'masterId',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '结算数量',
field: 'settlementQty',
sort: 'custom',
isSearch: true,
},
{
label: '结算记录单号',
field: 'settlementRecordNumber',
sort: 'custom',
isSearch: true,
},
{
label: '结算业务类型',
field: 'settlementBusinessType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '结算日期',
field: 'settlementDatetime',
sort: 'custom',
formatter: dateFormatter,
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
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')]
}
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

279
src/views/wms/issueManage/onlinesettlement/settlementReport/index.vue

@ -0,0 +1,279 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SettlementReport.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SettlementReport.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 结算库位列表 -->
<SearchTable
ref="searchTableRef"
:showSearchTableQueryFields="['itemCode']"
:hiddenFilterBtnFields="[]"
:isCheckStrictly="false"
@searchTableSuccess="searchTableSuccess"
:hiddenFooterActions="true"
>
<template #footerActions>
<div class="flex items-center" style="justify-content: flex-end;">
<el-button type="primary" @click="settlementClick">结算库位</el-button>
<el-button @click="cancleClick">{{ t(`ts.${' '}`) }}</el-button>
</div>
</template>
<template #searchQueryhahaha>
<Form
ref="basicFormRef"
:rules="SettlementReportSelectionFormRules"
:schema="SettlementReportSelectionForm.allSchemas.formSchema"
:is-col="true"
@opensearchTable="opensearchTable"
@onBlur="onBlur"
/>
</template>
</SearchTable>
<!-- 库位 -->
<SearchTable
ref="searchTableRef1"
@searchTableSuccess="searchTableSuccess1"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SettlementReport,SettlementReportRules,SettlementReportSelection,SettlementReportSelectionlRules,SettlementReportSelectionForm,SettlementReportSelectionFormRules } from './settlementReport.data'
import * as SettlementtReportApi from '@/api/wms/settlementReport'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
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'
import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/inputBlur'
// 线
defineOptions({ name: 'SettlementReport' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SettlementReport.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SettlementtReportApi.getSettlementReportPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = (row) => {
return [{
label: '结算',
name: 'settlement',
// hide: row.settledStatus!=2,
hide: '',
type: 'primary',
icon: '',
color: '',
hasPermi: ''
}]
}
const searchTableRef = ref()
// -
const buttonTableClick = async (val, row) => {
if(val == 'settlement'){
//
searchTableRef.value.open(
"批量结算",
SettlementReportSelection.allSchemas,
SettlementtReportApi.getSettlementReportBalance,
"hahaha",
"hahaha",
true,
'tableForm',
null,
{
supplierCode:row.supplierCode,
itemCode:row.itemCode,
batch:row.batch
},
undefined,
false,
null
)
}
}
//
const settlementClick = ()=>{
if(!basicFormRef.value.formModel['toLocationCode']){
message.warning('请选择结算库位')
return
}else{
searchTableRef.value.submitForm()
}
}
const cancleClick = ()=>{
searchTableRef.value.cancleClick()
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
console.log('formModel',basicFormRef.value.formModel['toLocationCode'])
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row )
nextTick(async () => {
let ids = []
ids = val.map(item=>(item['id']))
ids.join(',')
let res = await SettlementtReportApi.submitSettlementReport({
ids,
toLocationCode:basicFormRef.value.formModel['toLocationCode']||''
})
if(res==1){
message.success('提交成功')
getList()
}
})
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 添加/修改操作 */
const basicFormRef = ref()
//
const opensearchTable = (
formField,
searchField,
searchTitle,
searchAllSchemas,
searchPage,
searchCondition,
multiple,
type,
row,
isConcatDetailSchemas = false,
searchDetailSchemas: any
) => {
searchTableRef1.value.open(
"结算库位",
Location.allSchemas,
LocationApi.getLocationPage,
"toLocationCode",
"code",
false,
'form',
null,
{
// supplierCode:row.supplierCode,
// itemCode:row.itemCode,
// batch:row.batch
},
undefined,
false,
null
)
}
const searchTableRef1 = ref()
const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row )
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
basicFormRef.value.setValues(setV)
})
}
const onBlur = async (field, e) => {
let formSchemaObj = SettlementReportSelectionForm.allSchemas.formSchema.find((item) => item.field == field)?.componentProps
if (formSchemaObj?.enterSearch) {
await FormBlur(
field,
e,
routeName.value,
basicFormRef.value,
null,
formSchemaObj,
(list) => {
searchTableSuccess1(field, formSchemaObj.searchField, list, basicFormRef.value, 'form')
}
)
}
}
/** 初始化 **/
onMounted(async () => {
getList()
// importTemplateData.templateUrl = await SettlementConfigurationApi.importTemplate()
})
</script>

186
src/views/wms/issueManage/onlinesettlement/settlementReport/settlementReport.data.ts

@ -0,0 +1,186 @@
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' }
],
})
Loading…
Cancel
Save