Browse Source

状态多选

master_hella_20240701
wangyufei 2 months ago
parent
commit
1cfb7bf3b8
  1. 11
      src/api/wms/purchasePlanDetail/index.ts
  2. 21
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  3. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

11
src/api/wms/purchasePlanDetail/index.ts

@ -15,7 +15,17 @@ export interface PurchasePlanDetailVO {
updater: string updater: string
available: string available: string
} }
// 要货预测-列表和头部请求参数
const getPageParams = (params)=>{
console.log('params.status',params.status)
// 状态
if(params.status&&params.status.length>0){
params.statuss = params.status.join(',')
}
params.status = ''
return params
}
// 查询要货计划子列表 // 查询要货计划子列表
export const getPurchasePlanDetailPage = async (params) => { export const getPurchasePlanDetailPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
@ -23,6 +33,7 @@ export const getPurchasePlanDetailPage = async (params) => {
const data = {...params} const data = {...params}
return await request.post({ url: '/wms/purchase-plan-detail/senior', data }) return await request.post({ url: '/wms/purchase-plan-detail/senior', data })
} else { } else {
params = getPageParams(params)
return await request.get({ url: `/wms/purchase-plan-detail/page`, params }) return await request.get({ url: `/wms/purchase-plan-detail/page`, params })
} }
} }

21
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...PurchasePlanMain.allSchemas.searchSchema,...PurchasePlanDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" @searchTableSuccess="searchQueryTableSuccess"/> <Search ref="seachRef" :schema="[...PurchasePlanMain.allSchemas.searchSchema,...PurchasePlanDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" @searchTableSuccess="searchQueryTableSuccess" @onChange="onSearchChange"/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -115,8 +115,23 @@
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const seachRef = ref()
const onSearchChange = (field, value)=>{
if(field=='status'){
if(value.length>0){
if(value[value.length-1]==''){
//
seachRef.value.setFormValues({
status:['']
})
}else{
seachRef.value.setFormValues({
status:value.filter(item=>item!='')
})
}
}
}
}
const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchQueryTableSuccess = (formField, searchField, val, formRef, type, row ) => {
console.log('searchQueryTableSuccess',formField, searchField, val, formRef, type, row ) console.log('searchQueryTableSuccess',formField, searchField, val, formRef, type, row )
nextTick(() => { nextTick(() => {

6
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -292,6 +292,12 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
sortTableDefault:13, sortTableDefault:13,
sortSearchDefault:6, sortSearchDefault:6,
search:{
value:[],
componentProps: {
multiple:true
}
},
form: { form: {
value: '1', value: '1',
componentProps: { componentProps: {

Loading…
Cancel
Save