研发图纸文件管理系统-前端项目
longyvfengyun
2022-08-01 299ffcbf7e0552db7a4018e3abc092e0979d8d3d
内容调整
3个文件已修改
64 ■■■■ 已修改文件
src/pages/workplace/handlingList/HandlingList.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/workForm/approveForm.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/workForm/auditForm.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/handlingList/HandlingList.vue
@@ -32,7 +32,12 @@
          centered
          :footer="false"
          :width="1300">
        <draw-upload v-if="isReload" :list="subList" @success="showVisibleModal" text="审核结果"></draw-upload>
        <draw-upload v-if="isReload" :list="subList">
          <template slot="footer">
            <a-button type="primary" style="margin-right: 8px" @click="showVisibleModal(1)">审核通过</a-button>
            <a-button type="danger" @click="showVisibleModal(0)">驳回</a-button>
          </template>
        </draw-upload>
      </a-modal>
      <a-modal
          v-model="auditFormVisible"
@@ -41,7 +46,7 @@
          :maskClosable="false"
          :footer="false"
          :width="500">
        <audit-form v-if="isReload" @success="auditSuccess"></audit-form>
        <audit-form :modelType="modelType" v-if="isReload" @success="auditSuccess" @cancel="auditCancel"></audit-form>
      </a-modal>
      <a-modal
          v-model="approveFormVisible"
@@ -50,7 +55,7 @@
          :maskClosable="false"
          :footer="false"
          :width="500">
        <approve-form @success="approveSuccess"></approve-form>
        <approve-form :modelType="modelType" @success="approveSuccess" @cancel="approveCancel"></approve-form>
      </a-modal>
    </div>
  </page-toggle-transition>
@@ -114,6 +119,12 @@
          align: "center"
        },
        {
          title: '工单状态',
          dataIndex: 'auditSuggestion',
          key: 'auditSuggestion',
          align: "center"
        },
        {
          title: '创建人',
          dataIndex: 'createUserName',
          key: 'createUserName',
@@ -144,7 +155,8 @@
        linkStatus: 1,    // 审批状态 1:通过,2:驳回
        dealReason: "",   // 审核建议
        parentId: 0,
      }
      },
      modelType: 0,
    }
  },
  methods: {
@@ -163,7 +175,6 @@
        if(rs.code == 1) {
          data = rsData.approvingBomList;
        }
        console.log(rs);
        this.subList = data;
        this.workDetailVisible = true;
@@ -206,6 +217,7 @@
        if(rs.code == 1) {
          data = rs.data.list.map(item=>{
            item.createUserName = item.createUser.name;
            item.auditSuggestion = item.links.length == 0?"-":item.links[0].dealDesc;
            return item;
          });
        }
@@ -213,8 +225,14 @@
        this.dataSource = data;
      });
    },
    showVisibleModal() {
    /**
     * 显示审核
     * 1003显示总经理审核界面
     * @param modelType 审核状态 0:驳回 1:通过
     */
    showVisibleModal(modelType) {
      let roles = this.roles;
      this.modelType = modelType;
      switch (Number(roles[0].id)) {
        case 1003:
          this.approveFormVisible = true;
@@ -227,6 +245,9 @@
    auditSuccess(info) {
      let data = {...this.formData, ...info};
      this.audit(data);
    },
    auditCancel() {
      this.auditFormVisible = false;
    },
    audit(data) {
      audit(data).then(res=>{
@@ -250,6 +271,9 @@
      let data = {...this.formData, ...info};
      this.approve(data);
    },
    approveCancel() {
      this.approveFormVisible = false;
    },
    approve(data) {
      let loading = this.$layer.loading();
      approve(data).then(res=>{
src/pages/workplace/workForm/approveForm.vue
@@ -18,8 +18,8 @@
      </a-row>
    </a-form>
    <div class="modal-footer">
      <a-button type="primary" @click="handleAudit(1)">通过</a-button>
      <a-button style="margin-left: 8px;" type="danger" @click="handleAudit(2)">驳回</a-button>
      <a-button type="primary" @click="handleAudit(1)">{{ modelType?"确认通过":"确认驳回" }}</a-button>
      <a-button style="margin-left: 8px;" type="danger" @click="cancelAudit">返回</a-button>
    </div>
  </div>
</template>
@@ -29,6 +29,12 @@
export default {
  name: "approveForm",
  props: {
    modelType: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {
      form: this.$form.createForm(this, { name: 'submitForm' }),
@@ -42,6 +48,9 @@
          this.$emit("success", values);
        }
      });
    },
    cancelAudit() {
      this.$emit('cancel');
    }
  }
}
src/pages/workplace/workForm/auditForm.vue
@@ -15,7 +15,7 @@
                placeholder="请输入审核建议" :rows="4" />
          </a-form-item>
        </a-col>
        <a-col :span="24">
        <a-col :span="24" v-if="modelType">
          <a-form-item label="最终审批人">
            <a-select
                show-search
@@ -38,8 +38,8 @@
      </a-row>
    </a-form>
    <div class="modal-footer">
      <a-button type="primary" @click="handleAudit(1)">通过</a-button>
      <a-button style="margin-left: 8px;" type="danger" @click="handleAudit(2)">驳回</a-button>
      <a-button type="primary" @click="handleAudit(1)">{{modelType?"确认通过":"确认驳回"}}</a-button>
      <a-button style="margin-left: 8px;" type="danger" @click="cancelAudit">返回</a-button>
    </div>
  </div>
</template>
@@ -50,6 +50,12 @@
export default {
  name: "auditForm",
  props: {
    modelType: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {
      form: this.$form.createForm(this, { name: 'submitForm' }),
@@ -80,6 +86,9 @@
          this.$emit("success", values);
        }
      });
    },
    cancelAudit() {
      this.$emit('cancel');
    }
  },
  mounted() {