进销存升级app
1.将首页与工作台分开,添加新首页样式
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // é¦é¡µæ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // å·¥åºæ°æ®ç产ç»è®¡æç» |
| | | export const processDataProductionStatistics = (params) => { |
| | | return request({ |
| | | url: "/home/processDataProductionStatistics", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // è´¨éç»è®¡ |
| | | export const qualityInspectionStatistics = (params) => { |
| | | return request({ |
| | | url: "/home/qualityInspectionStatistics", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // åæææ£æµ |
| | | export const rawMaterialDetection = (query) => { |
| | | return request({ |
| | | url: "/home/rawMaterialDetection", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | |
| | | // è¿ç¨æ£æµ |
| | | export const processDetection = (query) => { |
| | | return request({ |
| | | url: "/home/processDetection", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | |
| | | // æååºåæ£æµ |
| | | export const factoryDetection = (query) => { |
| | | return request({ |
| | | url: "/home/factoryDetection", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | |
| | | // æ£éªæ°é |
| | | export const qualityInspectionCount = () => { |
| | | return request({ |
| | | url: "/home/qualityInspectionCount", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // ä¸åæ ¼é¢è¦ |
| | | export const nonComplianceWarning = () => { |
| | | return request({ |
| | | url: "/home/nonComplianceWarning", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // 宿æ£éªæ° |
| | | export const completedInspectionCount = () => { |
| | | return request({ |
| | | url: "/home/completedInspectionCount", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // ä¸åæ ¼äº§åæå |
| | | export const unqualifiedProductRanking = () => { |
| | | return request({ |
| | | url: "/home/unqualifiedProductRanking", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // ä¸åæ ¼æ£åå¤çåæ |
| | | export const unqualifiedProductProcessingAnalysis = () => { |
| | | return request({ |
| | | url: "/home/unqualifiedProductProcessingAnalysis", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // éå®-éè´-åºåæ°æ® |
| | | export const getBusiness = () => { |
| | | return request({ |
| | | url: "/home/business", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | // 客æ·ååéé¢åæ |
| | | export const analysisCustomerContractAmounts = () => { |
| | | return request({ |
| | | url: "/home/analysisCustomerContractAmounts", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | // è´¨æ£åæï¼å¯ä¼ dateType: 1å¨ 2æ 3å£åº¦ï¼ |
| | | export const qualityStatistics = (params) => { |
| | | return request({ |
| | | url: "/home/qualityStatistics", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // å·¥åæ§è¡æçåæï¼dateType: 1å¨ 2æ 3å£åº¦ï¼ |
| | | export const workOrderEfficiencyAnalysis = (params) => { |
| | | return request({ |
| | | url: "/home/workOrderEfficiencyAnalysis", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // çäº§æ ¸ç®åæ |
| | | export const productionAccountingAnalysis = (query) => { |
| | | return request({ |
| | | url: "/home/productionAccountingAnalysis", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | // åºæ¶åºä»ç»è®¡ |
| | | export const statisticsReceivablePayable = (query) => { |
| | | return request({ |
| | | url: "/home/statisticsReceivablePayable", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | // å¾
åäºé¡¹ |
| | | export const homeTodos = () => { |
| | | return request({ |
| | | url: "/home/todos", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // çº¿å½¢å¾ |
| | | export const getAmountHalfYear = () => { |
| | | return request({ |
| | | url: "/sales/ledger/getAmountHalfYear", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // åç产订åç宿è¿åº¦ç»è®¡ |
| | | // /home/progressStatistics |
| | | export const getProgressStatistics = () => { |
| | | return request({ |
| | | url: "/home/progressStatistics", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // è®¢åæ°éç»è®¡ï¼çäº§è®¢åæ°ãå·²å®æè®¢åæ°ãå¾
çäº§è®¢åæ°ï¼ |
| | | export const orderCount = () => { |
| | | return request({ |
| | | url: "/home/orderCount", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | //å¨å¶åå¨è½¬æ
åµ |
| | | //home/workInProcessTurnover |
| | | export const getWorkInProcessTurnover = () => { |
| | | return request({ |
| | | url: "/home/workInProcessTurnover", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // 客æ·è¥æ¶è´¡ç®æ°å¼åæ |
| | | export const customerRevenueAnalysis = (params) => { |
| | | return request({ |
| | | url: "/home/customerRevenueAnalysis", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // åå·¥-客æ·-ä¾åºåæ»æ° |
| | | export const summaryStatistics = () => { |
| | | return request({ |
| | | url: "/home/summaryStatistics", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // åé¨é¨äººååå¸ |
| | | export const deptStaffDistribution = () => { |
| | | return request({ |
| | | url: "/home/deptStaffDistribution", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // ä¾åºåéè´æå |
| | | export const supplierPurchaseRanking = (query) => { |
| | | return request({ |
| | | url: "/home/supplierPurchaseRanking", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | |
| | | // 客æ·éé¢è´¡ç®æå |
| | | export const customerContributionRanking = (query) => { |
| | | return request({ |
| | | url: "/home/customerContributionRanking", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | }; |
| | | |
| | | // å产å大类åå¸ |
| | | export const productCategoryDistribution = () => { |
| | | return request({ |
| | | url: "/home/productCategoryDistribution", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // 产åéå®éé¢åæ |
| | | export const productSalesAnalysis = () => { |
| | | return request({ |
| | | url: "/home/productSalesAnalysis", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // å·¥åºäº§åºåæï¼dateType: 1å¨ 2æ 3å£åº¦ï¼ |
| | | export const processOutputAnalysis = (params) => { |
| | | return request({ |
| | | url: "/home/processOutputAnalysis", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // åææéè´éé¢å æ¯ |
| | | export const rawMaterialPurchaseAmountRatio = () => { |
| | | return request({ |
| | | url: "/home/rawMaterialPurchaseAmountRatio", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // è´¹ç¨ææåæï¼type: 1 æ 2ï¼ |
| | | export const expenseCompositionAnalysis = (params) => { |
| | | return request({ |
| | | url: "/home/expenseCompositionAnalysis", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // éå®/éè´/å¨åäº§åæ° |
| | | export const salesPurchaseStorageProductCount = () => { |
| | | return request({ |
| | | url: "/home/salesPurchaseStorageProductCount", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // 产ååºå
¥åºåæï¼å¯ä¼ productType: 1 åææ 2 åæå 3 æåï¼ |
| | | export const productInOutAnalysis = (params) => { |
| | | return request({ |
| | | url: "/home/productInOutAnalysis", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // æå
¥äº§åºåæ |
| | | export const inputOutputAnalysis = (params) => { |
| | | return request({ |
| | | url: "/home/inputOutputAnalysis", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | }; |
| | | |
| | | // 产åå¨è½¬å¤©æ° |
| | | export const productTurnoverDays = () => { |
| | | return request({ |
| | | url: "/home/productTurnoverDays", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // æ¶æ¯å¯¹æ¯åæ |
| | | export const incomeExpenseAnalysis = () => { |
| | | return request({ |
| | | url: "/home/incomeExpenseAnalysis", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // 婿¶¦è¶å¿åæ |
| | | export const profitTrendAnalysis = () => { |
| | | return request({ |
| | | url: "/home/profitTrendAnalysis", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // æåº¦æ¶å
¥ |
| | | export const getMonthlyIncome = () => { |
| | | return request({ |
| | | url: "/home/monthlyIncome", |
| | | method: "get", |
| | | }); |
| | | }; |
| | | |
| | | // æåº¦æ¯åº |
| | | export const getMonthlyExpenditure = () => { |
| | | return request({ |
| | | url: "/home/monthlyExpenditure", |
| | | method: "get", |
| | | }); |
| | | }; |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/login", |
| | | "path": "pages/works", |
| | | "style": { |
| | | "navigationBarTitleText": "ç»å½" |
| | | "navigationBarTitleText": "å·¥ä½å°", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/work", |
| | | "path": "pages/login", |
| | | "style": { |
| | | "navigationBarTitleText": "å·¥ä½å°" |
| | | "navigationBarTitleText": "ç»å½" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "text": "é¦é¡µ" |
| | | }, |
| | | { |
| | | "pagePath": "pages/works", |
| | | "iconPath": "static/images/tabbar/home.png", |
| | | "selectedIconPath": "static/images/tabbar/home_.png", |
| | | "text": "å·¥ä½å°" |
| | | }, |
| | | { |
| | | "pagePath": "pages/message", |
| | | "iconPath": "static/images/tabbar/work.png", |
| | | "selectedIconPath": "static/images/tabbar/work_.png", |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <!-- <view class="header-section">--> |
| | | <!-- <view class="currentFactory">--> |
| | | <!-- <up-text type="primary"--> |
| | | <!-- :text="userStore.currentFactoryName"--> |
| | | <!-- @click="show = true"--> |
| | | <!-- size="18"--> |
| | | <!-- class="factoryName"--> |
| | | <!-- suffixIcon="arrow-right"--> |
| | | <!-- :iconStyle="iconStyle"></up-text>--> |
| | | <!-- </view>--> |
| | | <!-- <up-picker :show="show"--> |
| | | <!-- :columns="factoryList"--> |
| | | <!-- @confirm="changeFactory"--> |
| | | <!-- @cancel="show = false"></up-picker>--> |
| | | <!-- </view>--> |
| | | <view class="hero-section"> |
| | | <view class="bg-img"> |
| | | <view class="hero-content"> |
| | | <!-- é¢çï¼å¦åç»éè¦å¯å¨æ¤æ¾ logo æç®çæç¤º --> |
| | | </view> |
| | | <view class="hero-wave"></view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="notice-section">--> |
| | | <!-- <view class="notice">--> |
| | | <!-- <view class="notice-content">--> |
| | | <!-- <view class="notice-left">--> |
| | | <!-- <text class="notice-status">éç¥</text>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="notice-separator"></view>--> |
| | | <!-- <view class="notice-right">--> |
| | | <!-- <text class="notice-label">{{currentStatus}}</text>--> |
| | | <!-- <text class="notice-text">彿¥éå®è®¾å¤æ°:<text class="notice-number">{{number}}<text class="notice-unit">个</text></text></text>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- è¥éç®¡çæ¨¡å --> |
| | | <view class="common-module marketing-module" |
| | | v-if="hasMarketingItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">è¥é管ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in marketingItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | <view class="page"> |
| | | <view class="safe-top" /> |
| | | |
| | | <scroll-view class="scroll" scroll-y> |
| | | <!-- å¿«æ·å
¥å£ --> |
| | | <view class="quick-section"> |
| | | <up-grid :border="false" col="4"> |
| | | <up-grid-item |
| | | v-for="item in quickTools" |
| | | :key="item.label" |
| | | @click="handleQuickTool(item)" |
| | | > |
| | | <view class="quick-icon" :style="{ background: item.bgColor }"> |
| | | <image :src="item.icon" class="quick-icon-img" mode="aspectFit" /> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | <text class="quick-text">{{ item.label }}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- <!– éè´ç®¡çæ¨¡å –>--> |
| | | <view class="common-module purchase-module" |
| | | v-if="hasPurchaseItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">éè´ç®¡ç</text> |
| | | |
| | | <!-- æ°æ®æ»è§ --> |
| | | <view class="section"> |
| | | <view class="section-header"> |
| | | <view class="section-title"> |
| | | <view class="title-bar" /> |
| | | <text class="title-text">æ°æ®æ»è§</text> |
| | | </view> |
| | | <view class="section-action" @tap="toggleOverview"> |
| | | <text class="action-text">{{ overviewExpanded ? "æ¶èµ·" : "å±å¼" }}</text> |
| | | <view :class="['chev', overviewExpanded ? 'up' : 'down']" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view v-show="overviewExpanded" class="overview"> |
| | | <view class="overview-card sales"> |
| | | <view class="card-left"> |
| | | <text class="card-title">é宿°æ®</text> |
| | | <view class="card-metrics"> |
| | | <view class="metric"> |
| | | <text class="metric-label">æ¬æè¥ä¸é¢(å
)</text> |
| | | <text class="metric-value">{{ overviewCards.sales.today }}</text> |
| | | </view> |
| | | <view class="metric"> |
| | | <text class="metric-label">æ¬æå·²å¼ç¥¨(å
)</text> |
| | | <text class="metric-value">{{ overviewCards.sales.unbilled }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <image class="card-icon" :src="imgSales" mode="widthFix" /> |
| | | </view> |
| | | |
| | | <view class="overview-card purchase"> |
| | | <view class="card-left"> |
| | | <text class="card-title">éè´æ°æ®</text> |
| | | <view class="card-metrics"> |
| | | <view class="metric"> |
| | | <text class="metric-label">æ¬æè¥ä¸é¢(å
)</text> |
| | | <text class="metric-value">{{ overviewCards.purchase.today }}</text> |
| | | </view> |
| | | <view class="metric"> |
| | | <text class="metric-label">æ¬æå·²å¼ç¥¨(å
)</text> |
| | | <text class="metric-value">{{ overviewCards.purchase.unbilled }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <image class="card-icon" :src="imgPurchase" mode="widthFix" /> |
| | | </view> |
| | | |
| | | <view class="overview-card stock"> |
| | | <view class="card-left"> |
| | | <text class="card-title">åºåæ°æ®</text> |
| | | <view class="card-metrics"> |
| | | <view class="metric"> |
| | | <text class="metric-label">åºåæ°é</text> |
| | | <text class="metric-value">{{ overviewCards.stock.today }}</text> |
| | | </view> |
| | | <view class="metric"> |
| | | <text class="metric-label">仿¥åºåæ°é</text> |
| | | <text class="metric-value">{{ overviewCards.stock.unbilled }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <image class="card-icon" :src="imgStock" mode="widthFix" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in purchaseItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | |
| | | <!-- 客æ·ååéé¢åæ --> |
| | | <view class="section"> |
| | | <view class="section-header"> |
| | | <view class="section-title"> |
| | | <view class="title-bar" /> |
| | | <text class="title-text">客æ·ååéé¢åæ</text> |
| | | </view> |
| | | <view class="section-action" @tap="goMore"> |
| | | <text class="action-text">æ´å¤</text> |
| | | <view class="chev right" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="analysis-card"> |
| | | <view class="chart-row"> |
| | | <view class="chart-box big"> |
| | | <qiun-data-charts |
| | | type="ring" |
| | | canvasId="home_contract_ring" |
| | | :canvas2d="isCanvas2d" |
| | | :reshow="chartReady" |
| | | :opts="ringOpts" |
| | | :chartData="ringChartData" |
| | | /> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- <!– åååå
¬æ¨¡å –> --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasCollaborationItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">åååå
¬</text> |
| | | </view> |
| | | |
| | | <view class="summary"> |
| | | <view class="summary-main"> |
| | | <text class="summary-label">æ»ååéé¢(å
)</text> |
| | | <text class="summary-value">{{ contractSummaryView.sumText }}</text> |
| | | </view> |
| | | <view class="summary-sub"> |
| | | <view class="summary-chip"> |
| | | <text class="chip-label">å¨åæ¯</text> |
| | | <text class="chip-value">{{ contractSummaryView.ynyText }}</text> |
| | | </view> |
| | | <view class="summary-chip"> |
| | | <text class="chip-label">æ¥ç¯æ¯</text> |
| | | <text class="chip-value">{{ contractSummaryView.chainText }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list-row"> |
| | | <swiper |
| | | class="customer-swiper" |
| | | :current="customerSwiperIndex" |
| | | :indicator-dots="false" |
| | | :autoplay="false" |
| | | :circular="false" |
| | | @change="onCustomerSwiperChange" |
| | | > |
| | | <swiper-item v-for="(page, pIdx) in customerPages" :key="pIdx"> |
| | | <view class="customer-page"> |
| | | <view v-for="item in page" :key="item.key" class="customer-item"> |
| | | <view class="customer-row"> |
| | | <view class="customer-name"> |
| | | <image |
| | | v-if="item.rank === 1" |
| | | class="rank-icon" |
| | | :src="imgNum1" |
| | | mode="heightFix" |
| | | /> |
| | | <image |
| | | v-else-if="item.rank === 2" |
| | | class="rank-icon" |
| | | :src="imgNum2" |
| | | mode="heightFix" |
| | | /> |
| | | <image |
| | | v-else-if="item.rank === 3" |
| | | class="rank-icon" |
| | | :src="imgNum3" |
| | | mode="heightFix" |
| | | /> |
| | | <text class="name-text">{{ item.name }}</text> |
| | | </view> |
| | | <view class="customer-rate"> |
| | | <text class="rate-label">å æ¯</text> |
| | | <text class="rate-value">{{ item.rateText }}</text> |
| | | </view> |
| | | <view class="amount"> |
| | | <text class="amount-num">{{ item.valueText }}</text> |
| | | <text class="amount-unit">å
</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </swiper-item> |
| | | </swiper> |
| | | |
| | | <view v-if="customerPages.length > 1" class="dots"> |
| | | <view |
| | | v-for="i in customerPages.length" |
| | | :key="i" |
| | | :class="['dot', customerSwiperIndex === i - 1 ? 'active' : '']" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in collaborationItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- å®å
¨ç产模å --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasSafetyItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">å®å
¨ç产</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in safetyItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- è´¨éç®¡çæ¨¡å --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasQualityItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">è´¨é管ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in qualityItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 人åèµæºæ¨¡å --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasHumanResourcesItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">人åèµæº</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in humanResourcesItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- çäº§ç®¡æ§æ¨¡å --> |
| | | <view class="common-module equipment-module" |
| | | v-if="hasProductionItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">ç产管æ§</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in productionItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 设å¤ç®¡ç模å --> |
| | | <view class="common-module equipment-module" |
| | | v-if="hasEquipmentItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">设å¤ç®¡ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in equipmentItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="bottom-space" /> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, nextTick, reactive, computed } from "vue"; |
| | | import { userLoginFacotryList } from "@/api/login"; |
| | | import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting"; |
| | | import modal from "@/plugins/modal"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { computed, onMounted, ref } from "vue"; |
| | | import { analysisCustomerContractAmounts, getBusiness } from "@/api/viewIndex"; |
| | | |
| | | const userStore = useUserStore(); |
| | | const show = ref(false); |
| | | const factoryList = ref([]); |
| | | const factoryListTem = ref([]); |
| | | const iconStyle = { |
| | | fontSize: "1.125rem", |
| | | color: "#2979ff", |
| | | }; |
| | | const imgSales = "/static/images/index/xiaoshoushuju.png"; |
| | | const imgPurchase = "/static/images/index/caigoushuju.png"; |
| | | const imgStock = "/static/images/index/kucunshuju.png"; |
| | | const imgNum1 = "/static/images/index/num1.png"; |
| | | const imgNum2 = "/static/images/index/num2.png"; |
| | | const imgNum3 = "/static/images/index/num3.png"; |
| | | |
| | | // éç¥ç¶æåæ¢ |
| | | const statusList = ["éå®", "éè´"]; |
| | | let statusIndex = 0; |
| | | const currentStatus = ref(statusList[0]); |
| | | const number = ref(7643); |
| | | const quickTools = [ |
| | | { |
| | | label: "ç产æ¥å·¥", |
| | | icon: "/static/images/icon/shengchanbaogong@2x.png", |
| | | bgColor: "linear-gradient(135deg,#3b82f6,#2563eb)", |
| | | route: "/pages/productionManagement/productionReport/index", |
| | | }, |
| | | { |
| | | label: "设å¤å·¡æ£", |
| | | icon: "/static/images/icon/xunjianshangchuan@2x.png", |
| | | bgColor: "linear-gradient(135deg,#22c55e,#16a34a)", |
| | | route: "/pages/inspectionUpload/index", |
| | | }, |
| | | { |
| | | label: "设å¤ä¿å
»", |
| | | icon: "/static/images/icon/shbeibaoyang@2x.png", |
| | | bgColor: "linear-gradient(135deg,#f97316,#ea580c)", |
| | | route: "/pages/equipmentManagement/upkeep/index", |
| | | }, |
| | | { |
| | | label: "è®¾å¤æ¥ä¿®", |
| | | icon: "/static/images/icon/shbeibaoxiu@2x.png", |
| | | bgColor: "linear-gradient(135deg,#a855f7,#7c3aed)", |
| | | route: "/pages/equipmentManagement/repair/index", |
| | | }, |
| | | ]; |
| | | |
| | | // 宿¶å¨åæ¢éç¥ç¶æ |
| | | const startStatusTimer = () => { |
| | | setInterval(() => { |
| | | statusIndex = (statusIndex + 1) % statusList.length; |
| | | currentStatus.value = statusList[statusIndex]; |
| | | }, 3000); |
| | | }; |
| | | const isCanvas2d = ref(false); |
| | | |
| | | // è¥é管çåè½æ°æ® |
| | | const marketingItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/xiaoshoutaizhang@2x.png", |
| | | label: "éå®å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kaipiaodengji@2x.png", |
| | | label: "å¼ç¥¨ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kaipiaotaizhang@2x.png", |
| | | label: "å¼ç¥¨å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huikuandengji@2x.png", |
| | | label: "忬¾ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huikuanliushui@2x.png", |
| | | label: "忬¾æµæ°´", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kehuwanglai@2x.png", |
| | | label: "客æ·å¾æ¥", |
| | | }, |
| | | ]); |
| | | const overviewExpanded = ref(true); |
| | | const businessRaw = ref({}); |
| | | const contractRawList = ref([]); |
| | | const chartReady = ref(false); |
| | | const contractSummary = ref({ sum: "0", chain: "0", yny: "0" }); |
| | | |
| | | // éè´ç®¡çåè½æ°æ® |
| | | const purchaseItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "éè´å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/laipiaodengji@2x.png", |
| | | label: "æ¥ç¥¨ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/laipiaotaizhang@2x.png", |
| | | label: "æ¥ç¥¨å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fukuanjingji@2x.png", |
| | | label: "仿¬¾ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fukuanliushui@2x.png", |
| | | label: "仿¬¾æµæ°´", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/gongyingshangwanglai@2x.png", |
| | | label: "ä¾åºå徿¥", |
| | | }, |
| | | ]); |
| | | const humanResourcesItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "æå¡ç¾å°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "人åèªèµ", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "åå管ç", |
| | | }, |
| | | ]); |
| | | const qualityItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "åæææ£éª", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "è¿ç¨æ£éª", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "åºåæ£éª", |
| | | }, |
| | | ]); |
| | | const safetyItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "è§ç¨ä¸èµè´¨", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "å±é©æºå°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "å±é©ä½ä¸å®¡æ¹", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "éæ£ææ¥ä¸æ¥", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "å±é©ç©æç®¡æ§", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "åºæ¥é¢æ¡æ¥é
", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "äºæ
䏿¥è®°å½", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "å®å
¨å¹è®èæ ¸", |
| | | }, |
| | | ]); |
| | | // åååå
¬åè½æ°æ® |
| | | const collaborationItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/baoxiaoguanli.png", |
| | | label: "åå审æ¹", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huiyiliebiao@2x.png", |
| | | label: "ä¼è®®ç®¡ç", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/tongzhigonggao@2x.png", |
| | | label: "éç¥å
Œ", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/zhishiku@2x.png", |
| | | label: "ç¥è¯åº", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/yongyinguanli@2x.png", |
| | | label: "ç¨å°ç®¡ç", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guizhangzhidu@2x.png", |
| | | label: "è§ç« å¶åº¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kehubaifang@2x.png", |
| | | label: "å®¢æ·æè®¿", |
| | | }, |
| | | ]); |
| | | // 客æ·ååéé¢åæï¼æ éçéé¡¹ï¼ææ¥å£é»è®¤è¿åå±ç¤ºï¼ |
| | | |
| | | // ç产管æ§åè½æ°æ® |
| | | const productionItems = reactive([ |
| | | // { |
| | | // icon: "/static/images/icon/shengchandingdan@2x.png", |
| | | // label: "ç产订å", |
| | | // bgColor: "#FF9800", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaigong@2x.png", |
| | | // label: "ç产派工", |
| | | // bgColor: "#FF6B35", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaichan@2x.png", |
| | | // label: "å·¥åºæäº§", |
| | | // bgColor: "#E91E63", |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong@2x.png", |
| | | label: "ç产æ¥å·¥", |
| | | bgColor: "#673AB7", |
| | | }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanhesuan@2x.png", |
| | | // label: "çäº§æ ¸ç®", |
| | | // bgColor: "#3F51B5", |
| | | // }, |
| | | ]); |
| | | function toggleOverview() { |
| | | overviewExpanded.value = !overviewExpanded.value; |
| | | } |
| | | |
| | | // 设å¤ç®¡çåè½æ°æ® |
| | | const equipmentItems = reactive([ |
| | | // { |
| | | // icon: '/static/images/icon/shebeitaizhang@2x.png', |
| | | // label: '设å¤å°è´¦', |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shbeibaoxiu@2x.png", |
| | | label: "è¿è¡ç®¡ç", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/shbeibaoxiu@2x.png", |
| | | label: "è®¾å¤æ¥ä¿®", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/shbeibaoyang@2x.png", |
| | | label: "设å¤ä¿å
»", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xunjianshangchuan@2x.png", |
| | | label: "设å¤å·¡æ£", |
| | | }, |
| | | ]); |
| | | function handleQuickTool(item) { |
| | | if (!item?.route) return; |
| | | uni.navigateTo({ url: item.route }); |
| | | } |
| | | |
| | | // å¤ç常ç¨åè½ç¹å» |
| | | const handleCommonItemClick = item => { |
| | | // æ ¹æ®ä¸åçåè½é¡¹è¿è¡è·³è½¬ |
| | | switch (item.label) { |
| | | case "éå®å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/salesAccount/index", |
| | | }); |
| | | break; |
| | | case "å¼ç¥¨ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/invoicingRegistration/index", |
| | | }); |
| | | break; |
| | | case "å¼ç¥¨å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/invoiceLedger/index", |
| | | }); |
| | | break; |
| | | case "忬¾ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPayment/index", |
| | | }); |
| | | break; |
| | | case "忬¾æµæ°´": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPaymentHistory/index", |
| | | }); |
| | | break; |
| | | case "客æ·å¾æ¥": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPaymentLedger/index", |
| | | }); |
| | | break; |
| | | case "éè´å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/procurementLedger/index", |
| | | }); |
| | | break; |
| | | case "æ¥ç¥¨ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/invoiceEntry/index", |
| | | }); |
| | | break; |
| | | case "æ¥ç¥¨å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/procurementInvoiceLedger/index", |
| | | }); |
| | | break; |
| | | case "仿¬¾ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/paymentEntry/index", |
| | | }); |
| | | break; |
| | | case "仿¬¾æµæ°´": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/receiptPaymentHistory/index", |
| | | }); |
| | | break; |
| | | case "ä¾åºå徿¥": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/paymentLedger/index", |
| | | }); |
| | | break; |
| | | case "å
¬åºç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index1", |
| | | }); |
| | | break; |
| | | case "请å管ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index2", |
| | | }); |
| | | break; |
| | | case "åºå·®ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index3", |
| | | }); |
| | | break; |
| | | case "æ¥é管ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index4", |
| | | }); |
| | | break; |
| | | case "åå审æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/indexItem?label=åå审æ¹", |
| | | }); |
| | | break; |
| | | case "ä¼è®®ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/indexItem?label=ä¼è®®ç®¡ç", |
| | | }); |
| | | break; |
| | | case "éç¥å
Œ": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/noticeManagement/index", |
| | | }); |
| | | break; |
| | | case "ç¥è¯åº": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/knowledgeBase/index", |
| | | }); |
| | | break; |
| | | case "ç¨å°ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/sealManagement/index", |
| | | }); |
| | | break; |
| | | case "è§ç« å¶åº¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/rulesRegulationsManagement/index", |
| | | }); |
| | | break; |
| | | case "å®¢æ·æè®¿": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/clientVisit/index", |
| | | }); |
| | | break; |
| | | case "éè´ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index5", |
| | | }); |
| | | break; |
| | | case "æ¥ä»·ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index6", |
| | | }); |
| | | break; |
| | | case "å货审æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index7", |
| | | }); |
| | | break; |
| | | case "ä¼è®®è®¾ç½®": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetingSettings/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®å表": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetingList/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®ç³è¯·": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetApplication/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®å®¡æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetExamine/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®åå¸": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetPublish/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®æ»ç»": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetSummary/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®çæ¿": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetingBoard/index", |
| | | }); |
| | | break; |
| | | case "ç产订å": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/productionOrder/index", |
| | | }); |
| | | break; |
| | | case "ç产派工": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/productionDispatching/index", |
| | | }); |
| | | break; |
| | | case "å·¥åºæäº§": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/processScheduling/index", |
| | | }); |
| | | break; |
| | | case "ç产æ¥å·¥": |
| | | getcode(); |
| | | break; |
| | | case "çäº§æ ¸ç®": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/productionAccounting/index", |
| | | }); |
| | | break; |
| | | case "设å¤å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/ledger/index", |
| | | }); |
| | | break; |
| | | case "è¿è¡ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/runManagement/index", |
| | | }); |
| | | break; |
| | | case "è®¾å¤æ¥ä¿®": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/repair/index", |
| | | }); |
| | | break; |
| | | case "设å¤ä¿å
»": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/upkeep/index", |
| | | }); |
| | | break; |
| | | case "设å¤å·¡æ£": |
| | | uni.navigateTo({ |
| | | url: "/pages/inspectionUpload/index", |
| | | }); |
| | | break; |
| | | case "åæè¿½æº¯": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/faultAnalysis/index", |
| | | }); |
| | | break; |
| | | case "æºè½æ´¾å": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/smartDispatch/index", |
| | | }); |
| | | break; |
| | | case "ä½ä¸æå¯¼": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/sop/index", |
| | | }); |
| | | break; |
| | | case "ç»æéªè¯": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/verification/index", |
| | | }); |
| | | break; |
| | | case "è§ç¨ä¸èµè´¨": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/safeQualifications/index", |
| | | }); |
| | | break; |
| | | case "å±é©æºå°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/hazardSourceLedger/index", |
| | | }); |
| | | break; |
| | | case "å±é©ä½ä¸å®¡æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index8", |
| | | }); |
| | | break; |
| | | case "éæ£ææ¥ä¸æ¥": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/dangerInvestigation/index", |
| | | }); |
| | | break; |
| | | case "å±é©ç©æç®¡æ§": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/hazardousMaterialsControl/index", |
| | | }); |
| | | break; |
| | | case "åºæ¥é¢æ¡æ¥é
": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/emergencyPlanReview/index", |
| | | }); |
| | | break; |
| | | case "äºæ
䏿¥è®°å½": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/accidentReportingRecord/index", |
| | | }); |
| | | break; |
| | | case "å®å
¨å¹è®èæ ¸": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/safetyTrainingAssessment/index", |
| | | }); |
| | | break; |
| | | case "æå¡ç¾å°": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/attendance/checkin", |
| | | }); |
| | | break; |
| | | case "人åèªèµ": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/monthlyStatistics/index", |
| | | }); |
| | | break; |
| | | case "åå管ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/contractManagement/index", |
| | | }); |
| | | break; |
| | | case "åæææ£éª": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/materialInspection/index", |
| | | }); |
| | | break; |
| | | case "è¿ç¨æ£éª": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/processInspection/index", |
| | | }); |
| | | break; |
| | | case "åºåæ£éª": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/finalInspection/index", |
| | | }); |
| | | break; |
| | | default: |
| | | uni.showToast({ |
| | | title: `ç¹å»äº${item.label}`, |
| | | icon: "none", |
| | | }); |
| | | } |
| | | }; |
| | | function goMore() { |
| | | uni.showToast({ title: "æ´å¤åè½å¾
æ¥å
¥", icon: "none" }); |
| | | } |
| | | |
| | | // å建对åç»ä»¶çå¼ç¨ |
| | | const uToastRef = ref(null); |
| | | |
| | | function getUserLoginFacotryList() { |
| | | userLoginFacotryList({ userName: userStore.nickName }) |
| | | .then(res => { |
| | | // æ£æ¥res.dataæ¯å¦ä¸ºæ°ç» |
| | | factoryList.value[0] = []; |
| | | if (res.data && Array.isArray(res.data)) { |
| | | factoryListTem.value = res.data; |
| | | res.data.forEach(item => { |
| | | factoryList.value[0].push(item.deptName); |
| | | }); |
| | | } else { |
| | | // 妿res.data䏿¯æ°ç»ï¼è®¾ç½®ä¸ºç©ºæ°ç» |
| | | factoryList.value = []; |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | modal.msgError("è·åå
¬å¸å表失败:", error); |
| | | factoryList.value = []; |
| | | }); |
| | | function getByPath(obj, path) { |
| | | if (!obj || !path) return undefined; |
| | | const seg = String(path).split("."); |
| | | let cur = obj; |
| | | for (const k of seg) { |
| | | if (cur == null) return undefined; |
| | | cur = cur[k]; |
| | | } |
| | | const getcode = () => { |
| | | uni.scanCode({ |
| | | success: async res => { |
| | | // è§£æäºç»´ç å
容 |
| | | const scanResult = res.result; |
| | | let orderRow = ""; |
| | | return cur; |
| | | } |
| | | |
| | | // å¤ææ«æç»ææ¯å¦ä¸ºçº¯æ°åï¼idï¼ |
| | | const isNumericId = /^\d+$/.test(scanResult.trim()); |
| | | |
| | | if (isNumericId) { |
| | | // 妿æ¯çº¯æ°åï¼æ ¹æ® id è·åå·¥åæ°æ® |
| | | const workOrderId = scanResult.trim(); |
| | | modal.loading("æ£å¨è·åå·¥åä¿¡æ¯..."); |
| | | try { |
| | | const workRes = await getProductWorkOrderById({ id: workOrderId }); |
| | | modal.closeLoading(); |
| | | |
| | | console.log("å·¥åæ¥è¯¢ç»æ:", workRes); |
| | | |
| | | if (workRes.code === 200 && workRes.data) { |
| | | // æ°æ¥å£è¿åçæ¯å个对象ï¼ä¸æ¯æ°ç» |
| | | const workData = workRes.data; |
| | | console.log("工忰æ®:", workData); |
| | | |
| | | orderRow = JSON.stringify({ |
| | | id: workData.id || workOrderId, |
| | | planQuantity: workData.planQuantity - workData.completeQuantity, |
| | | productProcessRouteItemId: |
| | | workData.productProcessRouteItemId || |
| | | workData.产åå·¥èºè·¯çº¿é¡¹ID || |
| | | "", |
| | | }); |
| | | |
| | | console.log("æé çorderRow:", orderRow); |
| | | } else { |
| | | modal.msgError("æªæ¾å°å¯¹åºçå·¥åä¿¡æ¯"); |
| | | return; |
| | | } |
| | | } catch (error) { |
| | | modal.closeLoading(); |
| | | console.error("è·åå·¥åä¿¡æ¯å¤±è´¥:", error); |
| | | modal.msgError("è·åå·¥åä¿¡æ¯å¤±è´¥: " + (error.message || "æªç¥é误")); |
| | | return; |
| | | } |
| | | } else { |
| | | // 妿䏿¯çº¯æ°åï¼å°è¯ä»æ«ç ç»æä¸æåorderRowåæ° |
| | | try { |
| | | // å¤çæ··åæ ¼å¼: http://...?orderRow={...} |
| | | const orderRowStart = scanResult.indexOf("orderRow={"); |
| | | if (orderRowStart !== -1) { |
| | | // æåä»orderRow={å¼å§çJSONå
容 |
| | | const jsonPart = scanResult.substring(orderRowStart + 9); // 9æ¯"orderRow=".length |
| | | orderRow = jsonPart; |
| | | } else { |
| | | // å¦æç´æ¥æ¯JSONå符串ï¼å°è¯è§£æ |
| | | orderRow = scanResult; |
| | | } |
| | | } catch (e) { |
| | | console.error(e, "è§£æå¤±è´¥====????====="); |
| | | orderRow = ""; |
| | | } |
| | | |
| | | // éªè¯æ¯å¦ä¸ºææçJSON |
| | | try { |
| | | JSON.parse(orderRow); |
| | | } catch (error) { |
| | | modal.msgError("订åè§£æå¤±è´¥ï¼è¯·æ£æ¥äºç»´ç æ ¼å¼"); |
| | | return; |
| | | } |
| | | } |
| | | // æ«ç æåå跳转å°ç产æ¥å·¥é¡µé¢ï¼å¹¶ä¼ éorderRowåæ° |
| | | uni.navigateTo({ |
| | | url: `/pages/productionManagement/productionReport/index?orderRow=${orderRow}`, |
| | | }); |
| | | }, |
| | | fail: err => { |
| | | uni.showToast({ |
| | | title: "æ«ç 失败", |
| | | icon: "none", |
| | | }); |
| | | }, |
| | | }); |
| | | }; |
| | | const changeFactory = async arr => { |
| | | show.value = false; |
| | | const factoryId = factoryListTem.value[arr.indexs[0]].deptId; |
| | | const loginForm = { |
| | | username: userStore.name, |
| | | password: uni.getStorageSync("remembered_password"), |
| | | }; |
| | | modal.loading("å·æ°ä¸ï¼è¯·èå¿çå¾
..."); |
| | | userStore |
| | | .loginCheckFactory(loginForm) |
| | | .then(() => { |
| | | modal.closeLoading(); |
| | | nextTick(() => { |
| | | loginSuccess(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | modal.closeLoading(); |
| | | }); |
| | | }; |
| | | function loginSuccess(result) { |
| | | // è·åè·¯ç±æé |
| | | userStore |
| | | .getRouters() |
| | | .then(() => { |
| | | console.log("è·¯ç±æéè·åæå"); |
| | | // è¿æ»¤èå项 |
| | | filterMenuItemsByRoutes(); |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åè·¯ç±æé失败:", error); |
| | | }); |
| | | uni.reLaunch({ |
| | | url: "/pages/index", |
| | | }); |
| | | function pick(obj, paths, fallback = undefined) { |
| | | for (const p of paths) { |
| | | const v = getByPath(obj, p); |
| | | if (v !== undefined && v !== null && v !== "") return v; |
| | | } |
| | | return fallback; |
| | | } |
| | | |
| | | // å®ä¹æ¹æ³ |
| | | const click = name => { |
| | | if (uToastRef.value) { |
| | | uToastRef.value.success(`ç¹å»äºç¬¬${name + 1}个`); // 注æï¼è¿éå 1æ¯å 为é常æä»¬æ¯ä»ç¬¬1个å¼å§è®¡æ°ç |
| | | } |
| | | function toNumber(v) { |
| | | const n = Number(v); |
| | | return Number.isFinite(n) ? n : NaN; |
| | | } |
| | | |
| | | function formatMoneyWan(v) { |
| | | const n = toNumber(v); |
| | | if (!Number.isFinite(n)) return "--"; |
| | | const wan = n >= 10000 ? n / 10000 : n; |
| | | const fixed = wan >= 100 ? wan.toFixed(0) : wan >= 10 ? wan.toFixed(1) : wan.toFixed(2); |
| | | return fixed.replace(/\.0+$/, ""); |
| | | } |
| | | |
| | | function formatWanFromYuan(v) { |
| | | const n = toNumber(v); |
| | | if (!Number.isFinite(n)) return "--"; |
| | | const wan = n / 10000; |
| | | const fixed = wan >= 100 ? wan.toFixed(0) : wan >= 10 ? wan.toFixed(1) : wan.toFixed(2); |
| | | return fixed.replace(/\.0+$/, ""); |
| | | } |
| | | |
| | | function formatPlain(v) { |
| | | const n = toNumber(v); |
| | | if (!Number.isFinite(n)) return "--"; |
| | | const fixed = n >= 100 ? n.toFixed(0) : n >= 10 ? n.toFixed(1) : n.toFixed(2); |
| | | return fixed.replace(/\.0+$/, ""); |
| | | } |
| | | |
| | | function formatPercent(v) { |
| | | const n = toNumber(v); |
| | | if (!Number.isFinite(n)) return "--"; |
| | | const p = n > 1 ? n : n * 100; |
| | | return `${p.toFixed(1).replace(/\.0$/, "")}%`; |
| | | } |
| | | |
| | | const overviewCards = computed(() => { |
| | | const b = businessRaw.value || {}; |
| | | |
| | | // /home/business å
¼å®¹å段ï¼ä½ æä¾çç»æä¼å
ï¼ |
| | | const monthSaleMoney = pick(b, ["monthSaleMoney", "sale.monthMoney", "sales.monthMoney", "sales.monthSaleMoney"]); |
| | | const monthSaleHaveMoney = pick(b, ["monthSaleHaveMoney", "sale.monthHaveMoney", "sales.monthHaveMoney"]); |
| | | const monthPurchaseMoney = pick(b, ["monthPurchaseMoney", "purchase.monthMoney", "procurement.monthMoney"]); |
| | | const monthPurchaseHaveMoney = pick(b, ["monthPurchaseHaveMoney", "purchase.monthHaveMoney", "procurement.monthHaveMoney"]); |
| | | const inventoryNum = pick(b, ["inventoryNum", "stock.inventoryNum", "inventory.num", "stock.num"]); |
| | | const todayInventoryNum = pick(b, ["todayInventoryNum", "stock.todayInventoryNum", "inventory.todayNum", "stock.todayNum"]); |
| | | |
| | | return { |
| | | // é颿âå
âå±ç¤º |
| | | sales: { today: formatPlain(monthSaleMoney), unbilled: formatPlain(monthSaleHaveMoney) }, |
| | | purchase: { today: formatPlain(monthPurchaseMoney), unbilled: formatPlain(monthPurchaseHaveMoney) }, |
| | | // åºå为æ°éï¼ä¸åâä¸âæ¢ç®ï¼ |
| | | stock: { today: formatPlain(inventoryNum), unbilled: formatPlain(todayInventoryNum) }, |
| | | }; |
| | | }); |
| | | |
| | | // æ ¹æ®è·¯ç±æéè¿æ»¤èå项 |
| | | const filterMenuItemsByRoutes = () => { |
| | | const routers = userStore.routers || []; |
| | | const contractSummaryView = computed(() => { |
| | | const sumText = formatPlain(contractSummary.value?.sum); |
| | | const chainText = formatPlain(contractSummary.value?.chain); |
| | | const ynyText = formatPlain(contractSummary.value?.yny); |
| | | return { |
| | | sumText, |
| | | chainText, |
| | | ynyText, |
| | | }; |
| | | }); |
| | | |
| | | // å¦ææ²¡æè·¯ç±æéæ°æ®ï¼ä¸è¿è¡è¿æ»¤ï¼æ¾ç¤ºææèåï¼ |
| | | if (!routers || routers.length === 0) { |
| | | console.log("ææ è·¯ç±æéæ°æ®ï¼æ¾ç¤ºææèå"); |
| | | return; |
| | | } |
| | | const ringOpts = computed(() => { |
| | | const totalYuan = formatPlain(contractSummary.value?.sum); |
| | | return { |
| | | padding: [0, 0, 0, 0], |
| | | legend: { show: false }, |
| | | rotate: false, |
| | | dataLabel: false, |
| | | title: { name: totalYuan, fontSize: 18, color: "#2b2b2b" }, |
| | | subtitle: { name: "ååéé¢(å
)", fontSize: 12, color: "#8a94a6" }, |
| | | extra: { |
| | | ring: { |
| | | ringWidth: 18, |
| | | activeOpacity: 0.5, |
| | | activeRadius: 8, |
| | | offsetAngle: 0, |
| | | labelWidth: 0, |
| | | border: true, |
| | | borderWidth: 2, |
| | | borderColor: "#FFFFFF", |
| | | }, |
| | | }, |
| | | }; |
| | | }); |
| | | |
| | | // æ¶éææææéçèåæ é¢ï¼æ ¹æ® meta.titleï¼ |
| | | const allowedMenuTitles = new Set(); |
| | | const collectMenuTitles = routes => { |
| | | if (!Array.isArray(routes)) return; |
| | | routes.forEach(route => { |
| | | // æ¶éå½åè·¯ç±çæ é¢ |
| | | if (route.meta && route.meta.title) { |
| | | allowedMenuTitles.add(route.meta.title); |
| | | } |
| | | // éå½å¤çåè·¯ç± |
| | | if (route.children && route.children.length > 0) { |
| | | collectMenuTitles(route.children); |
| | | } |
| | | }); |
| | | const ringChartData = computed(() => { |
| | | const list = Array.isArray(contractRawList.value) ? contractRawList.value : []; |
| | | const top = list.slice(0, 5); |
| | | const other = list.slice(5); |
| | | const otherSum = other.reduce((acc, cur) => acc + (Number(cur.value) || 0), 0); |
| | | |
| | | const data = [ |
| | | ...top.map((x) => ({ name: x.name, value: Number(x.value) || 0 })), |
| | | ...(otherSum > 0 ? [{ name: "å
¶ä»", value: otherSum }] : []), |
| | | ].filter((x) => x.value > 0); |
| | | |
| | | return { series: [{ data }] }; |
| | | }); |
| | | |
| | | const customerSwiperIndex = ref(0); |
| | | function onCustomerSwiperChange(e) { |
| | | customerSwiperIndex.value = e.detail?.current || 0; |
| | | } |
| | | |
| | | const customerPages = computed(() => { |
| | | const list = Array.isArray(contractRawList.value) ? contractRawList.value : []; |
| | | const pageSize = 2; |
| | | const pages = []; |
| | | for (let i = 0; i < list.length; i += pageSize) pages.push(list.slice(i, i + pageSize)); |
| | | return pages.length ? pages : [[]]; |
| | | }); |
| | | |
| | | function normalizeContractList(raw) { |
| | | const rows = Array.isArray(raw?.item) ? raw.item : []; |
| | | |
| | | const mapped = rows |
| | | .map((it, idx) => { |
| | | const name = pick(it, ["name"], `å
¬å¸${idx + 1}`); |
| | | const value = pick(it, ["value"], 0); |
| | | const rate = pick(it, ["rate"], 0); |
| | | |
| | | return { |
| | | key: `${idx}-${name}`, |
| | | name: String(name), |
| | | value: toNumber(value), |
| | | valueText: formatPlain(value), |
| | | rate: toNumber(rate), |
| | | rateText: `${formatPlain(rate)}%`, |
| | | }; |
| | | }) |
| | | .sort((a, b) => (b.rate || 0) - (a.rate || 0)) |
| | | .map((it, index) => ({ ...it, rank: index + 1 })); |
| | | |
| | | return mapped; |
| | | } |
| | | |
| | | async function loadHome() { |
| | | chartReady.value = false; |
| | | try { |
| | | const [bRes, cRes] = await Promise.all([getBusiness(), analysisCustomerContractAmounts()]); |
| | | businessRaw.value = bRes?.data || {}; |
| | | const cData = cRes?.data || {}; |
| | | contractSummary.value = { |
| | | sum: pick(cData, ["sum"], "0"), |
| | | chain: pick(cData, ["chain"], "0"), |
| | | yny: pick(cData, ["yny"], "0"), |
| | | }; |
| | | collectMenuTitles(routers); |
| | | contractRawList.value = normalizeContractList(cData); |
| | | } catch (e) { |
| | | contractSummary.value = { sum: "0", chain: "0", yny: "0" }; |
| | | contractRawList.value = normalizeContractList({ item: [] }); |
| | | } finally { |
| | | customerSwiperIndex.value = 0; |
| | | chartReady.value = true; |
| | | } |
| | | } |
| | | |
| | | // è¿æ»¤è¥é管çèå |
| | | const originalMarketing = [ |
| | | { icon: "/static/images/icon/xiaoshoutaizhang@2x.png", label: "éå®å°è´¦" }, |
| | | { icon: "/static/images/icon/kaipiaodengji@2x.png", label: "å¼ç¥¨ç»è®°" }, |
| | | { icon: "/static/images/icon/kaipiaotaizhang@2x.png", label: "å¼ç¥¨å°è´¦" }, |
| | | { icon: "/static/images/icon/huikuandengji@2x.png", label: "忬¾ç»è®°" }, |
| | | { icon: "/static/images/icon/huikuanliushui@2x.png", label: "忬¾æµæ°´" }, |
| | | { icon: "/static/images/icon/kehuwanglai@2x.png", label: "客æ·å¾æ¥" }, |
| | | ]; |
| | | const filteredMarketing = originalMarketing.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | marketingItems.splice(0, marketingItems.length, ...filteredMarketing); |
| | | |
| | | // è¿æ»¤åååå
¬èå |
| | | const originalCollaboration = [ |
| | | { icon: "/static/images/icon/baoxiaoguanli.png", label: "åå审æ¹" }, |
| | | { icon: "/static/images/icon/huiyiliebiao@2x.png", label: "ä¼è®®ç®¡ç" }, |
| | | { icon: "/static/images/icon/tongzhigonggao@2x.png", label: "éç¥å
Œ" }, |
| | | { icon: "/static/images/icon/zhishiku@2x.png", label: "ç¥è¯åº" }, |
| | | { icon: "/static/images/icon/yongyinguanli@2x.png", label: "ç¨å°ç®¡ç" }, |
| | | { icon: "/static/images/icon/guizhangzhidu@2x.png", label: "è§ç« å¶åº¦" }, |
| | | { icon: "/static/images/icon/kehubaifang@2x.png", label: "å®¢æ·æè®¿" }, |
| | | ]; |
| | | const filteredCollaboration = originalCollaboration.filter(item => { |
| | | // å¤çæ é¢ä¸å®å
¨å¹é
çæ
åµ |
| | | let matched = allowedMenuTitles.has(item.label); |
| | | // ç¹æ®å¤çï¼è§ç« å¶åº¦ -> è§ç« å¶åº¦ç®¡ç |
| | | if (!matched && item.label === "è§ç« å¶åº¦") { |
| | | matched = allowedMenuTitles.has("è§ç« å¶åº¦ç®¡ç"); |
| | | } |
| | | return matched; |
| | | }); |
| | | collaborationItems.splice( |
| | | 0, |
| | | collaborationItems.length, |
| | | ...filteredCollaboration |
| | | ); |
| | | |
| | | // è¿æ»¤éè´ç®¡çèå |
| | | const originalPurchase = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "éè´å°è´¦" }, |
| | | { icon: "/static/images/icon/laipiaodengji@2x.png", label: "æ¥ç¥¨ç»è®°" }, |
| | | { icon: "/static/images/icon/laipiaotaizhang@2x.png", label: "æ¥ç¥¨å°è´¦" }, |
| | | { icon: "/static/images/icon/fukuanjingji@2x.png", label: "仿¬¾ç»è®°" }, |
| | | { icon: "/static/images/icon/fukuanliushui@2x.png", label: "仿¬¾æµæ°´" }, |
| | | { |
| | | icon: "/static/images/icon/gongyingshangwanglai@2x.png", |
| | | label: "ä¾åºå徿¥", |
| | | }, |
| | | ]; |
| | | const filteredPurchase = originalPurchase.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | purchaseItems.splice(0, purchaseItems.length, ...filteredPurchase); |
| | | |
| | | // è¿æ»¤å®å
¨ç产èå |
| | | const originalSafety = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "è§ç¨ä¸èµè´¨" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "å±é©æºå°è´¦" }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "å±é©ä½ä¸å®¡æ¹", |
| | | }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "éæ£ææ¥ä¸æ¥" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "å±é©ç©æç®¡æ§" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "åºæ¥é¢æ¡æ¥é
" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "äºæ
䏿¥è®°å½" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "å®å
¨å¹è®èæ ¸" }, |
| | | ]; |
| | | const filteredSafety = originalSafety.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | safetyItems.splice(0, safetyItems.length, ...filteredSafety); |
| | | |
| | | // è¿æ»¤äººåèµæºèå |
| | | const originalHumanResources = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "æå¡ç¾å°" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "人åèªèµ" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "åå管ç" }, |
| | | ]; |
| | | const filteredHumanResources = originalHumanResources.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | humanResourcesItems.splice( |
| | | 0, |
| | | humanResourcesItems.length, |
| | | ...filteredHumanResources |
| | | ); |
| | | |
| | | // è¿æ»¤è´¨é管çèå |
| | | const originalQuality = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "åæææ£éª" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "è¿ç¨æ£éª" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "åºåæ£éª" }, |
| | | ]; |
| | | const filteredQuality = originalQuality.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | qualityItems.splice(0, qualityItems.length, ...filteredQuality); |
| | | |
| | | // è¿æ»¤ç产管æ§èå |
| | | const originalProduction = [ |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong@2x.png", |
| | | label: "ç产æ¥å·¥", |
| | | bgColor: "#673AB7", |
| | | }, |
| | | ]; |
| | | const filteredProduction = originalProduction.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | productionItems.splice(0, productionItems.length, ...filteredProduction); |
| | | |
| | | // è¿æ»¤è®¾å¤ç®¡çèå |
| | | const originalEquipment = [ |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "è¿è¡ç®¡ç" }, |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "è®¾å¤æ¥ä¿®" }, |
| | | { icon: "/static/images/icon/shbeibaoyang@2x.png", label: "设å¤ä¿å
»" }, |
| | | { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "设å¤å·¡æ£" }, |
| | | ]; |
| | | const filteredEquipment = originalEquipment.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | equipmentItems.splice(0, equipmentItems.length, ...filteredEquipment); |
| | | }; |
| | | |
| | | // æ£æ¥æ¨¡åæ¯å¦æèå项éè¦æ¾ç¤º |
| | | const hasMarketingItems = computed(() => marketingItems.length > 0); |
| | | const hasPurchaseItems = computed(() => purchaseItems.length > 0); |
| | | const hasCollaborationItems = computed(() => collaborationItems.length > 0); |
| | | const hasSafetyItems = computed(() => safetyItems.length > 0); |
| | | const hasQualityItems = computed(() => qualityItems.length > 0); |
| | | const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0); |
| | | const hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |
| | | |
| | | onMounted(() => { |
| | | // æ¯æ¬¡è¿å
¥é¦é¡µé½å¼ºå¶å·æ°ç¨æ·ä¿¡æ¯åè·¯ç±æéï¼ä¸åæ¬å°ç¼å夿 |
| | | userStore.getInfo().then(() => { |
| | | userStore |
| | | .getRouters() |
| | | .then(() => { |
| | | filterMenuItemsByRoutes(); |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åè·¯ç±æé失败:", error); |
| | | }); |
| | | }); |
| | | getUserLoginFacotryList(); |
| | | // å¯å¨éç¥ç¶æå®æ¶å¨ |
| | | startStatusTimer(); |
| | | }); |
| | | onMounted(() => { |
| | | try { |
| | | const platform = uni.getSystemInfoSync().platform; |
| | | isCanvas2d.value = platform === "android" || platform === "ios"; |
| | | } catch (e) { |
| | | isCanvas2d.value = false; |
| | | } |
| | | loadHome(); |
| | | }); |
| | | </script> |
| | | |
| | | |
| | | <style scoped lang="scss"> |
| | | .content { |
| | | background: #f6f7fb; |
| | | min-height: 100vh; |
| | | // padding: 12px; |
| | | /* 为ææè®¾å¤è®¾ç½®åºç¡padding-topï¼å
å«å®å
¨åºï¼ */ |
| | | padding-top: calc(env(safe-area-inset-top) + 30px); |
| | | position: relative; |
| | | .page { |
| | | min-height: 100vh; |
| | | background: #f5f6fa; |
| | | } |
| | | |
| | | /* 为å®å设å¤è®¾ç½®æ´å¤§çé¡¶é¨å
è¾¹è· */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | padding-top: calc(env(safe-area-inset-top) + 45px); |
| | | /* #endif */ |
| | | .safe-top { |
| | | height: calc(env(safe-area-inset-top) + 10px); |
| | | } |
| | | |
| | | /* H5åå°ç¨åºå¹³å°çéç¨æ ·å¼ */ |
| | | /* #ifdef H5 || MP */ |
| | | padding-top: calc(env(safe-area-inset-top) + 30px); |
| | | /* #endif */ |
| | | .scroll { |
| | | height: calc(100vh - env(safe-area-inset-top) - 10px); |
| | | } |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="24" height="24" patternUnits="userSpaceOnUse"><circle cx="12" cy="12" r="1" fill="rgba(41, 121, 255, 0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>'); |
| | | pointer-events: none; |
| | | z-index: -1; |
| | | } |
| | | .section { |
| | | margin: 0 14px 14px; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: radial-gradient( |
| | | circle at 20% 80%, |
| | | rgba(41, 121, 255, 0.02) 0%, |
| | | transparent 55% |
| | | ), |
| | | radial-gradient( |
| | | circle at 80% 20%, |
| | | rgba(156, 39, 176, 0.015) 0%, |
| | | transparent 55% |
| | | ); |
| | | pointer-events: none; |
| | | z-index: -1; |
| | | } |
| | | } |
| | | .quick-section { |
| | | margin: 0 14px 10px; |
| | | padding: 6px 0 2px; |
| | | } |
| | | |
| | | .header-section { |
| | | margin-bottom: 1rem; |
| | | animation: fadeInDown 0.6s ease-out; |
| | | /* 为å®å设å¤é¢å¤è°æ´å¤´é¨ä½ç½® */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | margin-top: 10px; |
| | | /* #endif */ |
| | | } |
| | | .quick-icon { |
| | | width: 44px; |
| | | height: 44px; |
| | | border-radius: 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18); |
| | | } |
| | | |
| | | .currentFactory { |
| | | margin-top: 0.5rem; |
| | | margin-left: 0.25rem; |
| | | font-weight: 500; |
| | | display: flex; |
| | | } |
| | | .quick-icon-img { |
| | | width: 26px; |
| | | height: 26px; |
| | | } |
| | | |
| | | .factoryName { |
| | | width: auto; |
| | | } |
| | | .quick-text { |
| | | margin-top: 6px; |
| | | font-size: 12px; |
| | | color: #555555; |
| | | text-align: center; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | :deep(.u-text) { |
| | | align-items: center; |
| | | } |
| | | .section-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 8px 2px 10px; |
| | | } |
| | | |
| | | .hero-section { |
| | | margin: 0 12px; |
| | | margin-bottom: 12px; |
| | | animation: fadeInUp 0.6s ease-out 0.1s both; |
| | | } |
| | | .section-title { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .bg-img { |
| | | width: 100%; |
| | | height: 9.25rem; |
| | | background-image: url("../static/images/banner/backview.png"); |
| | | background-size: cover; |
| | | border-radius: 14px; |
| | | position: relative; |
| | | overflow: hidden; |
| | | box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08); |
| | | .title-bar { |
| | | width: 4px; |
| | | height: 16px; |
| | | border-radius: 2px; |
| | | background: #2f6bff; |
| | | } |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: -50%; |
| | | left: -50%; |
| | | width: 200%; |
| | | height: 200%; |
| | | background: conic-gradient( |
| | | from 0deg, |
| | | transparent, |
| | | rgba(255, 255, 255, 0.1), |
| | | transparent, |
| | | rgba(255, 255, 255, 0.05), |
| | | transparent |
| | | ); |
| | | animation: rotate 20s linear infinite; |
| | | } |
| | | .title-text { |
| | | font-size: 16px; |
| | | font-weight: 700; |
| | | color: #1f2937; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 7.5rem; |
| | | height: 7.5rem; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(255, 255, 255, 0.15) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | transform: translate(2.5rem, -2.5rem); |
| | | } |
| | | } |
| | | .section-action { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 6px; |
| | | color: #8a94a6; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .hero-content { |
| | | position: relative; |
| | | z-index: 1; |
| | | .action-text { |
| | | color: #8a94a6; |
| | | } |
| | | |
| | | padding: 14px 14px 18px 14px; |
| | | margin: 0 12px; |
| | | height: 100%; |
| | | } |
| | | .hero-wave { |
| | | height: 2.75rem; |
| | | } |
| | | .chev { |
| | | width: 8px; |
| | | height: 8px; |
| | | border-right: 2px solid #b9c0cf; |
| | | border-bottom: 2px solid #b9c0cf; |
| | | transform: rotate(45deg); |
| | | } |
| | | .chev.up { |
| | | transform: rotate(-135deg); |
| | | } |
| | | .chev.down { |
| | | transform: rotate(45deg); |
| | | } |
| | | .chev.right { |
| | | transform: rotate(-45deg); |
| | | } |
| | | .chev.small { |
| | | width: 7px; |
| | | height: 7px; |
| | | border-width: 2px; |
| | | } |
| | | |
| | | .hero-wave { |
| | | position: absolute; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | height: 2.75rem; |
| | | background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'><path fill='%23ffffff' fill-opacity='0.2' d='M0,224L48,218.7C96,213,192,203,288,197.3C384,192,480,192,576,176C672,160,768,128,864,122.7C960,117,1056,139,1152,144C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'></path></svg>") |
| | | no-repeat bottom center/cover; |
| | | pointer-events: none; |
| | | } |
| | | .overview { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .notice-section { |
| | | margin-bottom: 1rem; |
| | | animation: fadeInUp 0.6s ease-out 0.2s both; |
| | | } |
| | | .overview-card { |
| | | position: relative; |
| | | overflow: hidden; |
| | | border-radius: 12px; |
| | | padding: 14px 14px 12px; |
| | | border: 1px dashed rgba(31, 41, 55, 0.08); |
| | | } |
| | | |
| | | .notice { |
| | | width: 100%; |
| | | background: linear-gradient(135deg, #eaf2ff 0%, #bbdefb 100%); |
| | | border: 0.0625rem solid #e3f2fd; |
| | | border-radius: 0.75rem; |
| | | padding: 1rem; |
| | | box-shadow: 0 0.25rem 1.25rem rgba(41, 121, 255, 0.08); |
| | | position: relative; |
| | | overflow: hidden; |
| | | .overview-card.sales { |
| | | background: linear-gradient(135deg, #e9fbff 0%, #d8fbff 100%); |
| | | } |
| | | .overview-card.purchase { |
| | | background: linear-gradient(135deg, #fff4e7 0%, #ffe7ce 100%); |
| | | } |
| | | .overview-card.stock { |
| | | background: linear-gradient(135deg, #eaf0ff 0%, #dbe6ff 100%); |
| | | } |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: -50%; |
| | | left: -50%; |
| | | width: 200%; |
| | | height: 200%; |
| | | background: linear-gradient( |
| | | 45deg, |
| | | transparent, |
| | | rgba(255, 255, 255, 0.6), |
| | | transparent |
| | | ); |
| | | animation: shine 4s infinite; |
| | | } |
| | | .card-left { |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 5rem; |
| | | height: 5rem; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(255, 255, 255, 0.2) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | transform: translate(1.875rem, -1.875rem); |
| | | } |
| | | .card-title { |
| | | font-size: 14px; |
| | | font-weight: 700; |
| | | color: rgba(17, 24, 39, 0.85); |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | &:hover { |
| | | transform: translateY(-0.125rem); |
| | | box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.1); |
| | | } |
| | | } |
| | | .card-metrics { |
| | | display: flex; |
| | | gap: 12px; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | } |
| | | |
| | | @keyframes shine { |
| | | 0% { |
| | | transform: translateX(-100%) translateY(-100%) rotate(45deg); |
| | | } |
| | | 100% { |
| | | transform: translateX(100%) translateY(100%) rotate(45deg); |
| | | } |
| | | } |
| | | .metric { |
| | | display: flex; |
| | | align-items: center; |
| | | min-width: 0; |
| | | flex: 1; |
| | | } |
| | | |
| | | @keyframes fadeInDown { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(-1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | .metric-label { |
| | | font-size: 11px; |
| | | color: rgba(107, 114, 128, 0.9); |
| | | white-space: nowrap; |
| | | width: 80px; |
| | | } |
| | | |
| | | @keyframes fadeInUp { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | .metric-value { |
| | | font-size: 14px; |
| | | font-weight: 800; |
| | | color: rgba(17, 24, 39, 0.9); |
| | | white-space: nowrap; |
| | | flex: 1 1 auto; |
| | | min-width: 0; |
| | | overflow: visible; |
| | | text-overflow: clip; |
| | | } |
| | | |
| | | @keyframes fadeInScale { |
| | | 0% { |
| | | opacity: 0; |
| | | transform: translateY(0.5rem) scale(0.96); |
| | | } |
| | | 100% { |
| | | opacity: 1; |
| | | transform: translateY(0) scale(1); |
| | | } |
| | | } |
| | | .metric-label, |
| | | .metric-value { |
| | | line-height: 1.2; |
| | | } |
| | | |
| | | .notice-content { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .metric-value { |
| | | font-variant-numeric: tabular-nums; |
| | | } |
| | | |
| | | .notice-left { |
| | | margin-right: 1rem; |
| | | } |
| | | .overview-card.purchase .metric-value { |
| | | color: rgba(124, 84, 28, 0.95); |
| | | } |
| | | .overview-card.stock .metric-value { |
| | | color: rgba(24, 64, 136, 0.95); |
| | | } |
| | | |
| | | .notice-status { |
| | | font-weight: 600; |
| | | font-size: 1rem; |
| | | color: #1976d2; |
| | | } |
| | | .card-icon { |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 10px; |
| | | width: 78px; |
| | | opacity: 0.35; |
| | | } |
| | | |
| | | .notice-separator { |
| | | width: 0.0625rem; |
| | | height: 1.5rem; |
| | | background: #e0e0e0; |
| | | margin-right: 1rem; |
| | | } |
| | | .analysis-card { |
| | | background: #ffffff; |
| | | border-radius: 14px; |
| | | padding: 12px; |
| | | border: 1px solid rgba(148, 163, 184, 0.18); |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .notice-right { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex: 1; |
| | | } |
| | | .chart-row { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .notice-label { |
| | | color: #333; |
| | | font-size: 0.875rem; |
| | | font-weight: 500; |
| | | margin-right: 0.75rem; |
| | | } |
| | | .summary { |
| | | padding: 2px 2px 10px; |
| | | } |
| | | .summary-main { |
| | | display: flex; |
| | | align-items: baseline; |
| | | justify-content: space-between; |
| | | gap: 10px; |
| | | } |
| | | .summary-label { |
| | | font-size: 12px; |
| | | color: #6b7280; |
| | | white-space: nowrap; |
| | | } |
| | | .summary-value { |
| | | font-size: 18px; |
| | | font-weight: 800; |
| | | color: #1f2937; |
| | | text-align: right; |
| | | min-width: 0; |
| | | white-space: nowrap; |
| | | } |
| | | .summary-sub { |
| | | margin-top: 6px; |
| | | display: flex; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .notice-text { |
| | | font-weight: 400; |
| | | font-size: 0.875rem; |
| | | color: #666666; |
| | | } |
| | | .list-row { |
| | | width: 100%; |
| | | } |
| | | .summary-chip { |
| | | flex: 1; |
| | | background: rgba(47, 107, 255, 0.06); |
| | | border: 1px solid rgba(47, 107, 255, 0.12); |
| | | border-radius: 10px; |
| | | padding: 6px 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | gap: 8px; |
| | | min-width: 0; |
| | | } |
| | | .chip-label { |
| | | font-size: 11px; |
| | | color: #6b7280; |
| | | white-space: nowrap; |
| | | } |
| | | .chip-value { |
| | | font-size: 12px; |
| | | font-weight: 700; |
| | | color: #2f6bff; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .notice-number { |
| | | font-weight: 600; |
| | | font-size: 1rem; |
| | | color: #1976d2; |
| | | margin-left: 0.25rem; |
| | | } |
| | | .chart-box { |
| | | height: 170px; |
| | | width: 100%; |
| | | } |
| | | .chart-box.big { |
| | | height: 220px; |
| | | width: 100%; |
| | | } |
| | | |
| | | .notice-unit { |
| | | font-weight: 600; |
| | | font-size: 1rem; |
| | | color: #1976d2; |
| | | margin-left: 0.25rem; |
| | | } |
| | | .customer-swiper { |
| | | height: 140px; |
| | | } |
| | | |
| | | /* åè½æ¨¡åæ ·å¼ */ |
| | | .common-module { |
| | | margin-bottom: 12px; |
| | | background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%); |
| | | // border-radius: 14px; |
| | | padding: 12px; |
| | | box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06); |
| | | border: none; |
| | | position: relative; |
| | | overflow: hidden; |
| | | transition: all 0.3s ease; |
| | | .customer-page { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 14px; |
| | | padding-top: 4px; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 3.75rem; |
| | | height: 3.75rem; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(0, 0, 0, 0.02) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | transform: translate(1.875rem, -1.875rem); |
| | | } |
| | | } |
| | | |
| | | .marketing-module { |
| | | --module-color: #2979ff; |
| | | } |
| | | |
| | | .purchase-module { |
| | | --module-color: #1976d2; |
| | | } |
| | | |
| | | .collaboration-module { |
| | | --module-color: #4caf50; |
| | | } |
| | | |
| | | .production-module { |
| | | --module-color: #ff9800; |
| | | } |
| | | |
| | | .equipment-module { |
| | | --module-color: #9c27b0; |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .module-title-container { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .module-title { |
| | | color: #333333; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | position: relative; |
| | | } |
| | | |
| | | .module-subtitle { |
| | | color: #666666; |
| | | font-size: 0.75rem; |
| | | font-weight: 400; |
| | | margin-left: 0.5rem; |
| | | } |
| | | |
| | | .module-content { |
| | | width: 100%; |
| | | display: grid; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .icon-container { |
| | | width: 46px; |
| | | height: 46px; |
| | | border-radius: 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 0.375rem; |
| | | box-shadow: 0 10px 20px rgba(17, 24, 39, 0.12); |
| | | transition: all 0.2s ease; |
| | | position: relative; |
| | | overflow: hidden; |
| | | animation: fadeInScale 0.5s ease both; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: linear-gradient( |
| | | 135deg, |
| | | rgba(255, 255, 255, 0.1) 0%, |
| | | transparent 50%, |
| | | rgba(255, 255, 255, 0.05) 100% |
| | | ); |
| | | opacity: 0; |
| | | transition: opacity 0.3s ease; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | border-radius: 0.75rem; |
| | | background: linear-gradient( |
| | | 45deg, |
| | | transparent, |
| | | rgba(255, 255, 255, 0.2), |
| | | transparent |
| | | ); |
| | | opacity: 0; |
| | | transition: opacity 0.3s ease; |
| | | } |
| | | |
| | | &:hover { |
| | | transform: translateY(-0.1875rem) scale(1.02); |
| | | box-shadow: 0 0.5rem 1.5625rem rgba(0, 0, 0, 0.18); |
| | | |
| | | &::before, |
| | | &::after { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | &:active { |
| | | transform: scale(0.97); |
| | | box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.18); |
| | | } |
| | | } |
| | | |
| | | .item-label { |
| | | font-size: 12px; |
| | | color: #555555; |
| | | text-align: center; |
| | | display: block; |
| | | line-height: 1.4; |
| | | font-weight: 500; |
| | | margin-top: 4px; |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | /* grid-item é´è·æ´ç´§åä¸è§è§æ´å±
ä¸ */ |
| | | :deep(.up-grid-item) { |
| | | padding: 6px 0; |
| | | } |
| | | :deep(.up-grid-item__content) { |
| | | padding: 0; |
| | | } |
| | | |
| | | .grid-text { |
| | | font-size: 0.875rem; |
| | | color: #909399; |
| | | padding: 0.625rem 0 1.25rem 0; |
| | | /* #ifndef APP-PLUS */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | } |
| | | |
| | | /* æè²æ¨¡å¼éé
*/ |
| | | @media (prefers-color-scheme: dark) { |
| | | .content { |
| | | background: linear-gradient(135deg, #121317 0%, #161a20 100%); |
| | | } |
| | | .content::before { |
| | | background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255, 255, 255, 0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>'); |
| | | } |
| | | .common-module { |
| | | background: linear-gradient(135deg, #1e1f24 0%, #23252b 100%); |
| | | box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35); |
| | | } |
| | | .module-title { |
| | | color: #e9edf3; |
| | | } |
| | | .module-subtitle, |
| | | .item-label, |
| | | .notice-text, |
| | | .notice-unit, |
| | | .notice-label { |
| | | color: #c7cbd3; |
| | | } |
| | | .notice { |
| | | background: linear-gradient(135deg, #1b2330 0%, #1a2432 100%); |
| | | border-color: rgba(255, 255, 255, 0.06); |
| | | box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4); |
| | | } |
| | | .notice-status, |
| | | .notice-number { |
| | | color: #8ab4ff; |
| | | } |
| | | .bg-img { |
| | | background: linear-gradient(135deg, #1f4fb9 0%, #0e3a8a 100%); |
| | | } |
| | | } |
| | | |
| | | @keyframes rotate { |
| | | from { |
| | | transform: rotate(0deg); |
| | | } |
| | | to { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInDown { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(-1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInUp { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInScale { |
| | | 0% { |
| | | opacity: 0; |
| | | transform: translateY(0.5rem) scale(0.96); |
| | | } |
| | | 100% { |
| | | opacity: 1; |
| | | transform: translateY(0) scale(1); |
| | | } |
| | | } |
| | | |
| | | .notice-left { |
| | | margin-right: 1rem; |
| | | } |
| | | .notice-status { |
| | | font-size: 1rem; |
| | | } |
| | | .notice-separator { |
| | | width: 0.0625rem; |
| | | height: 1.5rem; |
| | | margin-right: 1rem; |
| | | } |
| | | .notice-label { |
| | | font-size: 0.875rem; |
| | | margin-right: 0.75rem; |
| | | } |
| | | .notice-text { |
| | | font-size: 0.875rem; |
| | | } |
| | | .notice-number { |
| | | font-size: 1rem; |
| | | margin-left: 0.25rem; |
| | | } |
| | | .notice-unit { |
| | | font-size: 0.875rem; |
| | | margin-left: 0.125rem; |
| | | } |
| | | .customer-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 2px; |
| | | } |
| | | |
| | | .common-module { |
| | | margin-bottom: 12px; |
| | | background: #ffffff; |
| | | // border-radius: 16px; |
| | | // padding: 0px; |
| | | padding: 12px 0; |
| | | box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); |
| | | border: 1px solid rgba(148, 163, 184, 0.18); |
| | | position: relative; |
| | | overflow: hidden; |
| | | transition: all 0.22s ease; |
| | | .customer-row { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | gap: 8px; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: -40px; |
| | | right: -40px; |
| | | width: 90px; |
| | | height: 90px; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(148, 163, 184, 0.08) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | } |
| | | .customer-name { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | min-width: 0; |
| | | flex: 1 1 auto; |
| | | } |
| | | |
| | | &:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12); |
| | | } |
| | | } |
| | | .rank-icon { |
| | | width: 18px; |
| | | height: 18px; |
| | | flex: 0 0 auto; |
| | | } |
| | | |
| | | .marketing-module { |
| | | --module-color: #2979ff; |
| | | } |
| | | .name-text { |
| | | font-size: 13px; |
| | | color: #1f2937; |
| | | font-weight: 600; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .purchase-module { |
| | | --module-color: #1976d2; |
| | | } |
| | | .amount { |
| | | display: flex; |
| | | align-items: baseline; |
| | | gap: 4px; |
| | | color: #1f2937; |
| | | font-weight: 800; |
| | | flex: 0 0 auto; |
| | | } |
| | | .amount-num { |
| | | font-size: 18px; |
| | | line-height: 1; |
| | | } |
| | | .amount-unit { |
| | | font-size: 12px; |
| | | color: #6b7280; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .collaboration-module { |
| | | --module-color: #4caf50; |
| | | } |
| | | .customer-rate { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 4px; |
| | | flex: 0 0 auto; |
| | | white-space: nowrap; |
| | | } |
| | | .rate-label { |
| | | font-size: 11px; |
| | | color: #6b7280; |
| | | } |
| | | .rate-value { |
| | | font-size: 12px; |
| | | font-weight: 600; |
| | | color: #2f6bff; |
| | | } |
| | | |
| | | .production-module { |
| | | --module-color: #ff9800; |
| | | } |
| | | .customer-sub { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | color: #6b7280; |
| | | font-size: 12px; |
| | | } |
| | | .sub-label { |
| | | color: #6b7280; |
| | | } |
| | | .sub-value { |
| | | font-weight: 700; |
| | | color: #6b7280; |
| | | } |
| | | .sub-value.up { |
| | | color: #16a34a; |
| | | } |
| | | .sub-value.down { |
| | | color: #dc2626; |
| | | } |
| | | |
| | | .equipment-module { |
| | | --module-color: #9c27b0; |
| | | } |
| | | .arrow { |
| | | width: 0; |
| | | height: 0; |
| | | border-left: 4px solid transparent; |
| | | border-right: 4px solid transparent; |
| | | } |
| | | .arrow.up { |
| | | border-bottom: 6px solid #16a34a; |
| | | transform: translateY(-1px); |
| | | } |
| | | .arrow.down { |
| | | border-top: 6px solid #dc2626; |
| | | transform: translateY(1px); |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 18px; |
| | | padding-left: 18px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | .dots { |
| | | display: flex; |
| | | gap: 6px; |
| | | justify-content: center; |
| | | margin-top: 6px; |
| | | } |
| | | .dot { |
| | | width: 8px; |
| | | height: 4px; |
| | | border-radius: 99px; |
| | | background: rgba(148, 163, 184, 0.35); |
| | | } |
| | | .dot.active { |
| | | width: 14px; |
| | | background: #2f6bff; |
| | | } |
| | | |
| | | .module-title-container { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .bottom-space { |
| | | height: 24px; |
| | | } |
| | | |
| | | .module-title { |
| | | color: #1f2933; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | position: relative; |
| | | @media (prefers-color-scheme: dark) { |
| | | .page { |
| | | background: #121317; |
| | | } |
| | | |
| | | .module-content { |
| | | width: 100%; |
| | | display: grid; |
| | | gap: 10px; |
| | | .title-text { |
| | | color: #e9edf3; |
| | | } |
| | | |
| | | .icon-container { |
| | | width: 48px; |
| | | height: 48px; |
| | | border-radius: 14px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 4px; |
| | | box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18); |
| | | transition: all 0.18s ease; |
| | | position: relative; |
| | | overflow: hidden; |
| | | animation: fadeInScale 0.5s ease both; |
| | | background: linear-gradient(135deg, #3b82f6, #2563eb); |
| | | .overview-card, |
| | | .filter-item, |
| | | .analysis-card { |
| | | border-color: rgba(255, 255, 255, 0.08); |
| | | } |
| | | |
| | | .marketing-module .icon-container { |
| | | background: linear-gradient(135deg, #3b82f6, #2563eb); |
| | | .filter-item, |
| | | .analysis-card { |
| | | background: #1e1f24; |
| | | } |
| | | .purchase-module .icon-container { |
| | | background: linear-gradient(135deg, #1d4ed8, #0f766e); |
| | | .name-text, |
| | | .amount { |
| | | color: #e9edf3; |
| | | } |
| | | .collaboration-module .icon-container { |
| | | background: linear-gradient(135deg, #22c55e, #16a34a); |
| | | .amount-unit, |
| | | .metric-label, |
| | | .action-text, |
| | | .section-action, |
| | | .customer-sub, |
| | | .sub-label, |
| | | .sub-value { |
| | | color: #aab2c1; |
| | | } |
| | | .equipment-module .icon-container { |
| | | background: linear-gradient(135deg, #a855f7, #7c3aed); |
| | | .summary-value { |
| | | color: #e9edf3; |
| | | } |
| | | |
| | | .icon-container::before { |
| | | content: ""; |
| | | position: absolute; |
| | | inset: 0; |
| | | border-radius: inherit; |
| | | background: radial-gradient( |
| | | circle at 20% 20%, |
| | | rgba(255, 255, 255, 0.26), |
| | | transparent 55% |
| | | ); |
| | | opacity: 0.8; |
| | | pointer-events: none; |
| | | .summary-chip { |
| | | background: rgba(47, 107, 255, 0.12); |
| | | border-color: rgba(47, 107, 255, 0.18); |
| | | } |
| | | |
| | | .icon-container:active { |
| | | transform: scale(0.94); |
| | | box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25); |
| | | .overview-card.sales { |
| | | background: linear-gradient(135deg, rgba(30, 91, 104, 0.35) 0%, rgba(18, 68, 80, 0.35) 100%); |
| | | } |
| | | |
| | | .item-label { |
| | | font-size: 22rpx; |
| | | margin-top: 4px; |
| | | margin-bottom: 20px; |
| | | .overview-card.purchase { |
| | | background: linear-gradient(135deg, rgba(108, 76, 33, 0.35) 0%, rgba(80, 55, 20, 0.35) 100%); |
| | | } |
| | | .grid-text { |
| | | font-size: 0.875rem; |
| | | .overview-card.stock { |
| | | background: linear-gradient(135deg, rgba(36, 54, 110, 0.35) 0%, rgba(22, 35, 74, 0.35) 100%); |
| | | } |
| | | |
| | | @media (prefers-color-scheme: dark) { |
| | | .common-module { |
| | | box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35); |
| | | } |
| | | .notice { |
| | | box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4); |
| | | } |
| | | .metric-value { |
| | | color: #e9edf3; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <!-- <view class="header-section">--> |
| | | <!-- <view class="currentFactory">--> |
| | | <!-- <up-text type="primary"--> |
| | | <!-- :text="userStore.currentFactoryName"--> |
| | | <!-- @click="show = true"--> |
| | | <!-- size="18"--> |
| | | <!-- class="factoryName"--> |
| | | <!-- suffixIcon="arrow-right"--> |
| | | <!-- :iconStyle="iconStyle"></up-text>--> |
| | | <!-- </view>--> |
| | | <!-- <up-picker :show="show"--> |
| | | <!-- :columns="factoryList"--> |
| | | <!-- @confirm="changeFactory"--> |
| | | <!-- @cancel="show = false"></up-picker>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="hero-section">--> |
| | | <!-- <view class="bg-img">--> |
| | | <!-- <view class="hero-content">--> |
| | | <!-- <!– é¢çï¼å¦åç»éè¦å¯å¨æ¤æ¾ logo æç®çæç¤º –>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="hero-wave"></view>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="notice-section">--> |
| | | <!-- <view class="notice">--> |
| | | <!-- <view class="notice-content">--> |
| | | <!-- <view class="notice-left">--> |
| | | <!-- <text class="notice-status">éç¥</text>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="notice-separator"></view>--> |
| | | <!-- <view class="notice-right">--> |
| | | <!-- <text class="notice-label">{{currentStatus}}</text>--> |
| | | <!-- <text class="notice-text">彿¥éå®è®¾å¤æ°:<text class="notice-number">{{number}}<text class="notice-unit">个</text></text></text>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- è¥éç®¡çæ¨¡å --> |
| | | <view class="common-module marketing-module" |
| | | v-if="hasMarketingItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">è¥é管ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in marketingItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- <!– éè´ç®¡çæ¨¡å –>--> |
| | | <view class="common-module purchase-module" |
| | | v-if="hasPurchaseItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">éè´ç®¡ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in purchaseItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- <!– åååå
¬æ¨¡å –> --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasCollaborationItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">åååå
¬</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in collaborationItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- å®å
¨ç产模å --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasSafetyItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">å®å
¨ç产</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in safetyItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- è´¨éç®¡çæ¨¡å --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasQualityItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">è´¨é管ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in qualityItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 人åèµæºæ¨¡å --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasHumanResourcesItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">人åèµæº</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in humanResourcesItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- çäº§ç®¡æ§æ¨¡å --> |
| | | <view class="common-module equipment-module" |
| | | v-if="hasProductionItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">ç产管æ§</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in productionItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 设å¤ç®¡ç模å --> |
| | | <view class="common-module equipment-module" |
| | | v-if="hasEquipmentItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">设å¤ç®¡ç</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in equipmentItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, nextTick, reactive, computed } from "vue"; |
| | | import { userLoginFacotryList } from "@/api/login"; |
| | | import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting"; |
| | | import modal from "@/plugins/modal"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | |
| | | const userStore = useUserStore(); |
| | | const show = ref(false); |
| | | const factoryList = ref([]); |
| | | const factoryListTem = ref([]); |
| | | const iconStyle = { |
| | | fontSize: "1.125rem", |
| | | color: "#2979ff", |
| | | }; |
| | | |
| | | // éç¥ç¶æåæ¢ |
| | | const statusList = ["éå®", "éè´"]; |
| | | let statusIndex = 0; |
| | | const currentStatus = ref(statusList[0]); |
| | | const number = ref(7643); |
| | | |
| | | // 宿¶å¨åæ¢éç¥ç¶æ |
| | | const startStatusTimer = () => { |
| | | setInterval(() => { |
| | | statusIndex = (statusIndex + 1) % statusList.length; |
| | | currentStatus.value = statusList[statusIndex]; |
| | | }, 3000); |
| | | }; |
| | | |
| | | // è¥é管çåè½æ°æ® |
| | | const marketingItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/xiaoshoutaizhang@2x.png", |
| | | label: "éå®å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kaipiaodengji@2x.png", |
| | | label: "å¼ç¥¨ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kaipiaotaizhang@2x.png", |
| | | label: "å¼ç¥¨å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huikuandengji@2x.png", |
| | | label: "忬¾ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huikuanliushui@2x.png", |
| | | label: "忬¾æµæ°´", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kehuwanglai@2x.png", |
| | | label: "客æ·å¾æ¥", |
| | | }, |
| | | ]); |
| | | |
| | | // éè´ç®¡çåè½æ°æ® |
| | | const purchaseItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "éè´å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/laipiaodengji@2x.png", |
| | | label: "æ¥ç¥¨ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/laipiaotaizhang@2x.png", |
| | | label: "æ¥ç¥¨å°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fukuanjingji@2x.png", |
| | | label: "仿¬¾ç»è®°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fukuanliushui@2x.png", |
| | | label: "仿¬¾æµæ°´", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/gongyingshangwanglai@2x.png", |
| | | label: "ä¾åºå徿¥", |
| | | }, |
| | | ]); |
| | | const humanResourcesItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "æå¡ç¾å°", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "人åèªèµ", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "åå管ç", |
| | | }, |
| | | ]); |
| | | const qualityItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "åæææ£éª", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "è¿ç¨æ£éª", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "åºåæ£éª", |
| | | }, |
| | | ]); |
| | | const safetyItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "è§ç¨ä¸èµè´¨", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "å±é©æºå°è´¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "å±é©ä½ä¸å®¡æ¹", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "éæ£ææ¥ä¸æ¥", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "å±é©ç©æç®¡æ§", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "åºæ¥é¢æ¡æ¥é
", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "äºæ
䏿¥è®°å½", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guzhangfenxi@2x.png", |
| | | label: "å®å
¨å¹è®èæ ¸", |
| | | }, |
| | | ]); |
| | | // åååå
¬åè½æ°æ® |
| | | const collaborationItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/baoxiaoguanli.png", |
| | | label: "åå审æ¹", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/huiyiliebiao@2x.png", |
| | | label: "ä¼è®®ç®¡ç", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/tongzhigonggao@2x.png", |
| | | label: "éç¥å
Œ", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/zhishiku@2x.png", |
| | | label: "ç¥è¯åº", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/yongyinguanli@2x.png", |
| | | label: "ç¨å°ç®¡ç", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/guizhangzhidu@2x.png", |
| | | label: "è§ç« å¶åº¦", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kehubaifang@2x.png", |
| | | label: "å®¢æ·æè®¿", |
| | | }, |
| | | ]); |
| | | |
| | | // ç产管æ§åè½æ°æ® |
| | | const productionItems = reactive([ |
| | | // { |
| | | // icon: "/static/images/icon/shengchandingdan@2x.png", |
| | | // label: "ç产订å", |
| | | // bgColor: "#FF9800", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaigong@2x.png", |
| | | // label: "ç产派工", |
| | | // bgColor: "#FF6B35", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaichan@2x.png", |
| | | // label: "å·¥åºæäº§", |
| | | // bgColor: "#E91E63", |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong@2x.png", |
| | | label: "ç产æ¥å·¥", |
| | | bgColor: "#673AB7", |
| | | }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanhesuan@2x.png", |
| | | // label: "çäº§æ ¸ç®", |
| | | // bgColor: "#3F51B5", |
| | | // }, |
| | | ]); |
| | | |
| | | // 设å¤ç®¡çåè½æ°æ® |
| | | const equipmentItems = reactive([ |
| | | // { |
| | | // icon: '/static/images/icon/shebeitaizhang@2x.png', |
| | | // label: '设å¤å°è´¦', |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shbeibaoxiu@2x.png", |
| | | label: "è¿è¡ç®¡ç", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/shbeibaoxiu@2x.png", |
| | | label: "è®¾å¤æ¥ä¿®", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/shbeibaoyang@2x.png", |
| | | label: "设å¤ä¿å
»", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xunjianshangchuan@2x.png", |
| | | label: "设å¤å·¡æ£", |
| | | }, |
| | | ]); |
| | | |
| | | // å¤ç常ç¨åè½ç¹å» |
| | | const handleCommonItemClick = item => { |
| | | // æ ¹æ®ä¸åçåè½é¡¹è¿è¡è·³è½¬ |
| | | switch (item.label) { |
| | | case "éå®å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/salesAccount/index", |
| | | }); |
| | | break; |
| | | case "å¼ç¥¨ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/invoicingRegistration/index", |
| | | }); |
| | | break; |
| | | case "å¼ç¥¨å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/invoiceLedger/index", |
| | | }); |
| | | break; |
| | | case "忬¾ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPayment/index", |
| | | }); |
| | | break; |
| | | case "忬¾æµæ°´": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPaymentHistory/index", |
| | | }); |
| | | break; |
| | | case "客æ·å¾æ¥": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPaymentLedger/index", |
| | | }); |
| | | break; |
| | | case "éè´å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/procurementLedger/index", |
| | | }); |
| | | break; |
| | | case "æ¥ç¥¨ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/invoiceEntry/index", |
| | | }); |
| | | break; |
| | | case "æ¥ç¥¨å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/procurementInvoiceLedger/index", |
| | | }); |
| | | break; |
| | | case "仿¬¾ç»è®°": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/paymentEntry/index", |
| | | }); |
| | | break; |
| | | case "仿¬¾æµæ°´": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/receiptPaymentHistory/index", |
| | | }); |
| | | break; |
| | | case "ä¾åºå徿¥": |
| | | uni.navigateTo({ |
| | | url: "/pages/procurementManagement/paymentLedger/index", |
| | | }); |
| | | break; |
| | | case "å
¬åºç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index1", |
| | | }); |
| | | break; |
| | | case "请å管ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index2", |
| | | }); |
| | | break; |
| | | case "åºå·®ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index3", |
| | | }); |
| | | break; |
| | | case "æ¥é管ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index4", |
| | | }); |
| | | break; |
| | | case "åå审æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/indexItem?label=åå审æ¹", |
| | | }); |
| | | break; |
| | | case "ä¼è®®ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/indexItem?label=ä¼è®®ç®¡ç", |
| | | }); |
| | | break; |
| | | case "éç¥å
Œ": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/noticeManagement/index", |
| | | }); |
| | | break; |
| | | case "ç¥è¯åº": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/knowledgeBase/index", |
| | | }); |
| | | break; |
| | | case "ç¨å°ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/sealManagement/index", |
| | | }); |
| | | break; |
| | | case "è§ç« å¶åº¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/rulesRegulationsManagement/index", |
| | | }); |
| | | break; |
| | | case "å®¢æ·æè®¿": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/clientVisit/index", |
| | | }); |
| | | break; |
| | | case "éè´ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index5", |
| | | }); |
| | | break; |
| | | case "æ¥ä»·ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index6", |
| | | }); |
| | | break; |
| | | case "å货审æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index7", |
| | | }); |
| | | break; |
| | | case "ä¼è®®è®¾ç½®": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetingSettings/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®å表": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetingList/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®ç³è¯·": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetApplication/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®å®¡æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetExamine/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®åå¸": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetPublish/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®æ»ç»": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetSummary/index", |
| | | }); |
| | | break; |
| | | case "ä¼è®®çæ¿": |
| | | uni.navigateTo({ |
| | | url: "/pages/managementMeetings/meetingBoard/index", |
| | | }); |
| | | break; |
| | | case "ç产订å": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/productionOrder/index", |
| | | }); |
| | | break; |
| | | case "ç产派工": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/productionDispatching/index", |
| | | }); |
| | | break; |
| | | case "å·¥åºæäº§": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/processScheduling/index", |
| | | }); |
| | | break; |
| | | case "ç产æ¥å·¥": |
| | | getcode(); |
| | | break; |
| | | case "çäº§æ ¸ç®": |
| | | uni.navigateTo({ |
| | | url: "/pages/productionManagement/productionAccounting/index", |
| | | }); |
| | | break; |
| | | case "设å¤å°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/ledger/index", |
| | | }); |
| | | break; |
| | | case "è¿è¡ç®¡ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/runManagement/index", |
| | | }); |
| | | break; |
| | | case "è®¾å¤æ¥ä¿®": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/repair/index", |
| | | }); |
| | | break; |
| | | case "设å¤ä¿å
»": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/upkeep/index", |
| | | }); |
| | | break; |
| | | case "设å¤å·¡æ£": |
| | | uni.navigateTo({ |
| | | url: "/pages/inspectionUpload/index", |
| | | }); |
| | | break; |
| | | case "åæè¿½æº¯": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/faultAnalysis/index", |
| | | }); |
| | | break; |
| | | case "æºè½æ´¾å": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/smartDispatch/index", |
| | | }); |
| | | break; |
| | | case "ä½ä¸æå¯¼": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/sop/index", |
| | | }); |
| | | break; |
| | | case "ç»æéªè¯": |
| | | uni.navigateTo({ |
| | | url: "/pages/equipmentManagement/verification/index", |
| | | }); |
| | | break; |
| | | case "è§ç¨ä¸èµè´¨": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/safeQualifications/index", |
| | | }); |
| | | break; |
| | | case "å±é©æºå°è´¦": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/hazardSourceLedger/index", |
| | | }); |
| | | break; |
| | | case "å±é©ä½ä¸å®¡æ¹": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/index8", |
| | | }); |
| | | break; |
| | | case "éæ£ææ¥ä¸æ¥": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/dangerInvestigation/index", |
| | | }); |
| | | break; |
| | | case "å±é©ç©æç®¡æ§": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/hazardousMaterialsControl/index", |
| | | }); |
| | | break; |
| | | case "åºæ¥é¢æ¡æ¥é
": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/emergencyPlanReview/index", |
| | | }); |
| | | break; |
| | | case "äºæ
䏿¥è®°å½": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/accidentReportingRecord/index", |
| | | }); |
| | | break; |
| | | case "å®å
¨å¹è®èæ ¸": |
| | | uni.navigateTo({ |
| | | url: "/pages/safeProduction/safetyTrainingAssessment/index", |
| | | }); |
| | | break; |
| | | case "æå¡ç¾å°": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/attendance/checkin", |
| | | }); |
| | | break; |
| | | case "人åèªèµ": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/monthlyStatistics/index", |
| | | }); |
| | | break; |
| | | case "åå管ç": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/contractManagement/index", |
| | | }); |
| | | break; |
| | | case "åæææ£éª": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/materialInspection/index", |
| | | }); |
| | | break; |
| | | case "è¿ç¨æ£éª": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/processInspection/index", |
| | | }); |
| | | break; |
| | | case "åºåæ£éª": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/finalInspection/index", |
| | | }); |
| | | break; |
| | | default: |
| | | uni.showToast({ |
| | | title: `ç¹å»äº${item.label}`, |
| | | icon: "none", |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // å建对åç»ä»¶çå¼ç¨ |
| | | const uToastRef = ref(null); |
| | | |
| | | function getUserLoginFacotryList() { |
| | | userLoginFacotryList({ userName: userStore.nickName }) |
| | | .then(res => { |
| | | // æ£æ¥res.dataæ¯å¦ä¸ºæ°ç» |
| | | factoryList.value[0] = []; |
| | | if (res.data && Array.isArray(res.data)) { |
| | | factoryListTem.value = res.data; |
| | | res.data.forEach(item => { |
| | | factoryList.value[0].push(item.deptName); |
| | | }); |
| | | } else { |
| | | // 妿res.data䏿¯æ°ç»ï¼è®¾ç½®ä¸ºç©ºæ°ç» |
| | | factoryList.value = []; |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | modal.msgError("è·åå
¬å¸å表失败:", error); |
| | | factoryList.value = []; |
| | | }); |
| | | } |
| | | const getcode = () => { |
| | | uni.scanCode({ |
| | | success: async res => { |
| | | // è§£æäºç»´ç å
容 |
| | | const scanResult = res.result; |
| | | let orderRow = ""; |
| | | |
| | | // å¤ææ«æç»ææ¯å¦ä¸ºçº¯æ°åï¼idï¼ |
| | | const isNumericId = /^\d+$/.test(scanResult.trim()); |
| | | |
| | | if (isNumericId) { |
| | | // 妿æ¯çº¯æ°åï¼æ ¹æ® id è·åå·¥åæ°æ® |
| | | const workOrderId = scanResult.trim(); |
| | | modal.loading("æ£å¨è·åå·¥åä¿¡æ¯..."); |
| | | try { |
| | | const workRes = await getProductWorkOrderById({ id: workOrderId }); |
| | | modal.closeLoading(); |
| | | |
| | | console.log("å·¥åæ¥è¯¢ç»æ:", workRes); |
| | | |
| | | if (workRes.code === 200 && workRes.data) { |
| | | // æ°æ¥å£è¿åçæ¯å个对象ï¼ä¸æ¯æ°ç» |
| | | const workData = workRes.data; |
| | | console.log("工忰æ®:", workData); |
| | | |
| | | orderRow = JSON.stringify({ |
| | | id: workData.id || workOrderId, |
| | | planQuantity: workData.planQuantity - workData.completeQuantity, |
| | | productProcessRouteItemId: |
| | | workData.productProcessRouteItemId || |
| | | workData.产åå·¥èºè·¯çº¿é¡¹ID || |
| | | "", |
| | | }); |
| | | |
| | | console.log("æé çorderRow:", orderRow); |
| | | } else { |
| | | modal.msgError("æªæ¾å°å¯¹åºçå·¥åä¿¡æ¯"); |
| | | return; |
| | | } |
| | | } catch (error) { |
| | | modal.closeLoading(); |
| | | console.error("è·åå·¥åä¿¡æ¯å¤±è´¥:", error); |
| | | modal.msgError("è·åå·¥åä¿¡æ¯å¤±è´¥: " + (error.message || "æªç¥é误")); |
| | | return; |
| | | } |
| | | } else { |
| | | // 妿䏿¯çº¯æ°åï¼å°è¯ä»æ«ç ç»æä¸æåorderRowåæ° |
| | | try { |
| | | // å¤çæ··åæ ¼å¼: http://...?orderRow={...} |
| | | const orderRowStart = scanResult.indexOf("orderRow={"); |
| | | if (orderRowStart !== -1) { |
| | | // æåä»orderRow={å¼å§çJSONå
容 |
| | | const jsonPart = scanResult.substring(orderRowStart + 9); // 9æ¯"orderRow=".length |
| | | orderRow = jsonPart; |
| | | } else { |
| | | // å¦æç´æ¥æ¯JSONå符串ï¼å°è¯è§£æ |
| | | orderRow = scanResult; |
| | | } |
| | | } catch (e) { |
| | | console.error(e, "è§£æå¤±è´¥====????====="); |
| | | orderRow = ""; |
| | | } |
| | | |
| | | // éªè¯æ¯å¦ä¸ºææçJSON |
| | | try { |
| | | JSON.parse(orderRow); |
| | | } catch (error) { |
| | | modal.msgError("订åè§£æå¤±è´¥ï¼è¯·æ£æ¥äºç»´ç æ ¼å¼"); |
| | | return; |
| | | } |
| | | } |
| | | // æ«ç æåå跳转å°ç产æ¥å·¥é¡µé¢ï¼å¹¶ä¼ éorderRowåæ° |
| | | uni.navigateTo({ |
| | | url: `/pages/productionManagement/productionReport/index?orderRow=${orderRow}`, |
| | | }); |
| | | }, |
| | | fail: err => { |
| | | uni.showToast({ |
| | | title: "æ«ç 失败", |
| | | icon: "none", |
| | | }); |
| | | }, |
| | | }); |
| | | }; |
| | | const changeFactory = async arr => { |
| | | show.value = false; |
| | | const factoryId = factoryListTem.value[arr.indexs[0]].deptId; |
| | | const loginForm = { |
| | | username: userStore.name, |
| | | password: uni.getStorageSync("remembered_password"), |
| | | }; |
| | | modal.loading("å·æ°ä¸ï¼è¯·èå¿çå¾
..."); |
| | | userStore |
| | | .loginCheckFactory(loginForm) |
| | | .then(() => { |
| | | modal.closeLoading(); |
| | | nextTick(() => { |
| | | loginSuccess(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | modal.closeLoading(); |
| | | }); |
| | | }; |
| | | function loginSuccess(result) { |
| | | // è·åè·¯ç±æé |
| | | userStore |
| | | .getRouters() |
| | | .then(() => { |
| | | console.log("è·¯ç±æéè·åæå"); |
| | | // è¿æ»¤èå项 |
| | | filterMenuItemsByRoutes(); |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åè·¯ç±æé失败:", error); |
| | | }); |
| | | uni.reLaunch({ |
| | | url: "/pages/index", |
| | | }); |
| | | } |
| | | |
| | | // å®ä¹æ¹æ³ |
| | | const click = name => { |
| | | if (uToastRef.value) { |
| | | uToastRef.value.success(`ç¹å»äºç¬¬${name + 1}个`); // 注æï¼è¿éå 1æ¯å 为é常æä»¬æ¯ä»ç¬¬1个å¼å§è®¡æ°ç |
| | | } |
| | | }; |
| | | |
| | | // æ ¹æ®è·¯ç±æéè¿æ»¤èå项 |
| | | const filterMenuItemsByRoutes = () => { |
| | | const routers = userStore.routers || []; |
| | | |
| | | // å¦ææ²¡æè·¯ç±æéæ°æ®ï¼ä¸è¿è¡è¿æ»¤ï¼æ¾ç¤ºææèåï¼ |
| | | if (!routers || routers.length === 0) { |
| | | console.log("ææ è·¯ç±æéæ°æ®ï¼æ¾ç¤ºææèå"); |
| | | return; |
| | | } |
| | | |
| | | // æ¶éææææéçèåæ é¢ï¼æ ¹æ® meta.titleï¼ |
| | | const allowedMenuTitles = new Set(); |
| | | const collectMenuTitles = routes => { |
| | | if (!Array.isArray(routes)) return; |
| | | routes.forEach(route => { |
| | | // æ¶éå½åè·¯ç±çæ é¢ |
| | | if (route.meta && route.meta.title) { |
| | | allowedMenuTitles.add(route.meta.title); |
| | | } |
| | | // éå½å¤çåè·¯ç± |
| | | if (route.children && route.children.length > 0) { |
| | | collectMenuTitles(route.children); |
| | | } |
| | | }); |
| | | }; |
| | | collectMenuTitles(routers); |
| | | |
| | | // è¿æ»¤è¥é管çèå |
| | | const originalMarketing = [ |
| | | { icon: "/static/images/icon/xiaoshoutaizhang@2x.png", label: "éå®å°è´¦" }, |
| | | { icon: "/static/images/icon/kaipiaodengji@2x.png", label: "å¼ç¥¨ç»è®°" }, |
| | | { icon: "/static/images/icon/kaipiaotaizhang@2x.png", label: "å¼ç¥¨å°è´¦" }, |
| | | { icon: "/static/images/icon/huikuandengji@2x.png", label: "忬¾ç»è®°" }, |
| | | { icon: "/static/images/icon/huikuanliushui@2x.png", label: "忬¾æµæ°´" }, |
| | | { icon: "/static/images/icon/kehuwanglai@2x.png", label: "客æ·å¾æ¥" }, |
| | | ]; |
| | | const filteredMarketing = originalMarketing.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | marketingItems.splice(0, marketingItems.length, ...filteredMarketing); |
| | | |
| | | // è¿æ»¤åååå
¬èå |
| | | const originalCollaboration = [ |
| | | { icon: "/static/images/icon/baoxiaoguanli.png", label: "åå审æ¹" }, |
| | | { icon: "/static/images/icon/huiyiliebiao@2x.png", label: "ä¼è®®ç®¡ç" }, |
| | | { icon: "/static/images/icon/tongzhigonggao@2x.png", label: "éç¥å
Œ" }, |
| | | { icon: "/static/images/icon/zhishiku@2x.png", label: "ç¥è¯åº" }, |
| | | { icon: "/static/images/icon/yongyinguanli@2x.png", label: "ç¨å°ç®¡ç" }, |
| | | { icon: "/static/images/icon/guizhangzhidu@2x.png", label: "è§ç« å¶åº¦" }, |
| | | { icon: "/static/images/icon/kehubaifang@2x.png", label: "å®¢æ·æè®¿" }, |
| | | ]; |
| | | const filteredCollaboration = originalCollaboration.filter(item => { |
| | | // å¤çæ é¢ä¸å®å
¨å¹é
çæ
åµ |
| | | let matched = allowedMenuTitles.has(item.label); |
| | | // ç¹æ®å¤çï¼è§ç« å¶åº¦ -> è§ç« å¶åº¦ç®¡ç |
| | | if (!matched && item.label === "è§ç« å¶åº¦") { |
| | | matched = allowedMenuTitles.has("è§ç« å¶åº¦ç®¡ç"); |
| | | } |
| | | return matched; |
| | | }); |
| | | collaborationItems.splice( |
| | | 0, |
| | | collaborationItems.length, |
| | | ...filteredCollaboration |
| | | ); |
| | | |
| | | // è¿æ»¤éè´ç®¡çèå |
| | | const originalPurchase = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "éè´å°è´¦" }, |
| | | { icon: "/static/images/icon/laipiaodengji@2x.png", label: "æ¥ç¥¨ç»è®°" }, |
| | | { icon: "/static/images/icon/laipiaotaizhang@2x.png", label: "æ¥ç¥¨å°è´¦" }, |
| | | { icon: "/static/images/icon/fukuanjingji@2x.png", label: "仿¬¾ç»è®°" }, |
| | | { icon: "/static/images/icon/fukuanliushui@2x.png", label: "仿¬¾æµæ°´" }, |
| | | { |
| | | icon: "/static/images/icon/gongyingshangwanglai@2x.png", |
| | | label: "ä¾åºå徿¥", |
| | | }, |
| | | ]; |
| | | const filteredPurchase = originalPurchase.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | purchaseItems.splice(0, purchaseItems.length, ...filteredPurchase); |
| | | |
| | | // è¿æ»¤å®å
¨ç产èå |
| | | const originalSafety = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "è§ç¨ä¸èµè´¨" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "å±é©æºå°è´¦" }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "å±é©ä½ä¸å®¡æ¹", |
| | | }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "éæ£ææ¥ä¸æ¥" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "å±é©ç©æç®¡æ§" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "åºæ¥é¢æ¡æ¥é
" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "äºæ
䏿¥è®°å½" }, |
| | | { icon: "/static/images/icon/guzhangfenxi@2x.png", label: "å®å
¨å¹è®èæ ¸" }, |
| | | ]; |
| | | const filteredSafety = originalSafety.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | safetyItems.splice(0, safetyItems.length, ...filteredSafety); |
| | | |
| | | // è¿æ»¤äººåèµæºèå |
| | | const originalHumanResources = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "æå¡ç¾å°" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "人åèªèµ" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "åå管ç" }, |
| | | ]; |
| | | const filteredHumanResources = originalHumanResources.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | humanResourcesItems.splice( |
| | | 0, |
| | | humanResourcesItems.length, |
| | | ...filteredHumanResources |
| | | ); |
| | | |
| | | // è¿æ»¤è´¨é管çèå |
| | | const originalQuality = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "åæææ£éª" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "è¿ç¨æ£éª" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "åºåæ£éª" }, |
| | | ]; |
| | | const filteredQuality = originalQuality.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | qualityItems.splice(0, qualityItems.length, ...filteredQuality); |
| | | |
| | | // è¿æ»¤ç产管æ§èå |
| | | const originalProduction = [ |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong@2x.png", |
| | | label: "ç产æ¥å·¥", |
| | | bgColor: "#673AB7", |
| | | }, |
| | | ]; |
| | | const filteredProduction = originalProduction.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | productionItems.splice(0, productionItems.length, ...filteredProduction); |
| | | |
| | | // è¿æ»¤è®¾å¤ç®¡çèå |
| | | const originalEquipment = [ |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "è¿è¡ç®¡ç" }, |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "è®¾å¤æ¥ä¿®" }, |
| | | { icon: "/static/images/icon/shbeibaoyang@2x.png", label: "设å¤ä¿å
»" }, |
| | | { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "设å¤å·¡æ£" }, |
| | | ]; |
| | | const filteredEquipment = originalEquipment.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | equipmentItems.splice(0, equipmentItems.length, ...filteredEquipment); |
| | | }; |
| | | |
| | | // æ£æ¥æ¨¡åæ¯å¦æèå项éè¦æ¾ç¤º |
| | | const hasMarketingItems = computed(() => marketingItems.length > 0); |
| | | const hasPurchaseItems = computed(() => purchaseItems.length > 0); |
| | | const hasCollaborationItems = computed(() => collaborationItems.length > 0); |
| | | const hasSafetyItems = computed(() => safetyItems.length > 0); |
| | | const hasQualityItems = computed(() => qualityItems.length > 0); |
| | | const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0); |
| | | const hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |
| | | |
| | | onMounted(() => { |
| | | // æ¯æ¬¡è¿å
¥é¦é¡µé½å¼ºå¶å·æ°ç¨æ·ä¿¡æ¯åè·¯ç±æéï¼ä¸åæ¬å°ç¼å夿 |
| | | userStore.getInfo().then(() => { |
| | | userStore |
| | | .getRouters() |
| | | .then(() => { |
| | | filterMenuItemsByRoutes(); |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åè·¯ç±æé失败:", error); |
| | | }); |
| | | }); |
| | | getUserLoginFacotryList(); |
| | | // å¯å¨éç¥ç¶æå®æ¶å¨ |
| | | startStatusTimer(); |
| | | }); |
| | | </script> |
| | | |
| | | |
| | | <style scoped lang="scss"> |
| | | .content { |
| | | background: #f6f7fb; |
| | | min-height: 100vh; |
| | | // padding: 12px; |
| | | /* 为ææè®¾å¤è®¾ç½®åºç¡padding-topï¼å
å«å®å
¨åºï¼ */ |
| | | padding-top: calc(env(safe-area-inset-top) + 30px); |
| | | position: relative; |
| | | |
| | | /* 为å®å设å¤è®¾ç½®æ´å¤§çé¡¶é¨å
è¾¹è· */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | padding-top: calc(env(safe-area-inset-top) + 45px); |
| | | /* #endif */ |
| | | |
| | | /* H5åå°ç¨åºå¹³å°çéç¨æ ·å¼ */ |
| | | /* #ifdef H5 || MP */ |
| | | padding-top: calc(env(safe-area-inset-top) + 30px); |
| | | /* #endif */ |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="24" height="24" patternUnits="userSpaceOnUse"><circle cx="12" cy="12" r="1" fill="rgba(41, 121, 255, 0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>'); |
| | | pointer-events: none; |
| | | z-index: -1; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: radial-gradient( |
| | | circle at 20% 80%, |
| | | rgba(41, 121, 255, 0.02) 0%, |
| | | transparent 55% |
| | | ), |
| | | radial-gradient( |
| | | circle at 80% 20%, |
| | | rgba(156, 39, 176, 0.015) 0%, |
| | | transparent 55% |
| | | ); |
| | | pointer-events: none; |
| | | z-index: -1; |
| | | } |
| | | } |
| | | |
| | | .header-section { |
| | | margin-bottom: 1rem; |
| | | animation: fadeInDown 0.6s ease-out; |
| | | /* 为å®å设å¤é¢å¤è°æ´å¤´é¨ä½ç½® */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | margin-top: 10px; |
| | | /* #endif */ |
| | | } |
| | | |
| | | .currentFactory { |
| | | margin-top: 0.5rem; |
| | | margin-left: 0.25rem; |
| | | font-weight: 500; |
| | | display: flex; |
| | | } |
| | | |
| | | .factoryName { |
| | | width: auto; |
| | | } |
| | | |
| | | :deep(.u-text) { |
| | | align-items: center; |
| | | } |
| | | |
| | | .hero-section { |
| | | margin: 0 12px; |
| | | margin-bottom: 12px; |
| | | animation: fadeInUp 0.6s ease-out 0.1s both; |
| | | } |
| | | |
| | | .bg-img { |
| | | width: 100%; |
| | | height: 9.25rem; |
| | | background-image: url("../static/images/banner/backview.png"); |
| | | background-size: cover; |
| | | border-radius: 14px; |
| | | position: relative; |
| | | overflow: hidden; |
| | | box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08); |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: -50%; |
| | | left: -50%; |
| | | width: 200%; |
| | | height: 200%; |
| | | background: conic-gradient( |
| | | from 0deg, |
| | | transparent, |
| | | rgba(255, 255, 255, 0.1), |
| | | transparent, |
| | | rgba(255, 255, 255, 0.05), |
| | | transparent |
| | | ); |
| | | animation: rotate 20s linear infinite; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 7.5rem; |
| | | height: 7.5rem; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(255, 255, 255, 0.15) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | transform: translate(2.5rem, -2.5rem); |
| | | } |
| | | } |
| | | |
| | | .hero-content { |
| | | position: relative; |
| | | z-index: 1; |
| | | |
| | | padding: 14px 14px 18px 14px; |
| | | margin: 0 12px; |
| | | height: 100%; |
| | | } |
| | | .hero-wave { |
| | | height: 2.75rem; |
| | | } |
| | | |
| | | .hero-wave { |
| | | position: absolute; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | height: 2.75rem; |
| | | background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'><path fill='%23ffffff' fill-opacity='0.2' d='M0,224L48,218.7C96,213,192,203,288,197.3C384,192,480,192,576,176C672,160,768,128,864,122.7C960,117,1056,139,1152,144C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'></path></svg>") |
| | | no-repeat bottom center/cover; |
| | | pointer-events: none; |
| | | } |
| | | |
| | | .notice-section { |
| | | margin-bottom: 1rem; |
| | | animation: fadeInUp 0.6s ease-out 0.2s both; |
| | | } |
| | | |
| | | .notice { |
| | | width: 100%; |
| | | background: linear-gradient(135deg, #eaf2ff 0%, #bbdefb 100%); |
| | | border: 0.0625rem solid #e3f2fd; |
| | | border-radius: 0.75rem; |
| | | padding: 1rem; |
| | | box-shadow: 0 0.25rem 1.25rem rgba(41, 121, 255, 0.08); |
| | | position: relative; |
| | | overflow: hidden; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: -50%; |
| | | left: -50%; |
| | | width: 200%; |
| | | height: 200%; |
| | | background: linear-gradient( |
| | | 45deg, |
| | | transparent, |
| | | rgba(255, 255, 255, 0.6), |
| | | transparent |
| | | ); |
| | | animation: shine 4s infinite; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 5rem; |
| | | height: 5rem; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(255, 255, 255, 0.2) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | transform: translate(1.875rem, -1.875rem); |
| | | } |
| | | |
| | | &:hover { |
| | | transform: translateY(-0.125rem); |
| | | box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.1); |
| | | } |
| | | } |
| | | |
| | | @keyframes shine { |
| | | 0% { |
| | | transform: translateX(-100%) translateY(-100%) rotate(45deg); |
| | | } |
| | | 100% { |
| | | transform: translateX(100%) translateY(100%) rotate(45deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInDown { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(-1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInUp { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInScale { |
| | | 0% { |
| | | opacity: 0; |
| | | transform: translateY(0.5rem) scale(0.96); |
| | | } |
| | | 100% { |
| | | opacity: 1; |
| | | transform: translateY(0) scale(1); |
| | | } |
| | | } |
| | | |
| | | .notice-content { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .notice-left { |
| | | margin-right: 1rem; |
| | | } |
| | | |
| | | .notice-status { |
| | | font-weight: 600; |
| | | font-size: 1rem; |
| | | color: #1976d2; |
| | | } |
| | | |
| | | .notice-separator { |
| | | width: 0.0625rem; |
| | | height: 1.5rem; |
| | | background: #e0e0e0; |
| | | margin-right: 1rem; |
| | | } |
| | | |
| | | .notice-right { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | flex: 1; |
| | | } |
| | | |
| | | .notice-label { |
| | | color: #333; |
| | | font-size: 0.875rem; |
| | | font-weight: 500; |
| | | margin-right: 0.75rem; |
| | | } |
| | | |
| | | .notice-text { |
| | | font-weight: 400; |
| | | font-size: 0.875rem; |
| | | color: #666666; |
| | | } |
| | | |
| | | .notice-number { |
| | | font-weight: 600; |
| | | font-size: 1rem; |
| | | color: #1976d2; |
| | | margin-left: 0.25rem; |
| | | } |
| | | |
| | | .notice-unit { |
| | | font-weight: 600; |
| | | font-size: 1rem; |
| | | color: #1976d2; |
| | | margin-left: 0.25rem; |
| | | } |
| | | |
| | | /* åè½æ¨¡åæ ·å¼ */ |
| | | .common-module { |
| | | margin-bottom: 12px; |
| | | background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%); |
| | | // border-radius: 14px; |
| | | padding: 12px; |
| | | box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06); |
| | | border: none; |
| | | position: relative; |
| | | overflow: hidden; |
| | | transition: all 0.3s ease; |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | width: 3.75rem; |
| | | height: 3.75rem; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(0, 0, 0, 0.02) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | transform: translate(1.875rem, -1.875rem); |
| | | } |
| | | } |
| | | |
| | | .marketing-module { |
| | | --module-color: #2979ff; |
| | | } |
| | | |
| | | .purchase-module { |
| | | --module-color: #1976d2; |
| | | } |
| | | |
| | | .collaboration-module { |
| | | --module-color: #4caf50; |
| | | } |
| | | |
| | | .production-module { |
| | | --module-color: #ff9800; |
| | | } |
| | | |
| | | .equipment-module { |
| | | --module-color: #9c27b0; |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .module-title-container { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .module-title { |
| | | color: #333333; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | position: relative; |
| | | } |
| | | |
| | | .module-subtitle { |
| | | color: #666666; |
| | | font-size: 0.75rem; |
| | | font-weight: 400; |
| | | margin-left: 0.5rem; |
| | | } |
| | | |
| | | .module-content { |
| | | width: 100%; |
| | | display: grid; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .icon-container { |
| | | width: 46px; |
| | | height: 46px; |
| | | border-radius: 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 0.375rem; |
| | | box-shadow: 0 10px 20px rgba(17, 24, 39, 0.12); |
| | | transition: all 0.2s ease; |
| | | position: relative; |
| | | overflow: hidden; |
| | | animation: fadeInScale 0.5s ease both; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: linear-gradient( |
| | | 135deg, |
| | | rgba(255, 255, 255, 0.1) 0%, |
| | | transparent 50%, |
| | | rgba(255, 255, 255, 0.05) 100% |
| | | ); |
| | | opacity: 0; |
| | | transition: opacity 0.3s ease; |
| | | } |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | border-radius: 0.75rem; |
| | | background: linear-gradient( |
| | | 45deg, |
| | | transparent, |
| | | rgba(255, 255, 255, 0.2), |
| | | transparent |
| | | ); |
| | | opacity: 0; |
| | | transition: opacity 0.3s ease; |
| | | } |
| | | |
| | | &:hover { |
| | | transform: translateY(-0.1875rem) scale(1.02); |
| | | box-shadow: 0 0.5rem 1.5625rem rgba(0, 0, 0, 0.18); |
| | | |
| | | &::before, |
| | | &::after { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | &:active { |
| | | transform: scale(0.97); |
| | | box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.18); |
| | | } |
| | | } |
| | | |
| | | .item-label { |
| | | font-size: 12px; |
| | | color: #555555; |
| | | text-align: center; |
| | | display: block; |
| | | line-height: 1.4; |
| | | font-weight: 500; |
| | | margin-top: 4px; |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | /* grid-item é´è·æ´ç´§åä¸è§è§æ´å±
ä¸ */ |
| | | :deep(.up-grid-item) { |
| | | padding: 6px 0; |
| | | } |
| | | :deep(.up-grid-item__content) { |
| | | padding: 0; |
| | | } |
| | | |
| | | .grid-text { |
| | | font-size: 0.875rem; |
| | | color: #909399; |
| | | padding: 0.625rem 0 1.25rem 0; |
| | | /* #ifndef APP-PLUS */ |
| | | box-sizing: border-box; |
| | | /* #endif */ |
| | | } |
| | | |
| | | /* æè²æ¨¡å¼éé
*/ |
| | | @media (prefers-color-scheme: dark) { |
| | | .content { |
| | | background: linear-gradient(135deg, #121317 0%, #161a20 100%); |
| | | } |
| | | .content::before { |
| | | background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255, 255, 255, 0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>'); |
| | | } |
| | | .common-module { |
| | | background: linear-gradient(135deg, #1e1f24 0%, #23252b 100%); |
| | | box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35); |
| | | } |
| | | .module-title { |
| | | color: #e9edf3; |
| | | } |
| | | .module-subtitle, |
| | | .item-label, |
| | | .notice-text, |
| | | .notice-unit, |
| | | .notice-label { |
| | | color: #c7cbd3; |
| | | } |
| | | .notice { |
| | | background: linear-gradient(135deg, #1b2330 0%, #1a2432 100%); |
| | | border-color: rgba(255, 255, 255, 0.06); |
| | | box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4); |
| | | } |
| | | .notice-status, |
| | | .notice-number { |
| | | color: #8ab4ff; |
| | | } |
| | | .bg-img { |
| | | background: linear-gradient(135deg, #1f4fb9 0%, #0e3a8a 100%); |
| | | } |
| | | } |
| | | |
| | | @keyframes rotate { |
| | | from { |
| | | transform: rotate(0deg); |
| | | } |
| | | to { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInDown { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(-1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInUp { |
| | | from { |
| | | opacity: 0; |
| | | transform: translateY(1.25rem); |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | |
| | | @keyframes fadeInScale { |
| | | 0% { |
| | | opacity: 0; |
| | | transform: translateY(0.5rem) scale(0.96); |
| | | } |
| | | 100% { |
| | | opacity: 1; |
| | | transform: translateY(0) scale(1); |
| | | } |
| | | } |
| | | |
| | | .notice-left { |
| | | margin-right: 1rem; |
| | | } |
| | | .notice-status { |
| | | font-size: 1rem; |
| | | } |
| | | .notice-separator { |
| | | width: 0.0625rem; |
| | | height: 1.5rem; |
| | | margin-right: 1rem; |
| | | } |
| | | .notice-label { |
| | | font-size: 0.875rem; |
| | | margin-right: 0.75rem; |
| | | } |
| | | .notice-text { |
| | | font-size: 0.875rem; |
| | | } |
| | | .notice-number { |
| | | font-size: 1rem; |
| | | margin-left: 0.25rem; |
| | | } |
| | | .notice-unit { |
| | | font-size: 0.875rem; |
| | | margin-left: 0.125rem; |
| | | } |
| | | |
| | | .common-module { |
| | | margin-bottom: 12px; |
| | | background: #ffffff; |
| | | // border-radius: 16px; |
| | | // padding: 0px; |
| | | padding: 12px 0; |
| | | box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06); |
| | | border: 1px solid rgba(148, 163, 184, 0.18); |
| | | position: relative; |
| | | overflow: hidden; |
| | | transition: all 0.22s ease; |
| | | |
| | | &::after { |
| | | content: ""; |
| | | position: absolute; |
| | | top: -40px; |
| | | right: -40px; |
| | | width: 90px; |
| | | height: 90px; |
| | | background: radial-gradient( |
| | | circle, |
| | | rgba(148, 163, 184, 0.08) 0%, |
| | | transparent 70% |
| | | ); |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | &:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12); |
| | | } |
| | | } |
| | | |
| | | .marketing-module { |
| | | --module-color: #2979ff; |
| | | } |
| | | |
| | | .purchase-module { |
| | | --module-color: #1976d2; |
| | | } |
| | | |
| | | .collaboration-module { |
| | | --module-color: #4caf50; |
| | | } |
| | | |
| | | .production-module { |
| | | --module-color: #ff9800; |
| | | } |
| | | |
| | | .equipment-module { |
| | | --module-color: #9c27b0; |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 18px; |
| | | padding-left: 18px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .module-title-container { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .module-title { |
| | | color: #1f2933; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | position: relative; |
| | | } |
| | | |
| | | .module-content { |
| | | width: 100%; |
| | | display: grid; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .icon-container { |
| | | width: 48px; |
| | | height: 48px; |
| | | border-radius: 14px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 4px; |
| | | box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18); |
| | | transition: all 0.18s ease; |
| | | position: relative; |
| | | overflow: hidden; |
| | | animation: fadeInScale 0.5s ease both; |
| | | background: linear-gradient(135deg, #3b82f6, #2563eb); |
| | | } |
| | | |
| | | .marketing-module .icon-container { |
| | | background: linear-gradient(135deg, #3b82f6, #2563eb); |
| | | } |
| | | .purchase-module .icon-container { |
| | | background: linear-gradient(135deg, #1d4ed8, #0f766e); |
| | | } |
| | | .collaboration-module .icon-container { |
| | | background: linear-gradient(135deg, #22c55e, #16a34a); |
| | | } |
| | | .equipment-module .icon-container { |
| | | background: linear-gradient(135deg, #a855f7, #7c3aed); |
| | | } |
| | | |
| | | .icon-container::before { |
| | | content: ""; |
| | | position: absolute; |
| | | inset: 0; |
| | | border-radius: inherit; |
| | | background: radial-gradient( |
| | | circle at 20% 20%, |
| | | rgba(255, 255, 255, 0.26), |
| | | transparent 55% |
| | | ); |
| | | opacity: 0.8; |
| | | pointer-events: none; |
| | | } |
| | | |
| | | .icon-container:active { |
| | | transform: scale(0.94); |
| | | box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25); |
| | | } |
| | | |
| | | .item-label { |
| | | font-size: 22rpx; |
| | | margin-top: 4px; |
| | | margin-bottom: 20px; |
| | | } |
| | | .grid-text { |
| | | font-size: 0.875rem; |
| | | } |
| | | |
| | | @media (prefers-color-scheme: dark) { |
| | | .common-module { |
| | | box-shadow: 0 0.375rem 1.5rem rgba(0, 0, 0, 0.35); |
| | | } |
| | | .notice { |
| | | box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4); |
| | | } |
| | | } |
| | | </style> |