chengxiangling
2025-05-16 af1c9e588f1de0240390648f9bb56aa486870aff
src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -8,15 +8,14 @@
      v-show="showSearch"
      label-position="left"
    >
      <el-row type="flex" justify="left">
        <el-col :span="12">
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item
            :label-width="locale == 'zh' ? '80px' : '160px'"
            :style="{ width: '100%'  }"
            :label="$t('plan.query.workOrderNo')"
            prop="workOrderNo"
          >
            <el-input
              :style="{ width: '280px' }"
              v-model="queryParams.workOrderNo"
              :placeholder="`${$t('common.common.placeholder')}${$t(
                'plan.query.workOrderNo'
@@ -26,14 +25,13 @@
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
        <el-col :span="6">
          <el-form-item
            :label-width="locale == 'zh' ? '100px' : '200px'"
            :style="{ width: '100%'  }"
            :label="$t('plan.query.requireTraceID')"
            prop="requireTrackId"
          >
            <el-input
              :style="{ width: '280px' }"
              v-model="queryParams.requireTrackId"
              :placeholder="`${$t('common.common.placeholder')}${$t(
                'plan.query.requireTraceID'
@@ -43,16 +41,13 @@
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex" justify="left">
        <el-col :span="12">
        <el-col :span="6">
          <el-form-item
            :label-width="locale == 'zh' ? '80px' : '160px'"
            :style="{ width: '100%'  }"
            :label="$t('plan.query.itemNumber')"
            prop="mainPartNumber"
          >
            <el-input
              :style="{ width: '280px' }"
              v-model="queryParams.mainPartNumber"
              :placeholder="`${$t('common.common.placeholder')}${$t(
                'plan.query.itemNumber'
@@ -62,25 +57,15 @@
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
        <el-col :span="6">
          <el-form-item
            :label-width="locale == 'zh' ? '100px' : '200px'"
            :style="{ width: '100%'  }"
            :label="$t('plan.table.delayRiskIdentification')"
            prop="hasDelayRisk"
          >
            <!-- <el-input
          :style="{ width: locale == 'zh' ? '200px' : '280px' }"
          v-model="queryParams.hasDelayRisk"
          :placeholder="`${$t('common.common.placeholder')}${$t(
            'plan.table.delayRiskIdentification'
          )}`"
          clearable
          @keyup.enter="handleQuery"
        /> -->
            <el-select
              clearable
              v-model="queryParams.hasDelayRisk"
              style="width: 280px"
            >
              <el-option
                v-for="item in delayRiskOptions"
@@ -89,26 +74,6 @@
                :value="item.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col
          :span="24"
          style="
            display: flex;
            justify-content: flex-end;
            align-item: center;
            text-align: right;
          "
        >
          <el-form-item class="column-with-margin">
            <el-button type="primary" icon="Search" @click="handleQuery">{{
              $t("common.common.query")
            }}</el-button>
            <el-button icon="Refresh" @click="resetQuery">{{
              $t("common.common.reset")
            }}</el-button>
          </el-form-item>
        </el-col>
      </el-row>
@@ -139,7 +104,8 @@
      </el-col>
      <right-toolbar
        v-model:showSearch="showSearch"
        @queryTable="getList"
        @queryTable="handleQuery"
        @resetTable="resetQuery"
      ></right-toolbar>
    </el-row>
    <HxlhTable
@@ -155,6 +121,13 @@
      @on-checkbox="handleCheckboxChange"
    >
      <template #buttons="{ row }">
        <el-button
          type="primary"
          link
          @click="handleCheckLevels(row)"
          v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
          >{{ $t("plan.btns.viewUpperLowerLevels") }}</el-button
        >
        <el-button
          type="primary"
          link
@@ -255,6 +228,30 @@
        </span>
      </template>
    </el-dialog>
    <!-- 查看上下阶 -->
    <el-dialog
      :title="$t('plan.title.viewUpperLowerLevels')"
      v-model="openUpperLowerDialog"
      width="85%"
      style="height:90vh; overflow: hidden"
      append-to-body
    >
      <HxlhTable
        style="width: 100%"
        :columns="subUpAndDownGridOptions"
        :data="subUpAndDownList"
        :loading="loadingSubUpAndDown"
        :height="heightSub"
      >
      </HxlhTable>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="openUpperLowerDialog = false">{{
            $t("common.common.close")
          }}</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
@@ -266,6 +263,7 @@
import {
  metalOrderManageList,
  metalOrderManageSubList,
  metalOrderManageUpAndDownList,
  generatorPlanList,
  planDateList,
} from "@/api/mainPlan/metalOrderManage.js";
@@ -281,10 +279,13 @@
const radio = ref(1);
const customicDate = ref("");
const openDialog = ref(false);
const openUpperLowerDialog = ref(false);
const openBatchDialog = ref(false);
const subGridOptions = ref([]);
const subUpAndDownGridOptions = ref([]);
const subUpdateGridOptions = ref([]);
const subUpdateCustomGridOptions = ref([]);
const subUpAndDownList = ref([]);
const subList = ref([]);
const subUpdateList = ref([]);
// const tableRef = ref();
@@ -292,6 +293,7 @@
const loading = ref(false);
const loadingUpdateDate = ref(false);
const loadingGenerateList = ref(false);
const loadingSubUpAndDown = ref(false);
const loadingSub = ref(false);
const showSearch = ref(true);
const ids = ref([]);
@@ -317,7 +319,7 @@
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
const height = ref(document.documentElement.clientHeight - 320 + "px;");
const height = ref(document.documentElement.clientHeight - 220 + "px;");
const heightSub = ref(document.documentElement.clientHeight - 200 + "px;");
const heightSubUpdate = ref(document.documentElement.clientHeight - 270 + "px;");
// 表格配置-列表
@@ -352,25 +354,25 @@
      {
        title: t("basic.table.requirementTraceabilityID"),
        field: "requireTrackId",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.workOrderNo"),
        field: "workOrderNo",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("basic.table.matchQuantity"),
        field: "deductionAmount",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("basic.table.workOrderType"),
        field: "workOrderType",
        width: 200,
        width: "auto",
        align: "center",
        formatter: ({ cellValue, row, column }) => {
          if (cellValue) {
@@ -385,31 +387,31 @@
      {
        title: t("plan.table.itemNumber"),
        field: "mainPartNumber",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.mainPartDrawingNumber"),
        field: "mainPartDrawingNumber",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("basic.table.mainCustomer"),
        field: "customer",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.productionQuantity"),
        field: "productionQuantity",
        width: 100,
        width: "auto",
        align: "center",
      },
      {
        title: t("basic.table.applicableFactories"),
        field: "applicableFactories",
        width: 200,
        width: 100,
        align: "center",
        formatter: ({ cellValue, row, column }) => {
          if (cellValue) {
@@ -424,31 +426,31 @@
      {
        title: t("plan.table.productionBase"),
        field: "productionBase",
        width: 100,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "planStartDay",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.planEndDayDate"),
        field: "planEndDay",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.workorderCreationTime"),
        field: "orderCreateTime",
        width: 200,
        width: "auto",
        align: "center",
      },
      {
        title: t("plan.table.mismatchedProductionQuantity"),
        field: "unmatchedQuantity",
        width: 100,
        width: "auto",
        align: "center",
      },
      {
@@ -468,7 +470,7 @@
      },
      {
        title: t("common.common.require"),
        width: 150,
        width: "auto",
        fixed: "right",
        slots: { default: "buttons" },
        align: "center",
@@ -608,6 +610,38 @@
        },
      },
    ];
    subUpAndDownGridOptions.value = [
      {
        title: t("plan.table.documentNumber"),
        field: "documentNumber",
        align: "center",
      },
      {
        title: t("plan.table.level"),
        field: "requirementType",
        align: "center",
      },
      {
        title: t("plan.table.itemNumber"),
        field: "itemNumber",
        align: "center",
      },
      {
        title: t("plan.table.planStartDay"),
        field: "planStartDay",
        align: "center",
      },
      {
        title: t("plan.table.planEndDay"),
        field: "planEndDay",
        align: "center",
      },
      {
        title: t("plan.table.productionQuantity"),
        field: "productionQuantity",
        align: "center",
      },
    ]
    subUpdateGridOptions.value = [
      // {
      //   title: t("basic.table.requirementID"),
@@ -779,6 +813,17 @@
      loadingSub.value = false;
    });
}
function handleCheckLevels(row) {
  openUpperLowerDialog.value = true;
  loadingSubUpAndDown.value = true;
  metalOrderManageUpAndDownList({requireId: row.requireId}).then((res) => {
    console.log(res,"metalOrderManageUpAndDownList");
    subUpAndDownList.value = res.rows;
    loadingSubUpAndDown.value = false;
  }).catch(() => {
    loadingSubUpAndDown.value = false;
  });
}
async function hanleBatchUpdateDate() {
  loadingUpdateDate.value = true;
  let planIds = subUpdateList.value.map((item) => {