huang_an vor 1 Jahr
Ursprung
Commit
b329639d8e

+ 177 - 0
src/views/documentManagement/certificateManagement/components/aptitudeDialog.vue

@@ -0,0 +1,177 @@
+<template>
+  <div>
+    <ele-modal
+      width="960px"
+      :visible="visible"
+      append-to-body
+      :close-on-click-modal="false"
+      custom-class="ele-dialog-form"
+      title="资质列表"
+      @update:visible="updateVisible"
+    >
+      <div class="main">
+        <ele-pro-table
+          ref="table"
+          :initLoad="false"
+          :columns="columns"
+          :current.sync="current"
+          highlight-current-row
+          :datasource="datasource"
+          tool-class="ele-toolbar-form"
+          cache-key="systemOrgUserTable"
+          @selection-change="handleSelectionChange"
+        >
+        </ele-pro-table>
+      </div>
+      <template v-slot:footer>
+        <el-button @click="updateVisible(false)">取 消</el-button>
+        <el-button type="primary" @click="handleMine"> 确 定 </el-button>
+      </template>
+    </ele-modal>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import { getProfessionCertificationPageList } from '@/api/factoryModel';
+  export default {
+    mixins: [dictMixins],
+    data() {
+      return {
+        multipleSelection: [],
+        visible: false,
+        levelOptions: [
+          {
+            label: '初级',
+            value: '1'
+          },
+          {
+            label: '中级',
+            value: '2'
+          },
+          {
+            label: '高级',
+            value: '3'
+          }
+        ],
+        isView: false,
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            slot: 'type',
+            label: '类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.getDictValue('工种类型', _row.type);
+            }
+          },
+          {
+            align: 'center',
+            prop: 'code',
+            label: '编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            slot: 'name',
+            prop: 'name',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'level',
+            prop: 'level',
+            label: '等级',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.levelOptions.filter(
+                (item) => _row.level == item.value
+              )[0].label;
+            }
+          },
+          {
+            slot: 'startTime',
+            prop: 'startTime',
+            label: '有效开始时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'endTime',
+            prop: 'endTime',
+            label: '有效结束时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'accessory.name',
+            prop: 'accessory.name',
+            label: '附件',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          }
+        ]
+      };
+    },
+    methods: {
+      updateVisible(value) {
+        this.visible = value;
+        this.$emit('update:visible', value);
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      async handleMine() {
+        if (this.multipleSelection?.length <= 0) {
+          this.$message.warning('请至少选择一个资质!');
+          return;
+        }
+        this.$emit('success', this.multipleSelection);
+        this.updateVisible(false);
+      },
+      async datasource({ page, limit, where, order }) {
+        const res = await getProfessionCertificationPageList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit
+        });
+        return res;
+      },
+      async open() {
+        this.current = {};
+        this.radio = null;
+        this.visible = true;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            where: {}
+          });
+        });
+      }
+    }
+  };
+</script>

+ 332 - 0
src/views/documentManagement/certificateManagement/components/staffSelection.vue

@@ -0,0 +1,332 @@
+<template>
+  <div class="container">
+    <!-- 单据弹窗 -->
+    <el-dialog
+      title="员工"
+      :before-close="handleClose"
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      width="80%"
+    >
+      <el-row class="zw-page">
+        <el-col :span="6" class="zw-page-left">
+          <el-card>
+            <div class="zw-card-header" slot="header">
+              <span class="zw-header-title details-title">部门</span>
+            </div>
+            <div class="zw-page-left-tree">
+              <el-container class="zw-container">
+                <el-tree
+                  ref="tree"
+                  :data="treeList"
+                  highlight-current
+                  node-key="id"
+                  :props="{ label: 'name' }"
+                  :expand-on-click-node="false"
+                  :default-expand-all="true"
+                  @node-click="handleNodeClick"
+                >
+                </el-tree>
+              </el-container>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="9" class="zw-page-main">
+          <el-card>
+            <div class="zw-card-header" slot="header">
+              <span class="zw-header-title details-title">员工明细 </span>
+            </div>
+            <div class="zw-page-main-list">
+              <el-container class="zw-container">
+                <el-table
+                  :data="staffList"
+                  tooltip-effect="dark"
+                  style="width: 100%"
+                  max-height="500"
+                  :header-cell-style="{
+                    background: '#F0F3F3',
+                    border: 'none'
+                  }"
+                >
+                  <el-table-column prop="code" label="姓名">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.name }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="工号">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.jobNumber }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="80" label="操作">
+                    <template slot-scope="{ row }">
+                      <el-button
+                        size="mini"
+                        type="primary"
+                        @click="choiceAsset(row)"
+                        :disabled="row.disabled || selectStafflist.length > 0"
+                        icon="el-icon-arrow-right"
+                        circle
+                      >
+                      </el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <div
+                  v-if="staffList.length !== 0 && isMore"
+                  class="zw-page-list-more"
+                >
+                  <el-link @click="getMore()" type="primary"
+                    >更多<i class="el-icon-caret-bottom"></i>
+                  </el-link>
+                </div>
+              </el-container>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="9" class="zw-page-right">
+          <el-card>
+            <div class="zw-card-header" slot="header">
+              <span class="zw-header-title">已选员工</span>
+            </div>
+            <div class="zw-page-right-list">
+              <el-container class="zw-container">
+                <el-table
+                  :data="selectStafflist"
+                  tooltip-effect="dark"
+                  style="width: 100%"
+                  max-height="500"
+                  :header-cell-style="{
+                    background: '#F0F3F3',
+                    border: 'none'
+                  }"
+                >
+                  <el-table-column prop="code" label="姓名">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.name }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="工号">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.jobNumber }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="80" label="操作">
+                    <template slot-scope="scope">
+                      <el-button
+                        @click="deleteSelectStaff(scope.row, scope.$index)"
+                        size="mini"
+                        type="danger"
+                        >删除
+                      </el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </el-container>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" @click="handleClose">关 闭</el-button>
+        <el-button size="small" @click="sumbit" type="primary">确 认</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import { listOrganizations, getUserPage } from '@/api/system/organization';
+  export default {
+    data() {
+      return {
+        form: {
+          groupId: null
+        },
+        treeList: [],
+        staffList: [],
+        selectStafflist: [], //已选员工
+        defaultProps: {
+          children: 'children',
+          label: 'name',
+          value: 'code'
+        },
+        pageNum: 1, //设备当前页数
+        size: 10,
+        isMore: false,
+        dialogVisible: false
+      };
+    },
+    created() {},
+    methods: {
+      open(selectedList) {
+        this.dialogVisible = true;
+        this.selectStafflist = selectedList;
+        this.getInfo();
+      },
+      //初始数据
+      async getInfo() {
+        let list = await listOrganizations();
+        this.treeList = this.$util.toTreeData({
+          data: list,
+          idField: 'id',
+          parentIdField: 'parentId'
+        });
+        //this.treeList = res.data;
+      },
+      //选择分类
+      handleNodeClick(data) {
+        this.staffList = [];
+
+        this.form.groupId = data.id;
+        let params = {
+          pageNum: 1,
+          size: this.size,
+          groupId: this.form.groupId
+        };
+        this.getStaffList(params);
+      },
+      //获取员工列表
+      async getStaffList(params) {
+        let res = await getUserPage(params);
+        let list = res.list;
+        if (list.length < res.count) {
+          this.isMore = true;
+        } else {
+          this.isMore = false;
+        }
+        list.forEach((el) => {
+          let _index = this.selectStafflist.findIndex((n) => n.id == el.id);
+          if (_index !== -1) {
+            el.disabled = true;
+          } else {
+            el.disabled = false;
+          }
+        });
+        this.staffList = [...this.staffList, ...list];
+        // this.pageNum = res.pageNum;
+      },
+      //查询更多员工
+      async getMore() {
+        this.pageNum = this.pageNum + 1;
+        let params = {
+          pageNum: this.pageNum,
+          size: this.size,
+          groupId: this.form.groupId
+        };
+        this.getStaffList(params);
+      },
+      //选择员工
+      choiceAsset(info) {
+        let data = JSON.parse(JSON.stringify(info));
+        this.selectStafflist.push(data);
+        info.disabled = true;
+      },
+      //删除已选员工
+      deleteSelectStaff(info, index) {
+        this.staffList.forEach((el) => {
+          if (el.id == info.id) {
+            el.disabled = false;
+          }
+        });
+        this.selectStafflist.splice(index, 1);
+      },
+      //保存
+      sumbit() {
+        if (this.selectStafflist.length === 0) {
+          this.$message.warning('请选择员工');
+        } else {
+          this.$emit(
+            'confirm',
+            JSON.parse(JSON.stringify(this.selectStafflist))
+          );
+          this.handleClose();
+        }
+      },
+      handleClose() {
+        this.staffList = [];
+        this.selectStafflist = [];
+        this.dialogVisible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .container {
+    padding: 10px 0;
+  }
+  .zw-container {
+    height: 500px;
+    overflow-y: auto;
+  }
+  .zw-header-title {
+    display: inline-block;
+    margin-right: 10px;
+    font-weight: 600;
+  }
+  .details-title {
+    line-height: 32px;
+    height: 32px;
+  }
+  .zw-page-list-p {
+    font-size: 14px;
+    margin-bottom: 18px;
+    display: flex;
+    justify-content: space-between;
+    // align-items: center;
+    .zw-page-list-right {
+      display: flex;
+    }
+  }
+  .zw-page {
+    background: #fff;
+    //padding: 20px 0;
+    height: 600px;
+    .zw-page-left {
+      padding: 0 10px;
+    }
+    .zw-page-main {
+      padding: 0 10px;
+      .zw-page-main-list {
+        span {
+          margin-right: 10px;
+        }
+        .zw-page-span-num {
+          font-size: 12px;
+          color: #157a2c;
+        }
+        .zw-page-p-operation {
+          text-align: right;
+          // width: 200px;
+        }
+        .zw-page-operation-num {
+          width: 100px;
+          margin: 0 10px;
+        }
+      }
+      .zw-page-list-more {
+        text-align: center;
+      }
+    }
+    .zw-page-right {
+      .zw-card-header {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        height: 32px;
+      }
+      span {
+        margin-right: 10px;
+      }
+      .zw-page-span-num {
+        font-size: 12px;
+        color: #157a2c;
+      }
+    }
+  }
+  .notes {
+    font-size: 12px;
+    color: #909090;
+  }
+</style>

+ 177 - 0
src/views/factoryModel/jobManagement/components/aptitudeDialog.vue

@@ -0,0 +1,177 @@
+<template>
+  <div>
+    <ele-modal
+      width="960px"
+      :visible="visible"
+      append-to-body
+      :close-on-click-modal="false"
+      custom-class="ele-dialog-form"
+      title="资质列表"
+      @update:visible="updateVisible"
+    >
+      <div class="main">
+        <ele-pro-table
+          ref="table"
+          :initLoad="false"
+          :columns="columns"
+          :current.sync="current"
+          highlight-current-row
+          :datasource="datasource"
+          tool-class="ele-toolbar-form"
+          cache-key="systemOrgUserTable"
+          @selection-change="handleSelectionChange"
+        >
+        </ele-pro-table>
+      </div>
+      <template v-slot:footer>
+        <el-button @click="updateVisible(false)">取 消</el-button>
+        <el-button type="primary" @click="handleMine"> 确 定 </el-button>
+      </template>
+    </ele-modal>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import { getProfessionCertificationPageList } from '@/api/factoryModel';
+  export default {
+    mixins: [dictMixins],
+    data() {
+      return {
+        multipleSelection: [],
+        visible: false,
+        levelOptions: [
+          {
+            label: '初级',
+            value: '1'
+          },
+          {
+            label: '中级',
+            value: '2'
+          },
+          {
+            label: '高级',
+            value: '3'
+          }
+        ],
+        isView: false,
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            slot: 'type',
+            label: '类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.getDictValue('工种类型', _row.type);
+            }
+          },
+          {
+            align: 'center',
+            prop: 'code',
+            label: '编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            slot: 'name',
+            prop: 'name',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'level',
+            prop: 'level',
+            label: '等级',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.levelOptions.filter(
+                (item) => _row.level == item.value
+              )[0].label;
+            }
+          },
+          {
+            slot: 'startTime',
+            prop: 'startTime',
+            label: '有效开始时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'endTime',
+            prop: 'endTime',
+            label: '有效结束时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'accessory.name',
+            prop: 'accessory.name',
+            label: '附件',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          }
+        ]
+      };
+    },
+    methods: {
+      updateVisible(value) {
+        this.visible = value;
+        this.$emit('update:visible', value);
+      },
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+      },
+      async handleMine() {
+        if (this.multipleSelection?.length <= 0) {
+          this.$message.warning('请至少选择一个资质!');
+          return;
+        }
+        this.$emit('success', this.multipleSelection);
+        this.updateVisible(false);
+      },
+      async datasource({ page, limit, where, order }) {
+        const res = await getProfessionCertificationPageList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit
+        });
+        return res;
+      },
+      async open() {
+        this.current = {};
+        this.radio = null;
+        this.visible = true;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            where: {}
+          });
+        });
+      }
+    }
+  };
+</script>

+ 276 - 0
src/views/factoryModel/qualificationManagement/components/clientDialog.vue

@@ -0,0 +1,276 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    title="供应商列表"
+    width="80vw"
+    append-to-body
+  >
+    <el-form :model="params" label-width="100px">
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="编码/代号:" prop="codeOrSerialNo">
+            <el-input
+              clearable
+              v-model="params.codeOrSerialNo"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="客户名称:" prop="name">
+            <el-input
+              clearable
+              placeholder="请输入"
+              v-model.trim="params.name"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="是否启用:" prop="codeOrSerialNo">
+            <el-select
+              v-model="params.status"
+              placeholder="请选择"
+              class="w100"
+              clearable
+            >
+              <el-option
+                v-for="item in statusList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6" style="text-align: right">
+          <el-button type="primary" @click="search">查询</el-button>
+          <el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-container class="assets-dialog">
+      <el-aside width="200px" style="max-height: auto" class="wrapper-assets">
+        <AssetTree
+          @handleNodeClick="handleNodeClick"
+          id="17"
+          :isFirstRefreshTable="false"
+          ref="treeList"
+        />
+      </el-aside>
+      <el-main>
+        <ele-pro-table
+          ref="table"
+          :columns="columns"
+          :datasource="datasource"
+          height="calc(100vh - 325px)"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :selection.sync="selection"
+          cache-key="eomContactPageTable"
+        >
+        </ele-pro-table>
+      </el-main>
+    </el-container>
+
+    <div slot="footer">
+      <el-button type="primary" @click="confirm">确定</el-button>
+      <el-button @click="visible = false">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { getTreeByPid } from '@/api/classifyManage';
+  import { getVendorPageList } from '@/api/factoryModel';
+  import AssetTree from '@/components/AssetTree';
+  export default {
+    components: { AssetTree },
+    data() {
+      return {
+        params: {},
+        visible: false,
+        selection: [],
+        statusList: [
+          { value: 1, label: '启用' },
+          { value: 2, label: '禁用' }
+        ],
+        delVisible: false,
+        // 加载状态
+        loading: false,
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '客户编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'name',
+            label: '客户名称',
+            align: 'center',
+            slot: 'name',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'serialNo',
+            label: '客户代号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'phone',
+            label: '客户电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'addressName',
+            label: '单位地址',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              let addr =
+                '' + _row.addressName
+                  ? _row.addressName.replaceAll(',', '')
+                  : '';
+              addr += _row.address ? _row.address : '';
+              return addr;
+            }
+          },
+          {
+            prop: 'linkName',
+            label: '联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'linkPhone',
+            label: '联系人电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+
+          {
+            prop: 'parentName',
+            label: '上级单位',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return _row.status === 1 ? '启用' : '禁用';
+            }
+          },
+          {
+            prop: 'createUsername',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 160,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
+          }
+        ],
+        current: {},
+        curNodeData: {},
+        treeList: [],
+        treeLoading: false,
+        formData: {},
+        rootTreeId: null,
+        defaultProps: {
+          children: 'children',
+          label: 'name'
+        },
+        showEdit: true
+      };
+    },
+    created() {},
+    methods: {
+      /*  重置 */
+      reset() {
+        this.params = {};
+        this.search();
+      },
+      search() {
+        this.reload({ ...this.params });
+      },
+      handleNodeClick(data, node) {
+        this.curNodeData = data;
+        this.reload({ categoryId: data.id });
+      },
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+      datasource({ page, limit, where, order }) {
+        return getVendorPageList({
+          pageNum: page,
+          size: limit,
+          type: 1,
+          ...where
+        });
+      },
+      open() {
+        this.visible = true;
+        this.$nextTick(() => {
+          this.$refs.treeList.getTreeData();
+        });
+      },
+      confirm() {
+        console.log(this.selection);
+        this.$emit('success', this.selection);
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .el-dialog__wrapper {
+    ::v-deep .el-aside {
+      background-color: #fff !important;
+      border: 1px solid #ccc;
+    }
+  }
+
+  .wrapper-assets {
+    max-height: 53vh;
+    overflow: auto;
+  }
+</style>

+ 332 - 0
src/views/factoryModel/qualificationManagement/components/staffSelection.vue

@@ -0,0 +1,332 @@
+<template>
+  <div class="container">
+    <!-- 单据弹窗 -->
+    <el-dialog
+      title="员工"
+      :before-close="handleClose"
+      :visible.sync="dialogVisible"
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      width="80%"
+    >
+      <el-row class="zw-page">
+        <el-col :span="6" class="zw-page-left">
+          <el-card>
+            <div class="zw-card-header" slot="header">
+              <span class="zw-header-title details-title">部门</span>
+            </div>
+            <div class="zw-page-left-tree">
+              <el-container class="zw-container">
+                <el-tree
+                  ref="tree"
+                  :data="treeList"
+                  highlight-current
+                  node-key="id"
+                  :props="{ label: 'name' }"
+                  :expand-on-click-node="false"
+                  :default-expand-all="true"
+                  @node-click="handleNodeClick"
+                >
+                </el-tree>
+              </el-container>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="9" class="zw-page-main">
+          <el-card>
+            <div class="zw-card-header" slot="header">
+              <span class="zw-header-title details-title">员工明细 </span>
+            </div>
+            <div class="zw-page-main-list">
+              <el-container class="zw-container">
+                <el-table
+                  :data="staffList"
+                  tooltip-effect="dark"
+                  style="width: 100%"
+                  max-height="500"
+                  :header-cell-style="{
+                    background: '#F0F3F3',
+                    border: 'none'
+                  }"
+                >
+                  <el-table-column prop="code" label="姓名">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.name }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="工号">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.jobNumber }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="80" label="操作">
+                    <template slot-scope="{ row }">
+                      <el-button
+                        size="mini"
+                        type="primary"
+                        @click="choiceAsset(row)"
+                        :disabled="row.disabled"
+                        icon="el-icon-arrow-right"
+                        circle
+                      >
+                      </el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <div
+                  v-if="staffList.length !== 0 && isMore"
+                  class="zw-page-list-more"
+                >
+                  <el-link @click="getMore()" type="primary"
+                    >更多<i class="el-icon-caret-bottom"></i>
+                  </el-link>
+                </div>
+              </el-container>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="9" class="zw-page-right">
+          <el-card>
+            <div class="zw-card-header" slot="header">
+              <span class="zw-header-title">已选员工</span>
+            </div>
+            <div class="zw-page-right-list">
+              <el-container class="zw-container">
+                <el-table
+                  :data="selectStafflist"
+                  tooltip-effect="dark"
+                  style="width: 100%"
+                  max-height="500"
+                  :header-cell-style="{
+                    background: '#F0F3F3',
+                    border: 'none'
+                  }"
+                >
+                  <el-table-column prop="code" label="姓名">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.name }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="工号">
+                    <template slot-scope="{ row }">
+                      <div>{{ row.jobNumber }}</div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="80" label="操作">
+                    <template slot-scope="scope">
+                      <el-button
+                        @click="deleteSelectStaff(scope.row, scope.$index)"
+                        size="mini"
+                        type="danger"
+                        >删除
+                      </el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </el-container>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" @click="handleClose">关 闭</el-button>
+        <el-button size="small" @click="sumbit" type="primary">确 认</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import { listOrganizations, getUserPage } from '@/api/system/organization';
+  export default {
+    data() {
+      return {
+        form: {
+          groupId: null
+        },
+        treeList: [],
+        staffList: [],
+        selectStafflist: [], //已选员工
+        defaultProps: {
+          children: 'children',
+          label: 'name',
+          value: 'code'
+        },
+        pageNum: 1, //设备当前页数
+        size: 10,
+        isMore: false,
+        dialogVisible: false
+      };
+    },
+    created() {},
+    methods: {
+      open(selectedList) {
+        this.dialogVisible = true;
+        this.selectStafflist = selectedList;
+        this.getInfo();
+      },
+      //初始数据
+      async getInfo() {
+        let list = await listOrganizations();
+        this.treeList = this.$util.toTreeData({
+          data: list,
+          idField: 'id',
+          parentIdField: 'parentId'
+        });
+        //this.treeList = res.data;
+      },
+      //选择分类
+      handleNodeClick(data) {
+        this.staffList = [];
+
+        this.form.groupId = data.id;
+        let params = {
+          pageNum: 1,
+          size: this.size,
+          groupId: this.form.groupId
+        };
+        this.getStaffList(params);
+      },
+      //获取员工列表
+      async getStaffList(params) {
+        let res = await getUserPage(params);
+        let list = res.list;
+        if (list.length < res.count) {
+          this.isMore = true;
+        } else {
+          this.isMore = false;
+        }
+        list.forEach((el) => {
+          let _index = this.selectStafflist.findIndex((n) => n.id == el.id);
+          if (_index !== -1) {
+            el.disabled = true;
+          } else {
+            el.disabled = false;
+          }
+        });
+        this.staffList = [...this.staffList, ...list];
+        // this.pageNum = res.pageNum;
+      },
+      //查询更多员工
+      async getMore() {
+        this.pageNum = this.pageNum + 1;
+        let params = {
+          pageNum: this.pageNum,
+          size: this.size,
+          groupId: this.form.groupId
+        };
+        this.getStaffList(params);
+      },
+      //选择员工
+      choiceAsset(info) {
+        let data = JSON.parse(JSON.stringify(info));
+        this.selectStafflist.push(data);
+        info.disabled = true;
+      },
+      //删除已选员工
+      deleteSelectStaff(info, index) {
+        this.staffList.forEach((el) => {
+          if (el.id == info.id) {
+            el.disabled = false;
+          }
+        });
+        this.selectStafflist.splice(index, 1);
+      },
+      //保存
+      sumbit() {
+        if (this.selectStafflist.length === 0) {
+          this.$message.warning('请选择员工');
+        } else {
+          this.$emit(
+            'confirm',
+            JSON.parse(JSON.stringify(this.selectStafflist))
+          );
+          this.handleClose();
+        }
+      },
+      handleClose() {
+        this.staffList = [];
+        this.selectStafflist = [];
+        this.dialogVisible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .container {
+    padding: 10px 0;
+  }
+  .zw-container {
+    height: 500px;
+    overflow-y: auto;
+  }
+  .zw-header-title {
+    display: inline-block;
+    margin-right: 10px;
+    font-weight: 600;
+  }
+  .details-title {
+    line-height: 32px;
+    height: 32px;
+  }
+  .zw-page-list-p {
+    font-size: 14px;
+    margin-bottom: 18px;
+    display: flex;
+    justify-content: space-between;
+    // align-items: center;
+    .zw-page-list-right {
+      display: flex;
+    }
+  }
+  .zw-page {
+    background: #fff;
+    //padding: 20px 0;
+    height: 600px;
+    .zw-page-left {
+      padding: 0 10px;
+    }
+    .zw-page-main {
+      padding: 0 10px;
+      .zw-page-main-list {
+        span {
+          margin-right: 10px;
+        }
+        .zw-page-span-num {
+          font-size: 12px;
+          color: #157a2c;
+        }
+        .zw-page-p-operation {
+          text-align: right;
+          // width: 200px;
+        }
+        .zw-page-operation-num {
+          width: 100px;
+          margin: 0 10px;
+        }
+      }
+      .zw-page-list-more {
+        text-align: center;
+      }
+    }
+    .zw-page-right {
+      .zw-card-header {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        height: 32px;
+      }
+      span {
+        margin-right: 10px;
+      }
+      .zw-page-span-num {
+        font-size: 12px;
+        color: #157a2c;
+      }
+    }
+  }
+  .notes {
+    font-size: 12px;
+    color: #909090;
+  }
+</style>

+ 267 - 0
src/views/factoryModel/qualificationManagement/components/vendorDialog.vue

@@ -0,0 +1,267 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    title="供应商列表"
+    width="80vw"
+    append-to-body
+  >
+    <el-form :model="params" label-width="100px">
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="编码/代号:" prop="codeOrSerialNo">
+            <el-input
+              clearable
+              v-model="params.codeOrSerialNo"
+              placeholder="请输入"
+              maxlength="50"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="供应商名称:" prop="name">
+            <el-input
+              clearable
+              placeholder="请输入"
+              v-model.trim="params.name"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="是否启用:" prop="codeOrSerialNo">
+            <el-select
+              v-model="params.status"
+              placeholder="请选择"
+              class="w100"
+              clearable
+            >
+              <el-option
+                v-for="item in statusList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6" style="text-align: right">
+          <el-button type="primary" @click="search">查询</el-button>
+          <el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-container class="assets-dialog">
+      <el-aside width="200px" style="max-height: auto" class="wrapper-assets">
+        <AssetTree
+          @handleNodeClick="handleNodeClick"
+          id="19"
+          :isFirstRefreshTable="false"
+          ref="treeList"
+        />
+      </el-aside>
+      <el-main>
+        <ele-pro-table
+          ref="table"
+          :columns="columns"
+          :datasource="datasource"
+          height="calc(100vh - 325px)"
+          full-height="calc(100vh - 116px)"
+          tool-class="ele-toolbar-form"
+          :selection.sync="selection"
+          cache-key="eomContactPageTable"
+        >
+        </ele-pro-table>
+      </el-main>
+    </el-container>
+
+    <div slot="footer">
+      <el-button type="primary" @click="confirm">确定</el-button>
+      <el-button @click="visible = false">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { getTreeByPid } from '@/api/classifyManage';
+  import { getVendorPageList } from '@/api/factoryModel';
+  import AssetTree from '@/components/AssetTree';
+  export default {
+    components: { AssetTree },
+    data() {
+      return {
+        params: {},
+        visible: false,
+        selection: [],
+        statusList: [
+          { value: 1, label: '启用' },
+          { value: 2, label: '禁用' }
+        ],
+        delVisible: false,
+        // 加载状态
+        loading: false,
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '供应商编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'name',
+            label: '供应商名称',
+            align: 'center',
+            slot: 'name',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'serialNo',
+            label: '供应商代号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'phone',
+            label: '供应商电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'addressName',
+            label: '单位地址',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              let addr =
+                '' + _row.addressName
+                  ? _row.addressName.replaceAll(',', '')
+                  : '';
+              addr += _row.address ? _row.address : '';
+              return addr;
+            }
+          },
+          {
+            prop: 'linkName',
+            label: '联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'linkPhone',
+            label: '联系人电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return _row.status === 1 ? '启用' : '禁用';
+            }
+          },
+          {
+            prop: 'createUsername',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 160,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
+          }
+        ],
+        current: {},
+        curNodeData: {},
+        treeList: [],
+        treeLoading: false,
+        formData: {},
+        rootTreeId: null,
+        defaultProps: {
+          children: 'children',
+          label: 'name'
+        },
+        showEdit: true
+      };
+    },
+    created() {},
+    methods: {
+      /*  重置 */
+      reset() {
+        this.params = {};
+        this.search();
+      },
+      search() {
+        this.reload({ ...this.params });
+      },
+      handleNodeClick(data, node) {
+        this.curNodeData = data;
+        this.reload({ categoryId: data.id });
+      },
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+      datasource({ page, limit, where, order }) {
+        return getVendorPageList({
+          pageNum: page,
+          size: limit,
+          type: 2,
+          ...where
+        });
+      },
+      open() {
+        this.visible = true;
+        this.$nextTick(() => {
+          this.$refs.treeList.getTreeData();
+        });
+      },
+      confirm() {
+        this.$emit('success', this.selection);
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .el-dialog__wrapper {
+    ::v-deep .el-aside {
+      background-color: #fff !important;
+      border: 1px solid #ccc;
+    }
+  }
+
+  .wrapper-assets {
+    max-height: 53vh;
+    overflow: auto;
+  }
+</style>

+ 191 - 0
src/views/material/BOMmanage/components/jobDialog.vue

@@ -0,0 +1,191 @@
+<template>
+  <el-dialog
+    :title="title"
+    v-if="visible"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="70%"
+  >
+    <el-card shadow="never">
+      <user-search :typeList="typeOptions" @search="reload" />
+
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :selection.sync="selection"
+        row-key="id"
+      >
+      </ele-pro-table>
+    </el-card>
+
+    <div class="btns">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import UserSearch from '@/views/factoryModel/jobManagement/components/user-search.vue';
+  import { getProfessionPageList } from '@/api/factoryModel';
+  export default {
+    components: { UserSearch },
+    mixins: [dictMixins],
+    data() {
+      return {
+        visible: false,
+        title: '产品参数',
+        levelOptions: [
+          {
+            label: '初级',
+            value: '1'
+          },
+          {
+            label: '中级',
+            value: '2'
+          },
+          {
+            label: '高级',
+            value: '3'
+          }
+        ],
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            slot: 'type',
+            label: '类型',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.getDictValue('工种类型', _row.type);
+            }
+          },
+          {
+            align: 'center',
+            prop: 'code',
+            label: '编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            slot: 'name',
+            prop: 'name',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            slot: 'level',
+            prop: 'level',
+            label: '等级',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            formatter: (_row) => {
+              return this.levelOptions.filter(
+                (item) => _row.level == item.value
+              )[0].label;
+            }
+          },
+          {
+            slot: 'hourCost',
+            prop: 'hourCost',
+            label: '标准工时费',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          }
+        ],
+        statusList: [
+          { label: '工艺', value: 0 },
+          { label: '工序', value: 1 },
+          { label: '产品', value: 2 },
+          { label: '原料', value: 3 },
+          { label: '设备', value: 4 },
+          { label: '其他', value: 5 }
+        ],
+        // 表格选中数据
+        selection: [],
+        tableData: [],
+        current: null
+      };
+    },
+
+    created() {
+      this.requestDict('工种类型');
+    },
+    computed: {
+      typeOptions() {
+        return this.dict[this.dictEnum['工种类型']];
+      }
+    },
+    methods: {
+      /* 表格数据源 */
+      async datasource({ page, limit, where, order }) {
+        const res = await getProfessionPageList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit
+        });
+        return res;
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
+      open(item, current) {
+        if (item) {
+          this.tableData = JSON.parse(JSON.stringify(item));
+        }
+        if (current) {
+          this.current = current;
+        }
+        this.visible = true;
+      },
+
+      handleClose() {
+        this.visible = false;
+        this.$refs.table.setSelectedRows([]);
+        this.selection = [];
+      },
+      selected() {
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+        this.$emit('chooseModal', this.selection, this.current);
+        this.handleClose();
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+</style>

+ 153 - 0
src/views/material/BOMmanage/components/routing.vue

@@ -0,0 +1,153 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :selection.sync="selection"
+        row-key="id"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="add"
+            >新增</el-button
+          >
+        </template>
+        <!-- 状态列 -->
+        <template v-slot:status="{ row }">
+          {{ checkStatus(row) }}
+        </template>
+
+        <template v-slot:routeType="{ row }">
+          {{ row.routeType == 2 ? '委外' : '生产' }}
+        </template>
+      </ele-pro-table>
+    </el-card>
+    <routingDialog ref="routingDialogRef" @reload="reload"></routingDialog>
+  </div>
+</template>
+
+<script>
+  import { getMbomPage } from '@/api/material/BOM';
+  import routingDialog from './routingDialog.vue';
+  export default {
+    name: 'technologyRoute',
+    components: {
+      routingDialog
+    },
+    props: {
+      taskParam: Object
+    },
+    data() {
+      return {
+        tableData: [],
+        selection: [],
+        versionList: [],
+        where: {},
+        // 表格列配置
+        columns: [
+          {
+            prop: 'code',
+            label: '工艺路线组编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '工艺路线名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+
+          {
+            prop: 'version',
+            label: '工艺路线版本',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            prop: 'produceVersionName',
+            label: '生产版本',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            slot: 'status',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            slot: 'routeType',
+            label: '类型',
+            align: 'center',
+            showOverflowTooltip: true
+          }
+        ],
+
+        // 表格选中数据
+        selection: [],
+        // 当前编辑数据
+        current: null,
+        // 是否显示编辑弹窗
+        showEdit: false,
+        detailEdit: false,
+
+        statusList: [
+          { label: '草稿', value: -1 },
+          { label: '失效', value: 0 },
+          { label: '生效', value: 1 }
+        ],
+        loading: false
+      };
+    },
+    methods: {
+      add() {
+        this.$refs.routingDialogRef.open(this.taskParam, this.tableData);
+      },
+      search() {
+        this.reload(this.where);
+      },
+      /* 表格数据源 */
+      async datasource({ page, limit, where }) {
+        let data = await getMbomPage({
+          ...where,
+          bomCategoryId: this.taskParam.id,
+          pageNum: page,
+          size: limit
+        });
+        if (data?.length > 0) {
+          this.tableData = data[0];
+          return data[0].processRoute.list || [];
+        } else {
+          this.tableData = {};
+          return [];
+        }
+      },
+      checkStatus(row) {
+        let obj = this.statusList.find((it) => it.value == row.status);
+        return obj.label;
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      }
+    }
+  };
+</script>

+ 353 - 0
src/views/material/BOMmanage/components/routingDialog.vue

@@ -0,0 +1,353 @@
+<template>
+  <el-dialog
+    title="工艺路线"
+    v-if="visible"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="70%"
+  >
+    <div class="ele-body">
+      <el-card shadow="never">
+        <!-- 搜索表单 -->
+        <el-form
+          label-width="120px"
+          class="ele-form-search"
+          @keyup.enter.native="search"
+          @submit.native.prevent
+        >
+          <el-row>
+            <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
+              <el-form-item label="工艺路线组编码:">
+                <el-input clearable v-model="where.code" placeholder="请输入" />
+              </el-form-item>
+            </el-col>
+            <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
+              <el-form-item label="工艺路线名称:">
+                <el-input clearable v-model="where.name" placeholder="请输入" />
+              </el-form-item>
+            </el-col>
+            <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
+              <el-form-item label="生产版本:">
+                <el-select
+                  v-model="where.produceVersionId"
+                  filterable
+                  placeholder="请选择"
+                  :style="{ width: '100%' }"
+                >
+                  <el-option
+                    v-for="item in versionList"
+                    :key="item.code"
+                    :label="item.code + '-' + item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
+              <el-form-item label="状态:" label-width="70px">
+                <el-select
+                  v-model="where.status"
+                  filterable
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="item in statusList"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col v-bind="styleResponsive ? { lg: 4, md: 12 } : { span: 4 }">
+              <el-form-item label-width="20px">
+                <el-button
+                  type="primary"
+                  icon="el-icon-search"
+                  class="ele-btn-icon"
+                  @click="search"
+                >
+                  查询
+                </el-button>
+                <el-button @click="reset">重置</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <!-- 数据表格 -->
+        <ele-pro-table
+          ref="table"
+          :columns="columns"
+          :datasource="datasource"
+          :selection.sync="selection"
+          row-key="id"
+        >
+          <!-- 表头工具栏 -->
+          <template v-slot:toolbar>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              class="ele-btn-icon"
+              @click="synchronous()"
+              >同步</el-button
+            >
+          </template>
+
+          <template v-slot:code="{ row }">
+            <el-link type="primary" :underline="false" @click="openDetail(row)">
+              {{ row.code }}</el-link
+            >
+          </template>
+
+          <!-- 状态列 -->
+          <template v-slot:status="{ row }">
+            {{ checkStatus(row) }}
+          </template>
+
+          <template v-slot:routeType="{ row }">
+            {{ row.routeType == 2 ? '委外' : '生产' }}
+          </template>
+        </ele-pro-table>
+      </el-card>
+      <div class="btns">
+        <el-button type="primary" size="small" @click="selected"
+          >选择</el-button
+        >
+        <el-button size="small" @click="handleClose">关闭</el-button>
+      </div>
+      <UserDetail
+        :visible.sync="detailEdit"
+        :data="current"
+        @close="detailEdit = false"
+      ></UserDetail>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import {
+    workingProcedureUpdate,
+    workingProcedureSave
+  } from '@/api/material/BOM';
+  import { pageList } from '@/api/technology/version/version.js';
+  import UserDetail from './user-detail.vue';
+  import route from '@/api/technology/route';
+  export default {
+    name: 'technologyRoute',
+    components: {
+      UserDetail
+    },
+    data() {
+      return {
+        visible: false,
+        selection: [],
+        versionList: [],
+        where: {},
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            reserveSelection: true,
+            selectable: (row, index) => {
+              return this.tableData.processRoute
+                ? !this.tableData.processRoute.list.some(
+                    (it) => it.id == row.id
+                  )
+                : true;
+            },
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '工艺路线组编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110,
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '工艺路线名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+
+          {
+            prop: 'version',
+            label: '工艺路线版本',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            prop: 'produceVersionName',
+            label: '生产版本',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            slot: 'status',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            slot: 'routeType',
+            label: '类型',
+            align: 'center',
+            showOverflowTooltip: true
+          }
+        ],
+
+        // 表格选中数据
+        selection: [],
+        // 当前编辑数据
+        current: null,
+        // 是否显示编辑弹窗
+        showEdit: false,
+        detailEdit: false,
+
+        statusList: [
+          { label: '草稿', value: -1 },
+          { label: '失效', value: 0 },
+          { label: '生效', value: 1 }
+        ],
+        loading: false
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created() {
+      this.getVersionList();
+    },
+    methods: {
+      reset() {
+        this.where = {};
+        this.search();
+      },
+      handleClose() {
+        this.visible = false;
+      },
+      open(treeData, tableData) {
+        this.treeData = treeData;
+        console.log(tableData);
+        this.tableData = tableData;
+        this.visible = true;
+      },
+      selected() {
+        let routingId = this.selection.map((it) => it.id);
+        route.getProcessById(routingId).then((data) => {
+          console.log(this.tableData);
+          if (this.tableData.taskParam) {
+            let newArr = [];
+            for (let i = 0; i < data.length; i++) {
+              let isHas = false;
+              for (let j = 0; j < this.tableData.taskParam.length; j++) {
+                if (data[i].name == this.tableData.taskParam[j].name) {
+                  isHas = true;
+                  break;
+                }
+              }
+              if (!isHas) {
+                newArr.push(data[i]);
+              }
+            }
+            workingProcedureUpdate({
+              id: this.tableData.id,
+              categoryId: this.treeData.categoryId,
+              bomCategoryId: this.treeData.id,
+              categoryCode: this.treeData.categoryCode,
+              processRoute: {
+                list: this.tableData.processRoute.list.concat(this.selection)
+              },
+              taskParam: this.tableData.taskParam.concat(newArr)
+            }).then(() => {
+              this.$emit('reload');
+              this.visible = false;
+            });
+          } else {
+            workingProcedureSave({
+              categoryId: this.treeData.categoryId,
+              bomCategoryId: this.treeData.id,
+              categoryCode: this.treeData.categoryCode,
+              processRoute: {
+                list: this.selection
+              },
+              taskParam: data.map((item) => {
+                return {
+                  ...item,
+                  versions: this.treeData.versions,
+                  status: this.treeData.status
+                };
+              })
+            }).then(() => {
+              this.$emit('reload');
+              this.visible = false;
+            });
+          }
+        });
+      },
+      async getVersionList() {
+        const res = await pageList({
+          pageNum: 1,
+          size: 100
+        });
+
+        this.versionList = res.list;
+      },
+      search() {
+        this.reload(this.where);
+      },
+      /* 表格数据源 */
+      async datasource({ page, limit, where, order }) {
+        const res = await route.list({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit
+        });
+        return res;
+      },
+
+      checkStatus(row) {
+        let obj = this.statusList.find((it) => it.value == row.status);
+        return obj.label;
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
+      openDetail(row) {
+        this.current = row;
+        this.detailEdit = true;
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+</style>

+ 261 - 0
src/views/material/BOMmanage/components/user-detail.vue

@@ -0,0 +1,261 @@
+<!-- 用户编辑弹窗 -->
+<template>
+  <ele-modal
+    width="1060px"
+    :visible="visible"
+    :append-to-body="true"
+    :close-on-click-modal="false"
+    custom-class="ele-dialog-form"
+    title="工艺详情"
+    @update:visible="updateVisible"
+  >
+    <header-title title="基本信息"> </header-title>
+    <el-form ref="form" :model="form" :rules="rules" label-width="140px">
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="工艺路线组编码:" prop="code">
+            {{ form.code }}
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="工艺路线组名称:" prop="name">
+            {{ form.name }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="所属工厂:" prop="factoryId">
+            <el-select
+              v-model="form.factoryId"
+              placeholder="请选择"
+              filterable
+              disabled
+            >
+              <el-option
+                v-for="item in fList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="生产版本:" prop="produceVersionId">
+            <el-select
+              v-model="form.produceVersionId"
+              filterable
+              placeholder="请选择"
+              :style="{ width: '100%' }"
+              disabled
+            >
+              <el-option
+                v-for="item in versionList"
+                :key="item.code"
+                :label="item.code + '-' + item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="工艺路线版本:" prop="version">
+            {{ form.version }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="状态:" prop="status">
+            <el-select v-model="form.status" placeholder="" filterable disabled>
+              <el-option
+                v-for="item in statusList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :datasource="datasource"
+      row-key="id"
+    >
+      <template v-slot:orderNum="{ row }">
+        {{ row.orderNum }}
+      </template>
+    </ele-pro-table>
+
+    <template v-slot:footer>
+      <el-button type="primary" @click="save"> 确定 </el-button>
+    </template>
+  </ele-modal>
+</template>
+
+<script>
+  import route from '@/api/technology/route';
+  import { pageList } from '@/api/technology/version/version.js';
+
+  export default {
+    components: {},
+    props: {
+      // 弹窗是否打开
+      visible: Boolean,
+      // 修改回显的数据
+      data: Object
+    },
+    data() {
+      const defaultForm = {
+        code: '',
+        name: '',
+        factoryId: '',
+        status: -1,
+        categoryId: '',
+        produceVersionId: '',
+        version: '1.0',
+        id: ''
+      };
+      return {
+        defaultForm,
+        fList: [], //仓库列表
+
+        // 表单数据
+        form: { ...defaultForm },
+
+        statusList: [
+          { label: '草稿', value: -1 },
+          { label: '失效', value: 0 },
+          { label: '生效', value: 1 }
+        ],
+
+        // 表单验证规则
+        rules: {},
+        versionList: [],
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false,
+
+        columns: [
+          {
+            prop: 'orderNum',
+            label: '排序',
+            align: 'center',
+            slot: 'orderNum',
+            minWidth: 120
+          },
+          {
+            prop: 'code',
+            label: '工序编码',
+            // sortable: 'custom',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+
+          {
+            prop: 'name',
+            label: '工序名称',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            align: 'center',
+            prop: 'controlName',
+            label: '工序控制码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'workCenterName',
+            label: '所属工作中心',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          }
+        ]
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    methods: {
+      /* 表格数据源 */
+      async datasource({ page, limit, where }) {
+        if (this.data.id) {
+          const res = await route.taskinstanceList({
+            routingId: this.data.id,
+            isDetail: true,
+            pageNum: 1,
+            size: -1
+          });
+
+          let arr = res.list.map((it) => {
+            it.detail.orderNum = it.orderNum;
+            return it.detail;
+          });
+          return {
+            list: arr
+          };
+        }
+      },
+
+      /* 保存编辑 */
+      save() {
+        this.$emit('close');
+      },
+
+      async getVersionList() {
+        const res = await pageList({
+          pageNum: 1,
+          size: 100
+        });
+
+        this.versionList = res.list;
+      },
+
+      /* 更新visible */
+      updateVisible(value) {
+        this.$emit('update:visible', value);
+      }
+    },
+
+    watch: {
+      async visible(visible) {
+        if (visible) {
+          this.getVersionList();
+          const res = await route.Flist({
+            pageNum: 1,
+            size: -1,
+            type: 1
+          });
+          this.fList = res.list;
+          if (this.data) {
+            const res = await route.getById(this.data.id);
+            this.$util.assignObject(this.form, {
+              ...res
+            });
+
+            this.isUpdate = true;
+          }
+        } else {
+          this.$refs.form.clearValidate();
+          this.form = { ...this.defaultForm };
+        }
+      }
+    }
+  };
+</script>