Explorar o código

修改首尔首页

chencc hai 1 ano
pai
achega
1943869ae0

+ 7 - 0
src/utils/permission.js

@@ -3,6 +3,8 @@
  */
  */
 import store from '@/store';
 import store from '@/store';
 
 
+
+
 /* 数组是否有某些值 */
 /* 数组是否有某些值 */
 const arrayHas = function (array, value) {
 const arrayHas = function (array, value) {
   if (!value) {
   if (!value) {
@@ -74,6 +76,11 @@ export function hasAnyPermission(value) {
 }
 }
 
 
 export default {
 export default {
+  /**
+   * 安装Vue插件,扩展Vue实例和指令
+   *
+   * @param Vue Vue构造函数
+   */
   install(Vue) {
   install(Vue) {
     // 添加全局方法
     // 添加全局方法
     Vue.prototype.$hasRole = hasRole;
     Vue.prototype.$hasRole = hasRole;

+ 141 - 60
src/views/home/data.js

@@ -1,5 +1,11 @@
 // 引入Day.js库
 // 引入Day.js库
 const dayjs = require('dayjs');
 const dayjs = require('dayjs');
+let  statusOpt= [
+    { label: '待生产', value: 4 },
+    { label: '生产中', value: 5 },
+    { label: '待下达', value: 8 }
+  ];
+
 // 获取本月日期列表的函数
 // 获取本月日期列表的函数
 function getDatesInMonth() {
 function getDatesInMonth() {
     let year = dayjs().year()
     let year = dayjs().year()
@@ -14,82 +20,157 @@ function getDatesInMonth() {
     }
     }
     return dates;
     return dates;
 }
 }
-export const columns = [
+export const columns =  [
+    {
+      columnKey: 'index',
+      slot: 'index',
+      label: '序号',
+      type: 'index',
+      width: 55,
+      align: 'center',
+      showOverflowTooltip: true,
+      fixed: 'left'
+    },
+    {
+      slot: 'code',
+      prop: 'code',
+      label: '生产订单号',
+      align: 'center',
+      minWidth: 180,
+      sortable: true
+    },
+    {
+      prop: 'productionPlanCode',
+      label: '计划编号',
+      align: 'center',
+      minWidth: 150
+    },
+    {
+      prop: 'produceRoutingName',
+      label: '工艺路线',
+      align: 'center',
+      minWidth: 170
+    },
+    {
+      prop: 'productCode',
+      label: '编码',
+      align: 'center',
+      minWidth: 110
+    },
+    {
+      prop: 'productName',
+      label: '名称',
+      align: 'center',
+      minWidth: 170
+    },
+    {
+      prop: 'brandNo',
+      label: '牌号',
+      align: 'center'
+    },
+
+    {
+      prop: 'batchNo',
+      label: '批次号',
+      align: 'center',
+      minWidth: 100,
+      showOverflowTooltip: true
+    },
+    {
+      prop: 'model',
+      label: '型号',
+      align: 'center',
+      showOverflowTooltip: true
+    },
 
 
     {
     {
-        columnKey: 'index',
-        label: '序号',
-        type: 'index',
-        width: 55,
-        align: 'center',
-        showOverflowTooltip: true,
-        fixed: 'left'
+      prop: 'priority',
+      label: '优先级',
+      align: 'center',
+      minWidth: 120,
+      slot: 'priority',
+      sortable: 'custom'
     },
     },
+
     {
     {
-        prop: 'name',
-        label: '生产订单名称',
-        align: 'center',
-        showOverflowTooltip: true,
+      prop: 'formingNum',
+      label: '要求生产数量',
+      align: 'center',
+      showOverflowTooltip: true,
+      minWidth: 110
     },
     },
     {
     {
-        prop: 'name',
-        label: '生产订单编号',
-        align: 'center',
-        showOverflowTooltip: true,
+      prop: 'formingWeight',
+      label: '要求生产重量',
+      align: 'center',
+      showOverflowTooltip: true,
+      minWidth: 110,
+      slot: 'formingWeight'
     },
     },
     {
     {
-        prop: 'name1',
-        label: '订单状态',
-        align: 'center',
-        showOverflowTooltip: true,
+      prop: 'planStartTime',
+      label: '计划开始时间',
+      align: 'center',
+      showOverflowTooltip: true,
+      minWidth: 110
     },
     },
+
     {
     {
-        prop: 'qualified',
-        label: '计划开始日期',
-        minWidth: '120',
-        align: 'center',
-        showOverflowTooltip: true,
+      prop: 'planCompleteTime',
+      label: '计划结束时间',
+      align: 'center',
+      showOverflowTooltip: true,
+      minWidth: 110
     },
     },
+
     {
     {
-        prop: 'qualified',
-        label: '计划完成日期',
-        minWidth: '120',
-        align: 'center',
-        showOverflowTooltip: true,
+      prop: 'workCenterName',
+      label: '工作中心',
+      align: 'center',
+      minWidth: 110,
+      showOverflowTooltip: true
     },
     },
+
     {
     {
-        prop: 'name12',
-        label: '产品名称',
-        align: 'center',
-        showOverflowTooltip: true,
-    }, {
-        prop: 'name12',
-        label: '产品编码',
-        align: 'center',
-        showOverflowTooltip: true,
-    }, {
-        prop: 'name12',
-        label: '规格型号',
-        align: 'center',
-        showOverflowTooltip: true,
-    }, {
-        prop: 'name12',
-        label: '数量(个)',
-        align: 'center',
-        showOverflowTooltip: true,
-    }, {
-        prop: 'name12',
-        label: '生产单位',
-        align: 'center',
-        showOverflowTooltip: true,
-    }, {
-        prop: 'name12',
-        label: '交期状态',
-        align: 'center',
-        showOverflowTooltip: true,
+      prop: 'firstTaskName',
+      label: '首工序',
+      align: 'center',
+      minWidth: 110,
+      showOverflowTooltip: true
     },
     },
 
 
-];
+    {
+      prop: 'createTime',
+      label: '创建时间',
+      align: 'center',
+      showOverflowTooltip: true,
+      minWidth: 110,
+      sortable: 'custom'
+    },
+    {
+      slot: 'status',
+      label: '状态',
+      align: 'center',
+      formatter: (row) => {
+        const obj = statusOpt.find((i) => i.value == row.status);
+        return obj && obj.label;
+      }
+    },
+
+    {
+      prop: 'serialNo',
+      label: '客户代号',
+      align: 'center',
+      showOverflowTooltip: true
+    },
+
+    {
+      prop: 'simpleName',
+      label: '客户简称',
+      align: 'center',
+      showOverflowTooltip: true
+    }
+  ];
 export const lineOption = (data, itemStyle = {}) => {
 export const lineOption = (data, itemStyle = {}) => {
     return {
     return {
         tooltip: {
         tooltip: {

+ 25 - 18
src/views/home/index.vue

@@ -66,14 +66,12 @@
           <div slot="header" class="clearfix">
           <div slot="header" class="clearfix">
             <span>计划进度看板</span>
             <span>计划进度看板</span>
           </div>
           </div>
-          <ele-pro-table
-            ref="table"
-            :columns="columns"
-            :datasource="datasource"
-            :needPage="false"
-            :toolbar="false"
-          >
+
+          <ele-pro-table ref="table" height="calc(100%)" :columns="columns" :datasource="datasource"
+            :needPage="false" :toolbar="false">
           </ele-pro-table>
           </ele-pro-table>
+
+
         </el-card>
         </el-card>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
@@ -95,7 +93,7 @@ import {
   TooltipComponent,
   TooltipComponent,
   LegendComponent
   LegendComponent
 } from 'echarts/components';
 } from 'echarts/components';
-
+import { getList } from '@/api/workOrder/index'
 import VChart from 'vue-echarts';
 import VChart from 'vue-echarts';
 import { echartsMixin } from '@/utils/echarts-mixin';
 import { echartsMixin } from '@/utils/echarts-mixin';
 // 按需加载 echarts
 // 按需加载 echarts
@@ -154,7 +152,7 @@ export default {
     };
     };
   },
   },
 
 
-  created() {},
+  created() { },
   mounted() {
   mounted() {
     this.pieOption = pieOption([
     this.pieOption = pieOption([
       { value: 60, name: '人员异常' },
       { value: 60, name: '人员异常' },
@@ -262,7 +260,7 @@ export default {
       [55, 81, 90, 80, 78, 95, 80]
       [55, 81, 90, 80, 78, 95, 80]
     ]);
     ]);
     setTimeout(() => {
     setTimeout(() => {
-      
+
       this.$refs.pieRef.resize();
       this.$refs.pieRef.resize();
       this.$refs.barRef1.resize();
       this.$refs.barRef1.resize();
       this.$refs.lineRef.resize();
       this.$refs.lineRef.resize();
@@ -271,7 +269,6 @@ export default {
   },
   },
   methods: {
   methods: {
     datasource({ page, where, limit }) {
     datasource({ page, where, limit }) {
-      return [];
       return getList({
       return getList({
         ...where,
         ...where,
         pageNum: page,
         pageNum: page,
@@ -285,32 +282,41 @@ export default {
 .clearfix {
 .clearfix {
   font-size: 0.7vw;
   font-size: 0.7vw;
 
 
-  > span {
+  >span {
     font-weight: bold;
     font-weight: bold;
   }
   }
+
   :deep(.el-radio-button__inner) {
   :deep(.el-radio-button__inner) {
     font-size: 0.7vw;
     font-size: 0.7vw;
   }
   }
 }
 }
+
 .ele-body {
 .ele-body {
   height: calc(100vh - 136px);
   height: calc(100vh - 136px);
-  > .el-row {
+
+  >.el-row {
     height: 100%;
     height: 100%;
   }
   }
+
   .el-card {
   .el-card {
     height: 100%;
     height: 100%;
+
     :deep(.el-card__body) {
     :deep(.el-card__body) {
       padding: 0.3vw;
       padding: 0.3vw;
     }
     }
+
     :deep(.el-card__header) {
     :deep(.el-card__header) {
       padding: 0.6vw;
       padding: 0.6vw;
     }
     }
+
     :deep(.el-card__body) {
     :deep(.el-card__body) {
       height: calc(100% - 2.3vw);
       height: calc(100% - 2.3vw);
     }
     }
+
     :deep(.ele-pro-table) {
     :deep(.ele-pro-table) {
       height: 99%;
       height: 99%;
     }
     }
+
     :deep(.el-table) {
     :deep(.el-table) {
       font-size: 0.65vw;
       font-size: 0.65vw;
     }
     }
@@ -325,7 +331,8 @@ export default {
   border-radius: 6px;
   border-radius: 6px;
   padding: 1vw;
   padding: 1vw;
   color: #333;
   color: #333;
-  > .header {
+
+  >.header {
     font-size: 0.9vw;
     font-size: 0.9vw;
     font-weight: 600;
     font-weight: 600;
     width: 100%;
     width: 100%;
@@ -334,7 +341,8 @@ export default {
     text-align: center;
     text-align: center;
     color: #3a92edd1;
     color: #3a92edd1;
   }
   }
-  > .content {
+
+  >.content {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
@@ -342,6 +350,7 @@ export default {
     font-size: 0.9vw;
     font-size: 0.9vw;
     font-weight: 500;
     font-weight: 500;
     height: calc(100% - 1.5vw);
     height: calc(100% - 1.5vw);
+
     p {
     p {
       display: flex;
       display: flex;
       align-items: center;
       align-items: center;
@@ -351,6 +360,4 @@ export default {
     }
     }
   }
   }
 }
 }
-</style>
-
-  
+</style>

+ 1 - 0
src/views/productionPlan/components/productionPlan-search.vue

@@ -186,6 +186,7 @@
                     <el-input size="mini" clearable v-model="where.productCode" placeholder="请输入" />
                     <el-input size="mini" clearable v-model="where.productCode" placeholder="请输入" />
                   </el-form-item>
                   </el-form-item>
                 </el-row>
                 </el-row>
+
                 <el-row>
                 <el-row>
                   <el-form-item label="牌号:" label-width="80px">
                   <el-form-item label="牌号:" label-width="80px">
                     <el-input size="mini" clearable v-model="where.brandNo" placeholder="请输入" />
                     <el-input size="mini" clearable v-model="where.brandNo" placeholder="请输入" />

+ 12 - 4
src/views/productionPlan/index.vue

@@ -89,13 +89,13 @@
         <el-button type="success" size="mini" @click="homogeneityInspect"
         <el-button type="success" size="mini" @click="homogeneityInspect"
           >齐套性检查</el-button
           >齐套性检查</el-button
         >
         >
-        <el-button type="primary" size="mini" @click="disassemblePlan"
+        <el-button type="primary" size="mini" v-if="isshow" @click="disassemblePlan"
           >计划分解</el-button
           >计划分解</el-button
         >
         >
         <el-button type="primary" size="mini">补单计划</el-button>
         <el-button type="primary" size="mini">补单计划</el-button>
         <el-button type="info" size="mini">计划行事历</el-button>
         <el-button type="info" size="mini">计划行事历</el-button>
         <el-button type="warning" size="mini">预警设置</el-button>
         <el-button type="warning" size="mini">预警设置</el-button>
-        <el-button type="primary" size="mini" @click="handleMerge"
+        <el-button type="primary" size="mini" v-if="isshow" @click="handleMerge"
           >合批</el-button
           >合批</el-button
         >
         >
         <el-button type="danger" size="mini">延期申请</el-button>
         <el-button type="danger" size="mini">延期申请</el-button>
@@ -104,7 +104,7 @@
        
        
       </div>
       </div>
 
 
-      <el-tabs v-model="activeName" type="card" size="mini">
+      <el-tabs v-model="activeName" type="card" size="mini" @tab-click="handleSele">
         <el-tab-pane label="未发布" name="first"></el-tab-pane>
         <el-tab-pane label="未发布" name="first"></el-tab-pane>
         <el-tab-pane label="已发布" name="second"></el-tab-pane>
         <el-tab-pane label="已发布" name="second"></el-tab-pane>
         <el-tab-pane label="已变更" name="change"></el-tab-pane>
         <el-tab-pane label="已变更" name="change"></el-tab-pane>
@@ -342,7 +342,7 @@
           stockNum: 0
           stockNum: 0
         },
         },
         activeName: 'first',
         activeName: 'first',
-
+        isshow:true,
         // 加载状态
         // 加载状态
         loading: false,
         loading: false,
         pageType: 'add',
         pageType: 'add',
@@ -711,6 +711,14 @@
       this.getPlanStatistics();
       this.getPlanStatistics();
     },
     },
     methods: {
     methods: {
+      handleSele(e){
+        if(e.index==='1'){
+          this.isshow=false;
+        }else{
+          this.isshow=true;
+        }
+      },
+
       async getPlanStatistics() {
       async getPlanStatistics() {
         let res = await getPlanStatistics();
         let res = await getPlanStatistics();
         console.log(res);
         console.log(res);

+ 2 - 2
vue.config.js

@@ -33,10 +33,10 @@ module.exports = {
       '/api': {
       '/api': {
         // target: 'http://192.168.1.210:86/',
         // target: 'http://192.168.1.210:86/',
         // target: 'http://192.168.1.103:18086',
         // target: 'http://192.168.1.103:18086',
-        // target: 'http://192.168.1.158:18086',
+        target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
         // target: 'http://192.168.158:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
 
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
         pathRewrite: {