gongchunyi
昨天 d78a83092074fb7c6231f09607092419bc8a6449
Merge branch 'dev_pro_河南鹤壁' of http://114.132.189.42:9002/r/product-inventory-management into dev_pro_河南鹤壁
已修改4个文件
60 ■■■■ 文件已修改
src/components/PIMTable/PIMTable.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/workOrderManagement/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/rawMaterialInspection/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PIMTable/PIMTable.vue
@@ -120,6 +120,7 @@
            <el-button v-show="o.type != 'upload'"
                       v-if="o.showHide ? o.showHide(scope.row) : true"
                       :disabled="isOperationDisabled(o, scope.row)"
                       :loading="isOperationLoading(o, scope.row)"
                       :plain="o.plain"
                       type="primary"
                       :style="{
@@ -373,6 +374,13 @@
      : !!operation.disabled;
  };
  const isOperationLoading = (operation, row) => {
    if (!operation?.loading) return false;
    return typeof operation.loading === "function"
      ? !!operation.loading(row)
      : !!operation.loading;
  };
  const parseHexToRgb = hex => {
    const normalized = String(hex || "")
      .trim()
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -295,8 +295,10 @@
                v-if="operationType === 'approval'">
        <div class="dialog-footer">
          <el-button type="primary"
                     :loading="submitLoading"
                     @click="submitForm(2)">不通过</el-button>
          <el-button type="primary"
                     :loading="submitLoading"
                     @click="submitForm(1)">通过</el-button>
          <el-button @click="closeDia">取消</el-button>
        </div>
@@ -353,6 +355,7 @@
  const deliveryLoading = ref(false);
  const currentDelivery = ref({});
  const deliveryProductList = ref([]);
  const submitLoading = ref(false);
  const isQuotationApproval = computed(() => Number(props.approveType) === 6);
  const isPurchaseApproval = computed(() => Number(props.approveType) === 5);
  const isDeliveryApproval = computed(() => Number(props.approveType) === 7);
@@ -581,9 +584,14 @@
    // 判断是否为最后一步
    const isLast =
      activities.value.findIndex(a => a.isShen) === activities.value.length - 1;
    updateApproveNode({ ...currentActivity, isLast }).then(() => {
    submitLoading.value = true;
    updateApproveNode({ ...currentActivity, isLast })
      .then(() => {
      proxy.$modal.msgSuccess("提交成功");
      closeDia();
      })
      .finally(() => {
        submitLoading.value = false;
    });
  };
  // 关闭弹框
@@ -594,6 +602,7 @@
    currentQuotation.value = {};
    purchaseLoading.value = false;
    currentPurchase.value = {};
    submitLoading.value = false;
    emit("close");
  };
  defineExpose({
src/views/productionManagement/workOrderManagement/index.vue
@@ -133,7 +133,7 @@
          <el-input v-model.number="reportForm.quantity"
                    type="number"
                    min="0"
                    step="0.1"
                    step="0.0001"
                    style="width: 300px"
                    placeholder="请输入生产合格数量"
                    @input="handleQuantityInput" />
@@ -143,7 +143,7 @@
          <el-input v-model.number="reportForm.scrapQty"
                    type="number"
                    min="0"
                    step="0.1"
                    step="0.0001"
                    style="width: 300px"
                    placeholder="请输入报废数量"
                    @input="handleScrapQtyInput" />
@@ -529,6 +529,12 @@
    if (n >= 100) return 100;
    return Math.round(n);
  };
  const subtractQuantity = (minuend, subtrahend, precision = 4) => {
    const factor = 10 ** precision;
    const a = Math.round((Number(minuend) || 0) * factor);
    const b = Math.round((Number(subtrahend) || 0) * factor);
    return Math.max(0, (a - b) / factor);
  };
  const progressColor = percentage => {
    const p = toProgressPercentage(percentage);
    if (p < 30) return "#f56c6c";
@@ -651,10 +657,10 @@
      }
    }
    currentReportRowData.value = row;
    const planQuantity = Number(row.planQuantity || 0);
    const completeQuantity = Number(row.completeQuantity || 0);
    const remainingQuantity = Math.max(0, planQuantity - completeQuantity);
    reportForm.planQuantity = remainingQuantity;
    reportForm.planQuantity = subtractQuantity(
      row.planQuantity,
      row.completeQuantity
    );
    reportForm.quantity =
      row.quantity !== undefined && row.quantity !== null ? row.quantity : null;
    reportForm.productProcessRouteItemId = row.productProcessRouteItemId;
src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -227,6 +227,7 @@
        clickFun: (row) => {
          submit(row.id);
        },
        loading: (row) => submitLoadingId.value === row.id,
                disabled: (row) => {
                    // 已提交则禁用
                    if (row.inspectState == 1) return true;
@@ -257,6 +258,7 @@
        clickFun: (row) => {
          downLoadFile(row);
        },
        loading: (row) => downloadLoadingId.value === row.id,
      },
    ],
  },
@@ -264,6 +266,8 @@
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
const submitLoadingId = ref(null);
const downloadLoadingId = ref(null);
const userList = ref([]);
const dialogFormVisible = ref(false);
const form = ref({
@@ -369,12 +373,17 @@
      });
};
// 提价
// 提交
const submit = async (id) => {
  const res = await submitQualityInspect({id: id})
  submitLoadingId.value = id;
  try {
    const res = await submitQualityInspect({ id });
  if (res.code === 200) {
    proxy.$modal.msgSuccess("提交成功");
    getList();
    }
  } finally {
    submitLoadingId.value = null;
  }
}
@@ -405,8 +414,10 @@
  dialogFormVisible.value = true
}
const downLoadFile = (row) => {
  downloadQualityInspect({ id: row.id }).then((blobData) => {
const downLoadFile = async (row) => {
  downloadLoadingId.value = row.id;
  try {
    const blobData = await downloadQualityInspect({ id: row.id });
    const blob = new Blob([blobData], {
      type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    })
@@ -420,7 +431,9 @@
    document.body.removeChild(link)
    window.URL.revokeObjectURL(downloadUrl)
  })
  } finally {
    downloadLoadingId.value = null;
  }
};
onMounted(() => {