From 65f86f41dedbbbb7030e2f37ce3e001bbca4923a Mon Sep 17 00:00:00 2001
From: chengxiangling <291105840@qq.com>
Date: 星期四, 15 五月 2025 13:03:25 +0800
Subject: [PATCH] 查询日历带适用工厂
---
src/views/mainPlan/sheetMetalOrderManage/index.vue | 630 ++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 446 insertions(+), 184 deletions(-)
diff --git a/src/views/mainPlan/sheetMetalOrderManage/index.vue b/src/views/mainPlan/sheetMetalOrderManage/index.vue
index 2b9872d..e7118e0 100644
--- a/src/views/mainPlan/sheetMetalOrderManage/index.vue
+++ b/src/views/mainPlan/sheetMetalOrderManage/index.vue
@@ -6,53 +6,66 @@
ref="queryRef"
:inline="true"
v-show="showSearch"
- :label-width="locale == 'zh' ? '110px' : '200px'"
+ label-position="left"
>
- <el-form-item :label="$t('plan.query.workOrderNo')" prop="workOrderNo">
- <el-input
- :style="{ width: locale == 'zh' ? '200px' : '280px' }"
- v-model="queryParams.workOrderNo"
- :placeholder="`${$t('common.common.placeholder')}${$t(
- 'plan.query.workOrderNo'
- )}`"
- clearable
- @keyup.enter="handleQuery"
- />
- </el-form-item>
- <!-- <el-row type="flex" justify="left">
- <el-col :span="5"> -->
- <el-form-item
- :label="$t('plan.query.requireTraceID')"
- prop="requireTraceId"
- >
- <el-input
- :style="{ width: locale == 'zh' ? '200px' : '280px' }"
- v-model="queryParams.requireTraceId"
- :placeholder="`${$t('common.common.placeholder')}${$t(
- 'plan.query.requireTraceID'
- )}`"
- clearable
- @keyup.enter="handleQuery"
- />
- </el-form-item>
- <!-- </el-col>
- <el-col :span="5"> -->
- <el-form-item :label="$t('plan.query.itemNumber')" prop="mainPartNumber">
- <el-input
- :style="{ width: locale == 'zh' ? '200px' : '280px' }"
- v-model="queryParams.mainPartNumber"
- :placeholder="`${$t('common.common.placeholder')}${$t(
- 'plan.query.itemNumber'
- )}`"
- clearable
- @keyup.enter="handleQuery"
- />
- </el-form-item>
- <el-form-item
- :label="$t('plan.table.delayRiskIdentification')"
- prop="hasDelayRisk"
- >
- <el-input
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item
+ :style="{ width: '100%' }"
+ :label="$t('plan.query.workOrderNo')"
+ prop="workOrderNo"
+ >
+ <el-input
+ v-model="queryParams.workOrderNo"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.query.workOrderNo'
+ )}`"
+ clearable
+ @keyup.enter="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item
+ :style="{ width: '100%' }"
+ :label="$t('plan.query.requireTraceID')"
+ prop="requireTrackId"
+ >
+ <el-input
+ v-model="queryParams.requireTrackId"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.query.requireTraceID'
+ )}`"
+ clearable
+ @keyup.enter="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item
+ :style="{ width: '100%' }"
+ :label="$t('plan.query.itemNumber')"
+ prop="mainPartNumber"
+ >
+ <el-input
+ v-model="queryParams.mainPartNumber"
+ :placeholder="`${$t('common.common.placeholder')}${$t(
+ 'plan.query.itemNumber'
+ )}`"
+ clearable
+ @keyup.enter="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item
+ :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(
@@ -60,20 +73,39 @@
)}`"
clearable
@keyup.enter="handleQuery"
- />
- </el-form-item>
- <!-- </el-col>
- <el-col :span="14" style="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> -->
+ /> -->
+ <el-select
+ clearable
+ v-model="queryParams.hasDelayRisk"
+ >
+ <el-option
+ v-for="item in delayRiskOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col
+ :span="16"
+ 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>
</el-form>
<el-row :gutter="10" class="mb8">
@@ -81,10 +113,10 @@
<el-button
type="primary"
plain
- icon="Plus"
+ icon="Refresh"
:disabled="multiple"
@click="handleBatchUpdatePlanDate"
- v-hasPermi="['apsPlatePlan:edit']"
+ v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
>{{ $t("plan.btns.batchUpdateOrderDate") }}</el-button
>
</el-col>
@@ -93,6 +125,7 @@
type="success"
plain
icon="Edit"
+ :disabled="loadingGenerateList"
@click="handleGenerateList"
v-hasPermi="['apsPlatePlan:edit']"
>{{ $t("plan.btns.generatePlanOrder") }}</el-button
@@ -119,16 +152,24 @@
<el-button
type="primary"
link
+ @click="handleCheckLevels(row)"
+ v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
+ >{{ $t("plan.btns.viewUpperLowerLevels") }}</el-button
+ >
+ <el-button
+ type="primary"
+ link
@click="handleCheckView(row)"
- v-hasPermi="['aps:calendar:update']"
- >{{ $t("plan.btns.viewRequirement") }}</el-button
+ v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
+ >{{ $t("plan.btns.viewRequirement") }}({{row.requireNum}})</el-button
>
</template>
</HxlhTable>
<el-dialog
:title="$t('plan.title.viewAssociatedRequirements')"
v-model="openDialog"
- width="900px"
+ width="85%"
+ style="height:90vh; overflow: hidden"
append-to-body
>
<HxlhTable
@@ -142,7 +183,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="openDialog = false">{{
- $t("common.common.cancel")
+ $t("common.common.close")
}}</el-button>
</span>
</template>
@@ -150,27 +191,36 @@
<el-dialog
:title="$t('plan.btns.batchUpdateOrderDate')"
v-model="openBatchDialog"
- width="900px"
+ width="85%"
+ style="min-height:90vh; overflow: hidden"
append-to-body
>
<div class="mode_box">
<span>{{ $t("plan.title.setMode") }}</span>
- <el-radio-group v-model="radio">
+ <el-radio-group v-model="radio" @change="changeRadioCustom">
<el-radio :label="1">{{
$t("plan.btns.batchUpdateOrderDate")
}}</el-radio>
- <el-radio :label="2">{{
+ <!-- <el-radio :label="2">{{
$t("plan.title.CustomizePlannedCompletionDate")
- }}</el-radio>
+ }}</el-radio> -->
</el-radio-group>
</div>
- <div class="red_color">{{ $t("plan.title.tipsBugSheetMetal") }}</div>
+ <div class="red_color" v-if="radio === 1">{{ $t("plan.title.tipsBugSheetMetal") }}</div>
+ <div class="red_color" v-if="radio === 2">{{ $t("plan.title.tipsBugSheetMetal2") }}</div>
<div class="mode_box" v-if="radio === 2">
<span>{{ $t("plan.title.CustomizePlannedCompletionDate") }}</span>
- <el-date-picker
- v-model="value4"
+ <!-- <el-date-picker
+ v-model="customicDate"
type="dates"
:placeholder="$t('plan.title.CustomizePlannedCompletionDate')"
+ @change="handleChangeCustomDate($event)"
+ /> -->
+ <el-date-picker
+ v-model="customicDate"
+ type="datetime"
+ :placeholder="$t('plan.title.CustomizePlannedCompletionDate')"
+ @change="handleChangeCustomDate($event)"
/>
</div>
<HxlhTable
@@ -179,7 +229,7 @@
:columns="subUpdateGridOptions"
:data="subUpdateList"
:loading="loading"
- :height="heightSub"
+ :height="heightSubUpdate"
>
</HxlhTable>
<HxlhTable
@@ -188,7 +238,7 @@
:columns="subUpdateCustomGridOptions"
:data="subUpdateList"
:loading="loading"
- :height="heightSub"
+ :height="heightSubUpdate"
>
</HxlhTable>
<template #footer>
@@ -196,33 +246,83 @@
<el-button @click="openBatchDialog = false">{{
$t("common.common.cancel")
}}</el-button>
+ <el-button
+ type="primary"
+ @click="hanleBatchUpdateDate"
+ :disabled="loadingUpdateDate"
+ v-hasPermi="['ApsPlatOrderPlanManager:requirement:list']"
+ >{{ $t("common.common.batchUpdate") }}</el-button
+ >
+ </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>
-<script setup name="Calendar">
+<script setup name="SheetMetalOrderManage">
import HxlhTable from "@/components/HxlhTable";
+import { parseTime } from "@/utils/ruoyi.js";
import useBasicStore from "@/store/modules/request/basic/page";
import { listAll_plant } from "@/api/basicData/plant";
-import { metalOrderManageList,metalOrderManageSubList,generatorPlanList } from "@/api/mainPlan/metalOrderManage.js";
+import {
+ metalOrderManageList,
+ metalOrderManageSubList,
+ metalOrderManageUpAndDownList,
+ generatorPlanList,
+ planDateList,
+} from "@/api/mainPlan/metalOrderManage.js";
import { useI18n } from "vue-i18n"; //瑕佸湪js涓娇鐢ㄥ浗闄呭寲
+import { ElMessage } from "element-plus";
const { t, locale } = useI18n();
const basicStore = useBasicStore();
const { proxy } = getCurrentInstance();
+const { aps_work_order_type } = proxy.useDict("aps_work_order_type");
+const { aps_factory } = proxy.useDict("aps_factory");
+const { aps_has_risk } = proxy.useDict("aps_has_risk");
+const delayRiskOptions = ref([]);
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();
const orderList = ref([]);
const loading = ref(false);
-const loadingSub = 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([]);
const single = ref(true);
@@ -237,7 +337,7 @@
pageNum: 1,
pageSize: 10,
workOrderNo: null,
- requireTraceId: null,
+ requireTrackId: null,
mainPartNumber: null,
hasDelayRisk: null,
},
@@ -247,7 +347,9 @@
const shopList = ref([]);
const allShopList = ref([]);
const processList = ref([]);
-const height = ref(document.documentElement.clientHeight - 270 + "px;");
+const height = ref(document.documentElement.clientHeight - 320 + "px;");
+const heightSub = ref(document.documentElement.clientHeight - 200 + "px;");
+const heightSubUpdate = ref(document.documentElement.clientHeight - 270 + "px;");
// 琛ㄦ牸閰嶇疆-鍒楄〃
const columns = ref([]);
// 鍒嗛〉灞炴��
@@ -259,72 +361,91 @@
watch(
locale,
(newLocale) => {
- columns.value = [
- { type: "checkbox", width: 60, align: "center" },
+ delayRiskOptions.value = [
{
- title: t("basic.table.requirementID"),
- field: "requireId",
- width: 150,
- align: "center",
+ label: t("plan.options.hasRisk"),
+ value: "1",
},
{
+ label: t("plan.options.noRisk"),
+ value: "0",
+ },
+ ];
+ columns.value = [
+ { type: "checkbox", width: 60, align: "center", fixed: "left" },
+ // {
+ // title: t("basic.table.requirementID"),
+ // field: "requireId",
+ // width: 150,
+ // align: "center",
+ // },
+ {
title: t("basic.table.requirementTraceabilityID"),
- field: "requireTraceId",
- width: 200,
+ field: "requireTrackId",
+ 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) {
+ for (let i = 0; i < aps_work_order_type.value.length; i++) {
+ if (cellValue === aps_work_order_type.value[i].value) {
+ return aps_work_order_type.value[i].label;
+ }
+ }
+ }
+ },
},
{
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) {
- for (let i = 0; i < plantList.value.length; i++) {
- if (cellValue === plantList.value[i].plantCode) {
- return plantList.value[i].plantName;
+ for (let i = 0; i < aps_factory.value.length; i++) {
+ if (cellValue === aps_factory.value[i].value) {
+ return aps_factory.value[i].label;
}
}
}
@@ -333,31 +454,31 @@
{
title: t("plan.table.productionBase"),
field: "productionBase",
- width: 100,
+ width: "auto",
align: "center",
},
{
title: t("plan.table.planStartDay"),
field: "planStartDay",
- width: 100,
+ width: "auto",
align: "center",
},
{
title: t("plan.table.planEndDayDate"),
field: "planEndDay",
- width: 100,
+ width: "auto",
align: "center",
},
{
title: t("plan.table.workorderCreationTime"),
field: "orderCreateTime",
- width: 100,
+ width: "auto",
align: "center",
},
{
title: t("plan.table.mismatchedProductionQuantity"),
field: "unmatchedQuantity",
- width: 100,
+ width: "auto",
align: "center",
},
{
@@ -365,10 +486,19 @@
field: "hasDelayRisk",
width: 100,
align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < aps_has_risk.value.length; i++) {
+ if (cellValue === aps_has_risk.value[i].value) {
+ return aps_has_risk.value[i].label;
+ }
+ }
+ }
+ },
},
{
- title: t("common.common.operate"),
- width: 100,
+ title: t("common.common.require"),
+ width: "auto",
fixed: "right",
slots: { default: "buttons" },
align: "center",
@@ -381,12 +511,12 @@
width: 150,
align: "center",
},
- {
- title: t("basic.table.requirementTraceabilityID"),
- field: "requireId",
- width: 200,
- align: "center",
- },
+ // {
+ // title: t("basic.table.requirementTraceabilityID"),
+ // field: "requireId",
+ // width: 200,
+ // align: "center",
+ // },
{
title: t("plan.table.itemNumber"),
field: "bomLineCode",
@@ -405,18 +535,18 @@
width: 200,
align: "center",
},
- {
- title: t("basic.table.processRouteID"),
- field: "processRouteId",
- width: 200,
- align: "center",
- },
- {
- title: t("plan.table.processRouteWorkingHours"),
- field: "processRouteHours",
- width: 100,
- align: "center",
- },
+ // {
+ // title: t("basic.table.processRouteID"),
+ // field: "processRouteId",
+ // width: 200,
+ // align: "center",
+ // },
+ // {
+ // title: t("plan.table.processRouteWorkingHours"),
+ // field: "processRouteHours",
+ // width: 100,
+ // align: "center",
+ // },
{
title: t("plan.table.demandQuantity"),
field: "requireAmount",
@@ -452,6 +582,15 @@
field: "orgCode",
width: 100,
align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < aps_factory.value.length; i++) {
+ if (cellValue === aps_factory.value[i].value) {
+ return aps_factory.value[i].label;
+ }
+ }
+ }
+ },
},
{
title: t("plan.table.productionBase"),
@@ -488,18 +627,59 @@
field: "hasDelayRisk",
width: 100,
align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < aps_has_risk.value.length; i++) {
+ if (cellValue === aps_has_risk.value[i].value) {
+ return aps_has_risk.value[i].label;
+ }
+ }
+ }
+ },
},
];
- subUpdateGridOptions.value = [
+ subUpAndDownGridOptions.value = [
{
- title: t("basic.table.requirementID"),
- field: "requireId",
- width: 150,
+ 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"),
+ // field: "requireId",
+ // width: 150,
+ // align: "center",
+ // },
+ {
title: t("basic.table.requirementTraceabilityID"),
- field: "requireTraceId",
+ field: "requireTrackId",
width: 200,
align: "center",
},
@@ -520,6 +700,15 @@
field: "workOrderType",
width: 200,
align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < aps_work_order_type.value.length; i++) {
+ if (cellValue === aps_work_order_type.value[i].value) {
+ return aps_work_order_type.value[i].label;
+ }
+ }
+ }
+ },
},
{
title: t("plan.table.itemNumber"),
@@ -530,38 +719,38 @@
{
title: t("plan.table.planStartDay"),
field: "planStartDay",
- width: 100,
+ width: 200,
align: "center",
},
{
title: t("plan.table.planEndDayDate"),
field: "planEndDay",
- width: 100,
+ width: 200,
align: "center",
},
{
title: t("plan.table.startDateOfDemandPlan"),
- field: "startDay",
- width: 100,
+ field: "startDate",
+ width: 200,
align: "center",
},
{
title: t("plan.table.requirementPlanCompletionDate"),
- field: "completeDay",
- width: 100,
+ field: "completeDate",
+ width: 200,
align: "center",
},
];
subUpdateCustomGridOptions.value = [
- {
- title: t("basic.table.requirementID"),
- field: "requireId",
- width: 150,
- align: "center",
- },
+ // {
+ // title: t("basic.table.requirementID"),
+ // field: "requireId",
+ // width: 150,
+ // align: "center",
+ // },
{
title: t("basic.table.requirementTraceabilityID"),
- field: "requireTraceId",
+ field: "requireTrackId",
width: 200,
align: "center",
},
@@ -582,6 +771,15 @@
field: "workOrderType",
width: 200,
align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < aps_work_order_type.value.length; i++) {
+ if (cellValue === aps_work_order_type.value[i].value) {
+ return aps_work_order_type.value[i].label;
+ }
+ }
+ }
+ },
},
{
title: t("plan.table.itemNumber"),
@@ -592,19 +790,19 @@
{
title: t("plan.table.planStartDay"),
field: "planStartDay",
- width: 100,
+ width: 200,
align: "center",
},
{
title: t("plan.table.planEndDayDate"),
field: "planEndDay",
- width: 100,
+ width: 200,
align: "center",
},
{
title: t("plan.table.customizePlannedCompletionDate"),
- field: "updateTime",
- width: 100,
+ field: "customTime",
+ width: 200,
align: "center",
},
];
@@ -614,63 +812,127 @@
deep: true,
}
);
+function changeRadioCustom() {}
function handleBatchUpdatePlanDate() {
openBatchDialog.value = true;
+}
+function handleChangeCustomDate(e) {
+ customicDate.value = parseTime(e); //new Date(e).getFullYear()+ '-' + parseInt(new Date(e).getMonth()*1+1) + '-' + new Date(e).getDate()
+ console.log(customicDate.value, "chang date");
+ if (radio.value == 2) {
+ subUpdateList.value = subUpdateList.value.map((item) => {
+ return {
+ ...item,
+ customTime: customicDate.value,
+ };
+ });
+ console.log(subUpdateList.value, "changeRadioCustom");
+ }
}
function handleCheckView(row) {
openDialog.value = true;
loadingSub.value = true;
- metalOrderManageSubList(row.workOrderNo).then((res)=>{
- subList.value = res;
- loadingSub.value = false;
- console.log(res,"metalOrderManageSubListmetalOrderManageSubList")
- }).catch(()=>{
- loadingSub.value = false;
- })
+ metalOrderManageSubList(row.workOrderNo)
+ .then((res) => {
+ subList.value = res;
+ loadingSub.value = false;
+ })
+ .catch(() => {
+ loadingSub.value = false;
+ });
}
-async function handleGenerateList(){
- await generatorPlanList()
+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) => {
+ return item.id;
+ });
+ let res = null;
+ console.log(planIds, "planIds");
+ if (radio.value == 1) {
+ res = await planDateList({
+ isCustom: false,
+ planIds,
+ });
+ } else {
+ res = await planDateList({
+ isCustom: true,
+ planIds,
+ customDate: customicDate.value,
+ });
+ console.log(res, "res planDateList");
+ }
+ if (res.code === 200) {
+ ElMessage({
+ message: t("plan.message.update"),
+ type: "success",
+ });
+ openBatchDialog.value = false;
+ loadingUpdateDate.value = false;
+ getList();
+ } else {
+ openBatchDialog.value = true;
+ loadingUpdateDate.value = false;
+ }
+}
+async function handleGenerateList() {
+ loadingGenerateList.value = true;
+ const res = await generatorPlanList();
+ if (res.code == 200) {
+ ElMessage({
+ message: t("plan.message.update"),
+ type: "success",
+ });
+ loadingGenerateList.value = false;
+ getList();
+ } else {
+ loadingGenerateList.value = false;
+ }
}
/** 鏌ヨ閽i噾宸ュ崟璁″垝绠$悊鍒楄〃 */
function getList() {
loading.value = true;
- if (basicStore.sheetMetalOrderManageList&&basicStore.sheetMetalOrderManageList.rows) {
- orderList.value = basicStore.sheetMetalOrderManageList.rows;
- loading.value = false;
- } else {
- basicStore.getMetalOrderManagerList(queryParams.value).then((response) => {
+ metalOrderManageList(queryParams.value)
+ .then((response) => {
orderList.value = response.rows;
page.value.total = response.total;
loading.value = false;
- }).catch(()=>{
+ })
+ .catch((res) => {
loading.value = false;
});
- }
- // metalOrderManageList(queryParams.value).then((response) => {
- // orderList.value = response.rows;
- // page.value.total = response.total;
- // loading.value = false;
- // });
- // axios
- // .all([
- // /** 鏌ヨ宸ュ巶鍒楄〃 */
- // listAll_plant({}),
- // /** 鏌ヨ杞﹂棿鍒楄〃 */
- // listAll_shop({}),
- // ])
- // .then(
- // axios.spread((response1, response2) => {
- // plantList.value = response1.data;
- // shopList.value = response2.data;
- // loading.value = false;
- // })
- // )
- // .catch((error) => {
- // console.error("璇锋眰鍑洪敊:", error);
- // });
}
+
+// axios
+// .all([
+// /** 鏌ヨ宸ュ巶鍒楄〃 */
+// listAll_plant({}),
+// /** 鏌ヨ杞﹂棿鍒楄〃 */
+// listAll_shop({}),
+// ])
+// .then(
+// axios.spread((response1, response2) => {
+// plantList.value = response1.data;
+// shopList.value = response2.data;
+// loading.value = false;
+// })
+// )
+// .catch((error) => {
+// console.error("璇锋眰鍑洪敊:", error);
+// });
/** 鎼滅储鎸夐挳鎿嶄綔 */
function handleQuery() {
+ console.log("111111");
queryParams.value.pageNum = 1;
getList();
}
--
Gitblit v1.9.3