2213980799@qq.com 1 rok pred
rodič
commit
892fbc1971

+ 43 - 0
src/api/bpm/components/changeManagement/notice.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request';
+
+/**
+ * 列表
+ */
+export async function getNoticeList (data) {
+  const res = await request.post('/main/change_notice/page', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//新建/修改
+export async function noticeSave(data) {
+  const res = await request.post('/main/change_notice/' + (data.id ? 'update' : 'add'), data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 删除
+ */
+ export async function remove(data) {
+  const res = await request.delete('/main/change_notice/delete', { data });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 详情
+ */
+ export async function noticeDetails(id) {
+  const res = await request.get(`/main/change_notice/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+

+ 41 - 0
src/api/bpm/components/changeManagement/question.js

@@ -0,0 +1,41 @@
+import request from '@/utils/request';
+
+/**
+ * 列表
+ */
+export async function getQuestionList (data) {
+  const res = await request.post('/main/problem_report/page', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//新建/修改
+export async function questionSave(data) {
+  const res = await request.post('/main/problem_report/' + (data.id ? 'update' : 'add'), data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 删除
+ */
+ export async function remove(data) {
+  const res = await request.delete('/main/problem_report/delete', { data });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 详情
+ */
+ export async function questionDetails(id) {
+  const res = await request.get(`/main/problem_report/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 41 - 0
src/api/bpm/components/changeManagement/request.js

@@ -0,0 +1,41 @@
+import request from '@/utils/request';
+
+/**
+ * 列表
+ */
+export async function getRequestList (data) {
+  const res = await request.post('/main/change_request/page', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//新建/修改
+export async function requestSave(data) {
+  const res = await request.post('/main/change_request/' + (data.id ? 'update' : 'add'), data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 删除
+ */
+ export async function remove(data) {
+  const res = await request.delete('/main/change_request/delete', { data });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 详情
+ */
+ export async function requestDetails(id) {
+  const res = await request.get(`/main/change_request/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 2 - 1
src/enum/dict.js

@@ -76,7 +76,8 @@ export default {
   异常类型: 'Exception_type',
   异常判定: 'Exception_decide',
   异常处置: 'Exception_dispose',
-
+  问题类型: 'question_type',
+  变更类型: 'change_type',
 };
 
 export const numberList = [

+ 104 - 0
src/views/bpm/handleTask/components/changeManagement/EquipmentDialog.vue

@@ -0,0 +1,104 @@
+<template>
+  <el-dialog
+    title="关联变更"
+    :visible.sync="equipmentdialog"
+    :before-close="handleClose"
+    :close-on-click-modal="true"
+    :close-on-press-escape="false"
+    append-to-body
+    width="60%"
+  >
+    <div>
+      <tableLIst ref="tableLIstRef"></tableLIst>
+    </div>
+
+    <div>
+      <ele-pro-table
+        ref="table"
+        :columns="questionColumns"
+        :datasource="tableList"
+        :selection.sync="selection"
+        row-key="id"
+        height="20vh"
+        :needPage="false"
+      >
+        <template v-slot:category="{ row }">
+          <span v-for="item in row.category.split(',')" :key="item">
+            {{ getDictValue('问题类型', item) }}</span
+          >
+        </template>
+        <template v-slot:type="{ row }">
+        <span>{{ getDictValue('变更类型', row.type + '') }}</span>
+      </template>
+        <template v-slot:toolbar>
+          <el-button type="primary" size="small" @click="add">添加</el-button>
+          <el-button size="small" @click="del">移除</el-button></template
+        >
+      </ele-pro-table>
+    </div>
+    <template v-slot:footer>
+      <el-button type="primary" size="small" @click="selected">确认</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import tableLIst from './tableLIst.vue';
+import { questionColumns } from './data.js';
+import dictMixins from '@/mixins/dictMixins';
+
+export default {
+  components: { tableLIst },
+  mixins: [dictMixins],
+
+  data() {
+    return {
+      questionColumns: questionColumns.filter(
+        (item) => item.columnKey != 'action'&&item.prop != 'objType'
+      ),
+      equipmentdialog: false,
+      tableList: [],
+      selection: []
+    };
+  },
+
+  watch: {},
+  methods: {
+    open(data) {
+      this.tableList = JSON.parse(JSON.stringify(data));
+      this.equipmentdialog = true;
+    },
+
+    reload() {
+      this.$refs.equiTable.reload();
+    },
+    handleClose() {
+      this.equipmentdialog = false;
+    },
+    reset() {
+      this.reload();
+    },
+    add() {
+      if (this.$refs.tableLIstRef.getValue().length == 0) {
+        return;
+      }
+      let ids = this.tableList.map((item) => item.id);
+      let getValue = this.$refs.tableLIstRef
+        .getValue()
+        .filter((item) => !ids.includes(item.id)); //去重
+      this.tableList.push(...getValue);
+    },
+    del() {
+      let ids = this.selection.map((item) => item.id);
+      this.tableList = this.tableList.filter((item) => !ids.includes(item.id));
+    },
+    // 选择
+    selected() {
+      this.$emit('choose', JSON.parse(JSON.stringify(this.tableList)));
+      this.handleClose();
+    }
+  }
+};
+</script>
+

+ 179 - 0
src/views/bpm/handleTask/components/changeManagement/changeInfo.vue

@@ -0,0 +1,179 @@
+<template>
+  <el-form
+    ref="form"
+    :model="form"
+    :rules="rules"
+    label-width="100px"
+    class="create-form"
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="名称:" prop="name">
+          <el-input v-model="form.name" :disabled="disabled" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="编码:" prop="code">
+          <el-input v-model="form.code" disabled />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="类型:" prop="type">
+          <DictSelection
+            dictName="变更类型"
+            v-model="form.type"
+            :disabled="disabled"
+          ></DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="类别:" prop="category">
+          <DictSelection
+            multiple
+            dictName="问题类型"
+            v-model="form.category"
+            :disabled="disabled"
+          ></DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="变更原因:">
+          <el-input
+            v-model="form.changeReason"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="可行性分析:">
+          <el-input
+            v-model="form.feasibilityAnalysis"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="描述:">
+          <el-input
+            v-model="form.problemDescription"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item
+          label="接收人"
+          prop="recipientId"
+          style="margin-bottom: 20px"
+        >
+          <el-select
+            v-model="form.recipientId"
+            clearable
+            style="width: 100%"
+            :filterable="true"
+            :disabled="disabled"
+          >
+            <el-option
+              v-for="item in userOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+              @click.native="userChange(item)"
+            />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item prop="accessory" label="相关文档">
+          <fileUpload
+            v-model="form.accessory"
+            module="main"
+            :limit="5"
+            :disabled="disabled"
+            :showLib="false"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+import fileUpload from '@/components/upload/fileUpload';
+import { listAllUserBind } from '@/api/system/organization';
+
+import { infoForm } from './data.js';
+
+export default {
+  components: { fileUpload },
+  data() {
+    return {
+      visible: false,
+      loading: false,
+      userOptions: [],
+      form: { ...infoForm() },
+      // 表单验证规则
+      rules: {
+        type: [{ required: true, message: '请选择', trigger: 'change' }],
+        name: [{ required: true, message: '请选择', trigger: 'change' }],
+        relationType: [{ required: true, message: '请选择', trigger: 'change' }]
+      },
+      type: '',
+      title: '创建'
+    };
+  },
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  created() {
+    this.userOptions = [];
+    listAllUserBind().then((data) => {
+      this.userOptions.push(...data);
+    });
+  },
+  methods: {
+    cancel() {
+      this.form = { ...infoForm() };
+    },
+    open(row) {
+      if (row) {
+        this.form = row;
+      }
+    },
+    setValue(data) {
+      this.form = JSON.parse(JSON.stringify(data));
+    },
+    userChange(item) {
+      this.form.recipientName = item.name;
+    },
+    /* 保存编辑 */
+    async getValue() {
+      const valid = await this.validateFn();
+      this.form.objType = '2';
+      return valid ? JSON.parse(JSON.stringify(this.form)) : '';
+    },
+    validateFn() {
+      return new Promise((resolve, reject) => {
+        this.$refs.form.validate((valid) => {
+          resolve(valid);
+        });
+      });
+    }
+  }
+};
+</script>

+ 326 - 0
src/views/bpm/handleTask/components/changeManagement/create.vue

@@ -0,0 +1,326 @@
+<template>
+  <div>
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-width="100px"
+      class="create-form"
+    >
+      <el-row :gutter="15">
+        <headerTitle style="margin-top: 15px" title="基本信息"></headerTitle>
+        <questionInfo
+          ref="info"
+          v-if="form.objType == 1"
+          :disabled="type == 'detail'"
+        />
+        <changeInfo
+          ref="info"
+          v-if="form.objType == 2"
+          :disabled="type == 'detail'"
+        />
+        <noticeInfo
+          ref="info"
+          v-if="form.objType == 3"
+          :disabled="type == 'detail'"
+        />
+      </el-row>
+      <el-row :gutter="15">
+        <headerTitle style="margin-top: 15px" title="关联变更"></headerTitle>
+
+        <ele-pro-table
+          ref="table"
+          :columns="questionColumns"
+          :datasource="this.form.relationObjList"
+          height="10vh"
+          :selection.sync="selection"
+          :needPage="false"
+        >
+          <template v-slot:category="{ row }">
+            <span v-for="item in row.category.split(',')" :key="item">
+              {{ getDictValue('问题类型', item) }}</span
+            >
+          </template>
+          <template v-slot:type="{ row }">
+            <span>{{ getDictValue('变更类型', row.type + '') }}</span>
+          </template>
+          <template v-slot:toolbar>
+            <el-button
+              v-if="type != 'detail'"
+              size="small"
+              @click="del('selection', 'relationObjList')"
+              >移除</el-button
+            ></template
+          >
+        </ele-pro-table>
+        <div
+          class="add-product"
+          v-if="type != 'detail'"
+          @click="addEquipment('EquipmentDialogRef', 'relationObjList')"
+        >
+          <i class="el-icon-circle-plus-outline"></i>
+        </div>
+      </el-row>
+      <el-row :gutter="15">
+        <headerTitle style="margin-top: 15px" title="问题对象"></headerTitle>
+
+        <ele-pro-table
+          ref="table"
+          :columns="objColumns"
+          :datasource="this.form.problemObjList"
+          height="10vh"
+          :selection.sync="objSelection"
+          :needPage="false"
+        >
+          <template v-slot:toolbar>
+            <el-button
+              v-if="type != 'detail'"
+              size="small"
+              @click="del('objSelection', 'problemObjList')"
+              >移除</el-button
+            ></template
+          >
+        </ele-pro-table>
+        <div
+          v-if="type != 'detail'"
+          class="add-product"
+          @click="addEquipment('objEquipmentDialogRef', 'problemObjList')"
+        >
+          <i class="el-icon-circle-plus-outline"></i>
+        </div>
+      </el-row>
+      <el-row :gutter="15">
+        <headerTitle style="margin-top: 15px" title="影响对象"></headerTitle>
+
+        <ele-pro-table
+          ref="table"
+          :columns="objColumns"
+          :datasource="this.form.influenceObjList"
+          height="10vh"
+          :selection.sync="influenceSelection"
+          :needPage="false"
+        >
+          <template v-slot:toolbar>
+            <el-button
+              v-if="type != 'detail'"
+              size="small"
+              @click="del('influenceSelection', 'influenceObjList')"
+              >移除</el-button
+            ></template
+          >
+        </ele-pro-table>
+        <div
+          v-if="type != 'detail'"
+          class="add-product"
+          @click="addEquipment('objEquipmentDialogRef', 'influenceObjList')"
+        >
+          <i class="el-icon-circle-plus-outline"></i>
+        </div>
+      </el-row>
+      <el-row :gutter="15">
+        <headerTitle style="margin-top: 15px" title="参考对象"></headerTitle>
+        <ele-pro-table
+          ref="table"
+          :columns="objColumns"
+          :datasource="this.form.referenceObjList"
+          height="10vh"
+          :selection.sync="influenceSelection"
+          :needPage="false"
+        >
+          <template v-slot:toolbar>
+            <el-button
+              size="small"
+              v-if="type != 'detail'"
+              @click="del('referenceSelection', 'referenceObjList')"
+              >移除</el-button
+            ></template
+          >
+        </ele-pro-table>
+        <div
+          v-if="type != 'detail'"
+          class="add-product"
+          @click="addEquipment('objEquipmentDialogRef', 'referenceObjList')"
+        >
+          <i class="el-icon-circle-plus-outline"></i>
+        </div>
+      </el-row>
+    </el-form>
+
+    <EquipmentDialog ref="EquipmentDialogRef" @choose="choose" />
+    <objEquipmentDialog ref="objEquipmentDialogRef" @choose="choose" />
+  </div>
+</template>
+
+<script>
+import questionInfo from './questionInfo';
+import changeInfo from './changeInfo';
+import noticeInfo from './noticeInfo';
+
+import EquipmentDialog from './EquipmentDialog';
+import objEquipmentDialog from './objEquipmentDialog';
+import dictMixins from '@/mixins/dictMixins';
+import { questionDetails } from '@/api/bpm/components/changeManagement/question';
+import { requestDetails } from '@/api/bpm/components/changeManagement/request';
+import { noticeDetails } from '@/api/bpm/components/changeManagement/notice';
+import { questionColumns, objColumns } from './data.js';
+
+const defaultForm = function () {
+  return {
+    relationObjList: [],
+    problemObjList: [],
+    influenceObjList: [],
+    referenceObjList: []
+  };
+};
+export default {
+  mixins: [dictMixins],
+
+  components: {
+    // workOrder,
+    // produceOrder,
+    questionInfo,
+    // productionPlan,
+    EquipmentDialog,
+    objEquipmentDialog,
+    changeInfo,
+    noticeInfo
+  },
+  data() {
+    //关联对象类型 objType 1:生产计划 2:生产订单 3:生产工单
+    //关联变更类型 objType 1:问题报告 2:变更申请 3:变更通知
+    return {
+
+      questionColumns: questionColumns.filter(
+        (item) => item.columnKey != 'action'
+      ),
+      objColumns,
+      visible: false,
+      loading: false,
+      form: { ...defaultForm() },
+      // 表单验证规则
+      rules: {
+        type: [{ required: true, message: '请选择', trigger: 'change' }],
+        name: [{ required: true, message: '请选择', trigger: 'change' }],
+        relationType: [{ required: true, message: '请选择', trigger: 'change' }]
+      },
+      activeList: '',
+      type: '',
+      title: '创建',
+      selection: [],
+      influenceSelection: [],
+      objSelection: [],
+      referenceSelection: []
+    };
+  },
+  props: {
+    businessId: {
+      default: ''
+    },
+    processDefinitionId: {
+      default: ''
+    },
+    taskDefinitionKey: {
+      default: ''
+    }
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    del(selection, list) {
+      let ids = this[selection].map((item) => item.id);
+      this.form[list] = this.form[list].filter(
+        (item) => !ids.includes(item.id)
+      );
+    },
+
+    addEquipment(ref, list) {
+      this.activeList = list;
+      this.$refs[ref].open(this.form[list]);
+    },
+    async init() {
+      let api = this.processDefinitionId.includes('change_notice_approve')
+        ? noticeDetails
+        : this.processDefinitionId.includes('change_request_approve')
+        ? requestDetails
+        : questionDetails;
+
+      let data = await api(this.businessId);
+      this.type = this.taskDefinitionKey == 'starter' ? 'edit' : 'detail';
+      this.form = JSON.parse(JSON.stringify(data));
+      this.form.category = this.form.category.split(',');
+      this.form.type = this.form.type + '';
+      this.$nextTick(() => {
+        this.$refs.info.setValue(this.form);
+      });
+    },
+
+    choose(data) {
+      this.form[this.activeList] = data;
+      if (this.activeList == 'relationObjList') {
+        this.getChangeData();
+      }
+    },
+    getChangeData() {
+      ['problemObjList', 'influenceObjList', 'referenceObjList'].forEach(
+        (key) => {
+          this.form[key] = [];
+        }
+      );
+      //获取关联数据
+      this.form.relationObjList.forEach(async (item) => {
+        let api =
+          item.objType == 1
+            ? questionDetails
+            : item.objType == 2
+            ? requestDetails
+            : noticeDetails;
+        const data = await api(item.id);
+        ['problemObjList', 'influenceObjList', 'referenceObjList'].forEach(
+          (key) => {
+            this.form[key].push(...data[key]);
+          }
+        );
+      });
+    },
+    /* 保存编辑 */
+    async getTableValue() {
+      // let data = JSON.parse(JSON.stringify(this.form));
+      let infoData = await this.$refs.info.getValue();
+      if (!infoData) {
+        return;
+      }
+      infoData.category = infoData.category.toString();
+      Object.assign(infoData, {
+        relationObjList: this.form.relationObjList,
+        problemObjList: this.form.problemObjList,
+        influenceObjList: this.form.influenceObjList,
+        referenceObjList: this.form.referenceObjList
+      });
+      return infoData;
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.add-product {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  font-size: 30px;
+  color: #1890ff;
+  margin: 10px 0;
+  cursor: pointer;
+}
+
+.create-form .el-form-item {
+  margin-bottom: 15px !important;
+}
+</style>

+ 367 - 0
src/views/bpm/handleTask/components/changeManagement/data.js

@@ -0,0 +1,367 @@
+export const infoForm = function () {
+    return {
+        "name": "",
+        "problemSourceId": '',  //问题来源
+        "problemSourceCode": "",
+        "problemDescription": "",
+        "accessory": [
+
+        ],//附件
+        "approvalStatus": '', //审批状态
+        "reportUserId": '',  //提出人id
+        "reportUserName": "",
+        "recipientId": '',  //接收人人id
+        "recipientName": "",
+        "status": '',  //状态
+        "processInstanceId": "",  //流程实例id
+        "type": '',  //类型
+        "category": [], //类别
+        "objType": '',  //对象类型
+        changeReason: '',
+        "changeContent": "",
+        "createUserName": ""
+    };
+};
+
+export const questionColumns = [
+    {
+        columnKey: 'selection',
+        type: 'selection',
+        width: 45,
+        align: 'center',
+        fixed: 'left'
+    },
+    {
+        columnKey: 'index',
+        label: '序号',
+        type: 'index',
+        width: 55,
+        align: 'center',
+        showOverflowTooltip: true,
+        fixed: 'left'
+    },
+    {
+        prop: 'objType',
+        label: '对象类型',
+        align: 'center',
+        formatter: (row, column, cellValue) => {
+            return cellValue == 1 ? '问题报告' : cellValue == 2 ? '变更申请' : cellValue == 3 ? '变更通知' : ''
+        }
+
+    },
+    {
+        prop: 'code',
+        label: '编码',
+        align: 'center',
+        slot: 'code',
+
+    },
+    {
+        prop: 'name',
+        label: '名称',
+        align: 'center'
+    },
+    {
+        prop: 'problemDescription',
+        label: '问题描述',
+        align: 'center'
+    },
+    {
+        prop: 'type',
+        label: '类型',
+        align: 'center',
+        slot: 'type'
+    },
+    {
+        prop: 'category',
+        label: '类别',
+        align: 'center',
+        slot: 'category'
+    },
+    {
+        prop: 'departmentName',
+        label: '提出部门',
+        align: 'center',
+    },
+    {
+        prop: 'reportUserName',
+        label: '提出人',
+        align: 'center'
+    },
+    {
+        prop: 'createTime',
+        label: '提出时间',
+        align: 'center'
+    },
+
+    {
+        prop: 'recipientName',
+        label: '接收人',
+        align: 'center'
+    },
+    {
+        prop: 'approvalStatus',
+        label: '状态',
+        align: 'center',
+        slot: 'approvalStatus'
+    },
+
+    {
+        columnKey: 'action',
+        label: '操作',
+        width: 240,
+        align: 'center',
+        resizable: false,
+        fixed: 'right',
+        slot: 'action',
+        showOverflowTooltip: true
+    }
+];
+export const requestColumns = [
+    {
+        columnKey: 'selection',
+        type: 'selection',
+        width: 45,
+        align: 'center',
+        fixed: 'left'
+    },
+    {
+        columnKey: 'index',
+        label: '序号',
+        type: 'index',
+        width: 55,
+        align: 'center',
+        showOverflowTooltip: true,
+        fixed: 'left'
+    },
+
+    {
+        prop: 'code',
+        label: '编码',
+        align: 'center',
+        slot: 'code',
+
+    },
+    {
+        prop: 'name',
+        label: '名称',
+        align: 'center'
+    },
+    {
+        prop: 'changeReason',
+        label: '变更原因',
+        align: 'center'
+    },
+    {
+        prop: 'feasibilityAnalysis',
+        label: '可行性分析',
+        align: 'center'
+    },
+    {
+        prop: 'type',
+        label: '类型',
+        align: 'center',
+        slot: 'type'
+    },
+    {
+        prop: 'category',
+        label: '类别',
+        align: 'center',
+        slot: 'category'
+    },
+    {
+        prop: 'recipientName',
+        label: '接收人',
+        align: 'center'
+    },
+    {
+        prop: 'problemDescription',
+        label: '描述',
+        align: 'center'
+    },
+    {
+        prop: 'departmentName',
+        label: '申请部门',
+        align: 'center',
+    },
+    {
+        prop: 'reportUserName',
+        label: '申请人',
+        align: 'center'
+    },
+    {
+        prop: 'createTime',
+        label: '提出时间',
+        align: 'center'
+    },
+
+
+    {
+        prop: 'approvalStatus',
+        label: '状态',
+        align: 'center',
+        slot: 'approvalStatus'
+    },
+
+    {
+        columnKey: 'action',
+        label: '操作',
+        width: 240,
+        align: 'center',
+        resizable: false,
+        fixed: 'right',
+        slot: 'action',
+        showOverflowTooltip: true
+    }
+];
+export const noticeColumns = [
+    {
+        columnKey: 'selection',
+        type: 'selection',
+        width: 45,
+        align: 'center',
+        fixed: 'left'
+    },
+    {
+        columnKey: 'index',
+        label: '序号',
+        type: 'index',
+        width: 55,
+        align: 'center',
+        showOverflowTooltip: true,
+        fixed: 'left'
+    },
+
+    {
+        prop: 'code',
+        label: '编码',
+        align: 'center',
+        slot: 'code',
+
+    },
+    {
+        prop: 'name',
+        label: '名称',
+        align: 'center'
+    },
+    {
+        prop: 'changeReason',
+        label: '变更原因',
+        align: 'center'
+    },
+    {
+        prop: 'changeContent',
+        label: '变更内容',
+        align: 'center'
+    },
+    {
+        prop: 'type',
+        label: '类型',
+        align: 'center',
+        slot: 'type'
+    },
+    {
+        prop: 'category',
+        label: '类别',
+        align: 'center',
+        slot: 'category'
+    },
+    {
+        prop: 'recipientName',
+        label: '通知人员',
+        align: 'center'
+    },
+    {
+        prop: 'problemDescription',
+        label: '描述',
+        align: 'center'
+    },
+    {
+        prop: 'createTime',
+        label: '创建时间',
+        align: 'center'
+    },
+    {
+        prop: 'createUserName',
+        label: '创建人',
+        align: 'center'
+    },
+
+
+    {
+        prop: 'approvalStatus',
+        label: '状态',
+        align: 'center',
+        slot: 'approvalStatus'
+    },
+
+    {
+        columnKey: 'action',
+        label: '操作',
+        width: 240,
+        align: 'center',
+        resizable: false,
+        fixed: 'right',
+        slot: 'action',
+        showOverflowTooltip: true
+    }
+];
+export const objColumns = [
+    {
+        columnKey: 'selection',
+        type: 'selection',
+        width: 45,
+        align: 'center',
+        fixed: 'left'
+    },
+    {
+        columnKey: 'index',
+        label: '序号',
+        type: 'index',
+        width: 55,
+        align: 'center',
+        showOverflowTooltip: true,
+        fixed: 'left'
+    },
+    {
+        prop: 'objType',
+        label: '对象类型',
+        align: 'center',
+        formatter: (row, column, cellValue) => {
+            return cellValue == 1 ? '生产计划' : cellValue == 2 ? '生产订单' : cellValue == 3 ? '生产工单' : ''
+        }
+
+    },
+    {
+        prop: 'code',
+        label: '编码',
+        align: 'center',
+        slot: 'code',
+
+    },
+    {
+        prop: 'name',
+        label: '名称',
+        align: 'center'
+    },
+
+    {
+        prop: 'status',
+        label: '状态',
+        align: 'center',
+    }
+    ,
+
+    {
+        prop: 'createUserName',
+        label: '创建人',
+        align: 'center',
+    }
+    ,
+
+    {
+        prop: 'createTime',
+        label: '创建时间',
+        align: 'center',
+    }
+];

+ 181 - 0
src/views/bpm/handleTask/components/changeManagement/noticeInfo.vue

@@ -0,0 +1,181 @@
+<template>
+  <el-form
+    ref="form"
+    :model="form"
+    :rules="rules"
+    label-width="100px"
+    class="create-form"
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="名称:" prop="name">
+          <el-input v-model="form.name" :disabled="disabled" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="编码:" prop="code">
+          <el-input v-model="form.code" disabled />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="类型:" prop="type">
+          <DictSelection
+            dictName="变更类型"
+            v-model="form.type"
+            :disabled="disabled"
+          ></DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="类别:" prop="category">
+          <DictSelection
+            multiple
+            dictName="问题类型"
+            v-model="form.category"
+            :disabled="disabled"
+          ></DictSelection>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="变更原因:">
+          <el-input
+            v-model="form.changeReason"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="变更内容:">
+          <el-input
+            v-model="form.changeContent"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="描述:">
+          <el-input
+            v-model="form.problemDescription"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item
+          label="通知人员"
+          prop="recipientId"
+          style="margin-bottom: 20px"
+        >
+          <el-select
+            v-model="form.recipientId"
+            clearable
+            style="width: 100%"
+            :filterable="true"
+            :disabled="disabled"
+          >
+            <el-option
+              v-for="item in userOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+              @click.native="userChange(item)"
+            />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item prop="accessory" label="相关文档">
+          <fileUpload
+            v-model="form.accessory"
+            module="main"
+            :limit="5"
+            :disabled="disabled"
+            :showLib="false"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+import fileUpload from '@/components/upload/fileUpload';
+import { listAllUserBind } from '@/api/system/organization';
+
+import { infoForm } from './data.js';
+
+export default {
+  components: { fileUpload },
+  data() {
+    return {
+      visible: false,
+      loading: false,
+      userOptions: [],
+      form: { ...infoForm() },
+      // 表单验证规则
+      rules: {
+        type: [{ required: true, message: '请选择', trigger: 'change' }],
+        name: [{ required: true, message: '请选择', trigger: 'change' }],
+        relationType: [{ required: true, message: '请选择', trigger: 'change' }]
+      },
+      type: '',
+      title: '创建'
+    };
+  },
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  created() {
+    this.userOptions = [];
+    listAllUserBind().then((data) => {
+      this.userOptions.push(...data);
+    });
+  },
+  methods: {
+    cancel() {
+      this.form = { ...infoForm() };
+    },
+    setValue(data) {
+      this.form = JSON.parse(JSON.stringify(data));
+    },
+    open(row) {
+      if (row) {
+        this.form = row;
+      }
+    },
+    userChange(item) {
+      this.form.recipientName = item.name;
+    },
+    /* 保存编辑 */
+    async getValue() {
+      const valid = await this.validateFn();
+      this.form.objType = '3';
+      return valid ? JSON.parse(JSON.stringify(this.form)) : '';
+    },
+    validateFn() {
+      return new Promise((resolve, reject) => {
+        this.$refs.form.validate((valid) => {
+          resolve(valid);
+        });
+      });
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 252 - 0
src/views/bpm/handleTask/components/changeManagement/objEquipmentDialog.vue

@@ -0,0 +1,252 @@
+<template>
+  <el-dialog
+    title="问题对象"
+    :visible.sync="equipmentdialog"
+    :before-close="handleClose"
+    :close-on-click-modal="true"
+    :close-on-press-escape="false"
+    append-to-body
+    width="60%"
+  >
+    <el-row>
+      <el-col :span="6">
+        <el-form
+          label-width="90px"
+          style="padding: 10px"
+          class="ele-form-search"
+          @keyup.enter.native="search"
+          @submit.native.prevent
+        >
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="批号:">
+                <el-input
+                  v-model="where.batchNo"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="编号:">
+                <el-input v-model="where.code" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="名称:">
+                <el-input v-model="where.name" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="产品编码:">
+                <el-input
+                  v-model="where.productCode"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item label="产品名称:">
+                <el-input
+                  v-model="where.productName"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="牌号:">
+                <el-input
+                  v-model="where.brandNo"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="型号:">
+                <el-input v-model="where.model" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="规格:">
+                <el-input v-model="where.specification" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <div class="ele-form-actions" style="display:flex;justify-content: end;margin-top: 15px;" >
+                <el-button
+                  type="primary"
+                  icon="el-icon-search"
+                  class="ele-btn-icon"
+                  @click="search"
+                >
+                  查询
+                </el-button>
+                <el-button
+                  @click="reset"
+                  icon="el-icon-refresh-left"
+                  type="primary"
+                  >重置</el-button
+                >
+              </div>
+            </el-col>
+          </el-row> </el-form
+      ></el-col>
+      <el-col :span="18"
+        ><div>
+          <div class="switch">
+            <div class="switch_left">
+              <ul>
+                <li
+                  v-for="item in tabOptions"
+                  :key="item.key"
+                  :class="{ active: activeComp == item.key }"
+                  @click="activeComp = item.key"
+                >
+                  {{ item.name }}
+                </li>
+              </ul>
+            </div>
+          </div>
+        </div>
+        <productionPlan
+          v-if="activeComp == 'productionPlan'"
+          ref="productionPlan"
+        />
+        <workOrder v-if="activeComp == 'workOrder'" ref="workOrder" />
+        <produceOrder v-if="activeComp == 'produceOrder'" ref="produceOrder" />
+        <div>
+          <ele-pro-table
+            ref="table"
+            :columns="objColumns"
+            :datasource="tableList"
+            :selection.sync="selection"
+            row-key="id"
+            height="20vh"
+            :needPage="false"
+          >
+            <template v-slot:toolbar>
+              <el-button type="primary" size="small" @click="add"
+                >添加</el-button
+              >
+              <el-button size="small" @click="del">移除</el-button></template
+            >
+          </ele-pro-table>
+        </div></el-col
+      >
+    </el-row>
+
+    <template v-slot:footer>
+      <el-button type="primary" size="small" @click="selected">确认</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+// 默认表单数据
+const defaultWhere = {
+  code: '',
+  name: '',
+  productCode: '',
+  productName: '',
+  brandNo: '',
+  model: '',
+  batchNo:"",
+  specification:''
+};
+import { objColumns } from './data.js';
+import dictMixins from '@/mixins/dictMixins';
+import productionPlan from './productionPlan';
+import workOrder from './workOrder';
+import produceOrder from './produceOrder';
+export default {
+  components: { productionPlan, workOrder, produceOrder },
+  mixins: [dictMixins],
+
+  data() {
+    return {
+      activeComp: 'productionPlan',
+      where: {...defaultWhere},
+      tabOptions: [
+        { key: 'productionPlan', name: '生产计划' },
+        { key: 'workOrder', name: '生产订单' },
+        { key: 'produceOrder', name: '生产工单' }
+      ],
+      objColumns: objColumns,
+      equipmentdialog: false,
+      tableList: [],
+      selection: []
+    };
+  },
+
+  watch: {},
+  methods: {
+    open(data) {
+      this.tableList = (data && JSON.parse(JSON.stringify(data))) || [];
+      this.equipmentdialog = true;
+    },
+
+    reload() {
+      this.$refs.equiTable.reload();
+    },
+    handleClose() {
+      this.equipmentdialog = false;
+    },
+    reset() {
+      this.reload();
+    },
+    add() {
+      const planStatus = [
+        { label: '待发布', value: '2' },
+        { label: '发布失败', value: '3' },
+        { label: '待生产', value: '4' },
+        { label: '生产中', value: '5' },
+        { label: '已完成', value: '6' },
+        { label: '已延期', value: '7' },
+        { label: '待下达', value: '8' }
+      ];
+      if (this.$refs[this.activeComp].getValue().length == 0) {
+        return;
+      }
+      let ids = this.tableList.map((item) => item.id);
+      let getValue = this.$refs[this.activeComp]
+        .getValue()
+        .filter((item) => !ids.includes(item.id)); //去重
+      getValue.forEach((element) => {
+        element.status = planStatus.find(
+          (item) => item.value == element.status
+        ).label;
+      });
+      this.tableList.push(...getValue);
+    },
+    del() {
+      let ids = this.selection.map((item) => item.id);
+      this.tableList = this.tableList.filter((item) => !ids.includes(item.id));
+    },
+    // 选择
+    selected() {
+      this.$emit('choose', JSON.parse(JSON.stringify(this.tableList)));
+      this.handleClose();
+    },
+    /* 搜索 */
+    search() {
+      this.$refs[this.activeComp].reload(this.where)
+    },
+    /*  重置 */
+    reset() {
+      this.where = { ...defaultWhere };
+      this.search();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+:deep(.el-row) {
+  margin-bottom: 20px;
+  &:last-child {
+    margin-bottom: 0;
+  }
+}
+</style>
+
+

+ 233 - 0
src/views/bpm/handleTask/components/changeManagement/produceOrder.vue

@@ -0,0 +1,233 @@
+<template>
+  <ele-pro-table
+    ref="equiTable"
+    :columns="columns"
+    :datasource="datasource"
+    :selection.sync="selection"
+    :current.sync="current"
+    highlight-current-row
+    row-key="id"
+    height="20vh"
+  >
+  </ele-pro-table>
+</template>
+
+<script>
+import { produceOrder } from '@/api/bpm/components/exceptionManagement';
+
+export default {
+  components: {},
+  props: {
+    selectList: Array,
+    type: {
+      default: 1 //1多选 2单选
+    }
+  },
+  data() {
+    return {
+      planType: [
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' }
+      ],
+      equipmentdialog: false,
+      current: null,
+      columns: [
+        {
+          width: 45,
+          type: 'selection',
+          columnKey: 'selection',
+          align: 'center',
+          reserveSelection: true,
+          show: this.type == 1
+        },
+        {
+          label: '生产工单号',
+          align: 'center',
+          prop: 'code',
+          showOverflowTooltip: true,
+          minWidth: 180,
+          fixed: 'left'
+        },
+
+        {
+          prop: 'productionPlanCode',
+          label: '计划编号',
+          align: 'center',
+          minWidth: 180
+        },
+        {
+          prop: 'planType',
+          label: '计划类型',
+          align: 'center',
+          minWidth: 110,
+          showOverflowTooltip: true,
+
+          formatter: (row) => {
+            const obj = this.planType.find((i) => i.value == row.planType);
+            return obj && obj.label;
+          }
+        },
+        {
+          prop: 'produceRoutingName',
+          label: '工艺路线',
+          showOverflowTooltip: true,
+          align: 'center',
+          minWidth: 120
+        },
+        {
+          prop: 'productCode',
+          minWidth: 180,
+          label: '产品编号',
+          showOverflowTooltip: true,
+          align: 'center'
+        },
+        {
+          prop: 'productName',
+          label: '产品名称',
+          showOverflowTooltip: true,
+          minWidth: 150,
+
+          align: 'center'
+        },
+        {
+          prop: 'brandNo',
+          label: '牌号',
+          showOverflowTooltip: true,
+          minWidth: 100,
+
+          align: 'center'
+        },
+        {
+          prop: 'specification',
+          label: '规格',
+          showOverflowTooltip: true,
+          minWidth: 130,
+
+          align: 'center'
+        },
+        {
+          prop: 'model',
+          label: '型号',
+          minWidth: 130,
+          showOverflowTooltip: true,
+
+          align: 'center'
+        },
+        {
+          prop: 'batchNo',
+          label: '批号',
+          align: 'center',
+          minWidth: 100,
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'priority',
+          label: '优先级',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 90,
+          sortable: 'custom'
+        },
+
+        {
+          prop: 'formingNum',
+          label: '要求生产数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formingWeight',
+          label: '要求生产重量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formedNum',
+          label: '已生产数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formedWeight',
+          label: '已生产重量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planStartTime',
+          label: '计划开始时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planCompleteTime',
+          label: '计划结束时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'startTime',
+          label: '实际开始时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        {
+          prop: 'teamName',
+          label: '班组',
+          align: 'center',
+          minWidth: 110,
+
+          showOverflowTooltip: true
+        }
+      ],
+      categoryLevelId: null,
+      code: null,
+      selection: [],
+      ids: []
+    };
+  },
+
+  watch: {},
+  methods: {
+    datasource({ page, where, limit }) {
+      return produceOrder({
+        ...where,
+        pageNum: page,
+        size: limit
+      });
+    },
+    /* 刷新表格 */
+    reload(where) {
+      this.$nextTick(() =>
+        this.$refs.equiTable.reload({ page: 1, limit: 10, where })
+      );
+    },
+    // 选择
+    getValue() {
+      this.selection.forEach((item) => {
+        item['objType'] = 3;
+      });
+      return JSON.parse(JSON.stringify(this.selection));
+    }
+  }
+};
+</script>

+ 201 - 0
src/views/bpm/handleTask/components/changeManagement/productionPlan.vue

@@ -0,0 +1,201 @@
+<template>
+  <ele-pro-table
+    ref="equiTable"
+    :columns="columns"
+    :datasource="datasource"
+    :selection.sync="selection"
+    :current.sync="current"
+    highlight-current-row
+    row-key="id"
+    height="20vh"
+  >
+  </ele-pro-table>
+</template>
+
+<script>
+import { getList } from '@/api/bpm/components/exceptionManagement';
+
+
+export default {
+  components: {},
+  props: {
+    selectList: Array,
+    type: {
+      default: 1 //1多选 2单选
+    }
+  },
+  data() {
+    return {
+      equipmentdialog: false,
+      current: null,
+      planType: [
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' }
+      ],
+      columns: [
+        {
+          width: 45,
+          type: 'selection',
+          columnKey: 'selection',
+          align: 'center',
+          reserveSelection: true,
+          show: this.type == 1
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'code',
+          label: '计划编号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180,
+          fixed: 'left'
+        },
+        {
+          prop: 'productCode',
+          label: '产品编码',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
+        {
+          prop: 'productName',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 150
+        },
+
+        {
+          prop: 'brandNo',
+          label: '牌号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 80
+        },
+        {
+          prop: 'batchNo',
+          label: '批号',
+          align: 'center',
+          minWidth: 100,
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'model',
+          label: '型号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100
+        },
+
+        {
+          prop: 'priority',
+          label: '优先级',
+          align: 'center',
+          minWidth: 90,
+          showOverflowTooltip: true,
+          sortable: 'custom'
+        },
+
+        {
+          prop: 'productNum',
+          label: '计划数量',
+          showOverflowTooltip: true,
+          align: 'center',
+          minWidth: 90
+        },
+        {
+          prop: 'productWeight',
+          label: '计划重量',
+          minWidth: 90,
+
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'requiredFormingNum',
+          label: '要求生产数量',
+          minWidth: 120,
+
+          align: 'center',
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'newSumOrderWeight',
+          label: '要求生产重量',
+          minWidth: 120,
+
+          align: 'center',
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'reqMoldTime',
+          label: '要求生产日期',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+
+        {
+          prop: 'orderType',
+          label: '计划类型',
+          align: 'center',
+          minWidth: 80,
+          showOverflowTooltip: true,
+          formatter: (row) => {
+            const obj = this.planType.find((i) => i.value == row.planType);
+            return obj && obj.label;
+          }
+        },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        }
+      ],
+      categoryLevelId: null,
+      code: null,
+      selection: [],
+      ids: []
+    };
+  },
+
+  watch: {},
+  methods: {
+    datasource({ page, where, limit }) {
+      return getList({
+        ...where,
+        pageNum: page,
+        size: limit
+      });
+    },
+    /* 刷新表格 */
+    reload(where) {
+      this.$nextTick(() =>
+        this.$refs.equiTable.reload({ page: 1, limit: 10, where })
+      );
+    },
+    // 选择
+    getValue() {
+      this.selection.forEach((item) => {
+        item['objType'] = 1;
+      });
+      return JSON.parse(JSON.stringify(this.selection));
+    }
+  }
+};
+</script>
+

+ 152 - 0
src/views/bpm/handleTask/components/changeManagement/questionInfo.vue

@@ -0,0 +1,152 @@
+<template>
+  <el-form
+    ref="form"
+    :model="form"
+    :rules="rules"
+    label-width="100px"
+    class="create-form"
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="名称:" prop="name">
+          <el-input v-model="form.name"    :disabled="disabled" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="编码:" prop="code">
+          <el-input v-model="form.code" disabled />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="问题描述:">
+          <el-input
+            v-model="form.problemDescription"
+            type="textarea"
+            :rows="2"
+            :disabled="disabled"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+        <el-form-item label="类别:" prop="category">
+          <DictSelection
+            multiple
+            dictName="问题类型"
+            v-model="form.category"
+            :disabled="disabled"
+          ></DictSelection>
+        </el-form-item>
+      </el-col>
+
+      <el-col :span="24">
+        <el-form-item
+          label="接收人"
+          prop="recipientId"
+          style="margin-bottom: 20px"
+        >
+          <el-select
+            v-model="form.recipientId"
+            clearable
+            style="width: 100%"
+            :filterable="true"
+            :disabled="disabled"
+          >
+            <el-option
+              v-for="item in userOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+              @click.native="userChange(item)"
+            />
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item prop="accessory" label="相关文档">
+          <fileUpload
+            v-model="form.accessory"
+            module="main"
+            :limit="5"
+            :disabled="disabled"
+            :showLib="false"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+import fileUpload from '@/components/upload/fileUpload';
+import { listAllUserBind } from '@/api/system/organization';
+
+import { infoForm } from './data.js';
+
+export default {
+  components: { fileUpload },
+  data() {
+    return {
+      visible: false,
+      loading: false,
+      userOptions: [],
+      form: { ...infoForm() },
+      // 表单验证规则
+      rules: {
+        type: [{ required: true, message: '请选择', trigger: 'change' }],
+        name: [{ required: true, message: '请选择', trigger: 'change' }],
+        relationType: [{ required: true, message: '请选择', trigger: 'change' }]
+      },
+      type: '',
+      title: '创建',
+    
+    };
+  },
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    }
+  },
+  created() {
+    this.userOptions = [];
+    listAllUserBind().then((data) => {
+      this.userOptions.push(...data);
+    });
+  },
+  methods: {
+    cancel() {
+      this.form = { ...infoForm() };
+    },
+    open(row) {
+      if (row) {
+        this.form = row;
+      }
+    },
+    userChange(item) {
+      this.form.recipientName = item.name;
+    },
+    setValue(data){
+      this.form=JSON.parse(JSON.stringify(data))
+    },
+    /* 保存编辑 */
+    async getValue() {
+      const valid = await this.validateFn()
+      this.form.objType='1'
+      return valid?JSON.parse(JSON.stringify(this.form)):''
+    },
+    validateFn() {
+      return new Promise((resolve, reject) => {
+        this.$refs.form.validate(valid=>{
+          resolve(valid)
+      });
+      })
+    }
+  }
+};
+</script>

+ 135 - 0
src/views/bpm/handleTask/components/changeManagement/submit.vue

@@ -0,0 +1,135 @@
+<template>
+  <el-col :span="16" :offset="6">
+    <el-form label-width="100px" ref="formRef" :model="form">
+      <el-form-item
+        label="审批建议"
+        prop="reason"
+        style="margin-bottom: 20px"
+        :rules="{
+          required: true,
+          message: '请选择',
+          trigger: 'change'
+        }"
+      >
+        <el-input
+          type="textarea"
+          v-model="form.reason"
+          placeholder="请输入审批建议"
+        />
+      </el-form-item>
+    </el-form>
+    <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="handleAudit(1)"
+        >通过
+      </el-button>
+
+      <el-button
+        icon="el-icon-circle-close"
+        type="danger"
+        size="mini"
+        @click="handleAudit(0)"
+        v-if="taskDefinitionKey != 'starter'"
+        >驳回
+      </el-button>
+      <!-- <el-dropdown
+        @command="(command) => handleCommand(command)"
+        style="margin-left: 30px"
+      >
+        <span class="el-dropdown-link">
+          更多<i class="el-icon-arrow-down el-icon--right"></i>
+        </span>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item command="cancel">作废</el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown> -->
+    </div>
+  </el-col>
+</template>
+
+<script>
+import { approveTaskWithVariables } from '@/api/bpm/task';
+import dictMixins from '@/mixins/dictMixins';
+import { questionSave } from '@/api/bpm/components/changeManagement/question';
+import { requestSave } from '@/api/bpm/components/changeManagement/request';
+import { noticeSave } from '@/api/bpm/components/changeManagement/notice';
+// import {
+//   assign,
+//   cancel
+// } from '@/api/bpm/components/purchasingManage/purchasePlanManage';
+
+// 流程实例的详情页,可用于审批
+export default {
+  mixins: [dictMixins],
+
+  name: '',
+  components: {
+    //   Parser
+  },
+  props: {
+    businessId: {
+      default: ''
+    },
+    taskId: {
+      default: ''
+    },
+    id: {
+      default: ''
+    },
+    taskDefinitionKey: {
+      default: ''
+    }
+  },
+  data() {
+    return {
+      form: {
+        reason: ''
+      }
+    };
+  },
+  created() {},
+  methods: {
+    async handleAudit(status) {
+      //申请人申请
+      if (this.taskDefinitionKey === 'starter') {
+        const data = await this.getTableValue();
+        let api=data.objType==1?questionSave:data.objType==2?requestSave:noticeSave
+        // return
+        if (data) {
+          await api(data);
+        }
+      }
+      await this._approveTaskWithVariables(status);
+    },
+    async _approveTaskWithVariables(status) {
+      let variables = {
+        pass: !!status
+      };
+      approveTaskWithVariables({
+        id: this.taskId,
+        reason: this.form.reason,
+        variables
+      }).then((res) => {
+        if (res.data.code != '-1') {
+          this.$emit('handleAudit', {
+            status,
+            title: status === 0 ? '驳回' : ''
+          });
+        }
+      });
+    },
+    getTableValue() {
+      return new Promise((resolve, reject) => {
+        this.$emit('getTableValue', async (data) => {
+          resolve(await data);
+        });
+      });
+    }
+  }
+};
+</script>
+
+<style lang="scss"></style>

+ 97 - 0
src/views/bpm/handleTask/components/changeManagement/tableLIst.vue

@@ -0,0 +1,97 @@
+<template>
+  <div>
+    <div class="switch">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="activeComp = item.key"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+    <!-- <order-search @search="reload" ref="searchRef" v-if="type==1"> </order-search> -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      :selection.sync="selection"
+      row-key="id"
+      height="20vh"
+    >
+      <template v-slot:category="{ row }">
+        <span v-for="item in row.category.split(',')" :key="item">
+          {{ getDictValue('问题类型', item) }}</span
+        >
+      </template>
+      <template v-slot:type="{ row }">
+        <span>{{ getDictValue('变更类型', row.type + '') }}</span>
+      </template>
+    </ele-pro-table>
+  </div>
+</template>
+  
+  <script>
+// import OrderSearch from '../components/order-search.vue';
+import dictMixins from '@/mixins/dictMixins';
+import { questionColumns, requestColumns ,noticeColumns} from './data.js';
+import { getQuestionList } from '@/api/bpm/components/changeManagement/question';
+import { getRequestList } from '@/api/bpm/components/changeManagement/request';
+import { getNoticeList } from '@/api/bpm/components/changeManagement/notice';
+export default {
+  components: {},
+
+  mixins: [dictMixins],
+  data() {
+    return {
+      activeComp: 'question',
+      tabOptions: [
+        { key: 'question', name: '问题报告' },
+        { key: 'request', name: '变更申请' },
+        { key: 'notice', name: '变更通知' }
+      ],
+      loading: false,
+      selection: []
+    };
+  },
+  computed: {
+    // 表格列配置
+    columns() {
+      return( this.activeComp=='question'?questionColumns:this.activeComp=='request'?requestColumns:noticeColumns).filter((item) => item.columnKey != 'action'&&item.prop != 'objType');
+    }
+  },
+  watch: {
+    activeComp(){
+      this.$nextTick(() => {
+        this.$refs.table.reload({ page: 1 });
+      });
+    }
+  },
+  created() {
+    this.requestDict('问题类型');
+  },
+  filters: {},
+  methods: {
+    /* 表格数据源 */
+    datasource({ page, limit, where }) {
+      let api=this.activeComp=='question'?getQuestionList:this.activeComp=='request'?getRequestList:getNoticeList
+      return api({
+        pageNum: page,
+        size: limit,
+        ...where
+      });
+    },
+    getValue() {
+      this.selection.forEach(item=>{
+        item['objType']=this.activeComp=='question'?1:this.activeComp=='request'?2:3
+      })
+      return JSON.parse(JSON.stringify(this.selection));
+    }
+  }
+};
+</script>
+  

+ 212 - 0
src/views/bpm/handleTask/components/changeManagement/workOrder.vue

@@ -0,0 +1,212 @@
+<template>
+  <ele-pro-table
+    ref="equiTable"
+    :columns="columns"
+    :datasource="datasource"
+    :selection.sync="selection"
+    :current.sync="current"
+    highlight-current-row
+    row-key="id"
+    height="20vh"
+  >
+  </ele-pro-table>
+</template>
+
+<script>
+import { workOrder } from '@/api/bpm/components/exceptionManagement';
+
+
+export default {
+  components: {},
+  props: {
+    selectList: Array,
+    type: {
+      default: 1 //1多选 2单选
+    }
+  },
+  data() {
+    return {
+      equipmentdialog: false,
+      current: null,
+      planType: [
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' }
+      ],
+      columns: [
+        {
+          width: 45,
+          type: 'selection',
+          columnKey: 'selection',
+          align: 'center',
+          reserveSelection: true,
+          show: this.type == 1
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          label: '生产订单号',
+          align: 'center',
+          minWidth: 180,
+          prop: 'code',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'productionPlanCode',
+          label: '计划编号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
+        {
+          prop: 'produceRoutingName',
+          label: '工艺路线',
+          minWidth: 130,
+          showOverflowTooltip: true,
+
+          align: 'center'
+        },
+        {
+          prop: 'productCode',
+          label: '产品编码',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
+        {
+          prop: 'productName',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+        {
+          prop: 'brandNo',
+          label: '牌号',
+          align: 'center',
+          minWidth: 100,
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'batchNo',
+          label: '批号',
+          align: 'center',
+          minWidth: 100,
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'model',
+          label: '型号',
+          minWidth: 120,
+          showOverflowTooltip: true,
+
+          align: 'center'
+        },
+
+        {
+          prop: 'priority',
+          label: '优先级',
+          align: 'center',
+          minWidth: 90,
+          showOverflowTooltip: true,
+          sortable: 'custom'
+        },
+
+        {
+          prop: 'formingNum',
+          label: '要求生产数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formingWeight',
+          label: '要求生产重量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planStartTime',
+          label: '计划开始时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        {
+          prop: 'planCompleteTime',
+          label: '计划结束时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        {
+          prop: 'serialNo',
+          label: '客户代号',
+          align: 'center',
+          minWidth: 110,
+
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'simpleName',
+          label: '客户简称',
+          align: 'center',
+          minWidth: 120,
+
+          showOverflowTooltip: true
+        }
+      ],
+      categoryLevelId: null,
+      code: null,
+      selection: []
+    };
+  },
+
+  watch: {},
+  methods: {
+    datasource({ page, where, limit }) {
+      return workOrder({
+        ...where,
+        pageNum: page,
+        size: limit
+      });
+    },
+    /* 刷新表格 */
+    reload(where) {
+      this.$nextTick(() =>
+        this.$refs.equiTable.reload({ page: 1, limit: 10, where })
+      );
+    },
+    // 选择
+    getValue() {
+      this.selection.forEach((item) => {
+        item['objType'] = 2;
+      });
+      return JSON.parse(JSON.stringify(this.selection));
+    }
+  }
+};
+</script>
+

+ 1 - 0
src/views/bpm/handleTask/index.vue

@@ -22,6 +22,7 @@
             :taskId="listData?.taskId"
             :businessId="listData?.businessId"
             :id="listData?.id"
+            :processDefinitionId="processInstance.processDefinition.id"
             :taskDefinitionKey="listData?.taskDefinitionKey"
             @activeCompChange="activeCompChange"
             @handleClose="handleClose"