|
|
@ -7,7 +7,14 @@ |
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
|
:allSchemas="PurchasePlanMain.allSchemas" :detailAllSchemas="PurchasePlanDetail.allSchemas"/> |
|
|
|
:allSchemas="PurchasePlanMain.allSchemas" :detailAllSchemas="PurchasePlanDetail.allSchemas"> |
|
|
|
<template #rightBtn> |
|
|
|
<div style="display:flex;justify-content: center;align-items: center"> |
|
|
|
<span>计划数量包含0</span> |
|
|
|
<el-switch v-model="isZero" style="margin:0 5px" @change="zeroChange"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</TableHead> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
@ -281,6 +288,7 @@ const getSearchTableData = async (number,formField,searchField)=>{ |
|
|
|
} |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
defaultParams:{isZero:1}, |
|
|
|
getListApi: PurchasePlanDetailApi.getPurchasePlanDetailPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
@ -332,6 +340,7 @@ const getSearchTableData = async (number,formField,searchField)=>{ |
|
|
|
} else if (val=='mainOrderSelectionPub'){// 批量发布 |
|
|
|
handleSelectionPublish() |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
console.log('筛选',tableObject) |
|
|
|
} else { // 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
@ -510,7 +519,26 @@ const { wsCache } = useCache() |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const isZero = ref(false) |
|
|
|
const zeroChange = ()=>{ |
|
|
|
// isZero.value |
|
|
|
if(tableObject.params.isSearch){ |
|
|
|
tableObject.params.filters = tableObject.params.filters.filter(item=>item.column!='isZero') |
|
|
|
tableObject.params.filters = [...tableObject.params.filters,{ |
|
|
|
action: "==", |
|
|
|
column: "isZero", |
|
|
|
value: isZero.value?0:1 |
|
|
|
}] |
|
|
|
}else{ |
|
|
|
tableObject.params.isZero = isZero.value?0:1 |
|
|
|
} |
|
|
|
getList() |
|
|
|
console.log('tableObject',tableObject) |
|
|
|
} |
|
|
|
const searchList = (model)=>{ |
|
|
|
model.isZero = isZero.value?0:1 |
|
|
|
console.log('model',model) |
|
|
|
selectionRows.value = [] |
|
|
|
setSearchParams(model) |
|
|
|
} |
|
|
@ -634,6 +662,7 @@ const handleSelectionPublish = async ()=>{ |
|
|
|
} |
|
|
|
|
|
|
|
const handleExportDetails = async () => { |
|
|
|
console.log('tableObject.params',tableObject.params) |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
@ -807,9 +836,14 @@ const handleSelectionPublish = async ()=>{ |
|
|
|
|
|
|
|
// 筛选提交 |
|
|
|
const searchFormClick = (searchData) => { |
|
|
|
searchData.filters = searchData.filters.filter(item=>item.column!='isZero') |
|
|
|
tableObject.params = { |
|
|
|
isSearch: true, |
|
|
|
filters: searchData.filters |
|
|
|
filters: [...searchData.filters,{ |
|
|
|
action: "==", |
|
|
|
column: "isZero", |
|
|
|
value: isZero.value?0:1 |
|
|
|
}] |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|