소스 검색

前:信息变更保存不检查资质,提交才检查,提交文案;入库审核去掉弹窗,默认同意

wd 4 년 전
부모
커밋
5406acf786

+ 57 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/auditoperation.vue

@@ -17,9 +17,7 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick" v-if="auditBtn && InfoStatus == '1'">初审</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick" v-if="auditBtn && InfoStatus == '2'">复审</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick" v-if="auditBtn && InfoStatus == '5'">企管法规处审批</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick" v-if="auditBtn && InfoStatus == '7'">入库审批</el-button>
-          <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && InfoStatus == '6'">交费</el-button>-->
-          <!-- <el-button type="primary" size="mini" @click="submitInfoChange" v-if="InfoStatus > 0">审核</el-button> -->
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="putStorage" v-if="auditBtn && InfoStatus == '7'" :loading="putLoading">确认入库</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px;"  onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -1111,7 +1109,21 @@
         </el-table-column>
       </el-table>
     </el-dialog>
-
+    <el-dialog title="退回原因" :close-on-click-modal="false" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea" placeholder="请输入退回原因,不少于2个字!"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity" :loading="putLoading">确定</el-button>
+      </span>
+    </el-dialog>
     <el-dialog title="审核" :visible.sync="dialogCommonAuditMakeSureVisible">
       <el-form label-width="120px" :model="shenheForm" ref="EntityFormref">
         <el-row>
@@ -1252,6 +1264,9 @@
     },
     data () {
       return {
+        dialogVisibleBack: false,
+        putLoading: false,
+        backRemark: '',
         hseTrainingStatus: false,
         HSEList: [],
         is_todo: '0',
@@ -1849,6 +1864,44 @@
         this.dialogCommonAuditMakeSureVisible = true
         this.radioChange()
       },
+      // 入库
+      putStorage () {
+        this.putLoading = true
+        let params = {
+          SuppId: parseInt(this.SuppId),
+          result: 1,
+          AuditRemark: '同意'
+        }
+        api.commonAuditEntity(parseInt(this.infoId), params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            if (this.is_todo === '1') {
+              this.$router.push('/')
+            } else {
+              this.initDatas()
+            }
+            this.dialogCommonAuditMakeSureVisible = false
+            this.$message({
+              duration: 10000,
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.putLoading = false
+        }).catch(err => {
+          this.putLoading = false
+          console.error(err)
+        })
+      },
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
       paySureClick () {
         console.log('交费按钮')
         this.$confirm('是否确认交费', '提示', {

+ 26 - 19
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -22,7 +22,7 @@
             v-if="(InfoStatus == '' || InfoStatus <= 0) && !butnab && authUser.Profile.IsCompanyUser == 1">提交
           </el-button>
           <el-button type="primary" size="mini" @click="separateUnitSubmitApplyBtn"
-                     v-if="(InfoStatus == '' || InfoStatus <= 0) && authUser.Profile.IsCompanyUser == 0 ">提交申请
+                     v-if="(InfoStatus == '' || InfoStatus <= 0) && authUser.Profile.IsCompanyUser == 0 ">提交
           </el-button>
           <router-link :to="'/oilsupplier/infochangech'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -3505,25 +3505,27 @@
                 this.saveLoading = false
                 return resolve(false)
               } else {
-                // 供应商类型变更时检查是否缺少资质
-                let fileType = {
-                  Type: this.formData.OperType === '制造商' ? 1 : 2,
-                  SupplierId: this.formData.Id
-                }
-                supplierapi.checkCertFileForSupTypeChange(fileType, this.$axios).then(res => {
-                  if (res.data.code === 1) {
-                    this.addInfoChangeItemCh(val)
-                    resolve(true)
-                  } else {
-                    this.$message({
-                      duration: 10000,
-                      type: 'warning',
-                      message: res.data.message
-                    })
-                    this.saveLoading = false
-                    return resolve(false)
+                this.addInfoChangeItemCh(val)
+                if (val === 1) {
+                  // 供应商类型变更时检查是否缺少资质
+                  let fileType = {
+                    Type: this.formData.OperType === '制造商' ? 1 : 2,
+                    SupplierId: this.formData.Id
                   }
-                })
+                  supplierapi.checkCertFileForSupTypeChange(fileType, this.$axios).then(res => {
+                    if (res.data.code === 1) {
+                      return resolve(true)
+                    } else {
+                      this.$message({
+                        duration: 10000,
+                        type: 'warning',
+                        message: res.data.message
+                      })
+                      this.saveLoading = false
+                      return resolve(false)
+                    }
+                  })
+                }
               }
             }).catch(err => {
               this.saveLoading = false
@@ -3531,6 +3533,11 @@
               return resolve(false)
             })
           } else {
+            this.$message({
+              duration: 10000,
+              type: 'warning',
+              message: '请完善企业基本信息! '
+            })
             this.saveLoading = false
             return resolve(false)
           }