|
@@ -29,7 +29,7 @@
|
|
|
:row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)">
|
|
:row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)">
|
|
|
<template #headerCell="{ column }">
|
|
<template #headerCell="{ column }">
|
|
|
<div style="min-width:100px;" v-if="column.filter == 1 || column.filter == 2">
|
|
<div style="min-width:100px;" v-if="column.filter == 1 || column.filter == 2">
|
|
|
- <a-input v-model:value="column.value" :placeholder="column.title" @change="setSearchParam(column.dataIndex,column.value)" @pressEnter="listData(column.dataIndex,column.value)"></a-input>
|
|
|
|
|
|
|
+ <a-input v-model:value="column.value" :placeholder="column.title" @pressEnter="listData(column.dataIndex,column.value)"></a-input>
|
|
|
</div>
|
|
</div>
|
|
|
<span v-else style="display:inline-block;padding:0 10px;">{{column.title}}</span>
|
|
<span v-else style="display:inline-block;padding:0 10px;">{{column.title}}</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -140,13 +140,12 @@
|
|
|
listData()
|
|
listData()
|
|
|
}
|
|
}
|
|
|
const listData = async (dataIndex,value)=> {
|
|
const listData = async (dataIndex,value)=> {
|
|
|
- if (dataIndex && value) {
|
|
|
|
|
- console.log()
|
|
|
|
|
- setSearchParam(dataIndex, value)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ props.param.content.where.tablefilter = {}
|
|
|
|
|
+ console.log(propsColumns.value)
|
|
|
|
|
+ propsColumns.value.forEach((e)=>{
|
|
|
|
|
+ e.value?props.param.content.where.tablefilter[e.dataIndex] = e.value:''
|
|
|
|
|
+ })
|
|
|
props.param.content.tableid = props.tableid
|
|
props.param.content.tableid = props.tableid
|
|
|
- console.log(props.param)
|
|
|
|
|
-
|
|
|
|
|
const res = await Api.requested(props.param)
|
|
const res = await Api.requested(props.param)
|
|
|
res.data.forEach(element => {
|
|
res.data.forEach(element => {
|
|
|
element.qty = element.qty ? element.qty:element.orderminqty
|
|
element.qty = element.qty ? element.qty:element.orderminqty
|
|
@@ -154,11 +153,6 @@
|
|
|
data.value = res.data
|
|
data.value = res.data
|
|
|
total.value = res.total
|
|
total.value = res.total
|
|
|
}
|
|
}
|
|
|
- const setSearchParam = (dataIndex,value)=>{
|
|
|
|
|
- props.param.content.pageNumber = 1
|
|
|
|
|
- props.param.content.where.tablefilter = props.param.content.where.tablefilter ? props.param.content.where.tablefilter : {}
|
|
|
|
|
- props.param.content.where.tablefilter[dataIndex] = value
|
|
|
|
|
- }
|
|
|
|
|
const onSelect = async (record, selected, selectedRows, nativeEvent)=>{
|
|
const onSelect = async (record, selected, selectedRows, nativeEvent)=>{
|
|
|
if (!selected) {
|
|
if (!selected) {
|
|
|
tableRecord.value = tableRecord.value.filter(e=>e.itemid !== record.itemid)
|
|
tableRecord.value = tableRecord.value.filter(e=>e.itemid !== record.itemid)
|