曹睿
2025-04-24 5519cbf2e00c7ba4c650a542d98da99978124a30
src/pages/production/wire/backman/index.vue
@@ -1,8 +1,10 @@
<template>
  <view class="page pt-2">
    <CardTitle title="杂工信息" :hideAction="true" @action="addReport" />
    <view class="list">
      <wd-card type="rectangle" custom-class="round">
  <view class="list">
    <z-paging ref="pagingRef" v-model="cardList" :fixed="false" @query="getList">
      <template #top>
        <CardTitle title="杂工信息" :full="false" :hideAction="true" @action="addReport" />
      </template>
      <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round">
        <template #title>
          <view class="flex justify-between">
            <view>
@@ -14,13 +16,13 @@
        </template>
        <ProductionCard :data="cardAttr" color="#0D867F" />
      </wd-card>
    </view>
    </z-paging>
    <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup">
      <view class="action px-3">
        <wd-button type="text" @click="cancel">取消</wd-button>
        <wd-button type="text" @click="submit">确定</wd-button>
      </view>
      <BackmanForm />
      <BackmanForm ref="backmanFormRef" />
    </wd-popup>
    <wd-toast />
  </view>
@@ -31,7 +33,11 @@
import ProductionCard from "../../components/ProductionCard.vue";
import { useToast } from "wot-design-uni";
import BackmanForm from "./form.vue";
import ManageApi from "@/api/product/manage";
const pagingRef = ref();
const backmanFormRef = ref();
const paramsId = ref();
const toast = useToast();
const dialog = reactive({
  visible: false,
@@ -64,6 +70,8 @@
  },
]);
const cardList = ref<any[]>([]);
const toEdit = () => {
  uni.navigateTo({
    url: "/pages/production/wire/backman/edit",
@@ -75,28 +83,36 @@
};
const submit = () => {
  toast.show("提交");
  dialog.visible = false;
  dialog.visible = backmanFormRef.value.submit();
};
const cancel = () => {
  toast.show("取消");
  dialog.visible = false;
};
const getList = async () => {
  const { data } = await ManageApi.getBackmanDetail({
    outPutId: paramsId.value,
    type: "拉丝",
  });
  pagingRef.value.complete(data);
};
onLoad((options: any) => {
  paramsId.value = options.id;
});
</script>
<style lang="scss" scoped>
.page {
.list {
  height: calc(100vh - 120px);
  padding: 12px;
  background: #f3f9f8;
  .list {
    height: calc(100vh - 120px);
    margin: 12px;
    overflow: scroll;
    :deep() {
      .round {
        border-radius: 4px;
      }
  :deep() {
    .round {
      border-radius: 4px;
    }
  }
}