| | |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList() |
| | | } |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | getStockInPage({ ...searchForm.value, ...page }).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.data.records |
| | | ttotal.value = res.data.total |
| | | total.value = res.data.total |
| | | console.log('tableData:', tableData.value) |
| | | }).catch(() => { |
| | | tableLoading.value = false |
| | | }) |
| | |
| | | } |
| | | return null; // 没有找到节点,返回null |
| | | }; |
| | | |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | // const handleSelectionChange = (selection) => { |
| | | |
| | | // 加载规格型号列表 |
| | | const loadProductModels = async (productId) => { |
| | |
| | | } |
| | | } else { |
| | | // 编辑时填充表单数据 |
| | | form.value = { ...row , |
| | | form.value = { |
| | | ...row, |
| | | supplierId: row.supplierId, |
| | | productId: row.productId, |
| | | productModelId: row.productModelId, |
| | |
| | | proxy.$modal.msg("已取消") |
| | | }) |
| | | } |
| | | |
| | | // 获取当前日期并格式化为 YYYY-MM-DD |
| | | function getCurrentDate() { |
| | | const today = new Date(); |
| | |
| | | onMounted(() => { |
| | | getList() |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |