Browse Source

修改bug

qukaidi 2 years ago
parent
commit
b9f6369c06

+ 7 - 0
src/api/approveData/main.js

@@ -40,3 +40,10 @@ export function orderCheckProcess(data) {
   })
 }
 
+export function financingExcess(data) {
+  return request({
+      url: '/api/trade-purchase/woodHarvestingCloud/financingExcess',
+      method: 'post',
+      data: data
+  })
+}

+ 7 - 0
src/api/purchasingManagement/inStock.js

@@ -72,4 +72,11 @@ export function getAllgoods() {
         url: '/api/blade-client/goodsdesc/descListAll',
         method: 'get',
     })
+}
+export function financingExcess(data) {
+    return request({
+        url: '/api/trade-purchase/woodHarvestingCloud/financingExcess',
+        method: 'post',
+        data: data
+    })
 }

+ 25 - 4
src/views/approveData/index.vue

@@ -61,7 +61,7 @@
 import option from "./configuration/mainList.json";
 import option2 from "./configuration/mainList2.json";
 import option3 from "./configuration/mainList3.json";
-import { getList, approvePass } from "@/api/approveData/main";
+import { getList, approvePass, financingExcess } from "@/api/approveData/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
 import { getUserInfo } from "@/api/system/user";
@@ -199,9 +199,29 @@ export default {
         });
     },
     openCheck(row) {
-      this.batch = false; //单条操作
-      this.checkDialog = true;
-      this.checkData = row;
+      if (row.checkType == 'CK') {
+        financingExcess({ id: this.form.id }).then(res => {
+          if (res.data.data == '操作成功') {
+            this.batch = false; //单条操作
+            this.checkDialog = true;
+            this.checkData = row;
+          } else {
+            this.$confirm("此订单余额不足,是否继续审批?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.batch = false; //单条操作
+              this.checkDialog = true;
+              this.checkData = row;
+            })
+          }
+        })
+      } else {
+        this.batch = false; //单条操作
+        this.checkDialog = true;
+        this.checkData = row;
+      }
     },
     choceCheckFun() {
       this.checkDialog = false;
@@ -279,4 +299,5 @@ export default {
 </script>
 
 <style scoped>
+
 </style>

+ 54 - 25
src/views/salesManagement/outStock/detailsPage.vue

@@ -68,8 +68,8 @@
         </avue-crud>
       </trade-card>
       <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
-        feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'" :inCropId="true"
-        :tabShow="2" @beforeFinance="beforeFinance" :delType="2" :billingShow="false"/>
+        feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
+        :inCropId="true" :tabShow="2" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
       <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
         delUrl="" />
       <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
@@ -82,7 +82,7 @@
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
@@ -404,29 +404,58 @@ export default {
     },
     //请核
     auditCheck() {
-      this.$confirm("确定审核此订单?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        this.buttonLoading = true
-        const data = {
-          id: this.form.id,
-          checkType: 'CK',
-          url: '/salesManagement/outStock/index',
-          pageStatus: "this.$store.getters.entranceXsStatus",
-          pageLabel: "出库管理",
-          checkFlag: 2,
+      financingExcess({ id: this.form.id }).then(res => {
+        if (res.data.data == '操作成功') {
+          this.$confirm("确定审核此订单?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            this.buttonLoading = true
+            const data = {
+              id: this.form.id,
+              checkType: 'CK',
+              url: '/salesManagement/outStock/index',
+              pageStatus: "this.$store.getters.entranceXsStatus",
+              pageLabel: "出库管理",
+              checkFlag: 2,
+            }
+            checkWarehousing(data).then(res => {
+              if (res.data.success) {
+                this.$message.success("操作成功!")
+                this.viewDisabled = true
+                this.approverDisabled = true
+              }
+            })
+          }).finally(() => {
+            this.buttonLoading = false
+          })
+        }else{
+          this.$confirm("此订单余额不足,是否继续确认提交审核?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            this.buttonLoading = true
+            const data = {
+              id: this.form.id,
+              checkType: 'CK',
+              url: '/salesManagement/outStock/index',
+              pageStatus: "this.$store.getters.entranceXsStatus",
+              pageLabel: "出库管理",
+              checkFlag: 2,
+            }
+            checkWarehousing(data).then(res => {
+              if (res.data.success) {
+                this.$message.success("操作成功!")
+                this.viewDisabled = true
+                this.approverDisabled = true
+              }
+            })
+          }).finally(() => {
+            this.buttonLoading = false
+          })
         }
-        checkWarehousing(data).then(res => {
-          if (res.data.success) {
-            this.$message.success("操作成功!")
-            this.viewDisabled = true
-            this.approverDisabled = true
-          }
-        })
-      }).finally(() => {
-        this.buttonLoading = false
       })
     },
     getTemplate() {