曹睿
2025-04-23 8a09b751a8be8c4ed376f42e7f64e0794001e06a
test: 绞线新城测试
已修改5个文件
140 ■■■■■ 文件已修改
src/pages/production/components/ProductionCard.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/plate/form.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/plate/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/steelCore/form.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/steelCore/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/components/ProductionCard.vue
@@ -4,7 +4,7 @@
      <view class="flex justify-between w-full h-[20px]">
        <view class="text-[#646874] pl-1">{{ item.label }}</view>
        <view class="font-medium pr-1" :style="{ color: item.color ?? color }">
          {{ value[item.prop] }} {{ item.unit }}
          {{ value[item.prop] }} {{ value[item.unitProp] }} {{ item.unit }}
        </view>
      </view>
    </wd-col>
src/pages/production/twist/receive/plate/form.vue
@@ -2,39 +2,67 @@
  <wd-form ref="form" :model="model" class="relative form_box">
    <wd-cell-group :border="true">
      <wd-input
        v-model="model.plateType"
        v-model="model.diskMaterial"
        label="盘具类型"
        label-width="100px"
        prop="plateType"
        prop="diskMaterial"
        clearable
        placeholder="请输入盘具类型"
      />
      <wd-input
        v-model="model.length"
        v-model="model.model"
        label="尺寸"
        label-width="100px"
        prop="length"
        prop="model"
        clearable
        placeholder="请输入尺寸"
      />
      <wd-input
        v-model="model.weigth"
        label="重量"
        v-model="model.amount"
        label="数量"
        label-width="100px"
        prop="weigth"
        prop="amount"
        clearable
        placeholder="请输入重量"
        placeholder="请输入数量"
      />
      <wd-input
        v-model="model.supplier"
        label="厂家"
        label-width="100px"
        prop="supplier"
        clearable
        placeholder="请输入厂家"
      />
    </wd-cell-group>
    <wd-toast />
  </wd-form>
</template>
<script setup lang="ts">
import useFormData from "@/hooks/useFormData";
import TwistApi from "@/api/product/twist";
import { useToast } from "wot-design-uni";
const emits = defineEmits(["refresh"]);
const toast = useToast();
const { form: model } = useFormData({
  plateType: undefined, // 盘具类型
  length: undefined, // 尺寸
  weigth: undefined, // 重量
  diskMaterial: undefined, // 盘具类型
  model: undefined, // 尺寸
  amount: undefined, // 数量
  supplier: undefined,
});
const submit = async () => {
  const { code } = await TwistApi.addStrandedWireDish([model]);
  if (code == 200) {
    toast.success("新增成功");
    emits("refresh");
    return true;
  }
};
defineExpose({
  submit,
});
</script>
<style lang="scss" scoped>
src/pages/production/twist/receive/plate/index.vue
@@ -15,7 +15,7 @@
          <view class="flex justify-between">
            <view>
              <wd-icon name="a-rootlist" color="#0D867F"></wd-icon>
              <text class="text-[#252525] ml-2 font-medium">铁木盘</text>
              <text class="text-[#252525] ml-2 font-medium">{{ item.diskMaterial }}</text>
            </view>
            <view class="text-[#A8A8A8]" @click="toEdit">编辑</view>
          </view>
@@ -29,7 +29,7 @@
      <wd-button type="text" @click="cancel">取消</wd-button>
      <wd-button type="text" @click="submit">确定</wd-button>
    </view>
    <PlateForm />
    <PlateForm ref="plateFormRef" @refresh="reloadList" />
  </wd-popup>
  <wd-toast />
</template>
@@ -45,6 +45,7 @@
const paramsId = ref();
const pagingRef = ref();
const plateFormRef = ref();
const toast = useToast();
const dialog = reactive({
  visible: false,
@@ -61,6 +62,16 @@
    prop: "weight",
    unit: "kg",
  },
  {
    label: "数量",
    prop: "amount",
  },
  {},
  {
    label: "厂家",
    prop: "supplier",
    span: 14,
  },
]);
const toEdit = () => {
@@ -73,9 +84,9 @@
  dialog.visible = true;
};
const submit = () => {
const submit = async () => {
  toast.show("提交");
  dialog.visible = false;
  dialog.visible = !(await plateFormRef.value.submit());
};
const cancel = () => {
@@ -83,6 +94,10 @@
  dialog.visible = false;
};
const reloadList = () => {
  pagingRef.value.refresh();
};
const getList = async () => {
  const { code, data } = await ManageApi.getStrandedWireDish({
    wireId: paramsId.value,
src/pages/production/twist/receive/steelCore/form.vue
@@ -2,36 +2,28 @@
  <wd-form ref="form" :model="model" class="relative form_box">
    <wd-cell-group :border="true">
      <wd-input
        v-model="model.steelCoreName"
        label="钢芯名称"
        v-model="model.model"
        label="规格型号"
        label-width="100px"
        prop="steelCoreName"
        prop="model"
        clearable
        placeholder="请输入钢芯名称"
        placeholder="请输入规格型号"
      />
      <wd-input
        v-model="model.plateNo"
        label="盘号"
        v-model="model.monofilamentNumber"
        label="样品编号"
        label-width="100px"
        prop="plateNo"
        prop="monofilamentNumber"
        clearable
        placeholder="请输入盘号"
      />
      <wd-input
        v-model="model.length"
        label="长度"
        v-model="model.amount"
        label="数量"
        label-width="100px"
        prop="length"
        prop="amount"
        clearable
        placeholder="请输入长度"
      />
      <wd-input
        v-model="model.weight"
        label="重量"
        label-width="100px"
        prop="weight"
        clearable
        placeholder="请输入重量"
      />
      <wd-input
        v-model="model.manufacturers"
@@ -49,10 +41,9 @@
import useFormData from "@/hooks/useFormData";
const { form: model } = useFormData({
  steelCoreName: undefined, // 钢芯名称
  plateNo: undefined, // 盘号
  length: undefined, // 长度
  weight: undefined, // 重量
  model: undefined, // 规格型号
  monofilamentNumber: undefined, // 样品编号
  amount: undefined, // 数量
  manufacturers: undefined, // 厂家
});
</script>
src/pages/production/twist/receive/steelCore/index.vue
@@ -15,12 +15,12 @@
          <view class="flex justify-between">
            <view>
              <wd-icon name="a-rootlist" color="#0D867F"></wd-icon>
              <text class="text-[#252525] ml-2 font-medium">JX28201021-1</text>
              <text class="text-[#252525] ml-2 font-medium">{{ item.model }}</text>
            </view>
            <view class="text-[#A8A8A8]" @click="toEdit">编辑</view>
          </view>
        </template>
        <ProductionCard :data="cardAttr" color="#0D867F" />
        <ProductionCard :data="cardAttr" :value="item" color="#0D867F" />
      </wd-card>
    </z-paging>
  </view>
@@ -29,7 +29,7 @@
      <wd-button type="text" @click="cancel">取消</wd-button>
      <wd-button type="text" @click="submit">确定</wd-button>
    </view>
    <PlateForm />
    <SteelCore ref="steelCoreRef" />
  </wd-popup>
  <wd-toast />
</template>
@@ -38,13 +38,14 @@
import CardTitle from "@/components/card-title/index.vue";
import ProductionCard from "../../../components/ProductionCard.vue";
import { useToast } from "wot-design-uni";
import PlateForm from "./form.vue";
import SteelCore from "./form.vue";
import { onLoad } from "@dcloudio/uni-app";
import ManageApi from "@/api/product/manage";
import zPaging from "@/components/z-paging/z-paging.vue";
const paramsId = ref();
const pagingRef = ref();
const steelCoreRef = ref();
const toast = useToast();
const dialog = reactive({
  visible: false,
@@ -53,24 +54,17 @@
const cardAttr = ref<any[]>([
  {
    label: "盘号",
    value: "1902101",
    label: "样品编号",
    prop: "monofilamentNumber",
  },
  {
    label: "长度",
    value: "46kg",
  },
  {
    label: "重量",
    value: "10kg",
  },
  {
    label: undefined,
    value: undefined,
    label: "数量",
    prop: "amount",
    unitProp: "unit",
  },
  {
    label: "厂家",
    value: "江苏省南通市芯导数字厂",
    prop: "supplier",
    span: 16,
  },
]);
@@ -98,7 +92,7 @@
const getList = async () => {
  const { code, data } = await ManageApi.getStrandedWireDish({
    wireId: paramsId.value,
    type: "盘具",
    type: "钢芯",
  });
  if (code == 200) {
    pagingRef.value.complete(data);