lishenao
9 天以前 4d97a259f3069f9b18d87ac3fab710618f2c6087
库存管理数据修改
已修改2个文件
52 ■■■■ 文件已修改
src/views/inventoryManagement/dispatchLog/index.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/dispatchLog/index.vue
@@ -73,33 +73,24 @@
          show-overflow-tooltip
        />
        <el-table-column
          label="含税单价"
          prop="taxInclusiveUnitPrice"
          label="含税单价(元)"
          prop="entryDate"
          width="100"
          show-overflow-tooltip
        />
        <el-table-column
          label="含税总价"
          prop="taxInclusiveTotalPrice"
          label="含税总价(元)"
          prop="executionDate"
          width="100"
          show-overflow-tooltip
        />
        <el-table-column
          label="税率"
          prop="taxRate"
          label="税率(%)"
          prop="executionDate"
          width="100"
          show-overflow-tooltip
        />
        <el-table-column
          label="不含税总价"
          prop="taxExclusiveTotalPrice"
          width="100"
          label="不含税总价(元)"
          prop="executionDate"
          width="180"
@@ -148,24 +139,16 @@
import { userListNoPage } from "@/api/system/user.js";
import {
  getStockOutPage,
  addStockOut,
  updateStockOut,
  delStockOut,
  exportStockOut,
  getStockManageById
} from "@/api/inventoryManagement/stockOut.js";
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const tableData = ref([]);
// const productData = ref([]);
const selectedRows = ref([]);
const userList = ref([]);
// const customerOption = ref([]);
const tableLoading = ref(false);
const supplierList = ref([])
const productList = ref([])
const productModelList = ref([])
const page = reactive({
  current: 1,
  size: 100,
@@ -199,12 +182,6 @@
    inboundBatch: '',
    inboundQuantity: ''
  },
  rules: {
    supplierId: [{ required: true, message: '请选择供应商', trigger: 'change' }],
    productRecordid: [{ required: true, message: '请选择产品', trigger: 'change' }],
    inboundTime: [{ required: true, message: '请选择入库时间', trigger: 'change' }],
    inboundQuantity: [{ required: true, message: '请输入入库数量', trigger: 'blur' }]
  },
});
const { searchForm } = toRefs(data);
@@ -234,20 +211,7 @@
      tableLoading.value = false;
    });
};
// const findNodeById = (nodes, productId) => {
//   for (let i = 0; i < nodes.length; i++) {
//     if (nodes[i].value === productId) {
//       return nodes[i].label; // 找到节点,返回该节点
//     }
//     if (nodes[i].children && nodes[i].children.length > 0) {
//       const foundNode = findNodeById(nodes[i].children, productId);
//       if (foundNode) {
//         return foundNode.label; // 在子节点中找到,返回该节点
//       }
//     }
//   }
//   return null; // 没有找到节点,返回null
// };
// 表格选择数据
const handleSelectionChange = (selection) => {
  // 过滤掉子数据
@@ -279,6 +243,7 @@
      proxy.$modal.msg("已取消");
    });
};
// 删除
const handleDelete = () => {
  let ids = [];
src/views/inventoryManagement/receiptManagement/index.vue
@@ -190,17 +190,20 @@
  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
  })
@@ -242,8 +245,9 @@
  }
  return null; // 没有找到节点,返回null
};
// 表格选择数据
const handleSelectionChange = (selection) => {
// const handleSelectionChange = (selection) => {
// 加载规格型号列表
const loadProductModels = async (productId) => {
@@ -363,7 +367,8 @@
    }
  } else {
    // 编辑时填充表单数据
    form.value = { ...row ,
      form.value = {
        ...row,
      supplierId: row.supplierId,
      productId: row.productId,
      productModelId: row.productModelId,
@@ -463,6 +468,7 @@
    proxy.$modal.msg("已取消")
  })
}
// 获取当前日期并格式化为 YYYY-MM-DD
function getCurrentDate() {
  const today = new Date();
@@ -483,6 +489,7 @@
onMounted(() => {
  getList()
})
}
</script>
<style scoped lang="scss"></style>