aiwenzhu 2 months ago
parent
commit
57577d4edf

+ 0 - 3
.env.development

@@ -18,12 +18,9 @@ ENV = 'development'
 # 测试线
 
  
-# VUE_APP_BASE_API = 'http://lhpc.kptyun.com/'
-
  
 VUE_APP_BASE_API = 'http://210.16.189.72:8099/'
 
-#VUE_APP_BASE_API = 'http://192.168.1.76:8082/'
 
  
  

+ 28 - 0
.gitignore

@@ -14,3 +14,31 @@ tests/**/coverage/
 *.ntvs*
 *.njsproj
 *.sln
+
+# Archives
+*.zip
+*.rar
+*.7z
+*.tar
+*.gz
+*.bz2
+*.xz
+
+.gitignore
+
+# 数据备份文件
+*.bak
+*.backup
+
+# 临时文件
+*.tmp
+*.temp
+
+# 系统生成的报表文件
+/reports
+*.xlsx
+*.csv
+
+# 配置文件
+config.production.json
+config.development.json

+ 0 - 52
debug.log

@@ -1,52 +0,0 @@
-[0317/174929.466:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0320/173441.003:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0324/171832.361:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0326/114532.451:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0326/174029.035:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0330/102225.637:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0330/160524.844:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0331/180453.024:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0401/162157.520:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0402/165808.951:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0403/112343.031:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0403/134118.452:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0407/113651.340:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0407/180252.092:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0408/150218.094:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0410/104721.642:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0410/155916.867:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0413/145754.944:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0414/141831.460:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0414/154438.334:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0415/153518.201:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0416/112338.997:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0416/161655.335:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0417/141409.629:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0422/155012.381:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0428/175551.742:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0507/161117.954:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0509/181813.959:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0511/155936.922:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0515/155928.607:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0520/145310.286:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0601/113705.004:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0605/140648.507:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0616/160221.674:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0619/111927.316:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0622/133635.922:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0623/161920.161:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0628/142402.809:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0628/171924.492:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0710/131804.495:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0728/124804.485:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0817/134320.441:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0819/104154.277:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0823/120710.795:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0824/180735.938:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0826/172528.094:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0831/151716.494:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0901/170522.063:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0902/160013.710:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0912/165925.942:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0918/164433.625:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
-[0919/165440.003:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)

+ 0 - 10
src/views/customerInformation/customerInformation/index.vue

@@ -6,16 +6,6 @@
 
       <div class="search">
         <el-row :gutter="0">
-         
-            <!-- <el-select v-model="tableObj.getdataListParm.parammaps.customerId" placeholder="客户名称" class="filter-item" style="width: 120px;" clearable filterable remote :remote-method="change_custormer_remote" :loading="loading">
-                <el-option v-for="(item,index) in customerNameList" :key="index" :label="item.name" :value="item.id" />
-              </el-select> -->
-
-              <!-- <el-autocomplete v-model="tableObj.getdataListParm.parammaps.customerName" :fetch-suggestions="customer_search" placeholder="客户名称" style="width: 120px " class="filter-item" @select="change_customer_select" @clear="clear_customer_select" @blur="customer_search_blur" clearable>
-                <template slot-scope="{ item }">
-                  <span class="name">{{ item.name }}</span>
-                </template>
-              </el-autocomplete> -->
 
               <el-input v-model="tableObj.getdataListParm.parammaps.customerName" placeholder="客户名称" style="width: 180px;padding-bottom:10px;" class="filter-item" clearable />
 

+ 100 - 0
src/views/productManagement/productionSummary/components/BarChart.vue

@@ -0,0 +1,100 @@
+<template>
+  <div :class="className" :style="{height:height,width:width}" />
+</template>
+
+<script>
+import echarts from 'echarts'
+import resize from './mixins/resize'
+
+export default {
+  mixins: [resize],
+  props: {
+    className: {
+      type: String,
+      default: 'chart'
+    },
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '350px'
+    },
+    chartData: {
+      type: Object,
+      required: true
+    }
+  },
+  data() {
+    return {
+      chart: null
+    }
+  },
+  watch: {
+    chartData: {
+      deep: true,
+      handler(val) {
+        this.setOptions(val)
+      }
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initChart()
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  methods: {
+    initChart() {
+      this.chart = echarts.init(this.$el)
+      this.setOptions(this.chartData)
+    },
+    setOptions({ labels, datasets } = {}) {
+      this.chart.setOption({
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow'
+          }
+        },
+        legend: {
+          data: ['计划量', '完成量'],
+          bottom: '0%'
+        },
+        grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '10%',
+          top: '3%',
+          containLabel: true
+        },
+        xAxis: {
+          type: 'category',
+          data: labels,
+          axisTick: {
+            alignWithLabel: true
+          }
+        },
+        yAxis: {
+          type: 'value'
+        },
+        series: datasets.map(dataset => ({
+          name: dataset.label,
+          type: 'bar',
+          data: dataset.data,
+          itemStyle: {
+            color: dataset.backgroundColor
+          }
+        }))
+      })
+    }
+  }
+}
+</script> 

+ 51 - 0
src/views/productManagement/productionSummary/components/mixins/resize.js

@@ -0,0 +1,51 @@
+import { debounce } from '@/utils'
+
+export default {
+  data() {
+    return {
+      $_sidebarElm: null,
+      $_resizeHandler: null
+    }
+  },
+  mounted() {
+    this.$_resizeHandler = debounce(() => {
+      if (this.chart) {
+        this.chart.resize()
+      }
+    }, 100)
+    this.$_initResizeEvent()
+    this.$_initSidebarResizeEvent()
+  },
+  beforeDestroy() {
+    this.$_destroyResizeEvent()
+    this.$_destroySidebarResizeEvent()
+  },
+  activated() {
+    this.$_initResizeEvent()
+    this.$_initSidebarResizeEvent()
+  },
+  deactivated() {
+    this.$_destroyResizeEvent()
+    this.$_destroySidebarResizeEvent()
+  },
+  methods: {
+    $_initResizeEvent() {
+      window.addEventListener('resize', this.$_resizeHandler)
+    },
+    $_destroyResizeEvent() {
+      window.removeEventListener('resize', this.$_resizeHandler)
+    },
+    $_sidebarResizeHandler(e) {
+      if (e.propertyName === 'width') {
+        this.$_resizeHandler()
+      }
+    },
+    $_initSidebarResizeEvent() {
+      this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
+      this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
+    },
+    $_destroySidebarResizeEvent() {
+      this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
+    }
+  }
+} 

+ 311 - 0
src/views/productManagement/productionSummary/index.vue

@@ -0,0 +1,311 @@
+<template>
+  <div class="app-container">
+    <!-- 顶部标题栏 -->
+    <div class="page-header">
+      <div class="page-title">生产总览</div>
+      <div class="page-time">时间:{{ currentTime }}</div>
+    </div>
+
+    <!-- 顶部统计卡片 -->
+    <el-row :gutter="20" class="panel-group">
+      <el-col :span="3">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #E7F1FF;">
+            <svg-icon icon-class="order" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">本月总订单</div>
+            <count-to :start-val="0" :end-val="20" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="3">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #E8FFF3;">
+            <svg-icon icon-class="produced" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">本月已生产订单</div>
+            <count-to :start-val="0" :end-val="5" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="3">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #E6FFFB;">
+            <svg-icon icon-class="producing" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">正在生产订单</div>
+            <count-to :start-val="0" :end-val="8" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="3">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #FFF7E6;">
+            <svg-icon icon-class="unproduced" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">未生产</div>
+            <count-to :start-val="0" :end-val="7" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="4">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #F0E6FF;">
+            <svg-icon icon-class="total" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">订单总量</div>
+            <count-to :start-val="0" :end-val="1000" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="4">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #E6FFF6;">
+            <svg-icon icon-class="completed" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">已完成量</div>
+            <count-to :start-val="0" :end-val="5000" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="4">
+        <div class="card-panel">
+          <div class="card-panel-icon-wrapper" style="background: #FFE6E6;">
+            <svg-icon icon-class="uncompleted" class="card-panel-icon" />
+          </div>
+          <div class="card-panel-description">
+            <div class="card-panel-text">未完成量</div>
+            <count-to :start-val="0" :end-val="5000" :duration="2000" class="card-panel-num"/>
+          </div>
+        </div>
+      </el-col>
+    </el-row>
+
+    <!-- 生产概况表格 -->
+    <el-card class="box-card" style="margin-top: 20px;">
+      <div slot="header" class="clearfix">
+        <span>生产概况</span>
+        <el-tag type="primary" style="float: right;">当前数量:7条</el-tag>
+      </div>
+      <el-table :data="tableData" style="width: 100%">
+        <el-table-column prop="orderNo" label="订单编号" width="120"/>
+        <el-table-column prop="productName" label="商品名称" width="120"/>
+        <el-table-column prop="status" label="生产状态" width="100">
+          <template slot-scope="scope">
+            <el-tag :type="scope.row.status === '已完成' ? 'success' : 'warning'">
+              {{ scope.row.status }}
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="progress" label="进度">
+          <template slot-scope="scope">
+            <el-progress :percentage="scope.row.progress" :color="scope.row.progressColor"/>
+          </template>
+        </el-table-column>
+        <el-table-column prop="total" label="计划量" width="100"/>
+        <el-table-column prop="finished" label="已完成量" width="100"/>
+        <el-table-column prop="unfinished" label="未完成量" width="100"/>
+        <el-table-column prop="rate" label="完成率" width="100"/>
+        <el-table-column prop="remainingDays" label="剩余完成时间" width="120"/>
+      </el-table>
+    </el-card>
+
+    <!-- 月度生产概况图表 -->
+    <el-card class="box-card" style="margin-top: 20px;">
+      <div slot="header" class="clearfix">
+        <span>月度生产概况</span>
+      </div>
+      <div class="chart-wrapper">
+        <bar-chart :chart-data="chartData"/>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import CountTo from 'vue-count-to'
+import BarChart from './components/BarChart'
+
+export default {
+  name: 'ProductionSummary',
+  components: {
+    CountTo,
+    BarChart
+  },
+  data() {
+    return {
+      currentTime: '',
+      tableData: [
+        {
+          orderNo: '00000001',
+          productName: '包装材料',
+          status: '进行中',
+          progress: 22.5,
+          progressColor: '#409EFF',
+          total: 4000,
+          finished: 900,
+          unfinished: 3100,
+          rate: '22.5%',
+          remainingDays: '7天'
+        },
+        // 其他数据项...
+      ],
+      chartData: {
+        labels: ['包装材料', '包装材料', '板材类', '橡胶类型', '塑料类型', '特定订单', '无规格类型'],
+        datasets: [
+          {
+            label: '计划量',
+            data: [500, 2000, 600, 1200, 600, 1400, 500, 1600],
+            backgroundColor: '#409EFF'
+          },
+          {
+            label: '完成量',
+            data: [400, 1600, 500, 900, 400, 1200, 500, 1600],
+            backgroundColor: '#67C23A'
+          }
+        ]
+      }
+    }
+  },
+  created() {
+    this.updateTime()
+    setInterval(this.updateTime, 1000)
+  },
+  methods: {
+    updateTime() {
+      const now = new Date()
+      this.currentTime = now.getFullYear() + '年' + 
+        (now.getMonth() + 1) + '月' + 
+        now.getDate() + '日'
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.page-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20px 24px;
+  background: #fff;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
+  margin-bottom: 24px;
+  border-radius: 8px;
+  transition: all 0.3s ease;
+
+  .page-title {
+    font-size: 20px;
+    font-weight: 600;
+    color: #1f2d3d;
+    position: relative;
+    padding-left: 16px;
+    
+    &::before {
+      content: '';
+      position: absolute;
+      left: 0;
+      top: 50%;
+      transform: translateY(-50%);
+      width: 4px;
+      height: 22px;
+      background: #409EFF;
+      border-radius: 4px;
+    }
+  }
+
+  .page-time {
+    color: #606266;
+    font-size: 14px;
+  }
+}
+
+.panel-group {
+  margin-top: 24px;
+
+  .card-panel {
+    height: 108px;
+    cursor: pointer;
+    font-size: 12px;
+    position: relative;
+    overflow: hidden;
+    color: #666;
+    background: #fff;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
+    border-radius: 8px;
+    padding: 20px;
+    display: flex;
+    align-items: center;
+    transition: all 0.3s ease;
+
+    &:hover {
+      transform: translateY(-2px);
+      box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
+    }
+
+    .card-panel-icon-wrapper {
+      float: left;
+      margin: 0;
+      padding: 16px;
+      transition: all 0.3s ease-out;
+      border-radius: 50%;
+      width: 56px;
+      height: 56px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+
+    .card-panel-icon {
+      float: left;
+      font-size: 28px;
+    }
+
+    .card-panel-description {
+      float: right;
+      font-weight: bold;
+      margin: 8px 0 0 16px;
+      
+      .card-panel-text {
+        line-height: 20px;
+        color: #606266;
+        font-size: 14px;
+        margin-bottom: 12px;
+      }
+
+      .card-panel-num {
+        font-size: 24px;
+        font-weight: 600;
+        color: #1f2d3d;
+      }
+    }
+  }
+}
+
+.chart-wrapper {
+  background: #fff;
+  padding: 24px;
+  margin-bottom: 32px;
+  height: 400px;
+  border-radius: 8px;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
+}
+
+// 优化表格卡片样式
+.box-card {
+  border-radius: 8px;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
+  transition: all 0.3s ease;
+  
+  .el-card__header {
+    padding: 20px 24px;
+    border-bottom: 1px solid #ebeef5;
+  }
+}
+</style>