lilei 3 weeks ago
parent
commit
b7d87c95d7

+ 11 - 0
src/api/salesNew.js

@@ -249,6 +249,17 @@ export const salesWriteUpAuditPass = (params) => {
     }
   })
 }
+// 销售 审核不通过 待上级审核
+export const salesWriteUpAuditReject = (params) => {
+  return axios({
+    url: '/sales/superiorAuditReject',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('审核不通过,待上级审核')
+    }
+  })
+}
 //  销售 一键审核下推
 export const salesWriteAuditPush = (params) => {
   return axios({

+ 18 - 5
src/views/salesManagement/salesQueryNew/detail.vue

@@ -396,6 +396,7 @@ import {
   salesWriteAuditPass,
   salesWriteUpAuditPass,
   salesWriteAuditReject,
+  salesWriteUpAuditReject,
   salesWriteAuditPush,
   getThirdStockQty,
   salesPromoValidaAudit,
@@ -811,7 +812,6 @@ export default {
             _this.verificationSuccess(isBatch)
           } else {
             // 审核或上级审核,弹框表格提示
-            d[0].type = 'audit_price_less_cost'
             _this.openVaildPrice(d[0])
           }
         } else {
@@ -893,16 +893,29 @@ export default {
     },
     // 价格低于成本校验提示,继续审核
     vaildPriceOk (type) {
+      console.log(type, this.isSupAudit)
       if (type == 'confirm') {
         this.auditOrder(type)
         return
       }
-      // 不通过 或 是 如果是待上级审核,调用
-      if (type == 'AUDIT_REJECT' || this.isSupAudit) {
+      // 不通过,调用
+      if (type == 'AUDIT_REJECT') { // 价格低于成本审核不通过
         this.auditOrder(type)
-      } else {
+      } else if (type == 'AUDIT_UP_REJECT') { // 待上级审核不通过
+        this.spinning = true
+        salesWriteUpAuditReject({
+          salesBillSn: this.bizSn || this.$route.params.sn
+        }).then(res => {
+          if (res.status == 200) {
+            this.$message.success(res.message)
+            this.closeVaildPrice()
+            this.handleBack()
+          }
+          this.$refs.vaildPriceModal.spinning = false
+          this.spinning = false
+        })
+      } else { // 通过审核,业务状态变更 待上级审核
         this.spinning = true
-        // 通过审核,业务状态变更 待上级审核
         salesWriteUpAuditPass({
           salesBillSn: this.bizSn || this.$route.params.sn,
           billStatus: type

+ 2 - 2
src/views/salesManagement/salesQueryNew/list.vue

@@ -239,7 +239,7 @@
                 size="small"
                 type="link"
                 class="button-info"
-                v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesEdit')"
+                v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'SUPERIOR_AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesEdit')"
                 @click="handleEdit(record)"
               >
                 编辑
@@ -277,7 +277,7 @@
                 size="small"
                 type="link"
                 class="button-error"
-                v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesDel')"
+                v-if="(record.salesBillSource == 'SALES' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT' || record.billStatus == 'SUPERIOR_AUDIT_REJECT' || record.billStatus == 'HQ_CHANGE'))&&$hasPermissions('B_salesDel')"
                 @click="handleDel(record)"
               >
                 删除

+ 2 - 1
src/views/salesManagement/salesQueryNew/vaildPriceModal.vue

@@ -25,7 +25,7 @@
           {{ dataObj.message }}
         </div>
         <div style="margin-top:36px;text-align:center;" v-if="modalType == 'wait_up_audit_price_less_cost'||modalType == 'audit_price_less_cost'">
-          <a-button type="primary" style="margin-right: 15px" @click="handleSubmit('AUDIT_REJECT')" id="chooseCustom-btn-noPasss">审核不通过</a-button>
+          <a-button type="primary" style="margin-right: 15px" @click="handleSubmit(modalType == 'wait_up_audit_price_less_cost'?'AUDIT_UP_REJECT':'AUDIT_REJECT')" id="chooseCustom-btn-noPasss">审核不通过</a-button>
           <a-button type="primary" class="button-info" @click="handleSubmit('AUDIT_PASS')" id="chooseCustom-btn-Pass">审核通过</a-button>
         </div>
         <div style="margin-top:36px;text-align:center;" v-if="modalType == 'price_less_cost'">
@@ -107,6 +107,7 @@ export default {
   methods: {
     // 保存
     handleSubmit (type) {
+      console.log(type, this.modalType)
       this.spinning = true
       this.$emit('ok', type)
     },