huminmin
6 小时以前 3b28a3183baf6c4d864405dcfd5d8e7a52a3f046
src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -23,6 +23,14 @@
        </div>
        <div class="info-item">
          <div class="info-label-wrapper">
            <span class="info-label">产品图纸编号</span>
          </div>
          <div class="info-value-wrapper">
            <span class="info-value">{{ routeInfo.drawingNumber || '-' }}</span>
          </div>
        </div>
        <div class="info-item">
          <div class="info-label-wrapper">
            <span class="info-label">规格名称</span>
          </div>
          <div class="info-value-wrapper">
@@ -80,8 +88,14 @@
        </template>
      </el-table-column>
      <el-table-column label="产品名称" prop="productName" min-width="160" />
      <el-table-column label="图纸编号" prop="drawingNumber" min-width="160" />
      <el-table-column label="规格名称" prop="model" min-width="140" />
      <el-table-column label="单位" prop="unit" width="100" />
      <el-table-column label="是否质检" prop="isQuality" width="100">
        <template #default="scope">
          {{scope.row.isQuality ? "是" : "否"}}
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" fixed="right" width="150">
        <template #default="scope">
          <el-button type="primary" link size="small" @click="handleEdit(scope.row)" :disabled="scope.row.isComplete">编辑</el-button>
@@ -126,10 +140,12 @@
          <div class="card-content">
            <div v-if="item.productName" class="product-info">
              <div class="product-name">{{ item.productName }}</div>
              <div class="product-model">{{ item.drawingNumber || '-' }}</div>
              <div v-if="item.model" class="product-model">
                {{ item.model }}
                <!-- <span v-if="item.unit" class="product-unit">{{ item.unit }}</span> -->
              </div>
              <el-tag type="primary" class="product-tag" v-if="item.isQuality">质检</el-tag>
            </div>
            <div v-else class="product-info empty">暂无产品信息</div>
          </div>
@@ -189,6 +205,10 @@
              :disabled="true" 
          />
        </el-form-item>
        <el-form-item label="是否质检" prop="isQuality">
          <el-switch v-model="form.isQuality" :active-value="true" inactive-value="false"/>
        </el-form-item>
      </el-form>
      <template #footer>
@@ -235,6 +255,7 @@
const routeInfo = ref({
  processRouteCode: '',
  productName: '',
  drawingNumber: '',
  model: '',
  bomNo: '',
  description: ''
@@ -262,6 +283,7 @@
  productName: "",
  model: "",
  unit: "",
  isQuality: false,
});
const rules = {
@@ -288,6 +310,7 @@
    .then(res => {
      tableData.value = res.data || [];
      tableLoading.value = false;
      routeInfo.value = tableData.value[0] || {}
      // 列表加载完成后初始化拖拽排序
      nextTick(() => {
        initSortable();
@@ -316,6 +339,7 @@
  routeInfo.value = {
    processRouteCode: route.query.processRouteCode || '',
    productName: route.query.productName || '',
    drawingNumber: route.query.drawingNumber || '',
    model: route.query.model || '',
    bomNo: route.query.bomNo || '',
    description: route.query.description || ''
@@ -340,6 +364,7 @@
    productName: row.productName || "",
    model: row.model || "",
    unit: row.unit || "",
    isQuality: row.isQuality,
  };
  dialogVisible.value = true;
};
@@ -402,12 +427,14 @@
              productRouteId: routeId.value,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              isQuality: form.value.isQuality,
              dragSort,
            })
          : addOrUpdateProcessRouteItem({
              routeId: routeId.value,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              isQuality: form.value.isQuality,
              dragSort,
            });
@@ -432,12 +459,14 @@
              id: form.value.id,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              isQuality: form.value.isQuality,
            })
          : addOrUpdateProcessRouteItem({
              routeId: routeId.value,
              processId: form.value.processId,
              productModelId: form.value.productModelId,
              id: form.value.id,
              isQuality: form.value.isQuality,
            });
        updatePromise
@@ -733,6 +762,10 @@
  color: #409eff;
}
.product-tag {
  margin: 10px 0;
}
.card-footer {
  display: flex;
  justify-content: space-around;