张诺
6 小时以前 4743d5644fb9c1a4d4a8038331526a0890a453e9
feat: 在工艺路线相关界面添加开数、工艺正数和加放数字段

- 在产品结构详情和工艺路线项列表/表单中新增开数、工艺正数、加放数字段
- 调整生产订单中绑定/查看工艺路线的显示条件,基于 printId 而非 processRouteCode
- 修复绑定工艺路线弹窗中切料数量字段的 placeholder 文本错误
- 在工作订单用户选择器中,将“任意用户”选项与团队用户列表分离显示
- 优化绑定工艺路线弹窗中切料图示的显示逻辑和表单字段默认值
已修改6个文件
84 ■■■■ 文件已修改
src/views/productionManagement/processRoute/processRouteItem/index.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productStructure/Detail/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionOrder/BindRouteDialog.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionOrder/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrder/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -81,6 +81,9 @@
      </el-table-column>
      <el-table-column label="产品名称" prop="productName" min-width="160" />
      <el-table-column label="规格名称" prop="model" min-width="140" />
      <el-table-column label="开数" prop="processRouteOpenNum" min-width="140" />
      <el-table-column label="工艺正数" prop="processRouteNum" min-width="140" />
      <el-table-column label="加放数" prop="processRouteAddNum" min-width="140" />
      <el-table-column label="单位" prop="unit" width="100" />
      <el-table-column label="是否质检" prop="isQuality" width="100">
        <template #default="scope">
@@ -186,7 +189,6 @@
              : '选择产品' }}
          </el-button>
        </el-form-item>
        <el-form-item label="单位" prop="unit">
          <el-input 
              v-model="form.unit" 
@@ -271,6 +273,10 @@
  productModelId: undefined,
  productName: "",
  model: "",
  processName: "",
  openCount: "",
  processPositive: "",
  allowanceQty: "",
  unit: "",
  isQuality: false,
});
@@ -329,7 +335,12 @@
    productName: route.query.productName || '',
    model: route.query.model || '',
    bomNo: route.query.bomNo || '',
    description: route.query.description || ''
    description: route.query.description || '',
    processRouteAddNum:route.query.processRouteAddNum || '',
    processRouteNum:route.query.processRouteNum || '',
    processRouteName:route.query.processRouteName || '',
    processRouteOpenNum:route.query.processRouteOpenNum || '',
  };
};
@@ -350,6 +361,10 @@
    productModelId: row.productModelId,
    productName: row.productName || "",
    model: row.model || "",
    processName: row.processName || "",
    openCount: row.openCount || "",
    processPositive: row.processPositive || "",
    allowanceQty: row.allowanceQty || "",
    unit: row.unit || "",
    isQuality: row.isQuality,
  };
@@ -414,6 +429,10 @@
              productRouteId: routeId.value,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              processName: form.value.processName,
              openCount: form.value.openCount,
              processPositive: form.value.processPositive,
              allowanceQty: form.value.allowanceQty,
              isQuality: form.value.isQuality,
              dragSort,
            })
@@ -421,6 +440,10 @@
              routeId: routeId.value,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              processName: form.value.processName,
              openCount: form.value.openCount,
              processPositive: form.value.processPositive,
              allowanceQty: form.value.allowanceQty,
              isQuality: form.value.isQuality,
              dragSort,
            });
@@ -446,6 +469,10 @@
              id: form.value.id,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              processName: form.value.processName,
              openCount: form.value.openCount,
              processPositive: form.value.processPositive,
              allowanceQty: form.value.allowanceQty,
              isQuality: form.value.isQuality,
            })
          : addOrUpdateProcessRouteItem({
@@ -453,6 +480,10 @@
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              id: form.value.id,
              processName: form.value.processName,
              openCount: form.value.openCount,
              processPositive: form.value.processPositive,
              allowanceQty: form.value.allowanceQty,
              isQuality: form.value.isQuality,
            });
@@ -482,7 +513,12 @@
    productModelId: undefined,
    productName: "",
    model: "",
    processName: "",
    openCount: "",
    processPositive: "",
    allowanceQty: "",
    unit: "",
    isQuality: false,
  };
  formRef.value?.resetFields();
};
src/views/productionManagement/productStructure/Detail/index.vue
@@ -78,6 +78,9 @@
                  </el-form-item>
                </template>
              </el-table-column>
              <el-table-column label="开数" prop="processRouteOpenNum"/>
              <el-table-column label="工艺正数" prop="processRouteNum"/>
              <el-table-column label="加放数" prop="processRouteAddNum"/>
              <el-table-column prop="unitQuantity"
                               label="单位用量">
                <template #default="{ row, $index }">
src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue
@@ -16,7 +16,7 @@
            :row-class-name="tableRowClassName"
        >
          <el-table-column label="序号" type="index" width="60" align="center" />
          <el-table-column label="合同号" prop="salesContractNo" width="200" />
          <el-table-column label="订单编号" prop="salesContractNo" width="200" />
          <el-table-column label="客户名称" prop="customerName" width="200" />
          <!-- <el-table-column label="项目名称" prop="projectName" width="250" /> -->
          <el-table-column label="产品大类" prop="productCategory" width="150" />
src/views/productionManagement/productionOrder/BindRouteDialog.vue
@@ -155,9 +155,9 @@
      </el-descriptions-item>
    </el-descriptions>
    <!-- ================= 切料图示 ================= -->
    <div class="section-title" v-if="formData.cuttingFileVo.length > 0">切料图示</div>
    <div class="section-title" v-if="type === 'add' || (type === 'detail' && formData.cuttingFileVo.length > 0)">切料图示</div>
    <ActionFileUpload
    v-if="formData.cuttingFileVo.length > 0"
        v-if="type === 'add' || (type === 'detail' && formData.cuttingFileVo.length > 0)"
        style="width: 50%;float: left;"
        v-model:file-list="formData.cuttingFileVo"
        :action="upload.url"
@@ -171,7 +171,7 @@
        :onDownload="onDownload"
        :onRemove="onRemove"
        :onPreview="onPreview"
        :onView="type === 'detail' ? false : true"
        :onView="type!=='detail'"
        :tip-text="type === 'detail' ? '' : '支持图片(jpg, jpeg, png)格式'"
    />
    <el-image
@@ -192,7 +192,7 @@
        <el-input v-model="formData.cutNum" placeholder="切料尺寸" :disabled="isDetail" />
      </el-descriptions-item>
      <el-descriptions-item label="切料数量" align="center">
        <el-input v-model="formData.cutSize" placeholder="切料尺寸" :disabled="isDetail" />
        <el-input v-model="formData.cutSize" placeholder="切料数量" :disabled="isDetail" />
      </el-descriptions-item>
      <el-descriptions-item label="中盒数量" align="center">
        <el-input v-model="formData.mediumBoxQty" placeholder="中盒数量" :disabled="isDetail" />
@@ -451,6 +451,10 @@
  headers: { Authorization: 'Bearer ' + getToken() }
})
const showCuttingFile = computed(() => {
  return props.type === 'detail' && Array.isArray(formData.cuttingFileVo) && formData.cuttingFileVo.length > 0
})
const filePreviewRef = ref()
const formData = reactive({
  productOrderList:null,
@@ -462,6 +466,7 @@
  no: "",
  productName: "",
  productDescription: "",
  cuttingDiagramCheckout:"",
  clientName: "",
  finishedSize: "",
  cutNum: "",
@@ -484,7 +489,6 @@
  ],
  processContent: [
    {
      id: "1",
      processId: "",
      processName: "",
      mediumBoxQty: "",
@@ -500,7 +504,6 @@
  ],
  materialInfo: [
    {
      id: "1",
      productId: "",
      name: "",
      productModelId: "",
@@ -558,6 +561,7 @@
  no: "",
  productName: "",
  productDescription: "",
  cuttingDiagramCheckout:"平张",
  clientName: "",
  finishedSize: "",
  cutNum: "",
@@ -580,7 +584,6 @@
  ],
  processContent: [
    {
      id: "1",
      processId: "",
      processName: "",
      mediumBoxQty: "",
@@ -596,7 +599,6 @@
  ],
  materialInfo: [
    {
      id: "1",
      productId: "",
      name: "",
      productModelId: "",
@@ -892,7 +894,6 @@
const addProcessRow = () => {
  formData.processContent.push({
    id: Date.now().toString(),
    processId: "",
    processName: "",
    openCount: "",
src/views/productionManagement/productionOrder/index.vue
@@ -218,7 +218,7 @@
        {
          name: "绑定工艺路线",
          type: "text",
          showHide: row => !row.processRouteCode,
          showHide: row => !row.printId,
          clickFun: row => {
            openBindRouteDialog(row);
          },
@@ -226,7 +226,7 @@
        {
          name: "查看工艺路线",
          type: "text",
          showHide: row => row.processRouteCode,
          showHide: row => row.printId,
          clickFun: row => {
            openBindRouteDialog(row,"view");
          },
src/views/productionManagement/workOrder/index.vue
@@ -217,7 +217,7 @@
              style="width: 300px"
          >
            <el-option
                v-for="user in userOptions"
                v-for="user in userTeamOptions"
                :key="user.userId"
                :label="user.nickName"
                :value="{ userId: user.userId, userName: user.nickName }"
@@ -305,6 +305,7 @@
<script setup>
  import { onMounted, ref, nextTick, computed } from "vue";
  import { deepClone } from "@/utils/index.js"
  import { ElMessageBox, ElMessage } from "element-plus";
  import dayjs from "dayjs";
  import {
@@ -544,6 +545,7 @@
  const workOrderFilesRef = ref(null);
  const reportFormRef = ref(null);
  const userOptions = ref([]);
  const userTeamOptions = ref([]);
  const reportForm = reactive({
    planQuantity: 0,
    quantity: null,
@@ -978,12 +980,12 @@
    userListNoPageByTenantId()
      .then(res => {
        if (res.code === 200) {
          userOptions.value = res.data || [];
          console.log(userOptions.value)
          userOptions.value.unshift({
            nickName:"任意用户",
            userId:"-1",
          })
          const list = Array.isArray(res.data) ? res.data : []
          userOptions.value = [
            { nickName: "任意用户", userId: "-1" },
            ...deepClone(list)
          ]
          userTeamOptions.value = deepClone(list)
        }
      })
      .catch(err => {