|
|
|
@ -166,7 +166,7 @@
|
|
|
|
|
<script setup> |
|
|
|
|
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue'; |
|
|
|
|
import { columnList } from '@/option/distribution/Unstoreddetails.js'; |
|
|
|
|
import { processRowPropertyName, setNodeHeight, getObjType } from '@/utils/util'; |
|
|
|
|
import { processRowPropertyName, setNodeHeight, getObjType, deepClone } from '@/utils/util'; |
|
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'; |
|
|
|
|
import { downloadXls, handleClearTableQuery } from '@/utils/util'; |
|
|
|
|
import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails'; |
|
|
|
@ -182,6 +182,7 @@ const $router = useRouter(); //跳转
|
|
|
|
|
const $useStore = useStore(); //权限 |
|
|
|
|
const $route = useRoute(); //获取地址栏参数 |
|
|
|
|
const activeName = ref('1'); |
|
|
|
|
const dataCopy = ref([]); //拷贝数据 |
|
|
|
|
const dialogVisible = ref(false); |
|
|
|
|
const from = ref({ |
|
|
|
|
unWarehouse: [], |
|
|
|
@ -193,8 +194,6 @@ const details = reactive({
|
|
|
|
|
search: false, |
|
|
|
|
/** 表格搜索条件 */ |
|
|
|
|
query: { |
|
|
|
|
inputQuery: {}, |
|
|
|
|
selectQuery: {}, |
|
|
|
|
}, |
|
|
|
|
defaultTime2: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)], // '12:00:00', '08:00:00' |
|
|
|
|
/** 时间快捷选择设置 */ |
|
|
|
@ -292,9 +291,32 @@ const {
|
|
|
|
|
const showdrawer = _flag => { |
|
|
|
|
details.drawerShow = _flag; |
|
|
|
|
}; |
|
|
|
|
const filterAst = (ast, data) => { |
|
|
|
|
// 检查 `data` 中是否所有的 `values` 都为空 |
|
|
|
|
const allValuesEmpty = data.every(item => !item.values); |
|
|
|
|
|
|
|
|
|
// 如果所有 `values` 都为空,直接返回 `ast` |
|
|
|
|
if (allValuesEmpty) { |
|
|
|
|
// tabclaick(); |
|
|
|
|
return dataCopy.value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 否则筛选出 `values` 不为空的对象 |
|
|
|
|
const filteredData = data.filter(item => item.values); |
|
|
|
|
|
|
|
|
|
// 根据筛选出的条件过滤 `ast` |
|
|
|
|
return ast.filter(item => { |
|
|
|
|
return filteredData.every(sub => { |
|
|
|
|
const prop = sub.prop; |
|
|
|
|
const value = sub.values; |
|
|
|
|
return item[prop] === value; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
/** 表格表头输入框搜索 */ |
|
|
|
|
const inputsc = (index, row) => { |
|
|
|
|
|
|
|
|
|
let _query = filterAst(dataCopy.value, columnList); |
|
|
|
|
details.data = _query; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 表格表头时间选择 */ |
|
|
|
@ -375,10 +397,12 @@ const onLoad = async () => {
|
|
|
|
|
if (code !== 200 || !data) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(_res, '基础信息'); |
|
|
|
|
from.value.warehouse = data.warehouse; //已入库 |
|
|
|
|
from.value.unWarehouse = data.unWarehouse; //未入库 |
|
|
|
|
details.data = data.warehouse; |
|
|
|
|
dataCopy.value = deepClone(from.value.warehouse); |
|
|
|
|
details.loadingObj.list = false; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -402,8 +426,10 @@ initPage();
|
|
|
|
|
const tabclaick = () => { |
|
|
|
|
if (activeName.value == 1) { |
|
|
|
|
details.data = from.value.warehouse; //已入库 |
|
|
|
|
dataCopy.value = deepClone(from.value.warehouse); |
|
|
|
|
} else { |
|
|
|
|
details.data = from.value.unWarehouse; //已入库 |
|
|
|
|
details.data = from.value.unWarehouse; //未入库 |
|
|
|
|
dataCopy.value = deepClone(from.value.unWarehouse); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|