天津建城恒商贸
1.生产订单来源样式修改
2.生产追溯中生产订单号下拉框数据反显错误修改
已修改2个文件
90 ■■■■■ 文件已修改
src/views/productionManagement/productionOrder/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionTraceability/index.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionOrder/index.vue
@@ -125,7 +125,8 @@
    <!-- 来源数据弹窗 -->
    <el-dialog v-model="sourceDataDialogVisible"
               title="来源数据"
               width="1200px">
               width="1200px"
               custom-class="source-data-dialog">
      <div v-if="sourceRowData"
           class="applyno-summary1">
        <div class="summary-item">
@@ -944,6 +945,17 @@
    text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2);
  }
  .source-data-dialog {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    .el-dialog__body {
      overflow-y: auto;
      flex: 1;
    }
  }
  .source-table-container {
    margin-top: 20px;
  }
@@ -952,8 +964,6 @@
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f5f7fa;
    border-radius: 4px;
src/views/productionManagement/productionTraceability/index.vue
@@ -13,7 +13,7 @@
                         filterable
                         remote
                         reserve-keyword
                         placeholder="请输入生产订单号"
                         placeholder="请输入生产订单号搜索"
                         :loading="npsNoLoading"
                         :remote-method="handleNpsNoSearch"
                         @change="handleSearch"
@@ -22,6 +22,18 @@
                           :key="option.id"
                           :label="option.npsNo + '-' + option.productName + '-' + option.model"
                           :value="option.id" />
                <template #footer>
                  <div v-if="npsNoHasMore"
                       class="select-load-more"
                       @click="loadMoreNpsNo">
                    <span v-if="npsNoLoadingMore">加载中...</span>
                    <span v-else>点击加载更多</span>
                  </div>
                  <div v-else-if="npsNoOptions.length > 0"
                       class="select-load-more no-more">
                    没有更多了
                  </div>
                </template>
              </el-select>
            </el-form-item>
          </el-form>
@@ -310,7 +322,11 @@
  });
  const selectedNpsNo = ref(null);
  const npsNoLoading = ref(false);
  const npsNoLoadingMore = ref(false);
  const npsNoOptions = ref([]);
  const npsNoPage = reactive({ current: 1, size: 20, total: 0 });
  const npsNoHasMore = computed(() => npsNoOptions.value.length < npsNoPage.total);
  const npsNoSearchKeyword = ref("");
  // 详情数据
  const rowData = reactive({
@@ -360,21 +376,45 @@
    return "#67c23a";
  };
  // 模拟搜索方法
  const handleNpsNoSearch = async query => {
    npsNoSearchKeyword.value = query || "";
    npsNoPage.current = 1;
    npsNoOptions.value = [];
    npsNoLoading.value = true;
    try {
      const res = await productOrderListPage({
        npsNo: query || "",
        pageNum: 1,
        pageSize: 50,
        current: npsNoPage.current,
        size: npsNoPage.size,
      });
      // 参照 productionOrder/index.vue 的数据结构 res.data.records
      npsNoOptions.value = res.data?.records || res.rows || [];
      const records = res.data?.records || [];
      npsNoOptions.value = records;
      npsNoPage.total = res.data?.total || 0;
    } catch (error) {
      console.error(error);
    } finally {
      npsNoLoading.value = false;
    }
  };
  const loadMoreNpsNo = async () => {
    if (npsNoLoadingMore.value || !npsNoHasMore.value) return;
    npsNoLoadingMore.value = true;
    npsNoPage.current++;
    try {
      const res = await productOrderListPage({
        npsNo: npsNoSearchKeyword.value,
        current: npsNoPage.current,
        size: npsNoPage.size,
      });
      const records = res.data?.records || [];
      npsNoOptions.value = [...npsNoOptions.value, ...records];
      npsNoPage.total = res.data?.total || 0;
    } catch (error) {
      console.error(error);
      npsNoPage.current--;
    } finally {
      npsNoLoadingMore.value = false;
    }
  };
@@ -728,4 +768,26 @@
  .param-detail-list {
    padding: 10px;
  }
  .select-load-more {
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    color: #409eff;
    cursor: pointer;
    border-top: 1px solid #ebeef5;
    &:hover {
      background-color: #f5f7fa;
    }
    &.no-more {
      color: #c0c4cc;
      cursor: default;
      &:hover {
        background-color: transparent;
      }
    }
  }
</style>