Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dengfei

695593266@qq.com 9 месяцев назад
Родитель
Сommit
8051fbeb72

+ 10 - 0
src/api/eam/index.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+// 查询仓库下拉列表
+export async function batchRecordPage(body) {
+  const res = await request.post(`/eam/workordermaintenance/batchRecordPage`, body);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 0
src/api/pickorder/index.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+// 查询仓库下拉列表
+export async function batchRecordPage(body) {
+  const res = await request.post(`/mes/pickorder/batchRecordPage`, body);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 13 - 0
src/api/qualityWorkOrder/index.js

@@ -0,0 +1,13 @@
+import request from '@/utils/request';
+
+// 查询仓库下拉列表
+export async function batchRecordPage(body) {
+  const res = await request.post(
+    `/qms/quality_work_order/batchRecordPage`,
+    body
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 0
src/api/returnmaterials/index.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+// 查询仓库下拉列表
+export async function batchRecordPage(body) {
+  const res = await request.post(`/mes/returnmaterials/batchRecordPage`, body);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 0
src/api/wms/index.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+// 查询仓库下拉列表
+export async function getPages(params) {
+  const res = await request.get(`/wms/outintwo/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 0
src/api/workReport/index.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request';
+
+// 查询仓库下拉列表
+export async function batchRecordPage(body) {
+  const res = await request.post(`/mes/workreport/batchRecordPage`, body);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 2 - 1
src/enum/dict.js

@@ -39,7 +39,8 @@ export default {
   规则类型: 'rule_type',
   规则状态: 'rule_status',
   规则周期: 'rule_cycle',
-  流程实例的结果: 'bpm_process_instance_result'
+  流程实例的结果: 'bpm_process_instance_result',
+  取样类型: 'quality_method_code'
 };
 export const numberList = ['date_method'];
 

+ 2 - 1
src/views/batchRecord/components/detialsModal.vue

@@ -504,7 +504,7 @@
         details &&
         visible &&
         details.processInstanceId &&
-        details.approvalStatus == 0
+        details.approvalStatus == 1
       "
       :gutter="20"
       style="margin-top: 40px"
@@ -582,6 +582,7 @@
       open(data, type) {
         this.type = type;
         this.title = type == 'detail' ? '详情' : '审核';
+        this.activeComp = 'main';
         console.log('当前行数据', data);
         this.getDatails(data.id);
         if (data.executeMethod == 1) {

+ 193 - 0
src/views/batchRecord/components/tables/batchRecordTable.vue

@@ -0,0 +1,193 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { producetaskrulerecordPage } from '@/api/producetaskrulerecord/index';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'code',
+            label: '记录编码',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'ruleName',
+            label: '事项名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'workOrderCode',
+            label: '关联生产工单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createUserName',
+            label: '来源列表',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            label: '状态',
+            minWidth: 180,
+            prop: 'executeStatus',
+            formatter: (row) => {
+              switch (row.executeStatus) {
+                case 0:
+                  return '未执行';
+                case 1:
+                  return '执行中';
+                default:
+                  return '已执行';
+              }
+            }
+          },
+          {
+            label: '审核状态',
+            prop: 'approvalStatus',
+            minWidth: 180,
+            formatter: (row) => {
+              switch (row.approvalStatus) {
+                case 0:
+                  return '未提交';
+                case 1:
+                  return '审核中';
+                case 2:
+                  return '审核通过';
+                case 3:
+                  return '审核不通过';
+                case 4:
+                  return '终止审核中';
+                case 5:
+                  return '终止审核通过';
+                case 7:
+                  return '流程废止';
+                default:
+                  return '';
+              }
+            }
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          }
+        ],
+        cacheKeyUrl: 'mes-259231507-batchRecord-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '记录编码:',
+            value: 'code',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '产品名称:',
+            value: 'productName',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '状态:',
+            value: 'executeStatus',
+            type: 'select',
+            placeholder: '请选择',
+            planList: [
+              {
+                label: '未执行',
+                value: 0
+              },
+              {
+                label: '执行中',
+                value: 1
+              },
+              {
+                label: '已执行',
+                value: 2
+              }
+            ]
+          }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          // 查询生产记录
+          itemType: '2',
+          ...this.tableQuery
+        };
+        return producetaskrulerecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 128 - 0
src/views/batchRecord/components/tables/craftFilesTable.vue

@@ -0,0 +1,128 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { craftFiles } from '@/api/produce/workOrder.js';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            label: '编码',
+            prop: 'code',
+            width: 180,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'name',
+            label: '文档名称',
+            align: 'center',
+            slot: 'name',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+
+          {
+            prop: 'storagePath',
+            label: '文件名称',
+            align: 'center',
+
+            showOverflowTooltip: true,
+            minWidth: 200,
+            formatter: (_row, _column, cellValue) => {
+              return cellValue[0]?.name;
+            }
+          },
+
+          {
+            prop: 'version',
+            label: '版本',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          }
+        ],
+        cacheKeyUrl: 'mes-259231537-craft-files-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          ...this.tableQuery
+        };
+        return craftFiles(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 194 - 0
src/views/batchRecord/components/tables/deviceBatchRecordTable.vue

@@ -0,0 +1,194 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { batchRecordPage } from '@/api/eam/index.js';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'code',
+            label: '工单单号',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'planCode',
+            label: '计划单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'planName',
+            label: '名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'ruleName',
+            label: '规则名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'workOrderCode',
+            label: '关联生产工单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'finishTime',
+            label: '报工时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            label: '状态',
+            minWidth: 180,
+            prop: 'orderStatus',
+            formatter: (row) => {
+              switch (row.orderStatus) {
+                case 0:
+                  return '待接收';
+                case 1:
+                  return '已接收';
+                case 2:
+                  return '执行中';
+                case 3:
+                  return '已完成';
+                default:
+                  return '';
+              }
+            }
+          },
+          {
+            prop: 'isAbnormal',
+            label: '执行结果',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter(row) {
+              return { 0: '异常', 1: '正常', 2: '异常', 3: '待检' }[
+                row.isAbnormal
+              ];
+            }
+          }
+        ],
+        cacheKeyUrl: 'mes-259231549-device-batchRecord-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单单号',
+            value: 'code',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          // {
+          //   label: '计划单号:',
+          //   value: 'planCode',
+          //   type: 'input',
+          //   placeholder: '请输入'
+          // },
+          {
+            label: '状态:',
+            value: 'orderStatus',
+            type: 'select',
+            placeholder: '请选择',
+            planList: [
+              {
+                label: '待接收',
+                value: 0
+              },
+              {
+                label: '已接收',
+                value: 1
+              },
+              {
+                label: '执行中',
+                value: 2
+              },
+              {
+                label: '已完成',
+                value: 3
+              }
+            ]
+          }
+          // ,
+          // {
+          //   label: '保养名称:',
+          //   value: 'planName',
+          //   type: 'input',
+          //   placeholder: '请输入'
+          // }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          types: [1, 2],
+          ...this.tableQuery
+        };
+        return batchRecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 138 - 0
src/views/batchRecord/components/tables/materialReturnTable.vue

@@ -0,0 +1,138 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { batchRecordPage } from '@/api/returnmaterials/index';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'code',
+            label: '退料单编号',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'name',
+            label: '退料单名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'scene',
+            label: '退料场景',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createUserName',
+            label: '退料人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createTime',
+            label: '退料时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'workOrderCode',
+            label: '关联领料单编号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          }
+        ],
+        cacheKeyUrl: 'mes-259231042-material-return-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '退料单编号',
+            value: 'returnMaterialsCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '退料单名称',
+            value: 'returnMaterialsName',
+            type: 'input',
+            placeholder: '请输入'
+          }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          ...this.tableQuery
+        };
+        return batchRecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 152 - 0
src/views/batchRecord/components/tables/materialTable.vue

@@ -0,0 +1,152 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { batchRecordPage } from '@/api/pickorder/index';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'code',
+            label: '领料单编号',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'workOrderCode',
+            label: '关联工单编号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'warehouseName',
+            label: '领料仓库名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createUserName',
+            label: '领料人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createTime',
+            label: '领料时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              switch (row.status) {
+                case 0:
+                  return '未领料';
+                case 1:
+                  return '已领料';
+                case 2:
+                  return '已出库';
+                case 3:
+                  return '部分出库';
+                default:
+                  return '';
+              }
+            }
+          }
+        ],
+        cacheKeyUrl: 'mes-259231040-material-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '领料编码:',
+            value: 'pickOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '领料名称:',
+            value: 'pickOrderName',
+            type: 'input',
+            placeholder: '请输入'
+          }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          ...this.tableQuery
+        };
+        return batchRecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 172 - 0
src/views/batchRecord/components/tables/qualityWorkOrderTable.vue

@@ -0,0 +1,172 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { batchRecordPage } from '@/api/qualityWorkOrder/index.js';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'code',
+            label: '质检工单编码',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'name',
+            label: '质检工单名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'sourceCode',
+            label: '来源单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              return row.qualityPlanCode
+                ? row.qualityPlanCode
+                : row.workOrderCode;
+            }
+          },
+          {
+            prop: 'qualityType',
+            label: '类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              return this.getDictValue('质检计划类型', row.qualityType);
+            }
+          },
+          {
+            prop: 'qualityMode',
+            label: '质检方式',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              return this.getDictValue('取样类型', `0${row.qualityMode}`);
+            }
+          },
+          {
+            prop: 'qualityTime',
+            label: '质检时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              switch (row.status) {
+                case 0:
+                  return '未报工';
+                case 1:
+                  return '已报工';
+
+                default:
+                  return '已关闭';
+              }
+            }
+          }
+        ],
+        cacheKeyUrl: 'mes-9221130-quality-work-order-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '生产工单编码',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '质检工单编码',
+            value: 'code',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '质检工单名称',
+            value: 'name',
+            type: 'input',
+            placeholder: '请输入'
+          }
+        ];
+      }
+    },
+    created() {
+      this.requestDict('质检计划类型');
+      this.requestDict('不良品处理类型');
+      this.requestDict('取样类型');
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          ...this.tableQuery
+        };
+        return batchRecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 175 - 0
src/views/batchRecord/components/tables/wmsOutInt.vue

@@ -0,0 +1,175 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { getPages } from '@/api/wms/index';
+  import { sceneState } from '@/utils/dict/index';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        sceneState,
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'bizNo',
+            label: '单号',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'warehouseName',
+            label: '仓库名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'bizType',
+            label: '入库类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              for (const key in this.sceneState) {
+                if (this.sceneState[key].code == row.bizType) {
+                  return this.sceneState[key].label;
+                }
+              }
+            }
+          },
+          {
+            prop: 'sourceBizNo',
+            label: '来源单据',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createUserName',
+            label: '入库人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'storageTime',
+            label: '入库时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'outInStatus',
+            label: '入库状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              if (row.verifyStatus == 2) {
+                switch (row.outInStatus) {
+                  case '1':
+                    return '预入库';
+                  case '2':
+                    return '部分入库';
+                  case '3':
+                    return '已入库';
+                  default:
+                    return '';
+                }
+              }
+            }
+          }
+        ],
+        cacheKeyUrl: 'mes-259231507-mwmsoutint-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '入库时间',
+            value: 'time',
+            type: 'date',
+            dateType: 'daterange',
+            placeholder: '请输入'
+          },
+          {
+            label: '入库单号',
+            value: 'sourceBizNo',
+            type: 'input',
+            placeholder: '请输入'
+          }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          ...this.tableQuery
+        };
+        return getPages(body);
+      },
+      search(where) {
+        console.log('where', where);
+        if (where.time) {
+          where.startTime = where.time[0];
+          where.endTime = where.time[1];
+        }
+        // 覆盖时间
+        this.reload({ ...where, time: null });
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 43 - 10
src/views/batchRecord/components/tables/workOrderTable.vue

@@ -1,13 +1,16 @@
 <template>
-  <ele-pro-table
-    ref="table"
-    row-key="id"
-    :columns="columns"
-    :datasource="datasource"
-    :cache-key="cacheKeyUrl"
-    autoAmendPage
-  >
-  </ele-pro-table>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
 </template>
 
 <script>
@@ -121,7 +124,34 @@
         cacheKeyUrl: 'mes-922194-work-order-table'
       };
     },
-    computed: {},
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '创建时间开始',
+            value: 'createTimeStart',
+            type: 'date',
+            dateType: 'date',
+            placeholder: '请输入',
+            width: '230'
+          },
+          {
+            label: '创建时间结束',
+            value: 'createTimeEnd',
+            type: 'date',
+            dateType: 'date',
+            placeholder: '请输入',
+            width: '230'
+          }
+        ];
+      }
+    },
     methods: {
       // 刷新表格
       reload(where = {}) {
@@ -141,6 +171,9 @@
           ...this.tableQuery
         };
         return batchRecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
       }
     }
   };

+ 149 - 0
src/views/batchRecord/components/tables/workReportTable.vue

@@ -0,0 +1,149 @@
+<template>
+  <div>
+    <seek-page :seekList="seekList" @search="search"></seek-page>
+    <ele-pro-table
+      ref="table"
+      row-key="id"
+      :columns="columns"
+      :datasource="datasource"
+      :cache-key="cacheKeyUrl"
+      autoAmendPage
+    >
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { batchRecordPage } from '@/api/workReport/index';
+
+  export default {
+    mixins: [dictMixins, tableColumnsMixin],
+    props: {
+      tableQuery: {
+        type: Object,
+        default: () => {
+          return {};
+        }
+      }
+    },
+    data() {
+      return {
+        columns: [
+          {
+            width: 50,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            label: '序号'
+          },
+          {
+            prop: 'taskName',
+            label: '报工工序名称',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'workOrderCode',
+            label: '生产工单编号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'createTime',
+            label: '报工时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'executorName',
+            label: '执行人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'formedNum',
+            label: '合格品数量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'formedWeight',
+            label: '合格品重量',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'reportStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (row) => {
+              switch (row.reportStatus) {
+                case 0:
+                  return '未报工';
+                case 1:
+                  return '已报工';
+                default:
+                  return '';
+              }
+            }
+          }
+        ],
+        cacheKeyUrl: 'mes-259231101-workreport-table'
+      };
+    },
+    computed: {
+      seekList() {
+        return [
+          {
+            label: '工单编码:',
+            value: 'workOrderCode',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '工序名称',
+            value: 'taskName',
+            type: 'input',
+            placeholder: '请输入'
+          }
+        ];
+      }
+    },
+    methods: {
+      // 刷新表格
+      reload(where = {}) {
+        this.$refs.table.reload({
+          where,
+          ...this.tableQuery
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // 参数
+        const body = {
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          ...this.tableQuery
+        };
+        return batchRecordPage(body);
+      },
+      search(where) {
+        this.reload(where);
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 56 - 52
src/views/batchRecord/index.vue

@@ -64,12 +64,12 @@
                   </el-form-item>
                 </el-form>
               </div>
-              <el-button slot="reference" type="primary" style="width: 100%"
-                >搜索</el-button
-              >
+              <el-button slot="reference" type="primary" style="width: 100%">
+                搜索
+              </el-button>
             </el-popover>
 
-            <div class="list-box">
+            <div class="list-box" style="padding-bottom: 80px">
               <div
                 class="list-item"
                 v-for="i in productList"
@@ -92,17 +92,13 @@
                     }}</div>
                   </template>
                 </el-popover> -->
-                <div class="ele-elip" style="width: 100%">{{
-                  i.productCode
-                }}</div>
-                <div class="ele-elip" style="width: 100%">{{
-                  i.productName
-                }}</div>
+                <div class="ele-elip" style="width: 100%">
+                  {{ i.productCode }}
+                </div>
+                <div class="ele-elip" style="width: 100%">
+                  {{ i.productName }}
+                </div>
               </div>
-              <div class="list-item"></div>
-              <div class="list-item"></div>
-              <div class="list-item"></div>
-              <div class="list-item"></div>
             </div>
 
             <div class="footer-box">
@@ -110,7 +106,7 @@
                 @size-change="handleSizeChange"
                 @current-change="handleCurrentChange"
                 :current-page.sync="productBody.pageNum"
-                :page-size="20"
+                :page-size="productBody.size"
                 layout="sizes,pager"
                 :total="total"
                 :pager-count="5"
@@ -150,12 +146,11 @@
 
         <template v-slot:content>
           <div>
-            <seek-page :seekList="seekList" @search="search"></seek-page>
-            <workOrderTable
-              v-if="activeType == '生产工单'"
+            <component
+              :is="activeComponentName"
               ref="tableRef"
               :tableQuery="tableQuery"
-            ></workOrderTable>
+            ></component>
           </div>
         </template>
       </ele-split-layout>
@@ -169,43 +164,72 @@
   import seekPage from '@/components/common/seekPage.vue';
   import { getAllProductInWorkOrder } from '@/api/produce/workOrder';
   import workOrderTable from './components/tables/workOrderTable.vue';
+  import materialTable from './components/tables/materialTable.vue';
+  import materialReturnTable from './components/tables/materialReturnTable.vue';
+  import workReportTable from './components/tables/workReportTable.vue';
+  import qualityWorkOrderTable from './components/tables/qualityWorkOrderTable.vue';
+  import wmsOutInt from './components/tables/wmsOutInt.vue';
+  import batchRecordTable from './components/tables/batchRecordTable.vue';
+  import deviceBatchRecordTable from './components/tables/deviceBatchRecordTable.vue';
+  import craftFilesTable from './components/tables/craftFilesTable.vue';
 
   export default {
-    components: { seekPage, workOrderTable },
+    components: {
+      seekPage,
+      workOrderTable,
+      materialTable,
+      materialReturnTable,
+      workReportTable,
+      qualityWorkOrderTable,
+      wmsOutInt,
+      batchRecordTable,
+      deviceBatchRecordTable,
+      craftFilesTable
+    },
     name: 'batchRecord',
     mixins: [dictMixins, tableColumnsMixin],
     data() {
       return {
         types: [
           {
-            name: '生产工单'
+            name: '生产工单',
+            componentName: 'workOrderTable'
           },
           {
-            name: '领料单'
+            name: '领料单',
+            componentName: 'materialTable'
           },
           {
-            name: '退料单'
+            name: '退料单',
+            componentName: 'materialReturnTable'
           },
           {
-            name: '报工'
+            name: '报工',
+            componentName: 'workReportTable'
           },
           {
-            name: '质检工单'
+            name: '质检工单',
+            componentName: 'qualityWorkOrderTable'
           },
           {
-            name: '入库单'
+            name: '入库单',
+            componentName: 'wmsOutInt'
           },
           {
-            name: '生产记录'
+            name: '生产记录',
+            componentName: 'batchRecordTable'
           },
           {
-            name: '设备工单'
+            name: '设备工单',
+            componentName: 'deviceBatchRecordTable'
           },
           {
-            name: '工艺文件'
+            name: '工艺文件',
+            componentName: 'craftFilesTable'
           }
         ],
         activeType: '生产工单',
+        activeComponentName: 'workOrderTable',
         // 产品搜索条件
         productBody: {
           param: '',
@@ -227,24 +251,7 @@
         }
       };
     },
-    computed: {
-      seekList() {
-        return [
-          {
-            label: '单据编码:',
-            value: 'workOrderCode',
-            type: 'input',
-            placeholder: '请输入'
-          },
-          {
-            label: '单据名称:',
-            value: 'workOrderName',
-            type: 'input',
-            placeholder: '请输入'
-          }
-        ];
-      }
-    },
+    computed: {},
     created() {
       this.getAllProductInWorkOrder();
     },
@@ -253,9 +260,6 @@
       reload() {
         this.$refs.tableRef?.reload();
       },
-      search(where) {
-        this.$refs.tableRef?.reload(where);
-      },
       // 获取产品和批次号
       async getAllProductInWorkOrder() {
         try {
@@ -282,6 +286,7 @@
       // 选择批记录类型
       changeActiveType(i) {
         this.activeType = i.name;
+        this.activeComponentName = i.componentName;
         this.reload();
       },
       resetSubmit() {
@@ -304,12 +309,12 @@
 
 <style lang="scss" scoped>
   .left-box {
+    height: 100%;
     display: flex;
 
     .left-item {
       flex: 1;
       border-right: 1px solid #ededed;
-      max-height: 78%;
       padding: 0 5px;
       width: 33.3%;
       position: relative;
@@ -325,7 +330,6 @@
 
       .list-box {
         margin-top: 10px;
-        max-height: 80vh;
         overflow-y: auto;
         box-sizing: border-box;
 

+ 1 - 0
vue.config.js

@@ -43,6 +43,7 @@ module.exports = {
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
+        target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''