2
3
Просмотр исходного кода

下一步;没保存基本信息添加禁用;未办提交审核位置

baichengfei 5 лет назад
Родитель
Сommit
ddfe7af635

+ 1 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/auditbuslist.vue

@@ -61,10 +61,7 @@
 
     <el-card class="box-card" style="margin-top: -20px">
       <div slot="header" class="clearfix">
-        <span>企业资质</span>
-        <span style="float: right;">
-          <el-button type="primary" size="mini"  v-if ="Visiblebtn =='0'" @click="AuditEntity">提交审批</el-button>
-        </span>
+        <span>企业资质1</span>
       </div>
       <auditfile-list ref="auditfileList" :data="auditfileList" :SupplierId="SupplierId"
         :SupplierCertId="SupplierCertId" :SupplierTypeCode="SupplierTypeCode" :businessList="auditbusList"

+ 1 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue

@@ -697,7 +697,7 @@
         <el-button style="float: right; padding: 3px 10px"
                    type="text"
                    @click="manufacturerdialog"
-                   :disabled="certId > 0 && parseInt(formData.status) >= 0"
+                   :disabled="parseInt(certId) === 0"
         >添加</el-button>
       </div>
       <manufacturer-list ref="manufacturerList"

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -522,7 +522,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="审核状态">
+        <el-form-item label="审核状态1">
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">退回</el-radio>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -578,7 +578,7 @@ export default {
       loading: false,
       WorkerTotal: 0,
       allowpre: true,
-      totalTab: 3,
+      totalTab: 4,
       activeName: '0',
       chooseAuditorVisible: false,
       chooseAuditorVisibleFen: false,

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -574,7 +574,7 @@ export default {
       loading: false,
       WorkerTotal: 0,
       allowpre: true,
-      totalTab: 3,
+      totalTab: 4,
       activeName: '0',
       chooseAuditorVisible: false,
       chooseAuditorVisibleFen: false,

+ 109 - 15
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -22,6 +22,7 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="concentrateAuditClick()" v-if="auditBtn && this.formData.Status == '5'">集中评审</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="this.formData.Status == '10'">分办</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && parseInt(this.formData.Status) === 6">交费</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commitAudit()" v-if="parseInt(this.formData.Status) === 0">提交审批</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -153,7 +154,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="企业资质">
+        <el-tab-pane label="企业1资质">
           <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId+''"
                          :SupplierTypeCode="classId+''" :Visiblebtn="this.formData.Status" height="360px">
           </auditbus-list>
@@ -198,7 +199,7 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="审核状态">
+        <el-form-item label="审核状态1">
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">退回</el-radio>
@@ -216,7 +217,7 @@
     </el-dialog>
     <el-dialog :title="atitle" :visible.sync="dialogConcentrateAuditVisible">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <el-form-item label="审核状态">
+        <el-form-item label="审核状态2">
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">退回</el-radio>
@@ -235,7 +236,7 @@
     </el-dialog>
     <el-dialog :title="atitle" :visible.sync="dialogCommonAuditMakeSureVisible">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <el-form-item label="审核状态">
+        <el-form-item label="审核状态3">
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">退回</el-radio>
@@ -249,12 +250,12 @@
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogCommonAuditMakeSureVisible = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="commonAuditMakeSure()" :loading="loading">确 定</el-button>
+        <el-button type="primary" size="small" @click="commonAuditMakeSure()" :loading="loading">确 定1</el-button>
       </div>
     </el-dialog>
     <el-dialog title="审核" :visible.sync="dialogMakeSure2">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <el-form-item label="审核状态">
+        <el-form-item label="审核状态4">
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">退回</el-radio>
@@ -291,7 +292,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure2 = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
+        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定2</el-button>
       </div>
     </el-dialog>
     <el-dialog title="提交领导审核" :visible.sync="dialogBusinessOfficeSeparateAuditVisible">
@@ -309,7 +310,7 @@
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogBusinessOfficeSeparateAuditVisible = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="businessOfficeSeparateAuditMakeSure()" :loading="loading">确 定</el-button>
+        <el-button type="primary" size="small" @click="businessOfficeSeparateAuditMakeSure()" :loading="loading">确 定3</el-button>
       </div>
     </el-dialog>
     <el-dialog title="提交初审" :visible.sync="dialogSecUnitSeparateVisible" width="520px">
@@ -372,7 +373,7 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogSecUnitSeparateVisible = false">取 消</el-button>
-        <el-button type="primary" @click="secUnitSeparateAuditMakeSure()" :loading="loading">确定</el-button>
+        <el-button type="primary" @click="secUnitSeparateAuditMakeSure()" :loading="loading">确2定</el-button>
       </span>
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
@@ -865,21 +866,114 @@
         })
       },
       // 保存信息
-      saveEntity () {
-        this.$refs['EntityForm'].validate((valid) => {
-          if (valid) {
-            // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + ''
-            if (!this.formData.Id) {
+      saveEntity (val) {
+        let valid1 = false
+        let valid2 = false
+        this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
+          valid1 = valid
+        })
+
+        this.$refs['BasisInfo'].$refs['EntityFormCert'].validate((valid) => {
+          valid2 = valid
+        })
+
+        if (valid1 && valid2) {
+          if (!this.formData.SetupTime) {
+            this.formData.SetupTime = null
+          } else {
+            this.formData.SetupTime = new Date(this.formData.SetupTime)
+          }
+          // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
+          this.formData.RegCapital = parseFloat(this.formData.RegCapital)
+          if (!this.formData.Id || !this.certId) {
+            if (val === 1) {
+              this.addEntityNoInfo()
+            } else {
               this.addEntity()
+            }
+          } else {
+            if (val === 1) {
+              this.updateEntityNoInfo()
             } else {
               this.updateEntity()
             }
+          }
+          return true
+        } else {
+          return false
+        }
+      },
+      updateNumberEntityNoInfo () {
+        this.$refs['EntityFormNumber'].validate((valid) => {
+          if (valid) {
+            if (!this.CheckCompanyBase()) {
+              return false
+            }
+            this.formDataCert.InStyle = this.formData.InStyle
+            api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(
+              res => {
+                if (res.data.code === 0) {
+                  // 保存成功后,初始化数据,变成修改
+                  this.initDatas()
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              }).catch(err => {
+              console.error(err)
+            })
           } else {
             return false
           }
         })
       },
-
+      selectAuditOrg () {
+        if (this.selectDept) {
+          this.changeOrgUnit(this.selectDept)
+        }
+        if (this.IsCompanyUser === 0) {
+          this.getFirAuditerByDept()
+          this.dialogVisible = true
+        } else if (this.IsCompanyUser === 1) {
+          this.dialogVisibleCom = true
+        }
+      },
+      commitAudit () {
+        this.saveEntity(1)
+        this.updateNumberEntityNoInfo()
+        apiCert.checkSupplierCertCanSubmit(this.certId, this.$axios)
+          .then(res => {
+            if (res.data.code === 0) {
+              this.selectAuditOrg()
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      updateEntityNoInfo () {
+        api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 更新子表
+            // this.updateNumberEntity()
+            this.initDatas()
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       // 保存信息
       saveCertEntity () {
         this.$refs['SupplierCertEditCompoment'].saveEntity()