yusheng 1 год назад
Родитель
Сommit
1645f5b2aa

+ 40 - 0
src/api/bpm/components/documentManagement/index.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request';
+
+// 保存or更新
+export async function saveOrEdit (data) {
+  const res = await request.post(`/main/identityphoto/saveOrUpdate`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取证照列表分页
+export async function getPhotoList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/identityphoto/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取证照信息详情
+export async function getPhotoInfo (id) {
+  const res = await request.get(`/main/identityphoto/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteIdentityphoto(data) {
+  const res = await request.delete('/main/identityphoto/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 14 - 0
src/api/bpm/task.js

@@ -322,3 +322,17 @@ export async function getProcessInstanceNoticePage(query) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+
+// 我的抄送分页
+export async function ccPage(data) {
+  const res = await request({
+    url: `/bpm/task/cc-page`,
+    method: 'get',
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 299 - 0
src/views/bpm/carbonCopy/index.vue

@@ -0,0 +1,299 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <div class="filter-container">
+        <el-form
+          label-width="100px"
+          class="ele-form-search"
+          @keyup.enter.native="reload"
+          @submit.native.prevent
+        >
+          <el-row :gutter="15">
+            <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+              <el-form-item label="流程名:" prop="name">
+                <el-input clearable v-model.trim="params.name"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+              <el-form-item label="结果:" prop="result">
+                <DictSelection
+                  dictName="流程实例的结果"
+                  clearable
+                  v-model="params.result"
+                >
+                </DictSelection>
+              </el-form-item>
+            </el-col>
+            <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+              <el-form-item label="创建时间:" prop="createTime">
+                <el-date-picker
+                  v-model="params.createTime"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  type="daterange"
+                  range-separator="-"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  :default-time="['00:00:00', '23:59:59']"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col
+              style="display: flex; justify-content: flex-end"
+              v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
+            >
+              <div class="ele-form-actions">
+                <el-button
+                  type="primary"
+                  icon="el-icon-search"
+                  class="ele-btn-icon"
+                  @click="reload"
+                >
+                  查询
+                </el-button>
+                <el-button @click="reset">重置</el-button>
+              </div>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable5"
+      >
+        <template v-slot:result="{ row }">
+          <el-tag
+            size="medium"
+            :type="
+              getTimelineItemType(getDictValue('流程实例的结果', row.result))
+            "
+          >
+            {{ getDictValue('流程实例的结果', row.result) }}
+          </el-tag>
+        </template>
+        <template v-slot:processResult="{ row }">
+          <el-tag
+            size="medium"
+            :type="
+              getTimelineItemType(
+                getDictValue('流程实例的结果', row.processResult)
+              )
+            "
+          >
+            {{ getDictValue('流程实例的结果', row.processResult) }}
+          </el-tag>
+        </template>
+
+        <template v-slot:durationInMillis="{ row }">
+          {{ getDateTime(row.durationInMillis) }}
+        </template>
+        <template v-slot:name="{ row }">
+          <el-link type="primary" :underline="false" @click="handleAudit(row)">
+            {{ row.name }}</el-link
+          >
+        </template>
+        <!-- 操作列 -->
+        <template v-slot:action="{ row }">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleAudit(row)"
+            >详情</el-button
+          >
+        </template>
+      </ele-pro-table>
+    </el-card>
+    <detail ref="detailRef"></detail>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import { ccPage } from '@/api/bpm/task';
+  import { getDate } from '@/utils/dateUtils';
+  import detail from '@/views/bpm/done/detailDialog.vue';
+
+  // 默认表单数据
+  const defaultParams = {
+    status: '',
+    name: ''
+  };
+  export default {
+    name: 'BpmDoneTask',
+    components: { detail },
+    mixins: [dictMixins],
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        params: { ...defaultParams },
+        statusList: [],
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'processInstance.processTypeName',
+            label: '流程分类',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'taskName',
+            label: '当前节点名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'name',
+            slot: 'name',
+            label: '流程名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'vals.businessCode',
+            label: '单据编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'vals.businessName',
+            label: '单据名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'vals.businessType',
+            label: '单据类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'vals.userName',
+            label: '流程发起人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'result',
+            slot: 'result',
+            label: '当前节点结果',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          {
+            prop: 'processResult',
+            slot: 'processResult',
+            label: '流程结果',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+          // {
+          //   prop: 'reason',
+          //   label: '审批意见',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   minWidth: 200
+          // },
+
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'endTime',
+            label: '审批时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
+          {
+            prop: 'durationInMillis',
+            slot: 'durationInMillis',
+            label: '耗时',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          }
+        ]
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created() {},
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return ccPage({
+          pageNo: page,
+          pageSize: limit,
+          ...this.params
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+
+      /*  重置 */
+      reset() {
+        this.params = { ...defaultParams };
+        this.reload();
+      },
+      /** 处理审批按钮 */
+      handleAudit(row) {
+        this.$refs.detailRef.open({
+          processInstance: {
+            id: row.processInstanceId,
+            pcView: row.vals?.processInstanceId
+          }
+        });
+      },
+      getTimelineItemType(result) {
+        if (result === '通过') {
+          return 'success';
+        }
+        if (result === '不通过') {
+          return 'danger';
+        }
+        if (result === '取消') {
+          return 'info';
+        }
+        if (result === '处理中') {
+          return 'warning';
+        }
+
+        return '';
+      },
+      getDateTime(ms) {
+        return getDate(ms);
+      }
+    }
+  };
+</script>

+ 3 - 26
src/views/bpm/handleTask/components/businessOpportunity/addOpportunityDialog.vue

@@ -74,36 +74,11 @@
             ></el-date-picker>
           </el-form-item>
         </el-col>
-        <!-- <el-col :span="8">
-          <el-form-item label="商机阶段" prop="stageCode">
-            <DictSelection
-              dictName="商机阶段"
-              clearable
-              v-model="form.stageCode"
-            >
-            </DictSelection>
-          </el-form-item>
-        </el-col> -->
-        <!-- <el-col :span="8">
-          <el-form-item
-            label="计价方式"
-            prop="pricingWay"
-          >
-            <el-radio-group v-model="form.pricingWay" @change="changePricingWay" :disabled="!!form.contractId">
-              <el-radio v-for="item in pricingWayList" :label="item.id">{{ item.name }}</el-radio>
-            </el-radio-group>
-          </el-form-item>
 
-        </el-col> -->
         <el-col :span="8" style="height: 58px">
           <el-form-item prop="files" label="附件">
             <fileMain v-model="form.files"></fileMain>
-            <!--            <fileUpload-->
-            <!--              v-model="form.files"-->
-            <!--              module="main"-->
-            <!--              :showLib="false"-->
-            <!--              :limit="5"-->
-            <!--            />-->
+
           </el-form-item>
         </el-col>
         <el-col :span="16">
@@ -439,7 +414,9 @@
         } catch (error) {
           console.log(error);
           // 表单验证未通过,不执行保存操作
+          return false
         }
+       
       },
       cancel() {
         this.$nextTick(() => {

+ 1 - 1
src/views/bpm/handleTask/components/businessOpportunity/opportunityDetailDialog.vue

@@ -438,7 +438,7 @@
 
         } catch (error) {
           console.log(error);
-          return Promise.resolve([]);
+          return false
         }
       }
     }

+ 3 - 1
src/views/bpm/handleTask/components/businessOpportunity/submit.vue

@@ -205,6 +205,7 @@
           status === 1
         ) {
           let data = await this.getTableValue();
+
           if (!data) {
             return;
           }
@@ -250,9 +251,10 @@
           // }
           await UpdateInformation(data);
         }
-        //销售主管审批
+        //销售主管审批
         if (this.taskDefinitionKey === 'salesManagerApprove' && status === 1) {
           let arr = await this.getTableValue();
+
           if (!arr) {
             return;
           }

+ 69 - 654
src/views/bpm/handleTask/components/certificateQualifications/certificateQualificationsDialog.vue

@@ -1,678 +1,93 @@
 <template>
   <div>
-    <el-tabs v-model="activeName">
-      <el-tab-pane label="客户信息" v-if="form.isShowContact" name="1">
-        <contactDetailDialog
-          style="margin-top: 10px"
-          :businessId="businessId"
-          :taskDefinitionKey="taskDefinitionKey"
-        ></contactDetailDialog>
-      </el-tab-pane>
-      <el-tab-pane label="资质信息" name="2">
-        <el-form
-          ref="form"
-          style="margin-top: 10px"
-          :model="form"
-          :rules="rules"
-          class="el-form-box"
-        >
-          <headerTitle title="基本信息" />
-          <el-row :gutter="20">
+    <el-descriptions title="" :column="3" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 证照编号 </template>
+        {{ form.code }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 类型 </template>
+        {{
+          getDictValue(
+            form.holderType == 1 ? '证件类型' : '客户/供应商资质类型',
+            form.type
+          )
+        }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 持证对象</template>
+        {{ form.holder }}
+      </el-descriptions-item>
+      <el-descriptions-item :span="2">
+        <template slot="label"> 有效期至 </template>
+        {{ form.validityStartTime + ' — ' + form.validityEndTime }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 状态 </template>
+        {{ getDictValue('规则状态', form.status) }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 颁发时间 </template>
+        {{ form.enactorTime }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 创建人 </template>
+        {{ form.createUserName }}
+      </el-descriptions-item>
 
-            <el-col :span="12">
-              <el-form-item
-                label="名称"
-                prop="name"
-                label-width="90px"
-                :rules="{ required: true, message: '请输入', trigger: 'blur' }"
-              >
-                <el-input
-                  v-model="form.name"
-                  :disabled="type == 'view'"
-                  clearable
-                ></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="有效时间:" prop="date" label-width="90px">
-                <el-date-picker
-                  :disabled="type == 'view'"
-                  v-model="form.date"
-                  style="width: 100%"
-                  type="daterange"
-                  value-format="yyyy-MM-dd"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item
-                label="资质类型:"
-                prop="certificationType"
-                label-width="90px"
-              >
-                <el-select
-                  style="width: 100%"
-                  :disabled="type == 'view'"
-                  v-model="form.certificationType"
-                  @change="changeCertificationType"
-                  filterable
-                >
-                  <el-option
-                    v-for="item in qualificationOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item
-                label="关联类型:"
-                prop="relationName"
-                label-width="90px"
-                :rules="{
-                  required: ['1', '2', '3'].includes(form.certificationType)
-                    ? true
-                    : false,
-                  message: '请选择关联类型',
-                  trigger: 'blur'
-                }"
-              >
-                <el-input
-                  :disabled="type == 'view'"
-                  v-model="form.relationName"
-                  readonly
-                  clearable
-                  @click.native="handleClick"
-                  placeholder="请选择"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="20">
-            <el-col :span="12">
-              <el-form-item label="备注" label-width="90px">
-                <el-input
-                  type="textarea"
-                  v-model="form.remark"
-                  :disabled="type == 'view'"
-                  clearable
-                ></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="附件:" prop="accessory" label-width="90px">
-                <fileMain v-model="form.accessory" :type="type"></fileMain>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <headerTitle title="资质信息" />
-          <ele-pro-table
-            ref="linkTable"
-            :columns="columns"
-            :datasource="form.detailsList"
-            :toolkit="[]"
-            height="300px"
-            :need-page="false"
-          >
-            <!-- 表头工具栏 -->
-            <template v-slot:toolbar>
-              <el-button
-                v-if="type !== 'view'"
-                type="primary"
-                @click="handleAdd"
-                >添加</el-button
-              >
-            </template>
-            <template v-slot:name="scope">
-              <el-form-item
-                :prop="'detailsList.' + scope.$index + '.name'"
-                :rules="{
-                  required: true,
-                  message: '',
-                  trigger: 'change'
-                }"
-              >
-                <el-select
-                  v-if="type !== 'view'"
-                  v-model="scope.row.name"
-                  clearable
-                >
-                  <el-option
-                    :disabled="
-                      disabledToType(scope.row).includes(item.dictCode)
-                    "
-                    v-for="item in dictList"
-                    :value="item.dictValue"
-                    :label="item.dictValue"
-                  ></el-option>
-                </el-select>
-
-                <span v-else>{{ scope.row.name }}</span>
-              </el-form-item>
-            </template>
-            <template v-slot:code="scope">
-              <el-form-item
-                :prop="'detailsList.' + scope.$index + '.code'"
-              
-              >
-                <el-input
-                  v-model="scope.row.code"
-                  :disabled="type == 'view'"
-                  clearable
-                ></el-input>
-              </el-form-item>
-            </template>
-            <template v-slot:businessRange="scope">
-              <el-form-item
-                :prop="'detailsList.' + scope.$index + '.businessRange'"
-              >
-                <el-input
-                  type="textarea"
-                  v-model="scope.row.businessRange"
-                  :disabled="type == 'view'"
-                  clearable
-                ></el-input>
-              </el-form-item>
-            </template>
-            <template v-slot:startTime="scope">
-              <el-form-item
-                inline-message
-                :prop="'detailsList.' + scope.$index + '.startTime'"
-           
-              >
-                <el-date-picker
-                  :disabled="type == 'view'"
-                  v-model="scope.row.startTime"
-                  type="date"
-                  style="width: 100%"
-                  value-format="yyyy-MM-dd"
-                  placeholder="选择日期"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </template>
-            <template v-slot:endTime="scope">
-              <el-form-item
-                :prop="'detailsList.' + scope.$index + '.endTime'"
-           
-              >
-                <el-date-picker
-                  :disabled="type == 'view'"
-                  v-model="scope.row.endTime"
-                  type="date"
-                  style="width: 100%"
-                  value-format="yyyy-MM-dd"
-                  placeholder="选择日期"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </template>
-            <template v-slot:noticePersonName="scope">
-              <el-form-item
-                :prop="'detailsList.' + scope.$index + '.noticePersonName'"
-               
-              >
-                <el-input
-                  :disabled="type == 'view'"
-                  @click.native="openStaffSelection(scope.$index)"
-                  v-model="scope.row.noticePersonName"
-                  placeholder="请选择"
-                ></el-input>
-              </el-form-item>
-            </template>
-            <template v-slot:accessory="scope">
-              <el-form-item
-                :prop="'detailsList.' + scope.$index + '.accessory'"
-                :rules="{
-                  required: true,
-                  message: '',
-                  trigger: ['change', 'blur']
-                }"
-              >
-                <fileMain v-model="scope.row.accessory" :type="type"></fileMain>
-            
-              </el-form-item>
-            </template>
-            <template v-slot:type="scope">
-              <el-form-item :prop="'detailsList.' + scope.$index + '.type'">
-                <el-select
-                  v-if="type !== 'view'"
-                  v-model="scope.row.type"
-                  clearable
-                >
-                  <el-option
-                    v-for="item in typeList"
-                    :value="item.dictCode"
-                    :label="item.dictValue"
-                  ></el-option>
-                </el-select>
-             
-                <span v-else>{{ getLabelName(typeList, scope.row.type) }}</span>
-              </el-form-item>
-            </template>
-            <template v-slot:level="scope">
-              <el-form-item :prop="'detailsList.' + scope.$index + '.level'">
-                <el-select
-                  v-if="type !== 'view'"
-                  v-model="scope.row.level"
-                  clearable
-                >
-                  <el-option
-                    v-for="item in levelOptions"
-                    :value="item.dictCode"
-                    :label="item.dictValue"
-                  ></el-option>
-                </el-select>
-                <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
-                <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-                <span v-else>{{
-                  getLabelName(levelOptions, scope.row.type)
-                }}</span>
-              </el-form-item>
-            </template>
-            <template v-slot:remark="scope">
-              <el-form-item :prop="'detailsList.' + scope.$index + '.remark'">
-                <el-input
-                  type="textarea"
-                  :disabled="type == 'view'"
-                  v-model="scope.row.remark"
-                ></el-input>
-              </el-form-item>
-            </template>
-            <template v-slot:status="scope">
-              <el-form-item :prop="'detailsList.' + scope.$index + '.status'">
-                <el-tag
-                  v-if="scope.row.status"
-                  :type="statusTagTypeList[scope.row.status]"
-                >
-                  {{ statusList[scope.row.status] }}
-                </el-tag>
-              </el-form-item>
-            </template>
-            <template v-slot:isRequired="{ column }">
-              <span class="is-required">{{ column.label }}</span>
-            </template>
-            <template v-slot:action="{ row, $index }">
-              <el-popconfirm
-                class="ele-action"
-                title="确定要删除该信息吗?"
-                @confirm="handleRemove($index)"
-              >
-                <template v-slot:reference>
-                  <el-link
-                    v-if="type !== 'view'"
-                    type="danger"
-                    :underline="false"
-                    icon="el-icon-delete"
-                  >
-                    删除
-                  </el-link>
-                </template>
-              </el-popconfirm>
-            </template>
-          </ele-pro-table>
-        </el-form>
-      </el-tab-pane>
-    </el-tabs>
+      <el-descriptions-item>
+        <template slot="label"> 创建时间 </template>
+        {{ form.createTime }}
+      </el-descriptions-item>
+      <el-descriptions-item :span="3">
+        <template slot="label"> 附件 </template>
+        <fileMain v-model="form.fileObj" type="view"></fileMain>
+      </el-descriptions-item>
+      <el-descriptions-item :span="3">
+        <template slot="label"> 备注 </template>
+        {{ form.remark }}
+      </el-descriptions-item>
+    </el-descriptions>
   </div>
 </template>
+
 <script>
-  import {
-    getProfessionCertificationById,
-    saveProfessionCertification,
-    updateProfessionCertificationById,
-    contactQcSubmit
-  } from '@/api/bpm/components/qualification';
-  import { getFile } from '@/api/system/file';
-  import { mapActions, mapGetters } from 'vuex';
-  import dictEnum from '@/enum/dict';
+  import { getPhotoInfo } from '@/api/bpm/components/documentManagement';
+  import dictMixins from '@/mixins/dictMixins';
   import fileMain from '@/components/addDoc/index.vue';
-  import contactDetailDialog from '../contactQC/contactDetailDialog.vue';
+
   export default {
-    name: 'addOrEditDialog',
-    components: { fileMain, contactDetailDialog },
-    props: {
-      taskDefinitionKey: {
-        type: String,
-        default: 'starter'
-      },
-      businessId: {
-        type: String,
-        default: ''
-      }
-    },
+    mixins: [dictMixins],
+    components: { fileMain },
+    //注册组件
     data() {
       return {
-        title: '',
-        type: 'view',
-        activeName: '2',
-        qualificationOptions: [
-          {
-            label: '客户资质',
-            value: '1'
-          },
-          {
-            label: '供应商资质',
-            value: '2'
-          },
-          {
-            label: '个人资质',
-            value: '3'
-          },
-          {
-            label: '企业资质',
-            value: '4'
-          },
-          {
-            label: '受托企业资质',
-            value: '5'
-          }
-        ],
-        levelOptions: [
-          {
-            dictValue: '初级',
-            dictCode: '1'
-          },
-          {
-            dictValue: '中级',
-            dictCode: '2'
-          },
-          {
-            dictValue: '高级',
-            dictCode: '3'
-          }
-        ],
-        defaultData: {
-          accessory: [],
-          name: '',
-          noticePersonId: '',
-          noticePersonName: '',
-          num: '',
-          remark: '',
-          businessRange: '',
-          type: '',
-          endTime: '',
-          startTime: ''
-        },
-        form: {
-          accessory: [],
-          detailsList: [],
-          relationName: '',
-          isShowContact: 0,
-          name: '',
-          date: [],
-          remark: ''
-        },
-        rules: {
-          name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
-          code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
-          certificationType: [
-            { required: true, message: '请选择资质类型', trigger: 'change' }
-          ],
-
-          date: [
-            { required: true, message: '请选择有效时间', trigger: 'change' }
-          ]
-        },
-        curIndex: null,
-        StaffType: '',
-
-        statusList: {
-          10: '有效',
-          20: '无效',
-          30: '已过期'
-        },
-        statusTagTypeList: {
-          10: 'success',
-          20: 'info',
-          30: 'danger'
-        }
+        form: {}
       };
     },
-    computed: {
-      ...mapGetters(['dict']),
-      dictList() {
-        return this.dict[dictEnum['客户/供应商资质类型']] || [];
-      },
-      typeList() {
-        return this.dict[dictEnum['工种类型']] || [];
-      },
-      columns() {
-        return [
-          {
-            type: 'index',
-            width: 55,
-            align: 'center'
-          },
-          {
-            label: '名称',
-            prop: 'name',
-            slot: 'name',
-            headerSlot: 'isRequired',
-            minWidth: 180,
-            align: 'center'
-          },
-          {
-            label: '编号',
-            prop: 'code',
-            slot: 'code',
-            // headerSlot: 'isRequired',
-            minWidth: 120,
-            align: 'center'
-          },
-          {
-            label: '许可/经营范围',
-            prop: 'businessRange',
-            slot: 'businessRange',
-            minWidth: 140,
-            align: 'center'
-          },
-          {
-            label: '有效期起始日期',
-            prop: 'startTime',
-            slot: 'startTime',
-            // headerSlot: 'isRequired',
-            minWidth: 160,
-            align: 'center'
-          },
-          {
-            label: '有效期截止日期',
-            prop: 'endTime',
-            slot: 'endTime',
-            // headerSlot: 'isRequired',
-            minWidth: 160,
-            align: 'center'
-          },
-          {
-            label: '通知人',
-            prop: 'noticePersonName',
-            slot: 'noticePersonName',
-            // headerSlot: 'isRequired',
-            minWidth: 140,
-            align: 'center'
-          },
-          {
-            label: '附件',
-            prop: 'accessory',
-            slot: 'accessory',
-            headerSlot: 'isRequired',
-            minWidth: 140
-          },
-          {
-            label: '等级',
-            prop: 'level',
-            slot: 'level',
-            minWidth: 140,
-            align: 'center'
-          },
-          {
-            label: '分类',
-            prop: 'type',
-            slot: 'type',
-            minWidth: 140,
-            align: 'center'
-          },
-          {
-            label: '备注',
-            prop: 'remark',
-            slot: 'remark',
-            minWidth: 140,
-            align: 'center'
-          }
-        ];
-      },
-      disabledToType() {
-        return (row) => {
-          let list = this.form.detailsList.map((item) => item.name);
-          let dictCodeList = this.dictList.map((item) => item.dictCode);
-          let intersectionList = list.filter(
-            (v) => dictCodeList.indexOf(v) > -1
-          );
-          intersectionList = intersectionList.filter((v) => row.name !== v);
-          return intersectionList;
-        };
+    props: {
+      businessId: {
+        default: ''
       }
     },
+    computed: {},
     created() {
+      this.requestDict('证件类型');
       this.requestDict('客户/供应商资质类型');
-      this.requestDict('工种类型');
-      this.getCertificateInfo({ id: this.businessId });
+      this.requestDict('规则状态');
+      this.getInfo(this.businessId);
     },
     methods: {
-      ...mapActions('dict', ['requestDict']),
-      getLabelName(arr, id) {
-        console.log(arr);
-        if (!id) return '';
-        return arr.find((item) => item.dictCode == id)?.dictValue;
-      },
-      //删除资质
-      handleRemove(index) {
-        this.form.detailsList.splice(index, 1);
-      },
-      //结束日期验证
-      validateEndDate(row, index) {
-        return (rule, value, callback) => {
-          if (!value) return callback(new Error(''));
-          if (row.endTime && row.startTime && value < row.startTime) {
-            callback(new Error('截止日期不能小于起始日期'));
-          } else {
-            callback();
-          }
-        };
-      },
-      //页面初始化
-      init(type, row = {}) {
-        this.title = type == 'add' ? '新增' : type == 'edit' ? '修改' : '详情';
-        this.type = type;
-        if (type !== 'add') {
-          this.getCertificateInfo(row);
-        }
-      },
-
-      handleClick() {
-        switch (this.form.certificationType) {
-          case '1':
-            this.$refs.clientSelection.open();
-            break;
-          case '2':
-            this.$refs.vendorDialogRef.open();
-            break;
-          case '3':
-            this.StaffType = 2;
-            this.$refs.staffSelection.open([]);
-            break;
-        }
-      },
-      changeCertificationType(value) {
-        this.form.certificationType = value;
-        this.form.relationName = '';
-        this.form.relationId = '';
-      },
-      confirmSelection(obj) {
-        this.form.relationId = obj.id;
-        this.form.relationName = obj.name;
-        this.$forceUpdate();
-      },
-      async getCertificateInfo(row) {
-        this.form = await getProfessionCertificationById(row.id);
-        this.form.date = [this.form.startTime, this.form.endTime];
-      },
-      //打开选择负责人弹窗
-      openStaffSelection(index) {
-        this.curIndex = index;
-        this.StaffType = 1;
-        this.$refs.staffSelection.open([]);
-      },
-      //选择负责人回调
-      confirmStaffSelection(data, type) {
-        if (this.StaffType == 1) {
-          this.form.detailsList[this.curIndex].noticePersonName = data
-            .map((item) => item.name)
-            .toString();
-          this.form.detailsList[this.curIndex].noticePersonId = data
-            .map((item) => item.id)
-            .toString();
-        } else {
-          this.form.relationId = data.map((item) => item.id).join(',');
-          this.form.relationName = data.map((item) => item.name).join(',');
-        }
-      },
-      //新增
-      handleAdd() {
-        this.form.detailsList.push({ ...this.defaultData });
-      },
-      //修改资质证书
-      handleChangeType(val, row) {
-        if (!val) return (row.name = '');
-        row.name =
-          this.dictList.find((i) => i.dictCode == val)?.dictValue || '';
-      },
-      downloadFile(file) {
-        getFile({ objectName: file.storePath }, file.name);
-      },
-      //保存/提交
-      handleSave(isSub) {
-        this.$refs.form.validate(async (valid) => {
-          if (!valid) return this.$message.warning('有必填项未填写,请检查');
-          if (!this.form.detailsList.length)
-            return this.$message.warning('至少保存一条资质信息');
-          this.form.startTime = this.form.date[0];
-          this.form.endTime = this.form.date[1];
-          let api =
-            this.type == 'add'
-              ? saveProfessionCertification
-              : updateProfessionCertificationById;
-          let id = await api(this.form);
-          if (isSub) {
-            let businessId = this.type == 'add' ? id : this.form.id;
-            await contactQcSubmit({
-              businessId: businessId,
-              certificationType: this.form.certificationType
-            });
-          }
-          this.$message.success('保存成功');
-          this.$emit('reload');
-          this.cancel();
-        });
-      },
-      //关闭弹窗
-      cancel() {
-        this.$emit('update:addOrEditDialogFlag', false);
+      async getInfo(id) {
+        const data = await getPhotoInfo(id);
+        this.form = data;
       }
     }
   };
 </script>
-<style scoped lang="scss">
-  :deep.el-form-item {
-    margin-bottom: 0;
+
+<style lang="scss">
+  .el-form-item {
+    margin-bottom: 20px !important;
   }
 </style>

+ 106 - 122
src/views/bpm/handleTask/components/certificateQualifications/submit.vue

@@ -23,159 +23,143 @@
         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="!['starter', 'starterFillApprove'].includes(taskDefinitionKey)"
-      >驳回
+        >驳回
       </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
+        @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>
 
-      <!-- <el-button
-        icon="el-icon-circle-close"
-        type="danger"
-        size="mini"
-        @click="handleBackList"
-        >退回
-      </el-button> -->
-      <!-- <el-button
-        icon="el-icon-circle-close"
-        type="danger"
-        size="mini"
-        @click="handleAudit(0)"
-        v-if="taskDefinitionKey != 'productionSupervisorApprove1'"
-        >不通过
-      </el-button>
-      <el-button
-        icon="el-icon-edit-outline"
-        type="primary"
-        size="mini"
-        v-if="taskDefinitionKey != 'productionSupervisorApprove1'"
-        @click="handleUpdateAssignee"
-        >转办
-      </el-button> -->
+     
     </div>
   </el-col>
 </template>
 
 <script>
-import { cancel} from '@/api/bpm/components/supplierManage/contact';
-import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
-import {listAllUserBind} from '@/api/system/organization';
+  import { cancel } from '@/api/bpm/components/supplierManage/contact';
+  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
+  import { listAllUserBind } from '@/api/system/organization';
 
-// 流程实例的详情页,可用于审批
-export default {
-  name: '',
-  components: {
-    //   Parser
-  },
-  props: {
-    businessId: {
-      default: ''
-    },
-    taskId: {
-      default: ''
-    },
-    id: {
-      default: ''
+  // 流程实例的详情页,可用于审批
+  export default {
+    name: '',
+    components: {
+      //   Parser
     },
-    taskDefinitionKey: {
-      default: ''
-    }
-  },
-  data() {
-    return {
-      form: {
-        technicianId: '',
-        reason: ''
+    props: {
+      businessId: {
+        default: ''
       },
-      userOptions: []
-    };
-  },
-  created() {
-    this.userOptions = [];
-    listAllUserBind().then((data) => {
-      this.userOptions.push(...data);
-    });
-  },
-  methods: {
-    /** 处理转办审批人 */
-    handleUpdateAssignee() {
-      this.$emit('handleUpdateAssignee');
-    },
-    /** 退回 */
-    handleBackList() {
-      this.$emit('handleBackList');
-    },
-
-    async handleAudit(status) {
-      //发起人补充
-      // if (this.taskDefinitionKey === 'starter') {
-      //   await this.getTableValue();
-      // }
-      await this._approveTaskWithVariables(status);
+      taskId: {
+        default: ''
+      },
+      id: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      }
     },
-    async _approveTaskWithVariables(status) {
-      let variables = {
-        pass: !!status
+    data() {
+      return {
+        form: {
+          technicianId: '',
+          reason: ''
+        },
+        userOptions: []
       };
-      let API = !!status ? approveTaskWithVariables : rejectTask;
-      API({
-        id: this.taskId,
-        reason: this.form.reason,
-        variables
-      }).then((res) => {
-        if (res.data.code != '-1') {
-          this.$emit('handleAudit', {
-            status,
-            title: status === 0 ? '驳回' : ''
-          });
-        }
+    },
+    created() {
+      this.userOptions = [];
+      listAllUserBind().then((data) => {
+        this.userOptions.push(...data);
       });
     },
+    methods: {
+      /** 处理转办审批人 */
+      handleUpdateAssignee() {
+        this.$emit('handleUpdateAssignee');
+      },
+      /** 退回 */
+      handleBackList() {
+        this.$emit('handleBackList');
+      },
 
-    getTableValue() {
-      return new Promise((resolve, reject) => {
-        this.$emit('getTableValue', async (data) => {
-          resolve(await data);
+      async handleAudit(status) {
+        //发起人补充
+        // if (this.taskDefinitionKey === 'starter') {
+        //   await this.getTableValue();
+        // }
+        await this._approveTaskWithVariables(status);
+      },
+      async _approveTaskWithVariables(status) {
+        let variables = {
+          pass: !!status
+        };
+        let API = !!status ? approveTaskWithVariables : rejectTask;
+        API({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables
+        }).then((res) => {
+          if (res.data.code != '-1') {
+            this.$emit('handleAudit', {
+              status,
+              title: status === 0 ? '驳回' : ''
+            });
+          }
         });
-      });
-    },
+      },
 
-    //更多
-    handleCommand(command) {
-      if (command === 'cancel') {
-        this.$confirm("是否确认作废?", {
-          type: 'warning',
-          cancelButtonText: '取消',
-          confirmButtonText: '确定'
-        }).then(() => {
-          cancel({
-            id: this.taskId,
-            reason: this.form.reason,
-            businessId: this.businessId,
-          }).then(() => {
-            this.$emit('handleClose');
-          }).catch(() => {
-            this.$message.error("流程作废失败");
+      getTableValue() {
+        return new Promise((resolve, reject) => {
+          this.$emit('getTableValue', async (data) => {
+            resolve(await data);
           });
-        }).catch(() => {
         });
-      }
-    },
+      },
 
-  }
-};
+      //更多
+      handleCommand(command) {
+        if (command === 'cancel') {
+          this.$confirm('是否确认作废?', {
+            type: 'warning',
+            cancelButtonText: '取消',
+            confirmButtonText: '确定'
+          })
+            .then(() => {
+              cancel({
+                id: this.taskId,
+                reason: this.form.reason,
+                businessId: this.businessId
+              })
+                .then(() => {
+                  this.$emit('handleClose');
+                })
+                .catch(() => {
+                  this.$message.error('流程作废失败');
+                });
+            })
+            .catch(() => {});
+        }
+      }
+    }
+  };
 </script>
 
 <style lang="scss"></style>

+ 2 - 2
src/views/bpm/handleTask/components/outsourcedWarehousingNoProcurement/detailDialog.vue

@@ -97,9 +97,9 @@
             <el-form-item prop="outsourceSendCode" label="委外发货单编码:">
               {{ form.outsourceSendCode }}
             </el-form-item>
-            <el-form-item prop="pricingWay" label="计价方式:">
+            <!-- <el-form-item prop="pricingWay" label="计价方式:">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
-            </el-form-item>
+            </el-form-item> -->
 
             <el-form-item
               label="制单人:"

+ 2 - 2
src/views/bpm/handleTask/components/purchaseOrder/invoice/receiptInfo.vue

@@ -51,11 +51,11 @@
             {{ form.outsourceSendCode }}
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <!-- <el-col :span="8">
           <el-form-item prop="pricingWay" label="计价方式:">
             {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="8">
           <el-form-item label="制单人:" prop="makerName">
             {{ form.makerName }}

+ 19 - 31
src/views/bpm/handleTask/components/saleOrder/invoice/submit.vue

@@ -47,37 +47,9 @@
         icon="el-icon-circle-close"
         type="danger"
         size="mini"
-        @click="handleAudit(0)"
-        v-if="
-          ['deptLeaderApprove', 'storemanApprove'].includes(
-            taskDefinitionKey
-          ) && outInData.verifyStatus != 1
-        "
+        @click="rejectTask(0)"
         >驳回
       </el-button>
-      <!-- <el-button
-        icon="el-icon-circle-close"
-        type="danger"
-        size="mini"
-        @click="handleBackList"
-        >退回
-      </el-button> -->
-      <!-- <el-button
-        icon="el-icon-circle-close"
-        type="danger"
-        size="mini"
-        @click="handleAudit(0)"
-        v-if="taskDefinitionKey != 'productionSupervisorApprove1'"
-        >不通过
-      </el-button>
-      <el-button
-        icon="el-icon-edit-outline"
-        type="primary"
-        size="mini"
-        v-if="taskDefinitionKey != 'productionSupervisorApprove1'"
-        @click="handleUpdateAssignee"
-        >转办
-      </el-button> -->
     </div>
   </el-col>
 </template>
@@ -89,7 +61,7 @@
     getWarehouseListByIds,
     saleSendProcessCancel
   } from '@/api/bpm/components/saleManage/saleorder';
-  import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
+  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
   import { getOutInBySourceBizNo } from '@/api/classifyManage';
   import outin from '@/api/warehouseManagement/outin';
   import { data } from 'ele-admin/lib/ele-pro-table';
@@ -186,7 +158,23 @@
       handleBackList() {
         this.$emit('handleBackList');
       },
-
+      rejectTask(status) {
+        let variables = {
+          pass: !!status
+        };
+        rejectTask({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables
+        }).then((res) => {
+          if (res.data.code != '-1') {
+            this.$emit('handleAudit', {
+              status,
+              title: status === 0 ? '驳回' : ''
+            });
+          }
+        });
+      },
       async handleAudit(status) {
         let storemanIds = '';
         //发起人补充