spring
2025-11-19 af4f45eaa2703ecf991bd10f07f6df179f2677d9
src/pages/production/list/index.vue
@@ -36,6 +36,7 @@
const map = reactive({
  deviceModel: "deviceModel",
  model: "model",
  systemNo: "systemNo",
  totalAmount: "totalAmount",
  amount: "amount",
  unAmount: "unAmount",
@@ -50,13 +51,17 @@
    type: String,
    default: "",
  },
  model: {
    type: String,
    default: "",
  },
});
const emits = defineEmits(["ok"]);
const list = ref<any[]>([]);
const toDetail = (id: number, type: string) => {
  toast.show("点击卡片");
  // toast.show("点击卡片");
  if (type == "拉丝") {
    uni.navigateTo({
      url: `/pages/production/detail/wireDetail?id=${id}`,
@@ -69,22 +74,28 @@
};
const getList = async (pageNo: number, pageSize: number) => {
  const { code, data } = await props.api({
  const params: any = {
    userName: userInfo.value.userName,
    state: props.state,
    current: pageNo,
    size: pageSize,
  });
  };
  if (props.model) {
    params.model = props.model;
  }
  const { code, data } = await props.api(params);
  if (code == 200) {
    if (data.type == "绞线") {
      map.deviceModel = "deviceModel";
      map.model = "model";
      map.systemNo = "systemNo";
      map.totalAmount = "totalLength";
      map.amount = "length";
      map.unAmount = "unLength";
    } else if (data.type == "拉丝") {
      map.deviceModel = "deviceModel";
      map.model = "model";
      map.systemNo = "systemNo";
      map.totalAmount = "totalAmount";
      map.amount = "amount";
      map.unAmount = "unAmount";