| | |
| | | centered |
| | | :footer="false" |
| | | :width="1300"> |
| | | <draw-upload v-if="isReload" :list="subList" @success="showAudit" text="审核结果"></draw-upload> |
| | | <draw-upload v-if="isReload" :list="subList" @success="showVisibleModal" text="审核结果"></draw-upload> |
| | | </a-modal> |
| | | <a-modal |
| | | v-model="auditFormVisible" |
| | | title="项目经理审核" |
| | | centered |
| | | :maskClosable="false" |
| | | :footer="false" |
| | | :width="500"> |
| | | <audit-form v-if="isReload" @success="auditSuccess"></audit-form> |
| | | </a-modal> |
| | | <a-modal |
| | | v-model="approveFormVisible" |
| | | title="总经理审核" |
| | | centered |
| | | :maskClosable="false" |
| | | :footer="false" |
| | | :width="500"> |
| | | <approve-form @success="approveSuccess"></approve-form> |
| | | </a-modal> |
| | | </div> |
| | | </page-toggle-transition> |
| | |
| | | import PageToggleTransition from "@/components/transition/PageToggleTransition"; |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import {mapState} from "vuex"; |
| | | import {handlingListPage, linkInfo, audit} from "@/pages/workplace/apis"; |
| | | import {handlingListPage, linkInfo, audit, approve} from "@/pages/workplace/apis"; |
| | | import DrawUpload from "@/pages/components/drawUpload/DrawUpload"; |
| | | import AuditForm from "@/pages/workplace/workForm/auditForm"; |
| | | import const_total from "@/pages/workplace/const_total"; |
| | | import ApprovedList from "@/pages/workplace/approvedList/ApprovedList"; |
| | | import ApproveForm from "@/pages/workplace/workForm/approveForm"; |
| | | |
| | | export default { |
| | | name: "HandlingList", |
| | | components: { |
| | | ApproveForm, |
| | | ApprovedList, |
| | | DrawUpload, |
| | | PageToggleTransition, |
| | | AdvanceTable, |
| | |
| | | loading: false, |
| | | workDetailVisible: false, |
| | | auditFormVisible: false, |
| | | approveFormVisible: false, |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | mainId: 0, // 主id |
| | | linkStatus: 1, // 审批状态 1:通过,2:驳回 |
| | | dealReason: "", // 审核建议 |
| | | nextUser: 0, // 下一个审核的用户id |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.dataSource = data; |
| | | }); |
| | | }, |
| | | showAudit() { |
| | | this.auditFormVisible = true; |
| | | showVisibleModal() { |
| | | let roles = this.roles; |
| | | switch (Number(roles[0].id)) { |
| | | case 1003: |
| | | this.approveFormVisible = true; |
| | | break; |
| | | default: |
| | | this.auditFormVisible = true; |
| | | break; |
| | | } |
| | | }, |
| | | auditSuccess(info) { |
| | | let data = {...this.formData, ...info}; |
| | |
| | | console.log(error); |
| | | this.$message.error("提交失败,请检查网络"); |
| | | }); |
| | | }, |
| | | approveSuccess(info) { |
| | | let data = {...this.formData, ...info}; |
| | | this.approve(data); |
| | | }, |
| | | approve(data) { |
| | | let loading = this.$layer.loading(); |
| | | approve(data).then(res=>{ |
| | | this.$layer.close(loading); |
| | | let rs = res.data; |
| | | if(rs.code == 1 && res.data) { |
| | | this.$message.success("提交成功"); |
| | | this.approveFormVisible = false; |
| | | this.$nextTick(()=>{ |
| | | this.workDetailVisible = false; |
| | | }); |
| | | this.searchData(); |
| | | }else { |
| | | this.$message.warn("提交失败") |
| | | } |
| | | }).catch(error=>{ |
| | | this.$layer.close(loading); |
| | | console.log(error); |
| | | this.$message.error("提交失败,请检查网络"); |
| | | }); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('setting', ['animate']), |
| | | ...mapState('account', ["roles"]), |
| | | workDetailTitle() { |
| | | return this.title; |
| | | }, |
| | |
| | | }, |
| | | mounted() { |
| | | this.searchData(); |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :maskClosable="false" |
| | | :footer="false" |
| | | :width="500"> |
| | | <submit-form v-if="isReload" :list="subList" @success="successSubmit" @cancel="cancelSubmit"></submit-form> |
| | | <submit-form :title="title" v-if="isReload" :list="subList" @success="successSubmit" @cancel="cancelSubmit"></submit-form> |
| | | </a-modal> |
| | | </div> |
| | | </page-toggle-transition> |
| | |
| | | console.log(scope); |
| | | }, |
| | | onSearch(conditions, searchOptions) { |
| | | console.log(conditions); |
| | | console.log(searchOptions); |
| | | this.page = 1 |
| | | this.conditions = conditions |
| | | this.searchData(); |
| | |
| | | let rs = res.data; |
| | | if(rs.code == 1 && rs.data) { |
| | | this.subList = rs.data2; |
| | | this.title = rs.data3; |
| | | this.drawUploadVisible = true; |
| | | this.$message.success(rs.msg); |
| | | }else { |
| | |
| | | align: "center" |
| | | }, |
| | | { |
| | | title: '创建人', |
| | | dataIndex: 'createUserName', |
| | | key: 'createUserName', |
| | | title: '审批人', |
| | | dataIndex: 'approvingUserName', |
| | | key: 'approvingUserName', |
| | | align: "center" |
| | | }, |
| | | { |
| | |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rs.data.list.map(item=>{ |
| | | item.approvingUserName = item.approvingUser.name; |
| | | return item; |
| | | }); |
| | | } |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="工单标题"> |
| | | <a-input |
| | | v-decorator="['title', { initialValue: '', rules: [{ required: true, message: '请输入工单标题!' }] }]" |
| | | v-decorator="['title', { initialValue: title, rules: [{ required: true, message: '请输入工单标题!' }] }]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: "" |
| | | } |
| | | }, |
| | | data() { |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="12"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="审批建议"> |
| | | <a-textarea |
| | | v-decorator="[ |
| | | 'dealReason', |
| | | { |
| | | initialValue: '', |
| | | rules: [{ required: true, message: '请输入审批建议' }] |
| | | }, |
| | | ]" |
| | | placeholder="请输入审批建议" :rows="4" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </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> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import getItemByKey from "@/assets/js/tools/getItemByKey"; |
| | | |
| | | export default { |
| | | name: "approveForm", |
| | | data() { |
| | | return { |
| | | form: this.$form.createForm(this, { name: 'submitForm' }), |
| | | } |
| | | }, |
| | | methods: { |
| | | handleAudit(linkStatus) { |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | values.linkStatus = linkStatus; |
| | | this.$emit("success", values); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .modal-footer { |
| | | padding: 8px; |
| | | text-align: right; |
| | | } |
| | | </style> |