| | |
| | | # é
åå端æå¡ |
| | | # VITE_APP_LOCAL = 'int' |
| | | # VITE_APP_LOCAL = 'zhl' |
| | | VITE_APP_LOCAL = 'cxl' |
| | | VITE_APP_LOCAL = 'hjy' |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // /ApsBomHeader/list |
| | | export function listApsBomHeaderList(query) { |
| | | return request({ |
| | | url: '/aps/ApsBomHeader/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // /ApsBom/list |
| | | export function listApsBomLineList(query) { |
| | | return request({ |
| | | url: '/aps/ApsBom/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢BOMæ°æ®ç®¡çå表 |
| | | export function listApsBom(query) { |
| | | return request({ |
| | |
| | | export const zh = { |
| | | query: {}, |
| | | upload: {}, |
| | | table: {}, |
| | | table: {}, |
| | | table: { |
| | | processRouteID:"å·¥èºè·¯çº¿ID", |
| | | processRouteVersion:"å·¥èºè·¯çº¿çæ¬", |
| | | effectiveDate:"çææ¥æ", |
| | | expiringDate:"å¤±ææ¥æ", |
| | | integrationDate:"éææ¥æ", |
| | | applicableFactories:"éç¨å·¥å", |
| | | parentPartNumber:"ç¶çº§æå·", |
| | | parentMaterialDescription:"ç¶çº§ç©ææè¿°", |
| | | materialDescription:"ç©ææè¿°", |
| | | usage:"ç¨é" |
| | | } |
| | | }; |
| | | |
| | | export const en = { |
| | | query: {}, |
| | | upload: {}, |
| | | table: {}, |
| | | table: {}, |
| | | table: { |
| | | processRouteID:"Process route ID", |
| | | processRouteVersion:"Process route version", |
| | | effectiveDate:"effective date", |
| | | expiringDate:"expiring date", |
| | | integrationDate:"Integration date", |
| | | applicableFactories:"Applicable factories", |
| | | parentPartNumber:"Parent part number", |
| | | parentMaterialDescription:"Parent material description", |
| | | materialDescription:"Material Description", |
| | | usage:"usage" |
| | | } |
| | | }; |
| | |
| | | edit: "ç¼è¾", |
| | | save: "ä¿å", |
| | | cancel: "åæ¶", |
| | | placeholder:"请è¾å
¥" |
| | | placeholder:"请è¾å
¥", |
| | | view:"æ¥ç" |
| | | }, |
| | | }; |
| | | export const en = { |
| | |
| | | edit: "Edit", |
| | | save: "Save", |
| | | cancel: "Cancel", |
| | | placeholder:"Please enter the " |
| | | placeholder:"Please enter the ", |
| | | view:"View" |
| | | }, |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :rules="rules" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æå·" prop="itemCode"> |
| | | <el-input |
| | | v-model="queryParams.itemCode" |
| | | placeholder="请è¾å
¥æå·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="bomList" |
| | | :loading="loading" |
| | | :height="height" |
| | | :treeConfig="treeConfig" |
| | | :row-style="getRowStyle" |
| | | > |
| | | </HxlhTable> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="ApsBom"> |
| | | import { listApsBom } from "@/api/basicData/bom/bom"; |
| | | import { listAll_plant } from "@/api/basicData/plant"; |
| | | import axios from 'axios'; |
| | | import HxlhTable from '@/components/HxlhTable' |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const bomList = ref([]); |
| | | const open = ref(false); |
| | | const loading = ref(false); |
| | | const showSearch = ref(true); |
| | | |
| | | const treeConfig= { |
| | | transform: true, |
| | | rowField: 'bomId', |
| | | parentField: 'parentBomId' |
| | | } |
| | | |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | itemCode: null, |
| | | }, |
| | | rules: { |
| | | itemCode: [ |
| | | { required: true, message: "æå·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | { |
| | | title: 'bomId', |
| | | field: 'bomId', |
| | | minWidth: 20, treeNode: true |
| | | }, |
| | | { |
| | | title: 'parentBomId', |
| | | field: 'parentBomId', |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemCode', |
| | | }, |
| | | { |
| | | title: 'ç©ææè¿°', |
| | | field: 'itemName', |
| | | }, |
| | | { |
| | | title: 'çææ¥æ', |
| | | field: 'startDate', |
| | | }, |
| | | { |
| | | title: 'å¤±ææ¥æ', |
| | | field: 'endDate', |
| | | }, |
| | | { |
| | | title: 'éç¨å·¥å', |
| | | field: 'orgCode', |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | field: 'createTime', |
| | | }, |
| | | ]); |
| | | |
| | | // å®ä¹ä¸ä¸ªå½æ°æ¥è·åè¡çå±çº§ |
| | | const getRowLevel = (row, dataMap) => { |
| | | let level = 0 |
| | | let parentBomId = row.parentBomId |
| | | while (parentBomId!== null) { |
| | | const parentRow = dataMap.get(parentBomId) |
| | | if (parentRow) { |
| | | level++ |
| | | parentBomId = parentRow.parentBomId |
| | | } else { |
| | | break |
| | | } |
| | | } |
| | | return level |
| | | } |
| | | |
| | | // å®ä¹ä¸ä¸ªå½æ°æ¥è®¾ç½®è¡çæ ·å¼ |
| | | const getRowStyle = (row, rowIndex) => { |
| | | if (!Array.isArray(bomList.value)) { |
| | | console.error('bomList 䏿¯ä¸ä¸ªæ°ç»ç±»å'); |
| | | return {}; |
| | | } |
| | | const dataMap = new Map(bomList.value.map(item => [item.bomId, item])) |
| | | const level = getRowLevel(row.row, dataMap) |
| | | const colors = ['#f0f9ff', '#e6f7ff', '#bae7ff', '#91d5ff', '#69c0ff'] |
| | | return { |
| | | backgroundColor: colors[level % colors.length] |
| | | } |
| | | } |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | |
| | | const queryPlants = ref({status: 1}); |
| | | const plantList = ref([]); |
| | | const height = ref(document.documentElement.clientHeight - 180 + "px;") |
| | | |
| | | /** æ¥è¯¢BOMæ°æ®ç®¡çå表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | | axios.all([ |
| | | listAll_plant(queryPlants.value), |
| | | listApsBom(queryParams.value) |
| | | ]) |
| | | .then(axios.spread((response1, response2) => { |
| | | plantList.value = response1.data; |
| | | bomList.value = response2.rows; |
| | | loading.value = false; |
| | | })) |
| | | .catch(error => { |
| | | console.error('请æ±åºé:', error); |
| | | }); |
| | | } |
| | | |
| | | // åæ¶æé® |
| | | function cancel() { |
| | | open.value = false; |
| | | reset(); |
| | | } |
| | | |
| | | // 表åéç½® |
| | | function reset() { |
| | | form.value = { |
| | | id: null, |
| | | bomId: null, |
| | | parentBomId: null, |
| | | itemCode: null, |
| | | itemName: null, |
| | | startDate: null, |
| | | endDate: null, |
| | | orgCode: null, |
| | | delFlag: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null |
| | | }; |
| | | proxy.resetForm("ApsBomRef"); |
| | | } |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | | proxy.$refs["queryRef"].validate(valid => { |
| | | if (valid) { |
| | | getList(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | proxy.resetForm("queryRef"); |
| | | bomList.value = null; |
| | | } |
| | | |
| | | console.log("123"); |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryRef" :rules="rules" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æå·" prop="itemCode"> |
| | | <el-input |
| | | v-model="queryParams.itemCode" |
| | | placeholder="请è¾å
¥æå·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | <el-row :gutter="20"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryRef" |
| | | :rules="rules" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | :label-width="locale === 'zh' ? '90px' : '120px'" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="10"> |
| | | <el-form-item :label="$t('plan.query.itemNumber')" prop="itemCode"> |
| | | <el-input |
| | | style="width: 240px" |
| | | v-model="queryParams.itemCode" |
| | | :placeholder="`${$t('common.common.placeholder')}${$t( |
| | | 'plan.query.itemNumber' |
| | | )}`" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item |
| | | label="éç¨å·¥å" |
| | | prop="orgCode" |
| | | > |
| | | <el-select |
| | | clearable |
| | | v-model="queryParams.orgCode" |
| | | style="width: 160px" |
| | | placeholder="请è¾å
¥éç¨å·¥å" |
| | | > |
| | | <el-option |
| | | v-for="plant in plantList" |
| | | :key="plant.id" |
| | | :label="plant.plantName" |
| | | :value="plant.plantCode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" style="text-align: right"> |
| | | <el-form-item> |
| | | <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> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Refresh" |
| | | @click="handleRefresh" |
| | | v-hasPermi="['apsPartRouteStat:edit']" |
| | | >{{ $t("common.common.update") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="bomList" |
| | | :loading="loading" |
| | | :height="height" |
| | | :treeConfig="treeConfig" |
| | | :row-style="getRowStyle" |
| | | style="width: 100%" |
| | | :columns="columns" |
| | | :data="bomList" |
| | | :loading="loading" |
| | | :height="height" |
| | | @on-checkbox="handleCheckboxChange" |
| | | :page="page" |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | > |
| | | <!-- :expand-config="expandConfig" |
| | | :subGridOptions="subGridOptions" --> |
| | | <template #buttons="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="handleCheckView(row)" |
| | | v-hasPermi="['aps:calendar:update']" |
| | | >æ¥ç</el-button |
| | | > |
| | | </template> |
| | | </HxlhTable> |
| | | <el-dialog :title="title" v-model="openDialog" width="900px" append-to-body> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="subGridOptions" |
| | | :data="subList" |
| | | :loading="loadingSub" |
| | | :height="heightSub" |
| | | > |
| | | </HxlhTable> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup name="ApsBom"> |
| | | import { listApsBom } from "@/api/basicData/bom/bom"; |
| | | <script setup name="ApsPlatePlan"> |
| | | import { |
| | | listApsBomHeaderList, |
| | | listApsBomLineList, |
| | | } from "@/api/basicData/bom/bom.js"; |
| | | import { listAll_plant } from "@/api/basicData/plant"; |
| | | import axios from 'axios'; |
| | | import HxlhTable from '@/components/HxlhTable' |
| | | |
| | | import HxlhTable from "@/components/HxlhTable/index.vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | // å页屿§ |
| | | const page = ref({ |
| | | total: 0, |
| | | current: 1, |
| | | size: 10, |
| | | }); |
| | | const plantList = ref([]); |
| | | const bomList = ref([]); |
| | | const open = ref(false); |
| | | const subList = ref([]); |
| | | const loading = ref(false); |
| | | const loadingSub = ref(false); |
| | | const showSearch = ref(true); |
| | | |
| | | const treeConfig= { |
| | | transform: true, |
| | | rowField: 'bomId', |
| | | parentField: 'parentBomId' |
| | | } |
| | | |
| | | const total = ref(0); |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;"); |
| | | const heightSub = ref(document.documentElement.clientHeight - 320 + "px;"); |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([]); |
| | | const subGridOptions = ref([]); |
| | | const openDialog = ref(false); |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | itemCode: null, |
| | | orgCode:"" |
| | | }, |
| | | rules: { |
| | | itemCode: [ |
| | | { required: true, message: "æå·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | rules: {}, |
| | | }); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | { |
| | | title: 'bomId', |
| | | field: 'bomId', |
| | | minWidth: 20, treeNode: true |
| | | }, |
| | | { |
| | | title: 'parentBomId', |
| | | field: 'parentBomId', |
| | | }, |
| | | { |
| | | title: 'æå·', |
| | | field: 'itemCode', |
| | | }, |
| | | { |
| | | title: 'ç©ææè¿°', |
| | | field: 'itemName', |
| | | }, |
| | | { |
| | | title: 'çææ¥æ', |
| | | field: 'startDate', |
| | | }, |
| | | { |
| | | title: 'å¤±ææ¥æ', |
| | | field: 'endDate', |
| | | }, |
| | | { |
| | | title: 'éç¨å·¥å', |
| | | field: 'orgCode', |
| | | 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 |
| | | const { queryParams, rules } = toRefs(data); |
| | | watch( |
| | | locale, |
| | | (newLocale) => { |
| | | rules.value = { |
| | | itemCode: [ |
| | | { |
| | | required: true, |
| | | message: `${t("common.common.placeholder")}${t( |
| | | "plan.query.itemNumber" |
| | | )}`, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }; |
| | | columns.value = [ |
| | | // { |
| | | // field: "expand", |
| | | // type: "expand", |
| | | // width: 60, |
| | | // align: "center", |
| | | // slots: { content: "expandContent" }, |
| | | // }, |
| | | // { type: "checkbox", width: 60, align: "center" }, |
| | | { |
| | | title: "BOM_Header_ID", |
| | | field: "bomHeaderId", |
| | | }, |
| | | { |
| | | title: t("basic.table.parentPartNumber"), |
| | | field: "itemCode", |
| | | }, |
| | | { |
| | | title: t("basic.table.parentMaterialDescription"), |
| | | field: "itemName", |
| | | }, |
| | | { |
| | | title: t("basic.table.effectiveDate"), |
| | | field: "startDate", |
| | | }, |
| | | { |
| | | title: t("basic.table.expiringDate"), |
| | | field: "endDate", |
| | | }, |
| | | { |
| | | title: t("basic.table.integrationDate"), |
| | | field: "createTime", |
| | | }, |
| | | { |
| | | title: t("basic.table.applicableFactories"), |
| | | field: "orgCode", |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return ''; |
| | | }) |
| | | }, |
| | | }, |
| | | { |
| | | title: "æä½", |
| | | width: 100, |
| | | fixed: "right", |
| | | slots: { default: "buttons" }, |
| | | align: "center", |
| | | }, |
| | | ]; |
| | | subGridOptions.value = [ |
| | | { |
| | | title: "BOM_Line_ID", |
| | | field: "bomLineId", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "BOM_Header_ID", |
| | | field: "bomHeaderId", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "itemCode", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.materialDescription"), |
| | | field: "itemName", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.usage"), |
| | | field: "num", |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.effectiveDate"), |
| | | field: "startDate", |
| | | width: 150, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.expiringDate"), |
| | | field: "endDate", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.integrationDate"), |
| | | field: "createTime", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: t("basic.table.applicableFactories"), |
| | | field: "orgCode", |
| | | width: 90, |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | ]; |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | field: 'createTime', |
| | | }, |
| | | ]); |
| | | { immediate: true, deep: true } |
| | | ); |
| | | |
| | | // å®ä¹ä¸ä¸ªå½æ°æ¥è·åè¡çå±çº§ |
| | | const getRowLevel = (row, dataMap) => { |
| | | let level = 0 |
| | | let parentBomId = row.parentBomId |
| | | while (parentBomId!== null) { |
| | | const parentRow = dataMap.get(parentBomId) |
| | | if (parentRow) { |
| | | level++ |
| | | parentBomId = parentRow.parentBomId |
| | | } else { |
| | | break |
| | | } |
| | | } |
| | | return level |
| | | function changePageNo(currentPage) { |
| | | queryParams.value.pageNum = currentPage; |
| | | page.value.current = currentPage; |
| | | getList(); |
| | | } |
| | | function changePageSize(pageSize) { |
| | | page.value.current = 1; |
| | | queryParams.value.pageNum = 1; |
| | | queryParams.value.pageSize = pageSize; |
| | | getList(); |
| | | } |
| | | |
| | | // å®ä¹ä¸ä¸ªå½æ°æ¥è®¾ç½®è¡çæ ·å¼ |
| | | const getRowStyle = (row, rowIndex) => { |
| | | if (!Array.isArray(bomList.value)) { |
| | | console.error('bomList 䏿¯ä¸ä¸ªæ°ç»ç±»å'); |
| | | return {}; |
| | | } |
| | | const dataMap = new Map(bomList.value.map(item => [item.bomId, item])) |
| | | const level = getRowLevel(row.row, dataMap) |
| | | const colors = ['#f0f9ff', '#e6f7ff', '#bae7ff', '#91d5ff', '#69c0ff'] |
| | | return { |
| | | backgroundColor: colors[level % colors.length] |
| | | } |
| | | } |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | |
| | | const queryPlants = ref({status: 1}); |
| | | const plantList = ref([]); |
| | | const height = ref(document.documentElement.clientHeight - 180 + "px;") |
| | | |
| | | /** æ¥è¯¢BOMæ°æ®ç®¡çå表 */ |
| | | /** æ¥è¯¢é¶ä»¶è®¡å管çå表 */ |
| | | function getList() { |
| | | page.value.current = 1; |
| | | queryParams.value.pageNum = 1; |
| | | loading.value = true; |
| | | axios.all([ |
| | | listAll_plant(queryPlants.value), |
| | | listApsBom(queryParams.value) |
| | | ]) |
| | | .then(axios.spread((response1, response2) => { |
| | | plantList.value = response1.data; |
| | | bomList.value = response2.rows; |
| | | listApsBomHeaderList(queryParams.value) |
| | | .then((response) => { |
| | | console.log(response, "listApsBomHeaderList"); |
| | | bomList.value = response.rows; |
| | | page.value.total = response.total; |
| | | loading.value = false; |
| | | })) |
| | | .catch(error => { |
| | | console.error('请æ±åºé:', error); |
| | | }) |
| | | .catch(() => { |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | // åæ¶æé® |
| | | function cancel() { |
| | | open.value = false; |
| | | reset(); |
| | | } |
| | | |
| | | // 表åéç½® |
| | | function reset() { |
| | | form.value = { |
| | | id: null, |
| | | bomId: null, |
| | | parentBomId: null, |
| | | itemCode: null, |
| | | itemName: null, |
| | | startDate: null, |
| | | endDate: null, |
| | | orgCode: null, |
| | | delFlag: null, |
| | | createBy: null, |
| | | createTime: null, |
| | | updateBy: null, |
| | | updateTime: null |
| | | }; |
| | | proxy.resetForm("ApsBomRef"); |
| | | } |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | function handleQuery() { |
| | | proxy.$refs["queryRef"].validate(valid => { |
| | | proxy.$refs["queryRef"].validate((valid) => { |
| | | if (valid) { |
| | | getList(); |
| | | } |
| | | getList(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | page.value.current = 1; |
| | | page.value.total = 0; |
| | | queryParams.value.pageNum = 1; |
| | | proxy.resetForm("queryRef"); |
| | | bomList.value = null; |
| | | bomList.value = []; |
| | | subList.value = []; |
| | | } |
| | | |
| | | console.log("123"); |
| | | function handleCheckView(row) { |
| | | openDialog.value = true; |
| | | listApsBomLineList({ bomHeaderId: row.bomHeaderId }).then((data) => { |
| | | console.log(data, "listApsBomLineList"); |
| | | subList.value = data.rows; |
| | | }); |
| | | } |
| | | |
| | | // /*å®ä¹ä¸æäºçº§è¡¨*/ |
| | | // const expandConfig = ref({ |
| | | // lazy: true, |
| | | // loadMethod({ row }) { |
| | | // // è°ç¨æ¥å£ |
| | | // return listProcessRoute({ workOrderNo: row.documentNumber }).then( |
| | | // (data) => { |
| | | // row.subList = data.rows; |
| | | // } |
| | | // ); |
| | | // }, |
| | | // }); |
| | | |
| | | onMounted(async () => { |
| | | const res = await listAll_plant({}); |
| | | plantList.value = res.data; |
| | | }); |
| | | </script> |
| | | <style lang="css" scoped> |
| | | h4 { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | |
| | | <el-input |
| | | style="width: 240px" |
| | | v-model="queryParams.itemCode" |
| | | :placeholder="`${$t('common.common.placeholder')}${$t( |
| | | 'plan.query.itemNumber' |
| | | )}`" |
| | | :placeholder="`${$t('common.common.placeholder')}${$t( |
| | | 'plan.query.itemNumber' |
| | | )}`" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | |
| | | </el-col> |
| | | <el-col :span="18" style="text-align: right"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >{{ |
| | | $t("common.common.query") |
| | | }}</el-button |
| | | > |
| | | <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> |
| | | $t("common.common.reset") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | icon="Refresh" |
| | | @click="handleRefresh" |
| | | v-hasPermi="['apsPartRouteStat:edit']" |
| | | >{{$t("common.common.update")}}</el-button |
| | | >{{ $t("common.common.update") }}</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar |
| | |
| | | :page="page" |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | :expand-config="expandConfig" |
| | | :subGridOptions="subGridOptions" |
| | | > |
| | | <!-- :expand-config="expandConfig" |
| | | :subGridOptions="subGridOptions" --> |
| | | <template #buttons="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="handleCheckView(row)" |
| | | v-hasPermi="['aps:calendar:update']" |
| | | >æ¥ç</el-button |
| | | > |
| | | </template> |
| | | </HxlhTable> |
| | | <el-dialog :title="title" v-model="openDialog" width="900px" append-to-body> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="subGridOptions" |
| | | :data="subList" |
| | | :loading="loading" |
| | | :height="heightSub" |
| | | @on-checkbox="handleCheckboxChange" |
| | | :page="page" |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | > |
| | | </HxlhTable> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { ref } from "vue"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | import { useI18n } from "vue-i18n"; //è¦å¨jsä¸ä½¿ç¨å½é
å |
| | | const { t, locale } = useI18n(); |
| | | const { proxy } = getCurrentInstance(); |
| | | // å页屿§ |
| | | const page = ref({ |
| | | total: 0, |
| | | current: 1, |
| | | size: 10 |
| | | size: 10, |
| | | }); |
| | | const { |
| | | aps_is_suspended, |
| | |
| | | "aps_business_type" |
| | | ); |
| | | |
| | | const exampleList = ref([]); |
| | | const planList = ref([]); |
| | | const subList = ref([]); |
| | | const loading = ref(true); |
| | | const showSearch = ref(true); |
| | | const single = ref(true); |
| | | const total = ref(0); |
| | | const daterangePlanStartDay = ref([]); |
| | | const daterangePlanEndDay = ref([]); |
| | | |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;"); |
| | | const isVisible = ref(false); |
| | | const isError = ref(false); |
| | | const planned = ref(true); |
| | | const batchNumber = ref(null); |
| | | const exampleHeight = ref("500px"); |
| | | const uploadRef = ref(); |
| | | |
| | | /*** ç¨æ·å¯¼å
¥åæ° */ |
| | | const upload = reactive({ |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå±ï¼ç¨æ·å¯¼å
¥ï¼ |
| | | open: false, |
| | | // å¼¹åºå±æ é¢ï¼ç¨æ·å¯¼å
¥ï¼ |
| | | title: "", |
| | | // æ¯å¦ç¦ç¨ä¸ä¼ |
| | | isUploading: false, |
| | | // æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | updateSupport: 0, |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: { Authorization: "Bearer " + getToken(), local: "zhl" }, |
| | | // ä¸ä¼ çå°å |
| | | url: import.meta.env.VITE_APP_BASE_API + "/aps/apsPlatePlan/importData", |
| | | }); |
| | | |
| | | const heightSub = ref(document.documentElement.clientHeight - 320 + "px;"); |
| | | // è¡¨æ ¼é
ç½® |
| | | const exampleColumns = ref([ |
| | | { type: "seq", title: "åºå·", width: 60 }, |
| | | { |
| | | title: "主计åå", |
| | | field: "masterPlanner", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "卿¥", |
| | | field: "weekDay", |
| | | width: 100, |
| | | formatter: ({ cellValue, row, column }) => { |
| | | if (cellValue) { |
| | | const weekDay = new Date(cellValue); |
| | | const year = weekDay.getFullYear(); |
| | | const month = String(weekDay.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(weekDay.getDate()).padStart(2, "0"); |
| | | return `${month}-${day}`; |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | title: "å¨åº¦", |
| | | field: "weekCycle", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: "主件æå·", |
| | | field: "mainPartNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "主件å¾å·", |
| | | field: "mainPartDrawingNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "客æ·åç§°", |
| | | field: "customer", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "ä¸å¡ç±»å", |
| | | field: "businessType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "åæ®å·", |
| | | field: "documentNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "éæ±åç±»", |
| | | field: "requirementType", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "documentStatus", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "æå·", |
| | | field: "itemNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "å¾å·", |
| | | field: "drawingNo", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "çæ¬å·", |
| | | field: "versionNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "ç产æ°é", |
| | | field: "productionQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "è¯åæ°é", |
| | | field: "goodProductsQuantity", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "å·¥åºå·", |
| | | field: "processNumber", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "å·¥ä½ä¸å¿", |
| | | field: "workCenter", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "æå±é¨é¨", |
| | | field: "department", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "计åå¼å·¥æ¥", |
| | | field: "planStartDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "计åå®å·¥æ¥", |
| | | field: "planEndDay", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "夿æå·", |
| | | field: "standbyNumber", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "夿åç§°", |
| | | field: "standbyName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "夿åºå", |
| | | field: "standbyStock", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "ä¸éå·¥åºæå±é¨é¨", |
| | | field: "nextProcessDeparment", |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: "æ¯å¦æèµ·", |
| | | field: "isSuspended", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "å¤åæ è¯", |
| | | field: "isOutsourcing", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "è´¦å¥", |
| | | field: "account", |
| | | width: 100, |
| | | }, |
| | | // { |
| | | // title: 'ä¸é¶ç©æ', |
| | | // field: 'advancedMaterials', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶åæ®å·', |
| | | // field: 'advancedDocumentNumber', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'ä¸é¶éæ±æ¥æ', |
| | | // field: 'advancedRequirementDay', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: '计åé½å¥', |
| | | // field: 'isPlanComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'åºåé½å¥', |
| | | // field: 'isStockComplete', |
| | | // width: 100, |
| | | // }, |
| | | // { |
| | | // title: 'æ¯å¦ææè¿å·¥åº', |
| | | // field: 'hasTurnback', |
| | | // width: 150, |
| | | // }, |
| | | // { |
| | | // title: 'é£é©æ è¯', |
| | | // field: 'hasRisk', |
| | | // width: 100, |
| | | // }, |
| | | ]); |
| | | |
| | | // è¡¨æ ¼é
ç½® |
| | | const columns = ref([ |
| | | { |
| | | field: "expand", |
| | | type: "expand", |
| | | width: 60, |
| | | align: "center", |
| | | slots: { content: "expandContent" }, |
| | | }, |
| | | { type: "checkbox", width: 60, align: "center" }, |
| | | { |
| | | title: "å·¥èºè·¯çº¿ID", |
| | | field: "mainPartNumber", |
| | | }, |
| | | { |
| | | title: "å·¥èºè·¯çº¿çæ¬", |
| | | field: "businessType", |
| | | }, |
| | | { |
| | | title: "æå·", |
| | | field: "documentNumber", |
| | | }, |
| | | { |
| | | title: "çææ¥æ", |
| | | field: "requirementType", |
| | | }, |
| | | { |
| | | title: "å¤±ææ¥æ", |
| | | field: "documentStatus", |
| | | }, |
| | | { |
| | | title: "éææ¥æ", |
| | | field: "itemNumber", |
| | | }, |
| | | { |
| | | title: "éç¨å·¥å", |
| | | field: "drawingNo", |
| | | }, |
| | | ]); |
| | | |
| | | const columns = ref([]); |
| | | const openDialog = ref(false); |
| | | const data = reactive({ |
| | | form: {}, |
| | | queryParams: { |
| | |
| | | itemCode: null, |
| | | }, |
| | | rules: { |
| | | itemCode: [{ required: true, message: "请è¾å
¥æå·", trigger: "blur" }], |
| | | itemCode: [ |
| | | { |
| | | required: true, |
| | | message: `${t("common.common.placeholder")}${t( |
| | | "plan.query.itemNumber" |
| | | )}`, |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | }); |
| | | |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | watch( |
| | | locale, |
| | | (newLocale) => { |
| | | columns.value = [ |
| | | // { |
| | | // field: "expand", |
| | | // type: "expand", |
| | | // width: 60, |
| | | // align: "center", |
| | | // slots: { content: "expandContent" }, |
| | | // }, |
| | | // { type: "checkbox", width: 60, align: "center" }, |
| | | { |
| | | title: t("basic.table.processRouteVersion"), |
| | | field: "mainPartNumber", |
| | | }, |
| | | { |
| | | title: t("basic.table.processRouteVersion"), |
| | | field: "businessType", |
| | | }, |
| | | { |
| | | title: t("plan.table.itemNumber"), |
| | | field: "documentNumber", |
| | | }, |
| | | { |
| | | title: t("basic.table.effectiveDate"), |
| | | field: "requirementType", |
| | | }, |
| | | { |
| | | title: t("basic.table.expiringDate"), |
| | | field: "documentStatus", |
| | | }, |
| | | { |
| | | title: t("basic.table.integrationDate"), |
| | | field: "itemNumber", |
| | | }, |
| | | { |
| | | title: t("basic.table.applicableFactories"), |
| | | field: "drawingNo", |
| | | }, |
| | | { |
| | | title: "æä½", |
| | | width: 100, |
| | | fixed: "right", |
| | | slots: { default: "buttons" }, |
| | | align: "center", |
| | | }, |
| | | ]; |
| | | }, |
| | | { immediate: true, deep: true } |
| | | ); |
| | | function changePageNo(currentPage) { |
| | | queryParams.value.pageNum = currentPage; |
| | | page.value.current = currentPage; |
| | |
| | | queryParams.value.pageSize = pageSize; |
| | | getList(); |
| | | } |
| | | /** æ¥è¯¢é£é计å临æ¶ç®¡çå表 */ |
| | | function getExampleList() { |
| | | loading.value = true; |
| | | queryParams.value = {}; |
| | | queryParams.value.batchNumber = batchNumber.value; |
| | | examplePlan(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | total.value = response.total; |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | /** æ¥è¯¢é¶ä»¶è®¡å管çå表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | | queryParams.value.params = {}; |
| | | if (null != daterangePlanStartDay && "" !== daterangePlanStartDay) { |
| | | queryParams.value.params["beginPlanStartDay"] = |
| | | daterangePlanStartDay.value[0]; |
| | | queryParams.value.params["endPlanStartDay"] = |
| | | daterangePlanStartDay.value[1]; |
| | | } |
| | | if (null != daterangePlanEndDay && "" !== daterangePlanEndDay) { |
| | | queryParams.value.params["beginPlanEndDay"] = daterangePlanEndDay.value[0]; |
| | | queryParams.value.params["endPlanEndDay"] = daterangePlanEndDay.value[1]; |
| | | } |
| | | listPlan(queryParams.value).then((response) => { |
| | | planList.value = response.rows; |
| | | loading.value = false; |
| | |
| | | |
| | | /** éç½®æé®æä½ */ |
| | | function resetQuery() { |
| | | daterangePlanStartDay.value = []; |
| | | daterangePlanEndDay.value = []; |
| | | proxy.resetForm("queryRef"); |
| | | handleQuery(); |
| | | } |
| | | |
| | | // å¤éæ¡é䏿°æ® |
| | | const handleCheckboxChange = (data) => { |
| | | console.log(data); |
| | | }; |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå¼å·¥æ¥æé®æä½ */ |
| | | function plannedStart() {} |
| | | |
| | | /** æ¹éä¿®æ¹è®¡åå®å·¥æ¥æé®æä½ */ |
| | | function plannedEnd() {} |
| | | |
| | | /** 导å
¥æé®æä½ */ |
| | | function handleImport() { |
| | | upload.title = "é£éè®¡åæ°æ®ä¸ä¼ "; |
| | | upload.open = true; |
| | | function handleCheckView(row) { |
| | | openDialog.value = true; |
| | | listProcessRoute({ workOrderNo: row.documentNumber }).then( |
| | | (data) => { |
| | | subList.value = data.rows; |
| | | }) |
| | | } |
| | | |
| | | /** å¯¼åºæé®æä½ */ |
| | | function handleExport() { |
| | | proxy.download( |
| | | "aps/apsPlatePlan/export", |
| | | { |
| | | ...queryParams.value, |
| | | }, |
| | | `plan_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | // /*å®ä¹ä¸æäºçº§è¡¨*/ |
| | | |
| | | /** ä¸è½½æ¨¡æ¿æä½ */ |
| | | function importTemplate() { |
| | | proxy.download( |
| | | "system/user/importTemplate", |
| | | {}, |
| | | `user_template_${new Date().getTime()}.xlsx` |
| | | ); |
| | | } |
| | | |
| | | /** buildEexample */ |
| | | function buildEexample() { |
| | | proxy.$refs["uploadRef"].submit(); |
| | | } |
| | | |
| | | /**æä»¶ä¸ä¼ ä¸å¤ç */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | |
| | | /** æä»¶ä¸ä¼ æåå¤ç */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | if (response.code == "200") { |
| | | batchNumber.value = response.data; |
| | | isVisible.value = true; |
| | | planned.value = false; |
| | | isError.value = false; |
| | | getExampleList(); |
| | | } else { |
| | | isError.value = true; |
| | | proxy.$alert( |
| | | "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + |
| | | response.msg + |
| | | "</div>", |
| | | "导å
¥ç»æ", |
| | | { dangerouslyUseHTMLString: true } |
| | | ); |
| | | } |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | upload.isUploading = false; |
| | | }; |
| | | |
| | | /** ä¸ä¼ å¹¶è§£ææé®æä½ */ |
| | | function uploadParse() { |
| | | queryParams.value.params = {}; |
| | | queryParams.value.params["batchNumber"] = batchNumber.value; |
| | | confirmPart(queryParams.value).then((response) => { |
| | | exampleList.value = response.rows; |
| | | loading.value = false; |
| | | isVisible.value = false; |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | ElMessage({ |
| | | message: "æ°ä½ç®¡è·¯è®¡åæ°æ®å·²æåä¸ä¼ åè§£æ", |
| | | type: "success", |
| | | }); |
| | | getList(); |
| | | }); |
| | | } |
| | | |
| | | /** dialogåæ¶ */ |
| | | function dialogCancel() { |
| | | if (uploadRef.value) { |
| | | uploadRef.value.clearFiles(); |
| | | } |
| | | isVisible.value = false; |
| | | isError.value = false; |
| | | planned.value = true; |
| | | upload.open = false; |
| | | upload.isUploading = false; |
| | | } |
| | | /*å®ä¹ä¸æäºçº§è¡¨*/ |
| | | |
| | | const subGridOptions = reactive({ |
| | | border: true, |
| | | showOverflow: true, |
| | | columns: [ |
| | | const subGridOptions = ref([ |
| | | { |
| | | title: "å·¥èºè·¯çº¿ID", |
| | | field: "itemNo", |
| | |
| | | width: 160, |
| | | align: "center", |
| | | }, |
| | | ], |
| | | }); |
| | | const expandConfig = ref({ |
| | | lazy: true, |
| | | loadMethod({ row }) { |
| | | // è°ç¨æ¥å£ |
| | | return listProcessRoute({ workOrderNo: row.documentNumber }).then( |
| | | (data) => { |
| | | row.subList = data.rows; |
| | | } |
| | | ); |
| | | }, |
| | | }); |
| | | ]) |
| | | // const expandConfig = ref({ |
| | | // lazy: true, |
| | | // loadMethod({ row }) { |
| | | // // è°ç¨æ¥å£ |
| | | // return listProcessRoute({ workOrderNo: row.documentNumber }).then( |
| | | // (data) => { |
| | | // row.subList = data.rows; |
| | | // } |
| | | // ); |
| | | // }, |
| | | // }); |
| | | |
| | | getList(); |
| | | </script> |
| | |
| | | v-show="showSearch" |
| | | label-width="110px" |
| | | > |
| | | <el-form-item label="å·¥åå·" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥éæ±è¿½æº¯ID" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åå·" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥éæ±è¿½æº¯ID" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-row type="flex" justify="left"> |
| | | <el-col :span="5"> --> |
| | | <el-form-item label="éæ±è¿½æº¯ID" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥éæ±è¿½æº¯ID" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-form-item label="éæ±è¿½æº¯ID" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥éæ±è¿½æº¯ID" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-col :span="5"> --> |
| | | <el-form-item label="æå·" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥æå·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å»¶è¿é£é©æ è¯" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥æå·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-form-item label="æå·" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥æå·" |
| | | clearable |
| | | @keyup.enter="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å»¶è¿é£é©æ è¯" prop="description"> |
| | | <el-input |
| | | style="width: 140px" |
| | | v-model="queryParams.description" |
| | | placeholder="请è¾å
¥æå·" |
| | | 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" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | <el-form-item class="column-with-margin"> |
| | | <el-button type="primary" icon="Search" @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="Refresh" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | <!-- </el-col> |
| | | </el-row> --> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éæ´æ°å·¥åè®¡åæ¥æ</el-button> |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >æ¹éæ´æ°å·¥åè®¡åæ¥æ</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >çæé£é计åå·¥å</el-button> |
| | | type="success" |
| | | plain |
| | | icon="Edit" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['apsPlatePlan:edit']" |
| | | >çæé£é计åå·¥å</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | v-model:showSearch="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | |
| | | @on-checkbox="handleCheckboxChange" |
| | | class="auto-height-grid" |
| | | > |
| | | <template #buttons="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="handleCheckView(row)" |
| | | v-hasPermi="['aps:calendar:update']" |
| | | >æ¥çéæ±</el-button |
| | | > |
| | | </template> |
| | | </HxlhTable> |
| | | <el-dialog :title="title" v-model="openDialog" width="900px" append-to-body> |
| | | <HxlhTable |
| | | style="width: 100%" |
| | | :columns="subGridOptions" |
| | | :data="subList" |
| | | :loading="loading" |
| | | :height="heightSub" |
| | | @on-checkbox="handleCheckboxChange" |
| | | :page="page" |
| | | @changePageNo="changePageNo" |
| | | @changePageSize="changePageSize" |
| | | > |
| | | </HxlhTable> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { listAll_shop, listAps_shop } from "@/api/basicData/shop"; |
| | | import { selectProcessNameList } from "@/api/basicData/processRoute.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const openDialog = ref(false); |
| | | const subGridOptions = ref([]); |
| | | const tableRef = ref(); |
| | | const calendarList = ref([]); |
| | | const loading = ref(true); |
| | |
| | | width: 100, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "æä½", |
| | | width: 100, |
| | | fixed: "right", |
| | | slots: { default: "buttons" }, |
| | | align: "center", |
| | | }, |
| | | ]); |
| | | // å页屿§ |
| | | const page = ref({ |
| | |
| | | current: 1, |
| | | size: 10, |
| | | }); |
| | | |
| | | function handleCheckView(row) { |
| | | openDialog.value = true; |
| | | // listProcessRoute({ workOrderNo: row.documentNumber }).then((data) => { |
| | | // subList.value = data.rows; |
| | | // }); |
| | | } |
| | | /** æ¥è¯¢æ¥å管çå表 */ |
| | | function getList() { |
| | | loading.value = true; |
| | |
| | | const { VITE_APP_ENV, VITE_APP_BASE_API } = env; |
| | | console.log(VITE_APP_BASE_API, VITE_APP_ENV); |
| | | // æ ¹æ®ç¯å¢åéå¨æè®¾ç½®ä»£ç |
| | | const proxyConfig = () => { |
| | | const personProxy = { |
| | | "/prod-api": { |
| | | target: "http://192.168.50.160:8080",//"http://192.168.50.13:8080", // å¼åç¯å¢çå端å°å |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | }, |
| | | }; |
| | | const devProxy = { |
| | | "/prod-api": { |
| | | target: "http://192.168.50.160:8080", // å¼åç¯å¢çå端å°å |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | }, |
| | | }; |
| | | // const proxyConfig = () => { |
| | | // const personProxy = { |
| | | // "/prod-api": { |
| | | // target: "http://192.168.50.160:8080",//"http://192.168.50.13:8080", // å¼åç¯å¢çå端å°å |
| | | // changeOrigin: true, |
| | | // rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | // }, |
| | | // }; |
| | | // const devProxy = { |
| | | // "/prod-api": { |
| | | // target: "http://192.168.50.160:8080", // å¼åç¯å¢çå端å°å |
| | | // changeOrigin: true, |
| | | // rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | // }, |
| | | // }; |
| | | |
| | | const testProxy = { |
| | | "/prod-api": { |
| | | target: "http://192.168.50.160:8080", // æµè¯ç¯å¢çå端å°å |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | }, |
| | | }; |
| | | // const testProxy = { |
| | | // "/prod-api": { |
| | | // target: "http://192.168.50.160:8080", // æµè¯ç¯å¢çå端å°å |
| | | // changeOrigin: true, |
| | | // rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | // }, |
| | | // }; |
| | | |
| | | const prodProxy = { |
| | | "/prod-api": { |
| | | target: "http://192.168.50.160:8080", // æµè¯ç¯å¢çå端å°å |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | }, |
| | | }; |
| | | // const prodProxy = { |
| | | // "/prod-api": { |
| | | // target: "http://192.168.50.160:8080", // æµè¯ç¯å¢çå端å°å |
| | | // changeOrigin: true, |
| | | // rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | // }, |
| | | // }; |
| | | |
| | | switch (VITE_APP_ENV) { |
| | | case "development": |
| | | return personProxy; |
| | | case "int": |
| | | return devProxy; |
| | | case "uat": |
| | | return testProxy; |
| | | default: // é»è®¤å¼åç¯å¢ |
| | | return prodProxy; |
| | | } |
| | | }; |
| | | // switch (VITE_APP_ENV) { |
| | | // case "development": |
| | | // return personProxy; |
| | | // case "int": |
| | | // return devProxy; |
| | | // case "uat": |
| | | // return testProxy; |
| | | // default: // é»è®¤å¼åç¯å¢ |
| | | // return prodProxy; |
| | | // } |
| | | // }; |
| | | return { |
| | | // é¨ç½²ç产ç¯å¢åå¼åç¯å¢ä¸çURLã |
| | | // é»è®¤æ
åµä¸ï¼vite ä¼åè®¾ä½ çåºç¨æ¯è¢«é¨ç½²å¨ä¸ä¸ªååçæ ¹è·¯å¾ä¸ |
| | |
| | | port: 80, |
| | | host: true, |
| | | open: true, |
| | | proxy: proxyConfig(), |
| | | proxy: { |
| | | "/prod-api": { |
| | | target: "http://192.168.50.160:8080", // æµè¯ç¯å¢çå端å°å |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/prod-api/, ""), |
| | | }, |
| | | }, |
| | | }, |
| | | //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file |
| | | css: { |