Browse Source

查询弹窗修改 条件 需拼接到 筛选中

master
陈薪名 10 months ago
parent
commit
98c1925c2e
  1. 20
      src/components/SearchTable/src/SearchTable.vue
  2. 13
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

20
src/components/SearchTable/src/SearchTable.vue

@ -67,6 +67,7 @@ const typeRef = ref()
const rowRef = ref() const rowRef = ref()
const allSchemasRef = ref() const allSchemasRef = ref()
const multipleBol = ref(false) const multipleBol = ref(false)
const searchConditionRef = ref()
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => { const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => {
searchDialogVisible.value = true searchDialogVisible.value = true
formFieldRef.value = formField formFieldRef.value = formField
@ -84,6 +85,7 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getListApi: getPage.value // getListApi: getPage.value //
}) })
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
searchConditionRef.value = searchCondition
if (searchCondition) tableObjectRef.value.params = searchCondition; if (searchCondition) tableObjectRef.value.params = searchCondition;
// //
@ -98,16 +100,24 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
// console.log(99, rowRef.value) // console.log(99, rowRef.value)
// console.log(100, searchData) // console.log(100, searchData)
// console.log(101, tableObjectRef.value.params) // console.log(101, searchConditionRef.value)
// 20240104 searchData.filters // 20240104 searchData.filters
if (tableObjectRef.value.params) { if (searchConditionRef.value) {
Object.keys(tableObjectRef.value.params).forEach(key => { Object.keys(searchConditionRef.value).forEach(key => {
if (searchData.filters) {
searchData.filters.push({ searchData.filters.push({
action: "==", action: "==",
column: key, column: key,
value: tableObjectRef.value.params[key] value: searchConditionRef.value[key]
}) })
// }
} else {
searchData.filters = [{
action: "==",
column: key,
value: searchConditionRef.value[key]
}]
}
}); });
} }
tableObjectRef.value.params = { tableObjectRef.value.params = {

13
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

@ -17,7 +17,10 @@ import * as TeamApi from '@/api/wms/team'
import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data' import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' // import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
// import * as BomApi from '@/api/wms/bom'
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
import * as WorkStationApi from '@/api/wms/workstation' import * as WorkStationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
@ -392,8 +395,8 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本 searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物品关系信息【原料】【半成品】', // 查询弹窗标题 searchTitle: '物品清单信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'productionLineCode', key:'productionLineCode',
@ -406,8 +409,8 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码', // 输入框占位文本 searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物品关系信息【原料】【半成品】', // 查询弹窗标题 searchTitle: '物品清单信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'productionLineCode', key:'productionLineCode',

Loading…
Cancel
Save