Sfoglia il codice sorgente

增项选择准入范围

lining 6 anni fa
parent
commit
55d2e373f4

+ 1 - 10
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -271,25 +271,16 @@ func (this *OilSupplierCertAppendController) UpdateEntity() {
 	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
 
 	cols := []string{
-
 		"Id",
-
+		"InStyle",
 		"ApplyDate",
-
 		"RecUnitFlag",
-
 		"RecUnitId",
-
 		"RecUnitName",
-
 		"WorkRange",
-
 		"Remark",
-
 		"ModifiedOn",
-
 		"ModifiedUserId",
-
 		"ModifiedBy",
 	}
 	err := svc.UpdateEntityBytbl(OilSupplierCertAppendName, id, &model, cols)

+ 2 - 2
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -175,11 +175,11 @@ module.exports = {
     'pages/oilsupplier/supplierfile/*.*',
 
     'pages/oilsupplier/suppliernopass/*.*',
-    // 'pages/oilsupplier/supplierps/*.*',
+    'pages/oilsupplier/supplierps/*.*',
     'pages/oilsupplier/supplierstorage/*.*',
     // 'pages/oilsupplier/supplierstore/*.*',
     'pages/oilsupplier/tablefieldsetting/*.*',
-    // 'pages/oilsupplier/technologyservice/*.*',
+    'pages/oilsupplier/technologyservice/*.*',
     'pages/system/*/*.*',
     // 'pages/setting/*/*.*',
     // 'pages/select/*/*.*',

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

@@ -45,6 +45,19 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="12">
+                <el-form-item label="准入方式">
+                  <el-select ref="inStyle" v-model="formData.InStyle"
+                             placeholder="请选择"
+                             style="width: 100%">
+                    <el-option v-for="item in InOptions"
+                               :key="item.Id"
+                               :label="item.Key"
+                               :value="item.Value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
               <el-col :span="24">
                 <el-form-item label="备注" prop="Remark">
                   <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
@@ -282,6 +295,7 @@ import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
         textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         chooseAuditorVisible: false,
         audithistoryshow: false,
+        InOptions: [],
         auditerOptions: [], // 审核人员
         secauditerOptions: [],
         auditerCurOptions: [],
@@ -323,6 +337,7 @@ import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
           Status: '',
           SupplierId: 1,
           SupplierCertId: 1,
+          InStyle: '',
           RecUnitFlag: '', // 推荐单位的级联Id标记
           RecUnitId: '', // 推荐单位编码
           RecUnitName: '', // 推荐单位名称
@@ -546,7 +561,6 @@ import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
             _this.subfileList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
             for (let idx in _this.subfileList) {
-              console.log(_this.subfileList[idx])
               _this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
             }
           })
@@ -567,6 +581,7 @@ import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.InOptions = res.data.items['InOptions']
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -626,7 +641,6 @@ import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
       },
 
       auditOrgChange (val) {
-        console.log(this.formData.Status, 'status')
         let auditstepcode = ''
         if (this.formData.Status === '1') {
           auditstepcode = 'SECOND_TRIAL'

+ 16 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -45,6 +45,19 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="12">
+                <el-form-item label="准入方式">
+                  <el-select ref="inStyle" v-model="formData.InStyle"
+                             placeholder="请选择"
+                             style="width: 100%">
+                    <el-option v-for="item in InOptions"
+                               :key="item.Id"
+                               :label="item.Key"
+                               :value="item.Value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
               <el-col :span="24">
                 <el-form-item label="备注" prop="Remark">
                   <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
@@ -295,6 +308,7 @@
         textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         chooseAuditorVisible: false,
         audithistoryshow: false,
+        InOptions: [],
         auditerOptions: [], // 审核人员
         secauditerOptions: [],
         auditerCurOptions: [],
@@ -339,6 +353,7 @@
           Id: '',
           Step: 1,
           Status: '',
+          InStyle: '',
           SupplierId: 1,
           SupplierCertId: 1,
           RecUnitFlag: '', // 推荐单位的级联Id标记
@@ -521,7 +536,6 @@
             _this.subfileList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
             for (let idx in _this.subfileList) {
-              console.log(_this.subfileList[idx])
               _this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
             }
           })
@@ -579,6 +593,7 @@
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.allorgunitOptions = res.data.items['Allunitorglist']
           this.MgrUnit = res.data.items['MgrUnit']
+          this.InOptions = res.data.items['InOptions']
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -638,7 +653,6 @@
     },
 
       auditOrgChange () {
-        console.log(this.formData.Status, 'status')
         let auditstepcode = ''
         if (this.formData.Status === '1') {
           auditstepcode = 'SECOND_TRIAL'

+ 18 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -45,6 +45,19 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="12">
+                <el-form-item label="准入方式">
+                  <el-select ref="inStyle" v-model="formData.InStyle"
+                             placeholder="请选择"
+                             style="width: 100%">
+                    <el-option v-for="item in InOptions"
+                               :key="item.Id"
+                               :label="item.Key"
+                               :value="item.Value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
               <el-col :span="24">
                 <el-form-item label="备注" prop="Remark">
                   <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
@@ -281,6 +294,7 @@
         chooseAuditorVisible: false,
         subfileList: [],
         audithistoryshow: false,
+        InOptions: [],
         auditerOptions: [], // 审核人员
         secauditerOptions: [],
         auditerCurOptions: [],
@@ -349,6 +363,7 @@
           ProcessKey: '',
           SupplierId: 0,
           SupplierCertId: 0,
+          InStyle: '',
           RecUnitFlag: '', // 推荐单位的级联Id标记
           RecUnitId: '', // 推荐单位编码
           RecUnitName: '', // 推荐单位名称
@@ -528,7 +543,6 @@
             _this.subfileList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
             for (let idx in _this.subfileList) {
-              console.log(_this.subfileList[idx])
               _this.subfileList[idx].FileUrlList = _this.subfileList[idx].FileUrl.split('$')
             }
           })
@@ -586,6 +600,7 @@
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.InOptions = res.data.items['InOptions']
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -645,7 +660,6 @@
     },
 
       auditOrgChange (val) {
-        console.log(this.formData.Status, 'status')
         let auditstepcode = ''
         if (this.formData.Status === '1') {
           auditstepcode = 'SECOND_TRIAL'
@@ -692,7 +706,7 @@
               })
               return
             }
-            if (this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') {
+            if (this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4' && this.formData.InStyle != '3') {
               if (this.selectDept === 0 || this.selectDept == '') {
                 this.$message({
                   type: 'warning',
@@ -701,7 +715,7 @@
                 return
               }
             }
-            if (this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') {
+            if (this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4' && this.formData.InStyle != '3') {
               if (this.userOptions == null || this.userOptions.length === 0) {
                 this.$message({
                   type: 'warning',
@@ -757,7 +771,6 @@
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.selectDept
         }
-        console.log('---params', params)
         api2.auditEntityFir(this.formData.Id, params, this.shenheForm, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.getEntityById()

+ 38 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -43,7 +43,7 @@
           </div>
           <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
             <el-row>
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-form-item label="供应商公司名称" prop="checkSelectedSupplier">
                   <el-select ref="suppselect" :disabled="formData.Status>0||IsCompanyUser == 1"
                     v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应商公司" style="width: 100%">
@@ -53,7 +53,17 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="16">
+              <el-col :span="6">
+                <el-form-item label="准入方式">
+                  <el-select ref="SpecType" v-model="formData.InStyle" :disabled="this.formData.Status > '0'&&!appendStatus"
+                             placeholder="请选择" style="width: 100%">
+                    <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" v-if="item.Value != '2' && item.Value != '3'"
+                               :value="item.Value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
                 <el-form-item label="备注" prop="Remark">
                   <el-input :disabled="formData.Status>0" type="textarea" v-model="formData.Remark"
                     placeholder="请输入">
@@ -265,9 +275,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室" v-if="allowpre">
-              <el-cascader :options="preorgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable disabled
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
-              </el-cascader>
+              <!--<el-cascader :options="preorgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable disabled-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">-->
+              <!--</el-cascader>-->
+              <el-select  v-model="selectDept" filterable
+                          placeholder="请选择" style="width: 100%" @change="changeOrgUnit">
+                <el-option  v-for="item in allorgunitOptions" :key="item.Id" :label="item.Fullname"
+                            :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -435,6 +451,8 @@ import fileapi from '@/api/oilsupplier/supplierfile'
         ComAuditdialogShow: false,
         organizeOption: [], // 审批部门
         auditerOption: [], // 审批人
+        InOptions: [], // 准入方式
+        allorgunitOptions: [],
         orgtreeprops: {
           value: 'id',
           label: 'name',
@@ -548,6 +566,7 @@ import fileapi from '@/api/oilsupplier/supplierfile'
           SupplierCertAppendId: '', // 增项信息表ID
           SupplierTypeCode: '',
           SubClassId: '', // 分类表主键
+          InStyle: '',
           // SortFlag: '', //分类标记
           Code: '', // 分类编码
           Name: '', // 分类名称
@@ -730,6 +749,13 @@ import fileapi from '@/api/oilsupplier/supplierfile'
       },
 
       SubpEntity () {
+        if (this.myentityList == null || this.myentityList.length <= 0) {
+          this.$message({
+            type: 'warning',
+            message: '没有新增准入项,不能提交!'
+          })
+          return
+        }
         if (this.UnitOrg === '') {
           this.$message({
             type: 'warning',
@@ -800,6 +826,8 @@ import fileapi from '@/api/oilsupplier/supplierfile'
           this.preorgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.UnitOrg = res.data.items['Register'].CheckUnitId
           this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.InOptions = res.data.items['InOptions']
+          this.allorgunitOptions = res.data.items['Allunitorglist']
           this.orgunitChange(this.UnitOrg)
         }).catch(err => {
           console.error(err)
@@ -892,6 +920,11 @@ import fileapi from '@/api/oilsupplier/supplierfile'
         return fullUrl
       },
       commitaudit () {
+        if (this.formData.InStyle === '2' || this.formData.InStyle === '6' || this.formData.InStyle === '4') {
+          this.allowpre = false
+        } else {
+          this.allowpre = true
+        }
         this.AuditdialogShow = true
         // if (this.subfileList && this.subfileList.length > 0) {
         //   for (var i = 0; i < this.subfileList.length; i++) {

+ 67 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -51,7 +51,7 @@
                   </el-cascader>
                 </el-form-item>
               </el-col> -->
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-form-item label="供应商公司名称" prop="checkSelectedSupplier">
                   <el-select ref="suppselect" :disabled="formData.Status>0||IsCompanyUser == 1" v-model="supplierOptions" filterable
                     @change="getInfo" placeholder="请选择供应商公司" style="width: 100%">
@@ -61,7 +61,21 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="16">
+              <el-col :span="6">
+                <el-form-item label="准入方式">
+                  <el-select ref="inStyle" v-model="formData.InStyle"
+                             :disabled="this.formData.Status > '0'"
+                             placeholder="请选择"
+                             style="width: 100%">
+                    <el-option v-for="item in InOptions"
+                               :key="item.Id"
+                               :label="item.Key"
+                               :value="item.Value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
                 <el-form-item label="备注" prop="Remark">
                   <el-input :disabled="formData.Status>0" type="textarea" v-model="formData.Remark" placeholder="请输入">
                   </el-input>
@@ -428,9 +442,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室" v-if="allowpre">
-              <el-cascader :options="preorgtreelist" :props="preorgtreeprops" :show-all-levels="false" filterable disabled
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
-              </el-cascader>
+              <!--<el-cascader :options="preorgtreelist" :props="preorgtreeprops" :show-all-levels="false" filterable disabled-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">-->
+              <!--</el-cascader>-->
+              <el-select  v-model="selectDept" filterable
+                          placeholder="请选择" style="width: 100%" @change="changeOrgUnit">
+                <el-option  v-for="item in allorgunitOptions" :key="item.Id" :label="item.Fullname"
+                            :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -589,6 +609,7 @@
       }
       return {
         // 456
+        selectDept: 100000071,
         Grade: '',
         OperType: '',
         cardloading: '',
@@ -741,6 +762,7 @@
           Step: 1,
           Status: '',
           ProcessKey: '',
+          InStyle: '',
           SupplierId: 0,
           SupplierCertId: 0,
           RecUnitFlag: '', // 推荐单位的级联Id标记
@@ -763,6 +785,8 @@
           Name: '', // 分类名称
           Remark: '' // 备注
         },
+        InOptions: [], // 准入方式
+        allorgunitOptions: [],
         // 列表数据
         entityList: [],
         myentityList: [],
@@ -817,11 +841,20 @@
       this.getSupplierList() // 获取供应方公司列表
       this.getDictOptions()
       // this.getorgtreelist()
-      this.orgtreeChange(this.majorDept)
+      // this.orgtreeChange(this.majorDept)
+      this.changeOrgUnit(this.selectDept)
       this.initTableHeader()
       this.initData2019()
     },
     methods: {
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        suppapi.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       isDisabledBtn () {
         if (this.OperType !== '制造商') {
           return true
@@ -912,16 +945,16 @@
           this.dynamicTableColumns = res.data.items
         })
       },
-      orgtreeChange (val) {
-        this.userOptions = []
-        let deptid = val[val.length - 1]
-        let auditstepcode = 'PROF_RECE'
-        suppapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.userOptions = res.data.item
-        }).catch(err => {
-          console.error(err)
-        })
-      },
+      // orgtreeChange (val) {
+      //   this.userOptions = []
+      //   let deptid = val[val.length - 1]
+      //   let auditstepcode = 'PROF_RECE'
+      //   suppapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+      //     this.userOptions = res.data.item
+      //   }).catch(err => {
+      //     console.error(err)
+      //   })
+      // },
 
       // 获取推荐单位列表
       getOrgTreeList () {
@@ -1064,6 +1097,11 @@
     },
 
       commitaudit () {
+        if (this.formData.InStyle === '2' || this.formData.InStyle === '6' || this.formData.InStyle === '4') {
+          this.allowpre = false
+        } else {
+          this.allowpre = true
+        }
         this.AuditdialogShow = true
         // if (this.subfileList && this.subfileList.length > 0) {
         //   for (var i = 0; i < this.subfileList.length; i++) {
@@ -1758,8 +1796,8 @@
           })
           return
         }
-        if (this.formData.InStyle != '2' && this.formData.InStyle != '6' || this.formData.InStyle == '4') {
-          if (this.majorDept.length === 0) {
+        if (this.formData.InStyle === '1' || this.formData.InStyle === '5') {
+          if (this.selectDept === 0 || this.selectDept === '') {
             this.$message({
               type: 'warning',
               message: '请选择专业处室!'
@@ -1767,7 +1805,7 @@
             return
           }
         }
-        if (this.formData.InStyle != '2' && this.formData.InStyle != '6' || this.formData.InStyle == '4') {
+        if (this.formData.InStyle === '1' || this.formData.InStyle === '5') {
           if (this.userOptions == null || this.userOptions.length === 0) {
             this.$message({
               type: 'warning',
@@ -1780,7 +1818,7 @@
         this.auditform.FirstAuditName = this.auditer
         this.auditform.CertId = this.formData.Id
         this.auditform.SecondAudit = this.fushenauditer
-        this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
+        this.auditform.ThirdAudit = this.selectDept
         api2.auditEntity(this.formData.Id, this.auditform, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -1802,6 +1840,13 @@
       },
 
       SubpEntity () {
+        if (this.myentityList == null || this.myentityList.length <= 0) {
+          this.$message({
+            type: 'warning',
+            message: '没有新增准入项,不能提交!'
+          })
+          return
+        }
         if (this.UnitOrg === '') {
           this.$message({
             type: 'warning',
@@ -1868,6 +1913,8 @@
           this.preorgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.UnitOrg = res.data.items['Register'].CheckUnitId
           this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.InOptions = res.data.items['InOptions']
           this.orgunitChange(this.UnitOrg)
         }).catch(err => {
           console.error(err)

+ 63 - 21
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -50,7 +50,7 @@
                   </el-cascader>
                 </el-form-item>
               </el-col> -->
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-form-item label="供应商公司名称" prop="checkSelectedSupplier">
                   <el-select ref="suppselect" :disabled="formData.Status>0||IsCompanyUser == 1" v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应商公司"
                     style="width: 100%">
@@ -60,12 +60,22 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="6">
+                <el-form-item label="准入方式">
+                  <el-select ref="SpecType" v-model="formData.InStyle" :disabled="this.formData.Status > '0'"
+                             placeholder="请选择" style="width: 100%">
+                    <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" v-if="item.Value != '2' && item.Value != '3'"
+                               :value="item.Value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
               <!-- <el-col :span="12">
                 <el-form-item label="推荐单位编码" prop="RecUnitId">
                   <el-input v-model="formData.RecUnitId" placeholder="请输入推荐单位编码"></el-input>
                 </el-form-item>
               </el-col> -->
-              <el-col :span="16">
+              <el-col :span="12">
                 <el-form-item label="备注" prop="Remark">
                   <el-input :disabled="formData.Status>0" type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
                 </el-form-item>
@@ -233,9 +243,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室" v-if="allowpre">
-              <el-cascader :options="preorgtreelist" :props="preorgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
-              </el-cascader>
+              <!--<el-cascader :options="preorgtreelist" :props="preorgtreeprops" :show-all-levels="false" filterable-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">-->
+              <!--</el-cascader>-->
+              <el-select  v-model="selectDept" filterable
+                          placeholder="请选择" style="width: 100%" @change="changeOrgUnit">
+                <el-option  v-for="item in allorgunitOptions" :key="item.Id" :label="item.Fullname"
+                            :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -391,6 +407,7 @@
         }
       }
       return {
+        selectDept: '',
         UnitOrg: '',
         allowpre: true,
         newVisible: false,
@@ -408,6 +425,7 @@
         ComAuditdialogShow: false,
         organizeOption: [], // 审批部门
         auditerOption: [], // 审批人
+        allorgunitOptions: [],
         orgtreeprops: {
           value: 'Id',
           label: 'CodeName',
@@ -515,6 +533,7 @@
           Status: '',
           SupplierId: 0,
           SupplierCertId: 0,
+          InStyle: '',
           RecUnitFlag: '', // 推荐单位的级联Id标记
           RecUnitId: '', // 推荐单位编码
           RecUnitName: '', // 推荐单位名称
@@ -570,6 +589,7 @@
         Id: '', // 传的参数
         editFlag: '', // 编辑操作标记
         waituploads: [],
+        userOptions: [],
         IsCompanyUser: ''
       }
     },
@@ -586,10 +606,19 @@
       // this.getTechTreeList() //获取技术服务类层级列表
       this.getSupplierList() // 获取供应方公司列表
       this.getDictOptions()
-      this.orgtreeChange(this.majorDept)
+      // this.orgtreeChange(this.majorDept)
+      this.changeOrgUnit(this.selectDept)
       this.initTableHeader()
     },
     methods: {
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        suppapi.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       newdeletedata (val) {
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
@@ -694,16 +723,16 @@
           }
         }
       },
-      orgtreeChange (val) {
-        this.userOptions = []
-        let deptid = val[val.length - 1]
-        let auditstepcode = 'PROF_RECE'
-        suppapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.userOptions = res.data.item
-        }).catch(err => {
-          console.error(err)
-        })
-      },
+      // orgtreeChange (val) {
+      //   this.userOptions = []
+      //   let deptid = val[val.length - 1]
+      //   let auditstepcode = 'PROF_RECE'
+      //   suppapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+      //     this.userOptions = res.data.item
+      //   }).catch(err => {
+      //     console.error(err)
+      //   })
+      // },
       // 获取推荐单位列表
       getOrgTreeList () {
         let _this = this
@@ -847,6 +876,11 @@
       },
 
       commitaudit () {
+        if (this.formData.InStyle === '2' || this.formData.InStyle === '6' || this.formData.InStyle === '4') {
+          this.allowpre = false
+        } else {
+          this.allowpre = true
+        }
         this.AuditdialogShow = true
         // if (this.subfileList && this.subfileList.length > 0) {
         //   for (var i = 0; i < this.subfileList.length; i++) {
@@ -1310,7 +1344,6 @@
           })
       },
       chooseAuditorShowFen () {
-        console.log('--this.formData.SupplierTypeCode----', this.formData.SupplierTypeCode)
         this.$refs['chooseAuditorFen'].getorgtreelist(this.formData.SupplierTypeCode)
         this.chooseAuditorVisibleFen = true
       },
@@ -1336,8 +1369,8 @@
           })
           return
         }
-        if (this.formData.InStyle != '2' && this.formData.InStyle != '6' || this.formData.InStyle == '4') {
-          if (this.majorDept.length === 0) {
+        if (this.formData.InStyle === '1' || this.formData.InStyle === '5') {
+          if (this.selectDept === 0 || this.selectDept === '') {
             this.$message({
               type: 'warning',
               message: '请选择专业处室!'
@@ -1345,7 +1378,7 @@
             return
           }
         }
-        if (this.formData.InStyle != '2' && this.formData.InStyle != '6' || this.formData.InStyle == '4') {
+        if (this.formData.InStyle === '1' || this.formData.InStyle === '5') {
           if (this.userOptions == null || this.userOptions.length === 0) {
             this.$message({
               type: 'warning',
@@ -1358,7 +1391,7 @@
         this.auditform.FirstAuditName = this.auditer
         this.auditform.CertId = this.formData.Id
         this.auditform.SecondAudit = this.fushenauditer
-        this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
+        this.auditform.ThirdAudit = this.selectDept
         api2.auditEntity(this.formData.Id, this.auditform, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -1381,6 +1414,13 @@
       },
 
       SubpEntity () {
+        if (this.myentityList == null || this.myentityList.length <= 0) {
+          this.$message({
+            type: 'warning',
+            message: '没有新增准入项,不能提交!'
+          })
+          return
+        }
         if (this.UnitOrg === '') {
           this.$message({
             type: 'warning',
@@ -1451,6 +1491,8 @@
           this.preorgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.UnitOrg = res.data.items['Register'].CheckUnitId
           this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.InOptions = res.data.items['InOptions']
           this.orgunitChange(this.UnitOrg)
         }).catch(err => {
           console.error(err)