2213980799@qq.com пре 1 година
родитељ
комит
ba9026e5aa

+ 61 - 0
src/api/mergePutMesh/mergePutMesh.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request';
+
+// 获取未合并挂网数据列表
+export const getScheduleWorkOrderByPage = (data) => {
+  return request({
+    url: '/aps/productionplan/ListHangNetwork',
+    method: 'post',
+    params: {
+      pageNum: data.pageNum,
+      pageSize: data.pageSize,
+    },
+    data,
+  })
+}
+
+//添加挂网并模
+export const updateMergeV2 = (data) => {
+  return request({
+    url: '/aps/productionplan/HangNet',
+    method: 'post',
+    data,
+  })
+}
+
+// 获取任务下发数据列表
+export const getPutMeshWorkOrderByPage = (data) => {
+  return request({
+    url: '/aps/team_networking_task/ListPage',
+    method: 'post',
+    params: {
+      pageNum: data.pageNum,
+      pageSize: data.pageSize,
+    },
+    data: data,
+  })
+}
+
+// 任务下发按钮操作
+export const issuedPutMeshWorkOrder = (params) => {
+  return request.post('/aps/team_networking_task/updateStatus', params)
+}
+
+// 批量删除挂网工单信息(取消、删除、撤回)
+export const deletePutMeshWorkOrder = (params, type) => {
+  let url = type == 0 ? '/aps/team_networking_task/cancel' : "/aps/team_networking_task/delete"
+  if (type == 1) {
+    return request.delete(url, {data:params.id})
+
+  } else {
+    return request.post(url, params)
+  }
+}
+
+// 未合并挂网列表删除
+export const deleteScheduleWorkOrder = (params) => {
+  return request({
+    url: '/api/blade-mes/scheduleWorkOrder/deleteScheduleWorkOrder',
+    method: 'post',
+    params,
+  })
+}

+ 55 - 0
src/components/basic-container/main.vue

@@ -0,0 +1,55 @@
+<template>
+  <div class="basic-container" :class="{ 'basic-container--block': block }">
+    <el-card>
+      <slot></slot>
+    </el-card>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "basicContainer",
+  props: {
+    radius: {
+      type: [String, Number],
+      default: 10
+    },
+    background: {
+      type: String
+    },
+    block: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    styleName() {
+      return {
+        borderRadius: this.setPx(this.radius),
+        background: this.background
+      };
+    }
+  }
+};
+</script>
+
+<style lang="scss">
+.basic-container {
+  height:100%;
+  // min-height: 1080px;
+  padding: 10px 0;
+  box-sizing: border-box;
+  &--block {
+    height: 100%;
+    .el-card {
+      height: 100%;
+    }
+  }
+  .el-card {
+    width: 100%;
+  }
+  &:first-child {
+    padding-top: 0;
+  }
+}
+</style>

+ 1 - 1
src/enum/dict.js

@@ -19,7 +19,7 @@ export default {
   交货状态: 'delivery_status',
   余量系数: 'margin_code',
   计量单位: 'measuring_uint',
-
+  开槽类型:'slotting_type'
 };
 
 export const numberList = [

+ 314 - 304
src/views/productionPlan/index.vue

@@ -28,21 +28,14 @@
           </el-link>
         </template>
 
-        
         <template v-slot:productWeight="{ row }">
-      
-      {{ row.productWeight }} {{ row.weightUnit }}
-  
-  </template>
-
+          {{ row.productWeight }} {{ row.weightUnit }}
+        </template>
 
         <template v-slot:newSumOrderWeight="{ row }">
-      
-            {{ row.newSumOrderWeight }} {{ row.newWeightUnit }}
-        
+          {{ row.newSumOrderWeight }} {{ row.newWeightUnit }}
         </template>
 
-
         <template v-slot:status="{ row }">
           <span :class="{ 'ele-text-danger': row.status == 3 }">
             {{ statusFormatter(row.status) }}
@@ -91,332 +84,349 @@
 </template>
 
 <script>
-  import { getList, del } from '@/api/productionPlan/index.js';
-  import productionPlanSearch from './components/productionPlan-search.vue';
-  import { release } from '@/api/productionPlan/order.js';
-  import { multiply } from '@/utils/math';
-  import { getCode } from '@/api/codeManagement';
-  export default {
-    components: {
-      productionPlanSearch
-    },
-    data() {
-      return {
-        activeName: 'first',
+import { getList, del } from '@/api/productionPlan/index.js';
+import productionPlanSearch from './components/productionPlan-search.vue';
+import { release } from '@/api/productionPlan/order.js';
+import { multiply } from '@/utils/math';
+import { getCode } from '@/api/codeManagement';
+export default {
+  components: {
+    productionPlanSearch
+  },
+  data() {
+    return {
+      activeName: 'first',
 
-        // 加载状态
-        loading: false,
-        pageType: 'add',
-        dialogTitle: '',
-        isBindPlan: false,
-        statusOpt: {
-          first: [
-            { label: '所有状态', value: '3,2' },
-            { label: '待发布', value: '2' },
-            { label: '发布失败', value: '3' }
-          ],
-          second: [
-            { label: '所有状态', value: '7,4,5,6' },
-            { label: '待生产', value: '4' },
-            { label: '生产中', value: '5' },
-            { label: '已完成', value: '6' },
-            { label: '已延期', value: '7' }
-          ]
-        },
-        planType: [
-          { label: '所有计划类型', value: null },
-          { label: '内销计划', value: '1' },
-          { label: '外销计划', value: '2' },
-          { label: '预制计划', value: '3' }
+      // 加载状态
+      loading: false,
+      pageType: 'add',
+      dialogTitle: '',
+      isBindPlan: false,
+      statusOpt: {
+        first: [
+          { label: '所有状态', value: '3,2' },
+          { label: '待发布', value: '2' },
+          { label: '发布失败', value: '3' }
+        ],
+        second: [
+          { label: '所有状态', value: '7,4,5,6' },
+          { label: '待生产', value: '4' },
+          { label: '生产中', value: '5' },
+          { label: '已完成', value: '6' },
+          { label: '已延期', value: '7' }
         ]
-      };
-    },
-    computed: {
-      // 表格列配置
-      columns() {
-        const opt = {
-          first: [
-            // {
-            //   prop: 'deliveryTime',
-            //   label: '预测交货日期',
-            //   align: 'center',
-            //   showOverflowTooltip: true,
-            //   minWidth: 110
-            // }
-          ],
-          second: [
-            // {
-            //   prop: 'formingTime',
-            //   label: '实际生产日期',
-            //   align: 'center',
-            //   showOverflowTooltip: true,
-            //   minWidth: 110
-            // },
-            {
-              prop: 'releaseTime',
-              label: '工单发布日期',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 110
-            },
-            {
-              prop: 'planFormingTime',
-              label: '预测生产日期',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 110
-            },
-            {
-              prop: 'deliveryTime',
-              label: '预测交货日期',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 110
-            },
-            {
-              prop: 'formingTime',
-              label: '实际交货日期',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 110
-            }
-          ]
-        };
-
-        return [
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            slot: 'code',
-            prop: 'code',
-            action: 'code',
-            label: '计划编号',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 180
-          },
-          {
-            prop: 'productCode',
-            label: '物料编号',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            prop: 'brandNo',
-            label: '牌号',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'model',
-            label: '型号',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'productNum',
-            label: '计划数量',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'productWeight',
-            label: '计划重量',
-            align: 'center',
-            showOverflowTooltip: true,
-            slot: 'productWeight'
-          },
-          {
-            prop: 'requiredFormingNum',
-            label: '要求生产数量',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-
-          {
-            prop: 'newSumOrderWeight',
-            label: '要求生产重量',
-            align: 'center',
-            showOverflowTooltip: true,
-            slot: 'newSumOrderWeight',
-          },
-
+      },
+      planType: [
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' }
+      ]
+    };
+  },
+  computed: {
+    // 表格列配置
+    columns() {
+      const opt = {
+        first: [
           // {
-          //   prop: '',
-          //   label: '已生产数量',
+          //   prop: 'deliveryTime',
+          //   label: '预测交货日期',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 110
+          // }
+        ],
+        second: [
+          // {
+          //   prop: 'formingTime',
+          //   label: '实际生产日期',
           //   align: 'center',
           //   showOverflowTooltip: true,
           //   minWidth: 110
           // },
           {
-            prop: 'reqMoldTime',
-            label: '要求生产日期',
+            prop: 'releaseTime',
+            label: '工单发布日期',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
-
-          ...opt[this.activeName],
-
           {
-            prop: 'orderType',
-            label: '计划类型',
+            prop: 'planFormingTime',
+            label: '预测生产日期',
             align: 'center',
             showOverflowTooltip: true,
-            formatter: (row) => {
-              const obj = this.planType.find((i) => i.value == row.planType);
-              return obj && obj.label;
-            }
+            minWidth: 110
           },
           {
-            prop: 'createTime',
-            label: '创建时间',
+            prop: 'deliveryTime',
+            label: '预测交货日期',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
           {
-            columnKey: 'status',
-            slot: 'status',
-            label: '状态',
+            prop: 'formingTime',
+            label: '实际交货日期',
             align: 'center',
-            formatter: (row) => {
-              const obj = this.statusOpt[this.activeName].find(
-                (i) => i.value == row.status
-              );
-              return obj && obj.label;
-            }
-          },
-          // ...(this.activeName === 'second'
-          //   ? [
-          //       {
-          //         prop: 'releaseTime',
-          //         label: '发布时间',
-          //         align: 'center',
-          //         showOverflowTooltip: true,
-          //         minWidth: 110
-          //       }
-          //     ]
-          //   : []),
-          ...(this.activeName === 'first'
-            ? [
-                {
-                  columnKey: 'action',
-                  label: '操作',
-                  width: 350,
-                  align: 'center',
-                  resizable: false,
-                  fixed: 'right',
-                  slot: 'action',
-                  showOverflowTooltip: true
-                }
-              ]
-            : [])
-        ];
-      }
-    },
-    methods: {
-      statusFormatter(status) {
-        const obj = this.statusOpt[this.activeName].find(
-          (i) => i.value == status
-        );
+            showOverflowTooltip: true,
+            minWidth: 110
+          }
+        ]
+      };
 
-        return obj && obj.label;
-      },
-      /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        return getList({
-          pageNum: page,
-          size: limit,
-          ...where
-        });
-      },
-      // 发布工单
-      handleOrderPublish(type, row) {
-        this.$confirm('发布工单后不可撤回,确定发布吗?', '发布确认')
-          .then(async () => {
-            const loading = this.$loading({
-              lock: true,
-              fullscreen: true,
-              text: '工单发布中...'
-            });
-            try {
-              let code = row.workOrderCode;
-              if (!code) {
-                code = await getCode('product_order_code');
-              }
-              // 反显对象会报错 status
-              const data = await release([    row.id  ]);
-              if (data || data === 0) {
-                this.$message.success('发布成功!');
-              } else {
-                this.$message.error('发布失败,请重新发布!');
+      return [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          slot: 'code',
+          prop: 'code',
+          action: 'code',
+          label: '计划编号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
+        {
+          prop: 'productCode',
+          label: '物料编号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'brandNo',
+          label: '牌号',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'model',
+          label: '型号',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'specification',
+          label: '规格',
+          align: 'center'
+        },
+        {
+          prop: 'productNum',
+          label: '计划数量(方)',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+        {
+          prop: 'productWeight',
+          label: '计划重量',
+          align: 'center',
+          showOverflowTooltip: true,
+          slot: 'productWeight'
+        },
+        {
+          prop: 'requiredFormingNum',
+          label: '要求生产数量(方)',
+          align: 'center',
+          minWidth: 120,
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'newSumOrderWeight',
+          label: '要求生产重量',
+          align: 'center',
+          showOverflowTooltip: true,
+          slot: 'newSumOrderWeight'
+        },
+        {
+          prop: 'moCount',
+          label: '模数',
+          align: 'center',
+        },
+
+        {
+          prop: 'blockCount',
+          label: '块数',
+          align: 'center',
+        },
+        // {
+        //   prop: '',
+        //   label: '已生产数量',
+        //   align: 'center',
+        //   showOverflowTooltip: true,
+        //   minWidth: 110
+        // },
+        {
+          prop: 'reqMoldTime',
+          label: '要求生产日期',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        ...opt[this.activeName],
+
+        {
+          prop: 'orderType',
+          label: '计划类型',
+          align: 'center',
+          showOverflowTooltip: true,
+          formatter: (row) => {
+            const obj = this.planType.find((i) => i.value == row.planType);
+            return obj && obj.label;
+          }
+        },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          columnKey: 'status',
+          slot: 'status',
+          label: '状态',
+          align: 'center',
+          formatter: (row) => {
+            const obj = this.statusOpt[this.activeName].find(
+              (i) => i.value == row.status
+            );
+            return obj && obj.label;
+          }
+        },
+        // ...(this.activeName === 'second'
+        //   ? [
+        //       {
+        //         prop: 'releaseTime',
+        //         label: '发布时间',
+        //         align: 'center',
+        //         showOverflowTooltip: true,
+        //         minWidth: 110
+        //       }
+        //     ]
+        //   : []),
+        ...(this.activeName === 'first'
+          ? [
+              {
+                columnKey: 'action',
+                label: '操作',
+                width: 350,
+                align: 'center',
+                resizable: false,
+                fixed: 'right',
+                slot: 'action',
+                showOverflowTooltip: true
               }
-              this.reload();
-            } catch (error) {
-              console.error(error);
-            }
-            loading.close();
-          })
-          .catch((err) => {
-            console.error(err);
-          });
+            ]
+          : [])
+      ];
+    }
+  },
+  methods: {
+    statusFormatter(status) {
+      const obj = this.statusOpt[this.activeName].find(
+        (i) => i.value == status
+      );
 
-        // this.$router.push({
-        //   path: '/productionPlan/workOrderPublish',
-        //   query: {
-        //     type,
-        //     id: row.id
-        //   }
-        // });
-      },
-      // 修改计划
-      planEdit({ id }) {
-        this.$router.push({
-          path: '/saleOrder/salesToProduction',
-          query: {
-            type: 'edit',
-            id
+      return obj && obj.label;
+    },
+    /* 表格数据源 */
+    datasource({ page, limit, where }) {
+      return getList({
+        pageNum: page,
+        size: limit,
+        ...where
+      });
+    },
+    // 发布工单
+    handleOrderPublish(type, row) {
+      this.$confirm('发布工单后不可撤回,确定发布吗?', '发布确认')
+        .then(async () => {
+          const loading = this.$loading({
+            lock: true,
+            fullscreen: true,
+            text: '工单发布中...'
+          });
+          try {
+            let code = row.workOrderCode;
+            if (!code) {
+              code = await getCode('product_order_code');
+            }
+            // 反显对象会报错 status
+            const data = await release([row.id]);
+            if (data || data === 0) {
+              this.$message.success('发布成功!');
+            } else {
+              this.$message.error('发布失败,请重新发布!');
+            }
+            this.reload();
+          } catch (error) {
+            console.error(error);
           }
+          loading.close();
+        })
+        .catch((err) => {
+          console.error(err);
         });
-      },
-      handleTabChange() {
-        this.$refs.searchRef.reset();
-      },
 
-      /* 刷新表格 */
-      reload(where) {
-        this.$nextTick(() => {
-          this.$refs.table.reload({ page: 1, where });
-        });
-      },
+      // this.$router.push({
+      //   path: '/productionPlan/workOrderPublish',
+      //   query: {
+      //     type,
+      //     id: row.id
+      //   }
+      // });
+    },
+    // 修改计划
+    planEdit({ id }) {
+      this.$router.push({
+        path: '/saleOrder/salesToProduction',
+        query: {
+          type: 'edit',
+          id
+        }
+      });
+    },
+    handleTabChange() {
+      this.$refs.searchRef.reset();
+    },
 
-      goDetail({ id }) {
-        this.$router.push({
-          path: '/productionPlan/detail/' + id
+    /* 刷新表格 */
+    reload(where) {
+      this.$nextTick(() => {
+        this.$refs.table.reload({ page: 1, where });
+      });
+    },
+
+    goDetail({ id }) {
+      this.$router.push({
+        path: '/productionPlan/detail/' + id
+      });
+    },
+    handleDelete({ id }) {
+      this.$confirm('确定删除当前数据?', '提示')
+        .then(async () => {
+          await del(id);
+          this.$message.success('删除成功!');
+          this.reload();
+        })
+        .catch((err) => {
+          console.error(err);
         });
-      },
-      handleDelete({ id }) {
-        this.$confirm('确定删除当前数据?', '提示')
-          .then(async () => {
-            await del(id);
-            this.$message.success('删除成功!');
-            this.reload();
-          })
-          .catch((err) => {
-            console.error(err);
-          });
-      }
     }
-  };
+  }
+};
 </script>
 
 <style lang="scss" scoped></style>

+ 3 - 1
src/views/saleOrder/components/create-order.vue

@@ -80,12 +80,14 @@
         </el-table-column>
         <el-table-column label="型号" align="center" prop="model">
         </el-table-column>
+        <el-table-column label="规格" align="center" prop="specification">
+        </el-table-column>
         <el-table-column label="单重" align="center" prop="productUnitWeight">
         </el-table-column>
         <el-table-column label="重量单位" align="center" prop="weightUnit">
           
         </el-table-column>
-        <el-table-column label="交付数量" align="center" prop="contractNum">
+        <el-table-column label="交付数量(方)" align="center" prop="contractNum">
           <template slot-scope="scope">
             <el-form-item label-width="0px" :prop="'productInfoList.' + scope.$index + '.contractNum'" :rules="{
               required: true,

+ 13 - 9
src/views/saleOrder/components/order-detail.vue

@@ -19,17 +19,17 @@
           {{ form.salesOrderBasicInfo.releaseTime }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template slot="label"> 合同数量</template>
+          <template slot="label"> 合同数量(方)</template>
           {{ form.salesOrderBasicInfo.contractNum }}
         </el-descriptions-item>
-<!--        <el-descriptions-item>
-          <template slot="label"> 已交货数量 </template>
-          {{ form.salesOrderBasicInfo.deliveredQuantity }}
-        </el-descriptions-item> -->
-<!--        <el-descriptions-item>
-          <template slot="label"> 欠交货数量 </template>
-          {{ form.salesOrderBasicInfo.lackNum }}
-        </el-descriptions-item> -->
+       <el-descriptions-item>
+          <template slot="label"> 模数 </template>
+          {{ form.salesOrderBasicInfo.moCount }}
+        </el-descriptions-item>
+       <el-descriptions-item>
+          <template slot="label"> 块数 </template>
+          {{ form.salesOrderBasicInfo.blockCount }}
+        </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label"> 订单来源 </template>
           {{ getDictValue('订单来源', form.salesOrderBasicInfo.orderSource) }}
@@ -116,6 +116,10 @@
           <template slot="label"> 型号 </template>
           {{ form.productSpecRequirement.model }}
         </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label"> 规格 </template>
+          {{ form.productSpecRequirement.specification }}
+        </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label"> 单重 </template>
           {{ form.productSpecRequirement.productUnitWeight }}

+ 21 - 2
src/views/saleOrder/index.vue

@@ -174,6 +174,12 @@
             minWidth: 120,
             sortable: true
           },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            minWidth: 120,
+          },
           {
             prop: 'productSumWeight',
             label: '合同重量',
@@ -182,12 +188,25 @@
           },
           {
             prop: 'contractNum',
-            label: '合同数量',
+            label: '合同数量(方)',
+            minWidth: 120,
             align: 'center'
+            
           },
           {
             prop: 'lackNum',
-            label: '欠交数量',
+            label: '欠交数量(方)',
+            minWidth: 120,
+            align: 'center'
+          },
+          {
+            prop: 'moCount',
+            label: '模数',
+            align: 'center'
+          },
+          {
+            prop: 'blockCount',
+            label: '块数',
             align: 'center'
           },
           {

+ 428 - 109
src/views/saleOrder/salesToProduction.vue

@@ -10,34 +10,56 @@
           </el-button>
         </div>
       </div>
-      <el-form ref="form" :model="form" :rules="rules" label-width="90px" class="formbox">
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="90px"
+        class="formbox"
+      >
         <el-row :gutter="24">
           <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
             <el-form-item label="计划类型:">
-              <DictSelection dictName="订单计划类型" clearable v-model="form.planType" disabled>
+              <DictSelection
+                dictName="订单计划类型"
+                clearable
+                v-model="form.planType"
+                disabled
+              >
               </DictSelection>
             </el-form-item>
           </el-col>
           <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
             <el-form-item label="工艺路线:" prop="produceRoutingName">
-              <el-input @click.native="openVersion" placeholder="请选择工艺路线" readonly
-                v-model="form.produceRoutingName"></el-input>
+              <el-input
+                @click.native="openVersion"
+                placeholder="请选择工艺路线"
+                readonly
+                v-model="form.produceRoutingName"
+              ></el-input>
             </el-form-item>
           </el-col>
 
           <el-col v-bind="styleResponsive ? { lg: 3, md: 6 } : { span: 3 }">
             <el-form-item label="使用改型:" prop="modification">
-              <el-checkbox v-model="form.modification" :true-label="1" :false-label="0"></el-checkbox>
+              <el-checkbox
+                v-model="form.modification"
+                :true-label="1"
+                :false-label="0"
+              ></el-checkbox>
             </el-form-item>
           </el-col>
 
           <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
             <el-form-item label="余量系数:" prop="marginCoefficient">
-              <DictSelection @itemChange="itemChange" style="width: 200px" dictName="余量系数"
-                v-model="form.marginCoefficient"></DictSelection>
+              <DictSelection
+                @itemChange="itemChange"
+                style="width: 200px"
+                dictName="余量系数"
+                v-model="form.marginCoefficient"
+              ></DictSelection>
             </el-form-item>
           </el-col>
-
         </el-row>
         <el-row :gutter="24" class="row-intro">
           <el-col v-bind="styleResponsive ? { lg: 3, md: 12 } : { span: 3 }">
@@ -58,10 +80,10 @@
               form.productCode
             }}</el-form-item>
           </el-col>
-          <el-col v-bind="styleResponsive ?  { lg: 3, md: 12 } : { span: 3 }">
+          <el-col v-bind="styleResponsive ? { lg: 3, md: 12 } : { span: 3 }">
             <el-form-item label="牌号:">{{ form.brandNo }}</el-form-item>
           </el-col>
-          <el-col v-bind="styleResponsive ?  { lg: 5, md: 12 } : { span: 5 }">
+          <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
             <el-form-item label="型号:">{{ form.model }}</el-form-item>
           </el-col>
 
@@ -77,46 +99,197 @@
               <span>{{ scope.$index + 1 }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="销售订单号" align="center" prop="code" width="120" sortable>
+          <el-table-column
+            label="销售订单号"
+            align="center"
+            prop="code"
+            width="120"
+            sortable
+          >
           </el-table-column>
           <el-table-column label="行号" align="center" prop="lineNumber">
           </el-table-column>
-          <el-table-column label="合同数量" align="center" prop="contractNum">
+          <el-table-column
+            label="合同数量(方)"
+            align="center"
+            prop="contractNum"
+          >
           </el-table-column>
-          <el-table-column label="合同重量" align="center" prop="productSumWeight">
+
+          <el-table-column
+            label="合同重量"
+            align="center"
+            prop="productSumWeight"
+          >
             <template slot-scope="scope">
-              {{  scope.row.productSumWeight }} {{ form.weightUnit  }}
-             </template>
+              {{ scope.row.productSumWeight }} {{ form.weightUnit }}
+            </template>
           </el-table-column>
-          <el-table-column label="欠交数量" align="center" prop="lackNum">
+          <el-table-column label="规格" align="center" prop="specification">
           </el-table-column>
-          <el-table-column label="计划生产数量" align="center" prop="planProductNum" width="120">
+          <el-table-column label="欠交数量(方)" align="center" prop="lackNum">
+          </el-table-column>
+          <el-table-column
+            label="计划生产数量(方)"
+            align="center"
+            prop="planProductNum"
+            width="140"
+          >
             <template slot-scope="scope">
-              <el-form-item label-width="0px" :prop="'salesOrders.' + scope.$index + '.planProductNum'" :rules="{
-                required: true,
-                message: '请输入计划生产数量',
-                trigger: 'blur'
-              }" class="table-item">
-
-                <el-input v-model.number="scope.row.planProductNum" size="small"
-                  oninput="value=value.replace(/[^\d]/g,'')" style="width: 100%"
-                  @blur="scope.row.requiredFormingNum = toInt(scope.row.planProductNum)" placeholder="输入数量"></el-input>
+              <el-form-item
+                label-width="0px"
+                :prop="'salesOrders.' + scope.$index + '.planProductNum'"
+                :rules="{
+                  required: true,
+                  message: '请输入计划生产数量',
+                  trigger: 'blur'
+                }"
+                class="table-item"
+              >
+                <el-input
+                  v-model.number="scope.row.planProductNum"
+                  size="small"
+                  @input="
+                    tableHandleKeyUp(scope.row, scope.$index, $event, 'sum')
+                  "
+                  style="width: 100%"
+                  placeholder="输入数量"
+                ></el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column label="要求生产数量" align="center" prop="requiredFormingNum" width="120">
+          <el-table-column
+            label="要求生产数量(方)"
+            align="center"
+            prop="requiredFormingNum"
+            width="140"
+          >
             <template slot-scope="scope">
-              <el-form-item label-width="0px" :prop="'salesOrders.' + scope.$index + '.requiredFormingNum'" :rules="{
-                required: true,
-                message: '请输入要求生产数量',
-                trigger: 'blur'
-              }" class="table-item">
-                <el-input v-model.number="scope.row.requiredFormingNum" size="small" disabled
-                  oninput="value=value.replace(/[^\d]/g,'')" style="width: 100%" placeholder="输入数量"></el-input>
+              <el-form-item
+                label-width="0px"
+                :prop="'salesOrders.' + scope.$index + '.requiredFormingNum'"
+                :rules="{
+                  required: true,
+                  message: '请输入要求生产数量',
+                  trigger: 'blur'
+                }"
+                class="table-item"
+              >
+                <el-input
+                  v-model.number="scope.row.requiredFormingNum"
+                  size="small"
+                  disabled
+                  style="width: 100%"
+                  placeholder="输入数量"
+                ></el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column label="按单按库" align="center" prop="orderLibraryType">
+          <el-table-column label="模数" align="center" width="100">
+            <template slot-scope="scope">
+              <div>
+                <el-input
+                  style="width: 100%"
+                  size="small"
+                  v-model="scope.row.moCount"
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
+                  @input="
+                    tableHandleKeyUp(scope.row, scope.$index, $event, 'moCount')
+                  "
+                  placeholder="请输入"
+                >
+                </el-input>
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" width="100">
+            <template slot="header">
+              <span style="color: red">*</span>
+              <span>块数</span>
+            </template>
+            <template slot-scope="scope">
+              <div>
+                <el-input
+                  size="small"
+                  style="width: 100%"
+                  oninput="value=value.replace(/[^0-9.]/g,'')"
+                  @input="
+                    tableHandleKeyUp(
+                      scope.row,
+                      scope.$index,
+                      $event,
+                      'blockCount'
+                    )
+                  "
+                  v-model="scope.row.blockCount"
+                  placeholder="请输入"
+                ></el-input>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="权重等级" align="center" width="120">
+            <template slot-scope="scope">
+              <div>
+                <el-select v-model="scope.row.weight" style="width: 100%">
+                  <el-option
+                    v-for="item of weightList"
+                    :key="item.code"
+                    :label="item.name"
+                    :value="item.code"
+                  ></el-option>
+                </el-select>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" width="120" label="是否开槽">
+            <template slot-scope="scope">
+              <div>
+                <el-select
+                  style="width: 100%"
+                  v-model="scope.row.isSlotting"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item of isSlotting"
+                    :key="item.code"
+                    :label="item.name"
+                    :value="item.code"
+                  />
+                </el-select>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" width="120" label="开槽类型">
+            <template slot-scope="scope">
+              <DictSelection
+                dictName="开槽类型"
+                v-model="scope.row.slottingType"
+                v-if="scope.row.isSlotting == 1"
+              >
+              </DictSelection>
+              <!-- <div>
+                <el-select
+                  v-if="scope.row.isSlotting == 1"
+                  style="width: 100%"
+                  v-model="scope.row.slottingType"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item of isSlotting"
+                    :key="item.code"
+                    :label="item.name"
+                    :value="item.code"
+                  />
+                </el-select>
+              </div> -->
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="按单按库"
+            align="center"
+            prop="orderLibraryType"
+          >
             <template slot-scope="{ row }">
               {{ getDictValue('按单按库', row.orderLibraryType) }}
             </template>
@@ -126,20 +299,43 @@
               {{ getDictValue('订单类型', row.orderType) }}
             </template>
           </el-table-column>
-          <el-table-column label="交付日期" align="center" prop="deliveryTime" width="160">
+
+          <el-table-column
+            label="交付日期"
+            align="center"
+            prop="deliveryTime"
+            width="160"
+          >
           </el-table-column>
-          <el-table-column label="要求生产日期" align="center" prop="reqMoldTime" width="180">
+          <el-table-column
+            label="要求生产日期"
+            align="center"
+            prop="reqMoldTime"
+            width="180"
+          >
             <template slot-scope="scope">
-              <el-form-item label-width="0px" :prop="'salesOrders.' + scope.$index + '.reqMoldTime'" :rules="{
-                required: true,
-                message: '请选择要求生产日期',
-                trigger: 'blur'
-              }" class="table-item">
-                <el-date-picker style="width: 100%" v-model="scope.row.reqMoldTime" :pickerOptions="{
-                  disabledDate: (time) =>
-                    time.getTime() <
-                    new Date(new Date().setHours(0, 0, 0, 0)).getTime()
-                }" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
+              <el-form-item
+                label-width="0px"
+                :prop="'salesOrders.' + scope.$index + '.reqMoldTime'"
+                :rules="{
+                  required: true,
+                  message: '请选择要求生产日期',
+                  trigger: 'blur'
+                }"
+                class="table-item"
+              >
+                <el-date-picker
+                  style="width: 100%"
+                  v-model="scope.row.reqMoldTime"
+                  :pickerOptions="{
+                    disabledDate: (time) =>
+                      time.getTime() <
+                      new Date(new Date().setHours(0, 0, 0, 0)).getTime()
+                  }"
+                  type="date"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd"
+                >
                 </el-date-picker>
                 <!-- 	<el-date-picker
 						   style="width: 100%;"
@@ -155,13 +351,23 @@
           </el-table-column>
           <el-table-column label="业务员" align="center" prop="salesman">
           </el-table-column>
-          <el-table-column label="交付要求" align="center" prop="deliveryRequirements">
+          <el-table-column
+            label="交付要求"
+            align="center"
+            prop="deliveryRequirements"
+          >
             <template slot-scope="{ row }">
               {{ getDictValue('交付要求', row.deliveryRequirements) }}
             </template>
           </el-table-column>
-          <el-table-column prop="priority" label="优先级" width="100" align="center">
-            <template slot-scope="{ row }">{{ row.priority }}
+          <el-table-column
+            prop="priority"
+            label="优先级"
+            width="100"
+            align="center"
+          >
+            <template slot-scope="{ row }"
+              >{{ row.priority }}
               <div class="sort-wrap">
                 <i class="el-icon-caret-top" @click="sortTop(row)"></i>
                 <i class="el-icon-caret-bottom" @click="sortBottom(row)"></i>
@@ -170,7 +376,9 @@
           </el-table-column>
           <el-table-column label="操作" align="center" width="70" fixed="right">
             <template slot-scope="scope">
-              <el-button type="text" @click="handleDeleteItem(scope.$index)">删除</el-button>
+              <el-button type="text" @click="handleDeleteItem(scope.$index)"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -180,15 +388,32 @@
         <el-row :gutter="24">
           <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
             <el-form-item label="计划备注:">
-              <el-input type="textarea" :rows="4" v-model="form.notes" resize="none"></el-input>
+              <el-input
+                type="textarea"
+                :rows="4"
+                v-model="form.notes"
+                resize="none"
+              ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
-      <AdditionalOrder ref="additionalRefs" :productCode="form.productCode" :selectList="form.salesOrders"
-        @choose="confirmChoose"></AdditionalOrder>
-      <ProductionVersion ref="versionRefs" @changeProduct="changeProduct"></ProductionVersion>
-      <PlanSubmit ref="submitRefs" :type="$route.query.type" :info="form" @publish="publishData"></PlanSubmit>
+      <AdditionalOrder
+        ref="additionalRefs"
+        :productCode="form.productCode"
+        :selectList="form.salesOrders"
+        @choose="confirmChoose"
+      ></AdditionalOrder>
+      <ProductionVersion
+        ref="versionRefs"
+        @changeProduct="changeProduct"
+      ></ProductionVersion>
+      <PlanSubmit
+        ref="submitRefs"
+        :type="$route.query.type"
+        :info="form"
+        @publish="publishData"
+      ></PlanSubmit>
     </el-card>
   </div>
 </template>
@@ -220,6 +445,15 @@ export default {
   data() {
     return {
       type: this.$route.query.type,
+      weightList: [
+        { code: 1, name: 'A' },
+        { code: 2, name: 'B' },
+        { code: 3, name: 'C' }
+      ],
+      isSlotting: [
+        { code: 1, name: '是' },
+        { code: 2, name: '否' }
+      ], //是否开槽
       form: {
         planType: 1,
         produceRoutingId: '',
@@ -227,7 +461,7 @@ export default {
         stockCountBase: '',
         salesOrders: [],
         produceRoutingName: '',
-        marginCoefficient: '1.0',
+        marginCoefficient: '1.0'
       },
 
       // 表单验证规则
@@ -247,47 +481,43 @@ export default {
     }
   },
   created() {
- 
-
-  
-
     this.requestDict('按单按库');
     this.requestDict('订单类型');
     this.requestDict('交付要求');
     if (this.type == 'edit') {
       this.getPlanInfo(this.$route.query.id);
     } else {
-
       this.getSaleInfo();
     }
-
-
   },
   methods: {
     async getPlanInfo(id) {
       const data = await getUpdateInfoById(id);
 
-
       this.form = data;
-
+      this.form.salesOrders.forEach((item) => {
+        item.slottingType = item.slottingType&&item.slottingType + '';
+      });
+      console.log(this.form.salesOrders, ';dsdsds');
     },
     async _getInventory() {
-      const res = await getInventory(
-        this.form.productCode,
-        this.form.planType
-      );
+      const res = await getInventory(this.form.productCode, this.form.planType);
 
       this.form.stockCountBase = res;
     },
     getSaleInfo() {
-      
-      let params = JSON.parse(this.$route.query.selection)
+      let params = JSON.parse(this.$route.query.selection);
       productionToPlan(params).then((res) => {
-  
         this.form = deepClone(res);
-        this.form.produceRoutingName = res.produceRoutingName ||  this.$route.query.produceRoutingName
-         this.form.produceRoutingId =  res.produceRoutingId ||  this.$route.query.produceRoutingId
+        this.form.produceRoutingName =
+          res.produceRoutingName || this.$route.query.produceRoutingName;
+        this.form.produceRoutingId =
+          res.produceRoutingId || this.$route.query.produceRoutingId;
         this.form.salesOrders.map((item, index) => {
+          this.tableHandleKeyUp(item, '', item.lackNum, 'sum');
+          item.slottingType = item.slottingType&&item.slottingType+'';
+
+          // console.log( item.slottingType,' item.slottingType')
           item.priority = index + 1;
           item.planProductNum = item.lackNum;
           item.requiredFormingNum = item.lackNum;
@@ -304,23 +534,23 @@ export default {
         }
         this._getInventory();
       });
-      this.$forceUpdate()
+      this.$forceUpdate();
     },
 
     itemChange() {
       this.form.salesOrders.map((item, index) => {
-        this.$set(item, 'requiredFormingNum', (item.planProductNum * (this.form.marginCoefficient || 1)).toFixed(0))
-      
-    })
-
-
+        this.$set(
+          item,
+          'requiredFormingNum',
+          (item.planProductNum * (this.form.marginCoefficient || 1)).toFixed(0)
+        );
+      });
     },
 
     toInt(planProductNum) {
-      return (planProductNum * (this.form.marginCoefficient || 1)).toFixed(0)
+      return (planProductNum * (this.form.marginCoefficient || 1)).toFixed(0);
     },
 
-
     cancel() {
       const key = getRouteTabKey();
       this.$router.go(-1);
@@ -336,28 +566,33 @@ export default {
     },
     // 对比日期,计算要求生产重量
     mapList() {
-
-      var _sumOrderWeight = 0
+      var _sumOrderWeight = 0;
       var requiredFormingNum = 0;
       var productNum = 0;
       this.form.salesOrders.map((item, index) => {
-       
-        requiredFormingNum = Number(requiredFormingNum) + Number(item.requiredFormingNum);
+        requiredFormingNum =
+          Number(requiredFormingNum) + Number(item.requiredFormingNum);
 
-        if(this.form.weightUnit == 'G' || this.form.weightUnit == 'g' ||  this.form.weightUnit == '克') {
-           this.form.newWeightUnit = 'kg'
-           _sumOrderWeight = (this.form.sumOrderWeight * Number(this.form.marginCoefficient || 1))/ 1000
+        if (
+          this.form.weightUnit == 'G' ||
+          this.form.weightUnit == 'g' ||
+          this.form.weightUnit == '克'
+        ) {
+          this.form.newWeightUnit = 'kg';
+          _sumOrderWeight =
+            (this.form.sumOrderWeight *
+              Number(this.form.marginCoefficient || 1)) /
+            1000;
         } else {
-           this.form.newWeightUnit = this.form.weightUnit
-           _sumOrderWeight = this.form.sumOrderWeight * Number(this.form.marginCoefficient || 1)
+          this.form.newWeightUnit = this.form.weightUnit;
+          _sumOrderWeight =
+            this.form.sumOrderWeight * Number(this.form.marginCoefficient || 1);
         }
 
-
         productNum += Number(item.planProductNum);
       });
       this.form.productNum = productNum;
-      this.form.productUnitWeight =
-        this.form.salesOrders[0]?.productUnitWeight;
+      this.form.productUnitWeight = this.form.salesOrders[0]?.productUnitWeight;
       this.form.newSumOrderWeight = _sumOrderWeight.toFixed(2);
       this.form.requiredFormingNum = requiredFormingNum;
       const collection = deepClone(this.form.salesOrders);
@@ -421,10 +656,103 @@ export default {
     changeProduct(data) {
       this.$set(this.form, 'produceRoutingName', data.name);
       this.$set(this.form, 'produceRoutingId', data.id);
-      this.$set(this.form, 'produceVersionName', data.produceVersionName)
-
+      this.$set(this.form, 'produceVersionName', data.produceVersionName);
     },
+    // 表格:模数、数量(方)、块数输入框 输入事件
+    tableHandleKeyUp(row, index, e, name) {
+      // console.log(row);
+      let modelArr = row.specification.split('*');
+      let modelLong = modelArr[0]; // model规格长度
+      let modeWide = modelArr[1]; // model规格宽度
+      let modeHight = modelArr[2].substr(0, modelArr[2].indexOf('cm')); // model规格高度
+      modeHight = Number(modeHight);
+      if (name === 'moCount') {
+        // 模数
+        row.moCount = e;
+        // 计算块数的公式:
+        // (一模6米长度 / model规格长度) * (一模1.2米宽度 / model规格宽度) = 每一模的块数
+        // 每一模的块数*模数moCount = 总块数
+        if (row.productName.includes('板材')) {
+          row.blockCount =
+            Math.floor(600 / modelLong) *
+            Math.floor(120 / modeHight) *
+            Math.floor(60 / modeWide) *
+            row.moCount;
+        } else if (row.productName.includes('砌块')) {
+          let modelLongFixed = (600 / modelLong).toFixed(2);
+          modelLongFixed = modelLongFixed.substring(
+            0,
+            modelLongFixed.length - 1
+          );
+          let modeWideFixed = (120 / modeWide).toFixed(2);
+          modeWideFixed = modeWideFixed.substring(0, modeWideFixed.length - 1);
+          let modeHightFixed = (60 / modeHight).toFixed(2);
+          modeHightFixed = modeHightFixed.substring(
+            0,
+            modeHightFixed.length - 1
+          );
+          row.blockCount =
+            Math.floor(modelLongFixed * modeWideFixed * modeHightFixed) *
+            row.moCount;
+        }
+
+        row.planProductNum =
+          ((modelLong * modeWide * modeHight) / 1000000).toFixed(5) *
+          row.blockCount;
+      } else if (name === 'sum') {
+        //方数
+        row.planProductNum = e;
 
+        row.blockCount = Math.floor(
+          e / ((modelLong * modeWide * modeHight) / 1000000)
+        );
+        // console.log(e,'row.blockCount')
+        // console.log(modelLong,'row.blockCount')
+        // console.log(modeWide,'row.blockCount')
+        // console.log(modeHight,'row.blockCount')
+
+        if (row.productName.includes('板材')) {
+          row.moCount = Math.ceil(
+            row.blockCount /
+              (Math.floor(600 / modelLong) *
+                Math.floor(120 / modeHight) *
+                Math.floor(60 / modeWide))
+          );
+        } else if (row.productName.includes('砌块')) {
+          row.moCount = Math.ceil(
+            row.blockCount /
+              Math.floor(
+                (600 / modelLong) * (120 / modeHight) * (60 / modeWide)
+              )
+          );
+        }
+      } else if (name === 'blockCount') {
+        //块数
+        row.blockCount = e;
+
+        if (row.productName.includes('板材')) {
+          row.moCount = Math.ceil(
+            row.blockCount /
+              (Math.floor(600 / modelLong) *
+                Math.floor(120 / modeHight) *
+                Math.floor(60 / modeWide))
+          );
+        } else if (row.productName.includes('砌块')) {
+          row.moCount = Math.ceil(
+            row.blockCount /
+              Math.floor(
+                (600 / modelLong) * (120 / modeHight) * (60 / modeWide)
+              )
+          );
+        }
+
+        row.planProductNum = (
+          (Number(e) * modelLong * modeWide * modeHight) /
+          1000000
+        ).toFixed(5);
+      }
+      row.requiredFormingNum = this.toInt(row.planProductNum);
+    },
     confirmChoose(list) {
       // 取出在弹窗中选中并且不在表格中的数据
       const result = list.filter(
@@ -442,8 +770,7 @@ export default {
         }
       }
       let priority =
-        this.form.salesOrders[this.form.salesOrders.length - 1]?.priority ||
-        0;
+        this.form.salesOrders[this.form.salesOrders.length - 1]?.priority || 0;
       this.form.salesOrders = this.form.salesOrders.concat(
         result.map((item, index) => {
           item.priority = ++priority;
@@ -463,7 +790,6 @@ export default {
       var productWeight = 0;
 
       this.form.salesOrders.map((item, index) => {
-
         item.priority = index + 1;
         planProductNum = planProductNum + item.requiredFormingNum;
         productWeight = productWeight + Number(item.productSumWeight);
@@ -481,7 +807,6 @@ export default {
         delete params.id;
       }
 
-      
       if (type === 2) {
         this.$confirm('发布工单后不可撤回,确定发布吗?', '发布确认').then(
           async () => {
@@ -516,8 +841,6 @@ export default {
                 data.workOrder.productionPlanId = params.id;
               }
 
-
-
               await releaseSave(data)
                 .then((res) => {
                   if (res === 1) {
@@ -549,18 +872,14 @@ export default {
                 .catch(() => {
                   this.$message.error('发布失败,请重新发布!');
                 });
-            } catch (error) { }
+            } catch (error) {}
 
             loading.close();
           }
         );
       } else {
         let request =
-          this.$route.query.type == 'edit'
-            ? updateSaleToPlan
-            : saveSaleToPlan;
-          
-    
+          this.$route.query.type == 'edit' ? updateSaleToPlan : saveSaleToPlan;
 
         request(params)
           .then(async (res) => {

+ 1443 - 0
src/views/schedulingCalculation/mergePutMesh/index.vue

@@ -0,0 +1,1443 @@
+<template>
+  <div class="mergePutMesh-container">
+    <div class="title" style="margin-left: 0px">
+      <div class="item">
+        <span class="font subWorkNameBox">合并挂网</span>
+      </div>
+      <div class="item">
+        <span class="font"
+          >{{ riqi }} &nbsp; &nbsp;{{ days }} &nbsp; {{ shijian }}</span
+        >
+      </div>
+      <div class="item">
+        <img class="top-bar__img" :src="info.avatar" />
+        <span class="font">
+          {{ info.name }}
+        </span>
+      </div>
+      <div class="item">
+        <div class="back" @click="$router.back()">
+          <i class="icon-mes-fanhui"></i>
+          <!-- <span class="font">返回</span> -->
+        </div>
+      </div>
+    </div>
+    <basic-container
+      v-loading="pageLoading"
+      element-loading-text="数据加载中..."
+      element-loading-spinner="el-icon-loading"
+    >
+      <!-- 板材计划未合并挂网详情列表 -->
+      <div class="unMerge-list">
+        <div class="table-header-row">
+          <el-button
+            size="small"
+            icon="el-icon-search"
+            type="primary"
+            class="screen"
+            @click="searchDialogVisible = true"
+            >筛选</el-button
+          >
+          <span class="table-title">板材计划未合并挂网详情列表</span>
+        </div>
+        <el-table
+          :data="unMergeTableData"
+          style="max-height: 300px"
+          border
+          v-loading="unMergeTableLoading"
+          :header-row-style="headerRowStyle"
+        >
+          <el-table-column
+            label="计划编号"
+            align="center"
+            prop="code"
+            width="170"
+          ></el-table-column>
+          <el-table-column label="等级" align="center" width="60">
+            <template slot-scope="scope">
+              <span>{{ scope.row.weight | weightFilter }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="规格型号"
+            align="center"
+            prop="specification"
+          ></el-table-column>
+          <el-table-column
+            prop="productName"
+            width="110"
+            align="center"
+            label="产品名称"
+          ></el-table-column>
+          <!-- <el-table-column
+            label="是否开槽"
+            align="center"
+            prop="isSlotting"
+          ></el-table-column> -->
+          <el-table-column label="开槽类型" align="center" prop="slottingType">
+            <template slot-scope="scope">
+              <span>{{
+                getDictValue('开槽类型', scope.row.slottingType+"")
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="未排程块数"
+            align="center"
+            prop="noWordCount"
+          ></el-table-column>
+          <el-table-column
+            label="计划块数"
+            align="center"
+            prop="blockCount"
+          ></el-table-column>
+          <el-table-column label="计划日期" align="center" prop="startTime">
+            <template slot-scope="scope">
+              <span>{{ scope.row.planDeliveryTime | subTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="交货期" align="center" prop="deliveryDate">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reqMoldTime | subTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="项目名称"
+            align="center"
+            prop="projectName"
+          ></el-table-column>
+          <el-table-column label="首次排程" align="center" prop="createTime">
+            <template slot-scope="scope">
+              <span>{{ scope.row.createTime | subTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="备注"
+            align="center"
+            prop="remark"
+          ></el-table-column>
+          <el-table-column label="操作" align="center">
+            <template slot-scope="scope">
+              <div>
+                <el-tooltip
+                  class="item"
+                  effect="dark"
+                  content="挂网"
+                  placement="bottom"
+                >
+                  <el-button
+                    type="text"
+                    size="small"
+                    class="handle-btn"
+                    icon="el-icon-guide"
+                    @click="handlePutMesh(scope.row)"
+                  ></el-button>
+                </el-tooltip>
+                <el-tooltip
+                  class="item"
+                  effect="dark"
+                  content="删除"
+                  placement="bottom"
+                >
+                  <el-button
+                    type="text"
+                    size="small"
+                    class="handle-btn"
+                    icon="el-icon-delete"
+                    @click="handleDeleteSchedule(scope.row)"
+                  ></el-button>
+                </el-tooltip>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 筛选弹窗 -->
+        <el-dialog
+          :visible.sync="searchDialogVisible"
+          width="600px"
+          append-to-body
+          :close-on-click-modal="false"
+          :close-on-press-escape="false"
+        >
+          <span slot="title">查询条件</span>
+          <el-form class="search-form" :model="searchForm" label-width="120px">
+            <el-form-item label="项目名称:">
+              <el-select v-model="searchForm.projectName" :clearable="true">
+                <el-option
+                  v-for="(item, index) in projectNameList"
+                  :key="index"
+                  :value="item"
+                  :label="item"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="产品名称:">
+              <el-select v-model="searchForm.productName" :clearable="true">
+                <el-option
+                  v-for="(item, index) in materialNameList"
+                  :key="index"
+                  :value="item"
+                  :label="item"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="规格型号:">
+              <el-input
+                v-model="searchForm.specification"
+                placeholder="请输入规格型号"
+                style="width: 200px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item label="是否开槽:">
+              <el-select v-model="searchForm.isSlotting" :clearable="true">
+                <el-option value="1" label="是"></el-option>
+                <el-option value="2" label="否"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="等级:">
+              <el-select v-model="searchForm.weight" :clearable="true">
+                <el-option :value="1" label="A"></el-option>
+                <el-option :value="2" label="B"></el-option>
+                <el-option :value="3" label="C"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-form>
+          <div class="searchForm-btns">
+            <el-button size="small" @click="reset">重置</el-button>
+            <el-button size="small" type="success" @click="search"
+              >查询</el-button
+            >
+          </div>
+        </el-dialog>
+      </div>
+
+      <!-- 合并挂网(并模)图示 -->
+      <div class="merge-pic-table-title">合并组网</div>
+      <div class="merge-pic-table">
+        <!-- 左边图示 -->
+        <div class="merge-pic">
+          <div
+            v-for="(item, index) in editTableData"
+            :key="index"
+            class="pic-item"
+            :style="{
+              width: Number(item.specification.split('*')[0]) / 6 + '%'
+            }"
+          >
+            <div>{{ item.specification }}</div>
+            <div>{{ item.productName }}</div>
+            <div>块数:{{ item.blockCount }}</div>
+          </div>
+          <div
+            :style="{
+              width: `${(surplusLength / 6.1).toFixed(2)}` + '%'
+            }"
+          >
+            <span>剩余:</span>
+            <span>{{ surplusLength }}</span>
+            <div>{{ Number((surplusLength / 6.1).toFixed(2)) }}%</div>
+          </div>
+        </div>
+        <div style="flex: 1; display: flex">
+          <!-- 中间表格 -->
+          <div class="merge-table">
+            <el-table
+              :data="editTableData"
+              border
+              :header-row-style="headerRowStyle"
+            >
+              <el-table-column
+                label="规格"
+                align="center"
+                width="120"
+                prop="specification"
+              ></el-table-column>
+              <el-table-column
+                prop="productName"
+                width="110"
+                align="center"
+                label="产品名称"
+              ></el-table-column>
+              <el-table-column
+                label="块数"
+                align="center"
+                prop="blockCount"
+              ></el-table-column>
+              <el-table-column label="等级" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.weight | weightFilter }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="剩余模数"
+                align="center"
+                prop="surplusModulus"
+              ></el-table-column>
+              <el-table-column
+                label="附加工艺"
+                align="center"
+                prop="slottingType"
+              >
+            
+              <template slot-scope="scope">
+              <span>{{
+                getDictValue('开槽类型', scope.row.slottingType+'')
+              }}</span>
+            </template>
+            </el-table-column>
+            </el-table>
+            <div class="merge-btns">
+              <el-button size="small" type="primary" @click="updateMerge"
+                >确定</el-button
+              >
+              <el-button size="small" type="primary" @click="resetEditTable"
+                >重置</el-button
+              >
+            </div>
+          </div>
+          <!-- 右边统计表 -->
+          <div class="info-message">
+            <div class="info-item">
+              <span :style="headerRowStyle">班组</span>
+              <span>*模数</span>
+              <span>合计模数</span>
+              <span>允许模数</span>
+            </div>
+            <div class="info-item">
+              <span :style="headerRowStyle">网A</span>
+              <el-input
+                v-model="modulusNum1"
+                placeholder="输入模数"
+                oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
+                @input="modulsNumInput"
+              ></el-input>
+              <span>{{ modulusSum }}</span>
+              <span>{{ allowModulus }}</span>
+            </div>
+            <div class="info-item">
+              <span :style="headerRowStyle">网B</span>
+              <el-input
+                v-model="modulusNum2"
+                oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
+                placeholder="输入模数"
+                @input="modulsNumInput"
+              ></el-input>
+              <span>*任务日期</span>
+              <el-date-picker
+                v-model="taskDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择日期"
+              >
+              </el-date-picker>
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <!-- 任务未下发列表操作 && 下发未报工列表 -->
+      <div class="task-distribution">
+        <!-- 任务未下发列表 -->
+        <div class="task-dist">
+          <div class="task-btns">
+            <div>
+              <el-button
+                size="small"
+                @click="seletAll(taskDistTableData, 'taskDistTableData')"
+                >全选</el-button
+              >
+              <!-- <el-button size="small">排序</el-button> -->
+              <!-- <el-button size="small">筛选</el-button> -->
+            </div>
+            <div class="task-dist-title">组网过渡表</div>
+            <div>
+              <el-button
+                size="small"
+                @click="handleDeleteWorkOrder('取消', '0')"
+                :disabled="taskDistSelection.length == 0"
+                >取消</el-button
+              >
+              <el-button
+                size="small"
+                :disabled="taskDistSelection.length == 0"
+                @click="taskDistribute"
+                >任务下发</el-button
+              >
+            </div>
+          </div>
+          <el-table
+            ref="taskDistTableData"
+            :data="taskDistTableData"
+            v-loading="taskDistTableLoading"
+            style="max-height: 300px"
+            border
+            @selection-change="taskDistTableSelectionChange"
+          >
+            <el-table-column type="selection" width="45" align="center">
+            </el-table-column>
+            <el-table-column
+              label="等级"
+              align="center"
+              width="70"
+              prop="weight"
+              filterable
+              :filters="[
+                { text: 'A', value: 1 },
+                { text: 'B', value: 2 },
+                { text: 'C', value: 3 }
+              ]"
+              :filter-method="filterWeightMethod1"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.weight | weightFilter }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              width="70"
+              label="高度"
+              prop="height"
+              filterable
+              :filters="heightFilterArr1"
+              :filter-method="filterHeightMethod1"
+            ></el-table-column>
+            <el-table-column
+              label="长1+长2+长3"
+              align="center"
+              width="120"
+              prop="length"
+            ></el-table-column>
+            <el-table-column
+              prop="productName"
+              width="110"
+              align="center"
+              label="产品名称"
+            ></el-table-column>
+            <el-table-column
+              label="模数"
+              align="center"
+              width="70"
+              prop="moCount"
+            ></el-table-column>
+            <el-table-column
+              label="片1+片2+片3"
+              align="center"
+              width="120"
+              prop="blockCount"
+            >
+        
+            </el-table-column>
+            <!-- <el-table-column label="是否开槽" align="center"></el-table-column> -->
+            <el-table-column
+              align="center"
+              width="115"
+              prop="slottingType"
+              filterable
+              label="开槽类型"
+              :filters="[
+                { text: '开槽', value: '开槽' },
+                { text: '不开槽', value: '不开槽' }
+              ]"
+              :filter-method="filterSlottingMethod1"
+            >
+            
+            <template slot-scope="scope">
+              <span>{{
+                getDictValue('开槽类型', scope.row.slottingType+"")
+              }}</span>
+            </template>
+          
+          </el-table-column>
+            <el-table-column label="日期" align="center" prop="taskTime">
+              <template slot-scope="scope">
+                <span>{{ scope.row.taskTime}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              width="85"
+              prop="teamName"
+              label="班组"
+              filterable
+              :filters="[
+                { text: '班组A', value: '班组A' },
+                { text: '班组B', value: '班组B' }
+              ]"
+              :filter-method="filterJobMethod1"
+            ></el-table-column>
+          </el-table>
+        </div>
+        <!-- 任务下发未报工列表 -->
+        <div class="work-unreport">
+          <div class="unreport-btns">
+            <div>
+              <el-button
+                size="small"
+                @click="
+                  seletAll(workUnreportTableData, 'workUnreportTableData')
+                "
+                >全选</el-button
+              >
+              <!-- <el-button size="small">排序</el-button> -->
+              <!-- <el-button size="small">筛选</el-button> -->
+            </div>
+            <div class="work-unreport-title">组网任务表</div>
+            <div>
+              <el-button
+                size="small"
+                @click="handleDeleteWorkOrder('删除', '1')"
+                :disabled="workUnreportSelection.length == 0"
+                >删除</el-button
+              >
+              <el-button
+                size="small"
+                :disabled="workUnreportSelection.length == 0"
+                @click="handleDeleteWorkOrder('撤回', '0')"
+                >撤回</el-button
+              >
+            </div>
+          </div>
+          <el-table
+            :data="workUnreportTableData"
+            ref="workUnreportTableData"
+            style="max-height: 300px"
+            v-loading="workUnreportTableLoading"
+            border
+            @selection-change="workUnreportTableSelectionChange"
+          >
+            <el-table-column type="selection" width="45" align="center">
+            </el-table-column>
+            <el-table-column
+              label="等级"
+              align="center"
+              width="70"
+              prop="weight"
+              filterable
+              :filters="[
+                { text: 'A', value: 1 },
+                { text: 'B', value: 2 },
+                { text: 'C', value: 3 }
+              ]"
+              :filter-method="filterWeightMethod1"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.weight | weightFilter }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              width="70"
+              label="高度"
+              prop="height"
+              filterable
+              :filters="heightFilterArr2"
+              :filter-method="filterHeightMethod1"
+            ></el-table-column>
+            <el-table-column
+              label="长1+长2+长3"
+              align="center"
+              prop="length"
+              width="120"
+            ></el-table-column>
+            <el-table-column
+              prop="productName"
+              width="110"
+              align="center"
+              label="产品名称"
+            ></el-table-column>
+            <el-table-column
+              label="余量"
+              align="center"
+              width="70"
+              prop="moCount"
+            ></el-table-column>
+            <el-table-column
+              label="模数"
+              align="center"
+              prop="moCount"
+              width="120"
+            ></el-table-column>
+            <el-table-column
+              label="片1+片2+片3"
+              align="center"
+              prop="blockCount"
+              width="120"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.blockCount}}</span>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column label="是否开槽" align="center"></el-table-column> -->
+            <el-table-column
+              align="center"
+              width="115"
+              prop="slottingType"
+              filterable
+              label="开槽类型"
+              :filters="[
+                { text: '开槽', value: '开槽' },
+                { text: '不开槽', value: '不开槽' }
+              ]"
+              :filter-method="filterSlottingMethod1"
+            >
+            <template slot-scope="scope">
+              <span>{{
+                getDictValue('开槽类型', scope.row.slottingType+'')
+              }}</span>
+            </template>
+          </el-table-column>
+            <el-table-column
+              label="任务日期"
+              prop="taskTime"
+              align="center"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.taskTime }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="下发日期"
+              align="center"
+              prop="issuedTime"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.issuedTime }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              width="85"
+              prop="teamName"
+              label="班组"
+              filterable
+              :filters="[
+                { text: '班组A', value: '班组A' },
+                { text: '班组B', value: '班组B' }
+              ]"
+              :filter-method="filterJobMethod1"
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import basicContainer from '@/components/basic-container/main';
+import {
+  getScheduleWorkOrderByPage,
+  updateMergeV2,
+  getPutMeshWorkOrderByPage,
+  issuedPutMeshWorkOrder,
+  deletePutMeshWorkOrder,
+  deleteScheduleWorkOrder
+} from '@/api/mergePutMesh/mergePutMesh';
+import {mapState } from 'vuex';
+import dictMixins from '@/mixins/dictMixins';
+
+export default {
+  components: {
+    basicContainer
+  },
+  mixins: [dictMixins],
+  data() {
+    return {
+      permission: {},
+      pageLoading: false,
+      unMergeTableData: [], // 未合并挂网详情列表
+      editTableData: [], // 合并挂网任务编辑详情列表
+      taskDistTableData: [], // 任务未下发列表
+      workUnreportTableData: [], // 任务已下发未报工列表
+      taskDistSelection: [],
+      workUnreportSelection: [],
+      unMergeTableLoading: false,
+      taskDistTableLoading: false,
+      workUnreportTableLoading: false,
+      searchDialogVisible: false, // 筛选弹窗
+      headerRowStyle: {
+        backgroundColor: ' #d0e4d5'
+      },
+      // 筛选弹窗表单
+      searchForm: {
+        projectName: '', // 项目名称下拉
+        productName: '', // 产品名称下拉
+        specification: '', // 规格型号
+        weight: '', // 等级
+        isSlotting:""
+      },
+      projectNameList: [],
+      materialNameList: [],
+      modulusNum1: 0,
+      modulusNum2: 0,
+      taskDate: '', // 任务日期
+      modulusLength: '',
+      surplusLength: 610, // 剩余长度
+      allowModulus: 0, // 允许模数
+      modulusSum: 0, // 合计模数
+      heightFilterArr1: [], // 高度筛选1表格
+      heightFilterArr2: [], // 高度筛选2表格
+      riqi: '',
+      days: '',
+      shijian: ''
+    };
+  },
+  computed: {
+    ...mapState({
+      info: (store) => store.user.info //用户数据
+    })
+  },
+  filters: {
+    weightFilter(value) {
+      let weight = '';
+      switch (value) {
+        case 1:
+          weight = 'A';
+          break;
+        case 2:
+          weight = 'B';
+          break;
+        case 3:
+          weight = 'C';
+          break;
+      }
+      return weight;
+    },
+    subTime(value) {
+      if (!value) return;
+      let date = value.substr(0, value.indexOf(' '));
+      return date;
+    }
+  },
+  created() {
+    this.requestDict('开槽类型');
+    this.getScheduleWorkOrder({});
+    this.getPutMeshWorkOrder();
+    this.getWorkUnreport();
+  },
+  mounted() {
+    this.gettime();
+    this.newtime();
+  },
+  methods: {
+    gettime() {
+      var date = new Date();
+      let year = date.getFullYear();
+      let mou = date.getMonth() + 1;
+      let day = date.getDate();
+      let days = date.getDay();
+      switch (days) {
+        case 1:
+          days = '星期一';
+          break;
+        case 2:
+          days = '星期二';
+          break;
+        case 3:
+          days = '星期三';
+          break;
+        case 4:
+          days = '星期四';
+          break;
+        case 5:
+          days = '星期五';
+          break;
+        case 6:
+          days = '星期六';
+          break;
+        case 0:
+          days = '星期日';
+          break;
+      }
+      let hou = date.getHours(); //获取当前小时数(0-23)
+      let min = date.getMinutes(); //获取当前分钟数(0-59)
+      let sec = date.getSeconds(); //获取当前秒数(0-59)
+      if (mou < 10) mou = '0' + mou;
+      if (day < 10) day = '0' + day;
+      if (hou < 10) hou = '0' + hou;
+      if (min < 10) min = '0' + min;
+      if (sec < 10) sec = '0' + sec;
+      this.riqi = year + '/' + mou + '/' + day;
+      this.days = days;
+      this.shijian = hou + ':' + min + ':' + sec;
+    },
+    newtime() {
+      setInterval(() => {
+        this.gettime();
+      }, 1000);
+    },
+    // 获取未合并挂网数据列表
+    getScheduleWorkOrder(params) {
+      this.unMergeTableLoading = true;
+      this.projectNameList = [];
+      this.materialNameList = [];
+      let pages = {
+        pageNum: 1,
+        pageSize: 100
+      };
+      let query = Object.assign(pages, params, {
+        status: ['3', '2']
+      });
+      getScheduleWorkOrderByPage(query)
+        .then((res) => {
+          this.unMergeTableLoading = false;
+          console.log('未合并挂网数据列表:', res.data.data.list);
+          this.unMergeTableData = res.data.data.list.filter((item) =>
+            item.productName.includes('板材')
+          );
+          console.log(this.unMergeTableData, 'unMergeTableData');
+          this.unMergeTableData.map((item) => {
+            if (!this.projectNameList.includes(item.projectName)&&item.projectName) {
+              this.projectNameList.push(item.projectName);
+            }
+            if (!this.materialNameList.includes(item.productName)) {
+              this.materialNameList.push(item.productName);
+            }
+          });
+        })
+        .catch(() => {
+          this.unMergeTableLoading = false;
+        });
+    },
+    // 获取任务未下发数据列表
+    async getPutMeshWorkOrder() {
+      this.taskDistTableLoading = true;
+      this.heightFilterArr1 = [];
+      let pages = {
+        // pageNum: 1,
+        // pageSize: 100,
+        status: '0',
+        // artisanStatus: '0'
+      };
+      const res = await getPutMeshWorkOrderByPage(pages);
+      console.log('任务未下发数据列表:', res.data.data.list);
+      this.taskDistTableLoading = false;
+      this.taskDistTableData = res.data.data.list;
+
+      let tempHeight = [];
+      this.taskDistTableData.map((item) => {
+        tempHeight.push(item.height);
+      });
+      tempHeight = [...new Set(tempHeight)];
+      tempHeight.map((item) => {
+        this.heightFilterArr1.push({
+          value: item,
+          text: item
+        });
+      });
+      // console.log(this.heightFilterArr1);
+    },
+    // 获取已下发未报工列表数据
+    async getWorkUnreport() {
+      this.workUnreportTableLoading = true;
+      this.heightFilterArr2 = [];
+      let pages = {
+        // pageNum: 1,
+        // pageSize: 100,
+        status: '1',
+        // artisanStatus: '0'
+      };
+      const res = await getPutMeshWorkOrderByPage(pages);
+      console.log('任务已下发数据列表:',res.data.data.list);
+      // this.taskDistTableLoading = false
+      this.workUnreportTableData = res.data.data.list;
+      this.workUnreportTableLoading = false;
+
+      let tempHeight = [];
+      this.workUnreportTableData.map((item) => {
+        tempHeight.push(item.height);
+      });
+      tempHeight = [...new Set(tempHeight)];
+      tempHeight.map((item) => {
+        this.heightFilterArr2.push({
+          value: item,
+          text: item
+        });
+      });
+    },
+    // 重置筛选表单
+    reset() {
+      this.searchForm = {
+        projectName: '',
+        productName: '',
+        specification: '',
+        weight: '',
+        isSlotting:""
+      };
+      this.searchDialogVisible = false;
+      this.getScheduleWorkOrder({});
+    },
+    // 按表单查询
+    search() {
+      this.searchDialogVisible = false;
+      this.getScheduleWorkOrder(this.searchForm);
+    },
+    // 挂网报工按钮操作
+    handlePutMesh(row) {
+      // 挂网判断
+      // 1,只允许添加相同高度的计划
+      // 2,只允许添加相同宽度的计划
+      // 3,只允许添加相同工艺的计划
+      // 4,长度加起来不能大610
+      // 5,最多只能添加3条
+      let rowModelArr = row.specification.split('*');
+      // 要添加的规格的高度
+      let addWide = Number(rowModelArr[1]);
+      let addHeight = Number(
+        rowModelArr[2].substr(0, rowModelArr[2].indexOf('cm'))
+      );
+      let allowSlotting = ''; // 已添加计划的工艺
+      let allowWide = 0; // 已添加计划的高度
+      let allowHeight = 0; // 已添加计划的高度
+      let allowLong = 0; // 已添加计划的长度
+      let addLong = Number(rowModelArr[0]); // 要添加计划的长度
+      if (this.editTableData.length > 0) {
+        allowSlotting = this.editTableData[0].slottingType
+        let modelArr = this.editTableData[0].specification.split('*');
+        allowWide = Number(modelArr[1]);
+        allowHeight = Number(modelArr[2].substr(0, modelArr[2].indexOf('cm')));
+
+        // 计算已添加的长度的总和是否大610
+        this.editTableData.map((item) => {
+          allowLong += Number(item.specification.split('*')[0]);
+        });
+        if (this.editTableData.length == 3) {
+          return this.$alert('最多只能添加三条计划!');
+        }
+        if (allowLong + addLong > 610) {
+          return this.$alert('挂网并模总长度不能大于610!');
+        }
+        if (row.slottingType != allowSlotting) {
+          return this.$alert(`请添加${this.getDictValue('开槽类型',allowSlotting+"")}工艺的计划!`);
+        }
+        if (addHeight != allowHeight) {
+          return this.$alert(`请添加高度为${allowHeight}cm的计划!`);
+        }
+        if (addWide != allowWide) {
+          return this.$alert(`请添加宽度为${allowWide}的计划!`);
+        }
+      }
+      this.editTableData.push(JSON.parse(JSON.stringify(row)));
+
+      let equalIdObj = {};
+      this.editTableData.map((item) => {
+        if (equalIdObj[item.id]) {
+          equalIdObj[item.id]++;
+        } else {
+          this.$set(equalIdObj, item.id, 1);
+        }
+      });
+
+      let longSum = 0;
+      let surplusModulusArr = []; // 允许模数
+      this.editTableData.map((item) => {
+        item.equalIdNum = equalIdObj[item.id];
+        let modelArr = item.specification.split('*');
+        let modelHeight = modelArr[2];
+        modelHeight = Number(modelHeight.substr(0, modelHeight.indexOf('cm')));
+        longSum += Number(modelArr[0]);
+        // 块数
+        item.blockCount = Number(Math.floor(120 / modelHeight));
+        // 剩余模数
+        item.surplusModulus = Number(
+          Math.ceil(item.noWordCount / item.blockCount / item.equalIdNum)
+        );
+        console.log(item, 'sss');
+
+        surplusModulusArr.push(item.surplusModulus);
+      });
+      // console.log(this.editTableData,'editTableData')
+      // 获取允许模数 allowModulus
+      this.allowModulus = Math.min(...surplusModulusArr);
+
+      this.surplusLength = 610 - longSum;
+      // 计算模数长度
+      this.modulusLength =
+        (100 - (this.surplusLength / 6.1).toFixed(2)) /
+          this.editTableData.length +
+        '%';
+    },
+    // 输入模数
+    modulsNumInput() {
+      this.modulusSum = Number(this.modulusNum1) + Number(this.modulusNum2);
+      if (this.modulusSum > this.allowModulus) {
+        this.$alert('合计模数不能大于允许模数!');
+        this.modulusSum = 0;
+        this.modulusNum1 = 0;
+        this.modulusNum2 = 0;
+        return false;
+      }
+      return true;
+    },
+    // 重置合并挂网
+    resetEditTable() {
+      this.editTableData = [];
+      this.modulusSum = 0;
+      this.modulusNum1 = 0;
+      this.modulusNum2 = 0;
+      this.allowModulus = 0;
+      this.taskDate = '';
+      this.surplusLength = 610;
+      this.modulusLength = '';
+    },
+    // 确定添加挂网并模
+    updateMerge() {
+      if (this.editTableData.length == 0)
+        return this.$alert('请选择要挂网的计划列表!');
+      if (Number(this.modulusNum1) + Number(this.modulusNum2) == 0)
+        return this.$alert('请输入班组模数!');
+      if (!this.taskDate) return this.$alert('请选择任务日期!');
+      if (!this.modulsNumInput()) return;
+ 
+      this.pageLoading = true;
+      let ids = [];
+      let meshSpecs = [];
+      let meshNumber = [];
+      let meshSpecsTwo = [];
+      let meshNumberTwo = [];
+      let numbersArr = [];
+      // for (let i = 0; i < this.editTableData.length; i++) {
+      //   ids.push(this.editTableData[i].id);
+      //   meshSpecs.push(this.editTableData[i].model);
+      //   meshNumber.push(this.editTableData[i].moCount);
+      //   meshSpecsTwo.push('+');
+      //   meshNumberTwo.push('+');
+      //   numbersArr.push('1');
+      // }
+
+      let data = {
+        mergeIds:  this.editTableData.map(item=>item.id).toString(),
+        meshNumber:  this.editTableData.map(item=>item.blockCount).join('+'),
+        modulus:this.modulusNum1&&this.modulusNum2?this.modulusNum1+','+this.modulusNum2:this.modulusNum1||this.modulusNum2,
+        job:this.modulusNum1&&this.modulusNum2?2:1,
+        endTime:this.taskDate
+        // mergeId: ids.join(','),
+        // numbers: numbersArr.join(','),
+        // moduls: String(this.modulusSum), // 合计模数
+        // meshSpecs: meshSpecs.join(','), // 网片尺寸
+        // meshNumber: meshNumber.join(','), // 网片数量
+        // meshSpecsTwo: meshSpecsTwo.join(','), // 网片尺寸2
+        // meshNumberTwo: meshNumberTwo.join(','), // 网片数量2
+        // meshType: '单网', // 网片类型
+        // joba: '班组A',
+        // jobb: '班组B',
+        // endTime: this.taskDate + ' 00:00:00', // 任务日期
+        // jobaModulus: Number(this.modulusNum1), // 网A数量
+        // jobbModulus: Number(this.modulusNum2) // 网B数量
+      };
+
+      updateMergeV2(data)
+        .then((res) => {
+          this.pageLoading = false;
+          this.$message.success('任务添加成功!');
+          this.resetEditTable();
+          this.getScheduleWorkOrder({});
+          this.getPutMeshWorkOrder();
+        })
+        .catch((err) => {
+          this.pageLoading = false;
+          this.$message.success('任务添加失败!');
+        });
+    },
+    // 筛选等级1
+    filterWeightMethod1(value, row, column) {
+      const property = column['property'];
+      return row[property] === value;
+    },
+    // 筛选高度1
+    filterHeightMethod1(value, row, column) {
+      const property = column['property'];
+      return row[property] === value;
+    },
+    // 筛选班组1
+    filterJobMethod1(value, row, column) {
+      const property = column['property'];
+      return row[property] === value;
+    },
+    // 筛选开槽1
+    filterSlottingMethod1(value, row, column) {
+      if (value == '开槽') {
+        return row['isSlotting'] == '1';
+      } else {
+        return row['isSlotting'] == '2';
+      }
+    },
+    // 任务未下发列表多选
+    taskDistTableSelectionChange(val) {
+      this.taskDistSelection = val;
+    },
+    // 任务下发按钮操作
+    taskDistribute() {
+      this.$confirm('确认下发选中的任务吗?', '提示', {
+        confirmButtonText: '确定',
+        cancleButtonText: '取消',
+        type: 'warning'
+      })
+        .then(async () => {
+          let ids = this.taskDistSelection.map((item) => item.id)
+          const res = await issuedPutMeshWorkOrder({ id:ids,status:1 });
+          this.$message.success('任务下发成功!');
+          this.getPutMeshWorkOrder();
+          this.getWorkUnreport();
+        })
+        .catch(() => {});
+    },
+    // 任务下发未报工列表多选
+    workUnreportTableSelectionChange(val) {
+      this.workUnreportSelection = val;
+    },
+    // 按钮全选
+    seletAll(data, tableName) {
+      if (data) {
+        data.forEach((row) => {
+          this.$refs[tableName].toggleRowSelection(row, true);
+        });
+      }
+    },
+    // 批量删除挂网工单信息(取消、删除、撤回)
+    handleDeleteWorkOrder(btnType, type) {
+      this.$confirm(`确定${btnType}选中的任务吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancleButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.pageLoading = true;
+          let ids = '';
+          if (btnType == '取消') {
+            ids = this.taskDistSelection.map((item) => item.id);
+          } else if (btnType == '撤回' || btnType == '删除') {
+            ids = this.workUnreportSelection.map((item) => item.id);
+          }
+          // let params = { type, ids };
+          deletePutMeshWorkOrder({id:ids},type)
+            .then((res) => {
+              this.pageLoading = false;
+              this.$message.success(res.data.msg);
+              this.getScheduleWorkOrder({});
+              this.getPutMeshWorkOrder();
+              this.getWorkUnreport();
+            })
+            .catch(() => {
+              this.pageLoading = false;
+            });
+        })
+        .catch(() => {});
+    },
+    // 未合并挂网列表删除
+    handleDeleteSchedule(row) {
+      this.$confirm('确定删除选中的任务吗?', '提示', {
+        confirmButtonText: '确定',
+        cancleButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.pageLoading = true;
+          let ids = row.id;
+          deleteScheduleWorkOrder({ ids })
+            .then((res) => {
+              this.pageLoading = false;
+              this.$message.success(res.data.msg);
+              this.getScheduleWorkOrder({});
+            })
+            .catch(() => {
+              this.pageLoading = false;
+            });
+        })
+        .catch(() => {});
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.avue-view {
+  height: 100vh;
+}
+.title {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  margin-left: 0;
+  padding: 0 20px;
+  box-sizing: border-box;
+  // color: #000;
+  height: 60px;
+  width: 100%;
+  background-color: #fff;
+  font-size: 16px;
+  .item:nth-child(1) {
+    flex: 1;
+  }
+  .item:nth-child(2) {
+    flex: 2;
+    text-align: left;
+  }
+  .item:nth-child(3) {
+    flex: 2;
+    text-align: left;
+  }
+  .item:nth-child(4) {
+    flex: 2;
+    text-align: right;
+  }
+  .item:nth-child(5) {
+    flex: 1;
+  }
+  .subWorkNameBox {
+    font-size: 24px;
+  }
+}
+:deep(.el-table) th.el-table__cell {
+  background: none;
+}
+:deep(.el-card.is-always-shadow),
+:deep(.el-table__empty-block),
+.basic-container {
+  // background-color: #fff;
+  height: calc(100% - 66px);
+}
+
+:deep(.el-table--border) {
+  overflow: auto;
+}
+
+:deep(.el-table::before) {
+  display: none;
+}
+
+:deep(.el-table) thead,
+:deep(.el-table) tbody {
+  // color: #000 !important;
+}
+
+:deep(.el-table) thead th,
+:deep(.el-table) tbody td {
+  // background-color: #080848 !important;
+  font-size: 16px;
+}
+
+// 全局修改滚动条样式
+:deep(::-webkit-scrollbar-thumb) {
+  // background-color: #666aa1;
+}
+
+:deep(.el-button) {
+  // background-color: #080848;
+  // color: #fff;
+}
+
+// 最上面一行
+.unMerge-list {
+  height: 50%;
+  margin-bottom: 8px;
+  // border: 1px solid #fff;
+  .table-header-row {
+    display: flex;
+    .screen {
+      padding: 9px 30px;
+      margin: 5px 0 5px 5px;
+    }
+    .table-title {
+      flex: 1;
+      // color: #fff;
+      text-align: center;
+      font-size: 20px;
+      padding-right: 10%;
+      line-height: 43px;
+    }
+  }
+  .handle-btn {
+    font-size: 16px;
+  }
+}
+
+// 筛选弹窗
+.search-form {
+  :deep(.el-input__inner) {
+    width: 300px;
+  }
+}
+// 筛选弹窗
+.searchForm-btns {
+  margin-top: 10px;
+  text-align: center;
+  padding-right: 30px;
+  :deep(.el-button) {
+    // background-color: #157a2c !important;
+    padding: 9px 30px;
+  }
+}
+
+// 第二行
+.merge-pic-table-title {
+  color: #fff;
+  font-size: 20px;
+  text-align: center;
+  line-height: 40px;
+  // border: 1px solid #fff;
+  border-bottom: 0;
+}
+.merge-pic-table {
+  display: flex;
+  height: 200px;
+  .merge-pic {
+    display: flex;
+    width: 610px;
+    height: 100%;
+    margin-right: 8px;
+    color: #fff;
+    // border: 1px solid #fff;
+    box-sizing: border-box;
+    font-size: 14px;
+    > div {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: space-around;
+      padding: 15px 0;
+      &:nth-child(1) {
+        background-color: #409eff;
+      }
+      &:nth-child(2) {
+        background-color: #e6a23c;
+      }
+      &:nth-child(3) {
+        background-color: #67c23a;
+      }
+      &:last-child {
+        background-color: #191a23;
+      }
+    }
+  }
+
+  .merge-table {
+    flex: 0.6;
+    height: 100%;
+    border: 1px solid #fff;
+    box-sizing: border-box;
+    :deep(.el-table__header-wrapper) {
+      background-color: #080848;
+    }
+    :deep(.el-table) {
+      // border: 0;
+      height: calc(100% - 45px);
+      // background-color: #080848;
+    }
+    :deep(.el-button--primary) {
+      padding: 9px 30px;
+      // border-color: #fff;
+    }
+    .merge-btns {
+      padding: 5px;
+      text-align: right;
+    }
+  }
+  .info-message {
+    flex: 0.4;
+    border-top: 1px solid #ededed;
+    border-left: 1px solid #ededed;
+    margin-left: 8px;
+    display: flex;
+    // color: #fff;
+    .info-item {
+      flex: 1;
+      border-right: 1px solid #ededed;
+      display: flex;
+      flex-direction: column;
+      font-size: 16px;
+      > span,
+      :deep(.el-input) {
+        flex: 1;
+        border-bottom: 1px solid #ededed;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+      :deep(.el-input__inner) {
+        padding: 0;
+        padding-left: 10px;
+        // border: 0;
+        border-radius: 0;
+        margin: 0 5px;
+        // background-color: #ccc;
+        // color: #fff;
+      }
+      :deep(.el-date-editor) {
+        width: 100%;
+      }
+      :deep(.el-input__icon) {
+        display: none;
+      }
+    }
+  }
+}
+
+// 第三行 任务未下发列表 和下发未报工列表
+.task-distribution {
+  margin-top: 8px;
+  display: flex;
+  .task-dist {
+    width: 45%;
+    overflow: auto;
+    margin-right: 8px;
+    // border: 1px solid #fff;
+    box-sizing: border-box;
+    .task-btns {
+      // border-bottom: 1px solid #fff;
+      padding: 5px;
+      box-sizing: border-box;
+      display: flex;
+      justify-content: space-between;
+      .task-dist-title {
+        font-size: 20px;
+        // color: #fff;
+        text-align: center;
+        flex: 1;
+        align-self: center;
+      }
+    }
+  }
+
+  .work-unreport {
+    width: 55%;
+    overflow: auto;
+    // border: 1px solid #fff;
+    box-sizing: border-box;
+    .unreport-btns {
+      padding: 5px;
+      // border-bottom: 1px solid #fff;
+      box-sizing: border-box;
+      display: flex;
+      justify-content: space-between;
+      .work-unreport-title {
+        flex: 1;
+        font-size: 20px;
+        // color: #fff;
+        text-align: center;
+        line-height: 33px;
+      }
+    }
+  }
+}
+:deep(.el-dropdown-selfdefine) {
+  font-size: 16px;
+  // color: #fff;
+}
+:deep(.el-dropdown-menu) {
+  padding: 4px;
+  box-sizing: border-box;
+}
+:deep(.el-dropdown-menu__item) {
+  font-size: 16px !important;
+}
+:deep(.el-table__column-filter-trigger) i {
+  font-size: 14px;
+  // color: #fff;
+}
+// /deep/ .el-table__header tr,
+// /deep/ .el-table__header th {
+//   height: 42px;
+// }
+</style>