spring
2025-09-26 a918d3676da9024c668c02e4a328d67285c7eac3
src/pages/production/twist/report/index.vue
@@ -1,23 +1,26 @@
<template>
  <view class="page pt-2">
    <z-paging ref="pagingRef" v-model="twistReportList" class="list" @query="getTwistReportList">
  <view class="list">
    <z-paging ref="pagingRef" v-model="twistReportList" :fixed="false" @query="getTwistReportList">
      <template #top>
        <CardTitle title="报工信息" :hideAction="true" :full="false" @action="addReport" />
      </template>
      <wd-card v-for="(item, index) in twistReportList" type="rectangle" custom-class="round">
      <wd-card v-for="item in twistReportList" :key="item.id" type="rectangle" custom-class="round">
        <template #title>
          <view class="flex justify-between">
            <view>
              <wd-icon name="user" color="#0D867F"></wd-icon>
              <text class="text-[#0D867F] ml-2 font-medium">生产人</text>
              <text class="text-[#333333] ml-2">方兆玉</text>
              <text class="text-[#333333] ml-2">{{ item.productUser }}</text>
            </view>
            <view class="text-[#A8A8A8]" @click="toEdit">编辑</view>
          </view>
        </template>
        <ProductionCard :data="cardAttr" :value="item" />
        <template #footer>
          <wd-button size="small" plain @click="toCheck">自检</wd-button>
          <wd-button size="small" plain @click="toAttachment(item)" style="margin-right: 10px">
            附件
          </wd-button>
          <wd-button size="small" plain @click="toCheck(item.id)">自检</wd-button>
        </template>
      </wd-card>
    </z-paging>
@@ -27,7 +30,7 @@
        <wd-button type="text" @click="cancel">取消</wd-button>
        <wd-button type="text" @click="submit">确定</wd-button>
      </view>
      <TwistForm />
      <TwistForm ref="twistFormRef" />
    </wd-popup>
    <wd-toast />
  </view>
@@ -42,6 +45,7 @@
const pagingRef = ref();
const paramsId = ref();
const twistFormRef = ref();
const toast = useToast();
const dialog = reactive({
  visible: false,
@@ -61,20 +65,20 @@
    prop: "monofilamentNumber",
  },
  {
    label: "规格型号",
    prop: "model",
    label: "实际重量(kg)",
    prop: "actuallyWeight",
  },
  {
    label: "盘长(m)",
    prop: "ontLength",
    prop: "oneLength",
  },
  {
    label: "理论重量(kg)",
    prop: "theoryWeight",
  },
  {
    label: "实际重量(kg)",
    prop: "actuallyWeight",
    label: "规格型号",
    prop: "model",
  },
]);
@@ -91,8 +95,7 @@
};
const submit = () => {
  toast.show("提交");
  dialog.visible = false;
  dialog.visible = twistFormRef.value.submit();
};
const cancel = () => {
@@ -100,11 +103,17 @@
  dialog.visible = false;
};
const toCheck = () => {
const toAttachment = (item: any) => {
  uni.navigateTo({
    url: "/pages/production/twist/selfInspect/index",
    url: "/pages/production/twist/attachment/index",
    success: () => {
      // 页面跳转成功后发送事件传递数据
      uni.$emit("detailData", item);
    },
  });
};
// 获取拉丝报工列表
const getTwistReportList = async () => {
@@ -121,16 +130,14 @@
</script>
<style lang="scss" scoped>
.page {
.list {
  height: calc(100vh - 80px);
  padding: 12px;
  background: #f3f9f8;
  .list {
    margin: 12px;
    :deep() {
      .round {
        border-radius: 4px;
      }
  :deep() {
    .round {
      border-radius: 4px;
    }
  }
}