Pārlūkot izejas kodu

添加仓库审核

mxx 3 gadi atpakaļ
vecāks
revīzija
64a2ed4d9f

+ 3 - 13
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -40,7 +40,7 @@
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'查看')">查看</el-button>
             <el-button size="mini" @click="newAcquisition(scope.$index, scope.row,'查看')">查看</el-button>
             <el-button v-if="scope.row.status!='审核中'" size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')">编辑</el-button>
             <el-button v-if="scope.row.status!='审核中'" size="mini" @click="newAcquisition(scope.$index, scope.row,'编辑')">编辑</el-button>
-            <el-button v-if="scope.row.status=='审核中'" size="mini" :disabled="!userJurisdiction" @click="newAcquisition(scope.$index, scope.row,'编辑')">审核中</el-button>
+            <el-button v-if="scope.row.status=='审核中'" size="mini" :disabled="!userJurisdictionAudit" @click="newAcquisition(scope.$index, scope.row,'审核中')">审核中</el-button>
             <el-button size="mini" :disabled="!userJurisdiction" type="danger" @click="delRow(scope.$index, scope.row)">删除</el-button>
             <el-button size="mini" :disabled="!userJurisdiction" type="danger" @click="delRow(scope.$index, scope.row)">删除</el-button>
             <el-button size="mini" @click="print(scope.$index, scope.row)">打印</el-button>
             <el-button size="mini" @click="print(scope.$index, scope.row)">打印</el-button>
           </template>
           </template>
@@ -102,13 +102,12 @@
     },
     },
     computed() {},
     computed() {},
     created() {
     created() {
-
-
     },
     },
     methods: {
     methods: {
       getUserJurisdiction(){
       getUserJurisdiction(){
          this.userJurisdiction = getHp('acquisitionManagement.acquisition.view')
          this.userJurisdiction = getHp('acquisitionManagement.acquisition.view')
          this.userJurisdictionAllow =  getHp('acquisitionManagement.acquisition.allow')
          this.userJurisdictionAllow =  getHp('acquisitionManagement.acquisition.allow')
+         this.userJurisdictionAudit = getHp('acquisitionManagement.acquisition.view')
       },
       },
       handleSizeChange(val) {
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
         console.log(`每页 ${val} 条`)
@@ -154,22 +153,13 @@
               goodsNameList: this.goodsNameList
               goodsNameList: this.goodsNameList
             }
             }
             break
             break
-          case '编辑':
+          default:
           _query = {
           _query = {
             data: JSON.stringify(row),
             data: JSON.stringify(row),
             type: type,
             type: type,
              goodsNameList: this.goodsNameList
              goodsNameList: this.goodsNameList
           }
           }
             break
             break
-          case "查看":
-            _query = {
-              data: JSON.stringify(row),
-              type: type,
-              goodsNameList: this.goodsNameList
-            }
-            break
-          default:
-            break
         }
         }
         this.$router.push({
         this.$router.push({
           name: 'acquisitionManagementAdd',
           name: 'acquisitionManagementAdd',

+ 38 - 0
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -158,6 +158,7 @@
   import {
   import {
     packList,
     packList,
   } from '@/model/contarct/index'
   } from '@/model/contarct/index'
+  import { posthandle } from '@/model/purchasingManagement/index'
   export default {
   export default {
 
 
     components: {
     components: {
@@ -341,6 +342,11 @@
           this.submitName = "提交"
           this.submitName = "提交"
           this.getData()
           this.getData()
           break;
           break;
+          case "审核中":
+            // this.isEdit = false;
+            this.submitName = "通过"
+            this.getData()
+            break;
         case "查看":
         case "查看":
           this.isEdit = false;
           this.isEdit = false;
           this.submitName = "计算"
           this.submitName = "计算"
@@ -783,9 +789,41 @@
                 this.isCountShow = false
                 this.isCountShow = false
               })
               })
             }
             }
+            case "审核中":
+            isValidate = this.validate()
+            if (isValidate) {
+              purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
+                console.log(response)
+                // this.tableData = response.records
+                let that = this
+                  this.$confirm(`是否确定通过?`, {
+                    cancelButtonText: '取消',
+                    confirmButtonText: '确定',
+                    type: 'warning',
+                  }).then(() => {
+                    that.audit(this.baseInfoForm,0,true,2)
+                  })
+              })
+            }
             break;
             break;
         }
         }
       },
       },
+      //审核
+      audit(item,status, status2, reason) {
+          posthandle({
+            taskId: item.taskId,
+            approved: status,
+            auditMind: reason != undefined ? '已驳回' : '34',
+            needReapply: status2 != undefined ? true : false,
+          })
+            .toPromise()
+            .then((response) => {
+              this.isCountShow = false
+            })
+            .catch((req) => {
+              this.$message.warning(req.message)
+            })
+      },
       // 关闭
       // 关闭
       closeCount() {
       closeCount() {
         this.isCountShow = true
         this.isCountShow = true