소스 검색

流程相关页面

cz 2 년 전
부모
커밋
3895ddf39c

+ 10 - 0
src/api/process/index.js

@@ -16,3 +16,13 @@ export function exampleInfoShowFlow(data = {}) {
     data: data,
   })
 }
+
+
+//审批流程列表
+export function getWaitTask(data = {}) {
+  return request({
+    url: '/api/service-flow/exampleInfo/getWaitingProcessingPage',
+    method: 'post',
+    data: data,
+  })
+}

+ 4 - 4
src/views/process/backlog/index.vue

@@ -35,7 +35,7 @@
 </template>
 
 <script>
-// import { getWaitingProcessingPage } from '@/api/process/processNode.js'
+import { getWaitTask } from "@/api/process";
 
 export default {
   name: "processBacklog",
@@ -52,19 +52,19 @@ export default {
   },
   created() {},
   mounted() {
-    // this.getList();
+    this.getList();
   },
   methods: {
     getList() {
       this.loading = true;
-      getWaitingProcessingPage(this.queryParams).then(
+      getWaitTask(this.queryParams).then(
         (res) => {
           this.tableList = res.data.data.records;
           this.total = res.data.data.total;
           this.loading = false;
         },
         (err) => {
-          console.log("getWaitingProcessingPage: " + err);
+          console.log("getWaitTask: " + err);
           this.loading = false;
         }
       );

+ 4 - 0
src/views/process/examinationApproval/index.vue

@@ -183,6 +183,7 @@ export default {
             if (this.transferParams.flowCode === "PURCHASE") {
               const flag = this.$refs.make.handleSubmit();
               if (flag) {
+                this.loadingStatus = true;
                 const data = this.$refs.make.form;
                 const goodsList = data.goodsList.map((x) => ({
                   id: x.id,
@@ -192,6 +193,7 @@ export default {
                 data.goodsList = goodsList;
                 sendPurchase(data).then(
                   () => {
+                    this.loadingStatus = false;
                     this.msgSuccess("发起成功");
                     this.clickCancel();
                   },
@@ -206,6 +208,7 @@ export default {
       } else {
         this.$refs.ruleForm.validate((valid) => {
           if (valid) {
+            this.loadingStatus = true;
             if (this.transferParams.flowCode === "PURCHASE") {
               purchaseApproval({
                 id: this.transferParams.id,
@@ -213,6 +216,7 @@ export default {
                 flowRemark: this.form.flowRemark,
               }).then(
                 () => {
+                  this.loadingStatus = false;
                   this.msgSuccess("审批成功");
                   this.clickCancel();
                 },

+ 20 - 9
src/views/purchase-management/deliver-goods/index.vue

@@ -9,6 +9,8 @@ import PurchaseDetails from "@/components/purchase/details.vue";
 
 import backGoods from "./backGoods.vue";
 
+import { mapGetters } from "vuex";
+
 export default {
   components: {
     query,
@@ -35,11 +37,14 @@ export default {
           prop: "status",
           data: [],
         },
-        // {
-        //   label: "付款状态",
-        //   prop: "type",
-        //   data: [],
-        // },
+        {
+          label: "审批状态",
+          prop: "status",
+          data: [
+            { label: "审批中", value: "10" },
+            { label: "审批通过", value: "60" },
+          ],
+        },
       ],
       tableList: [],
       total: 0,
@@ -87,7 +92,10 @@ export default {
       },
     };
   },
+  computed: mapGetters(["userInfo"]),
+
   created() {
+    console.log(this.userInfo, "aaaaass");
     const businessDictData = JSON.parse(
       window.localStorage.getItem("businessDict")
     );
@@ -306,7 +314,7 @@ export default {
         path: "/process/examinationApproval/index",
         query: {
           id: row.id,
-          processInstanceId: row.processInstanceId || "",
+          processInstanceId: row.flowId || "",
           flowCode: "PURCHASE",
         },
       });
@@ -389,12 +397,15 @@ export default {
                   >取消
                 </el-button>
               </div>
-              <el-button
+              <!-- <el-button
                 type="text"
-                v-if="scope.row.status === 10"
+                v-if="
+                  scope.row.status === 10 &&
+                  scope.row.flowApproverId === userInfo.user_id
+                "
                 @click="handleExamine(scope.row)"
                 >审批
-              </el-button>
+              </el-button> -->
             </div>
           </template>
         </el-table-column>