2
3
lining 6 rokov pred
rodič
commit
e100bbae2c

+ 3 - 0
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -99,6 +99,9 @@ const (
 	//二级物资供方准入流程图
 	OIL_SECOND_APPEND_APPLY string = "oil_second_append_apply"
 
+	// 分办
+	SUB_OFFICE string = "SUB_OFFICE"
+
 	//业务步骤编码 初审
 	FIRST_TRIAL string = "FIRST_TRIAL"
 	// 复审

+ 12 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1390,7 +1390,18 @@ func (this *OilSupplierController) GetDictListByStatus() {
 
 	}
 
-	// 分办单位
+	// 注册审批单位
+	var registermodel register.OilCorporateInfo
+	wherereg := "UserId=" + this.User.Id
+	svc.GetEntity(&registermodel, wherereg)
+	dictList["Register"] = registermodel
+
+	// 所有二级单位
+	var allunitorglist []organize.Base_Organize
+	where = "Category='Unit'"
+	orgsvc.GetEntities(&allunitorglist, where)
+	dictList["Allunitorglist"] = allunitorglist
+
 
 	var datainfo DataInfo
 	datainfo.Items = dictList

+ 20 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -569,6 +569,26 @@ func (this *OilSupplierCertController) AuditEntity() {
 	secondAudit := this.GetString("SecondAudit")
 	thirdAudit := this.GetString("ThirdAudit")
 
+	var setting auditsetting.Base_OilAuditSetting
+	var userlist []userRole.Base_User
+	usvc := userRole.GetUserService(utils.DBE)
+	if this.User.IsCompanyUser == 1 {
+		where := "AuditStepCode='" + workflow.SUB_OFFICE + "'"
+		usvc.GetEntity(&setting, where)
+		ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
+		tempstr := strings.Join(ids, ",")
+		uids := strings.Replace(tempstr, "uid_", "", -1)
+		uids = strings.Trim(uids, ",")
+		if uids != "" {
+			where := "Id in (" + uids + ")" + " and UnitId=" + firstAudit
+			usvc.GetEntities(&userlist, where)
+		}
+		userIds := ""
+		for _, tmpUser := range userlist {
+			userIds += strconv.Itoa(tmpUser.Id) + ","
+		}
+		firstAudit = strings.Trim(userIds, ",")
+	}
 	//取出审批列表
 	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
 	var supplierCertEntity suppliercert.OilSupplierCert

+ 6 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -61,18 +61,22 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		var todo todolist.TodoList
 		//找出待办任务===准入
 		var certIdList string
+		myTasksRetWithTimes = actisvc.GetMyTasksWithTime(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
 		ids := actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
 		if len(strings.Trim(ids, ",")) > 0 {
 			certIdList += strings.Trim(ids, ",")+ ","
 		}
 
-		myTasksRetWithTimes = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
+		arr := actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
+		for _,s := range arr {
+			myTasksRetWithTimes = append(myTasksRetWithTimes, s)
+		}
 		ids = actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
 		if len(strings.Trim(ids, ",")) > 0 {
 			certIdList += strings.Trim(ids, ",")+ ","
 		}
 
-		arr := actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
+		arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
 		for _,s := range arr {
 			myTasksRetWithTimes = append(myTasksRetWithTimes, s)
 		}

+ 10 - 6
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -70,11 +70,11 @@
 
           <el-table-column label="执行人" prop="UserName" align="center"></el-table-column>
 
-            <!--<el-table-column label="提交" prop="CreateTime">-->
-              <!--<template slot-scope="scope">-->
-                <!--{{ jstimehandle(timestampToTime(scope.row.CreateTime)) }}-->
-              <!--</template>-->
-            <!--</el-table-column>-->
+            <el-table-column label="提交" prop="CreateTime">
+              <template slot-scope="scope">
+                {{ jstimehandle(timestampToTime(scope.row.CreateTime)) }}
+              </template>
+            </el-table-column>
 
           <el-table-column label="操作" width="130" align="center" fixed="right">
             <template slot-scope="scope">
@@ -114,7 +114,11 @@
             <el-table-column label="公司名称" prop="SupplierName"></el-table-column>
 
             <el-table-column label="执行人" prop="UserName"></el-table-column>
-
+            <el-table-column label="提交" prop="CreateTime">
+              <template slot-scope="scope">
+                {{ jstimehandle(timestampToTime(scope.row.CreateTime)) }}
+              </template>
+            </el-table-column>
             <el-table-column label="操作" width="130" align="center" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" title="打开"  icon="el-icon-edit" size="mini" @click="rowClick(scope.row)">打开</el-button>

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

@@ -265,9 +265,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
-              </el-cascader>
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :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">
@@ -287,10 +293,17 @@
       <el-form ref="searchForm" label-width="100px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="分办人员">
-              <el-input ref="selectAuditerFen" readonly v-model="auditerName" placeholder="请选择分办人">
-                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShowFen"></el-button>
-              </el-input>
+            <!--<el-form-item label="分办人员">-->
+              <!--<el-input ref="selectAuditerFen" readonly v-model="auditerName" placeholder="请选择分办人">-->
+                <!--<el-button slot="append" icon="el-icon-search" @click="chooseAuditorShowFen"></el-button>-->
+              <!--</el-input>-->
+            <!--</el-form-item>-->
+            <el-form-item label="分办单位">
+              <el-select filterable v-model="UnitOrg" maxlength="255"  clearable  placeholder="请选择分办单位" style="width: 100%" @change="orgunitChange">
+                <el-option  v-for="item in UnitOrgOptions" :key="item.Id" :label="item.Fullname"
+                            :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -399,6 +412,11 @@
         IsCompanyUser: 0,
         fushenauditer: '', //复审人员
         majorDept: [100000000, 100000128, 100000151],
+        orgauditOptions: [],
+        UnitOrgOptions: [],
+        UnitOrg: '',
+        allorgunitOptions: [],
+        selectDept: 100000151,
         userOptions: [],
         dialogVisible: false,
         dialogVisibleCom: false,
@@ -620,6 +638,7 @@
         this.initDatas()
       }
       this.orgtreeChange(this.majorDept)
+      this.changeOrgUnit(this.selectDept)
     },
     methods: {
        nextStep(){
@@ -759,6 +778,23 @@
           })
 
       },
+      orgunitChange (val) {
+        let deptid = val
+        let auditstepcode = 'SUB_OFFICE'
+        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.orgauditOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(val, 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]
@@ -1026,6 +1062,10 @@
         api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+          this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.UnitOrg = res.data.items['Register'].CheckUnitId
+          this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.orgunitChange(this.UnitOrg)
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -1246,7 +1286,7 @@
           })
           return
         }
-        if (this.majorDept.length === 0) {
+        if (this.selectDept === 0 || this.selectDept == '') {
           this.$message({
             type: "warning",
             message: "请选择专业处室!"
@@ -1286,15 +1326,22 @@
         })
       },
       SubpEntity() {
-        if (this.auditer === "") {
+        if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
           this.$message({
-            type: "warning",
-            message: "请选择分办人!"
+            type: 'warning',
+            message: '该单位没有分办人员!'
           })
           return
         }
+        // if (this.auditer === "") {
+        //   this.$message({
+        //     type: "warning",
+        //     message: "请选择分办人!"
+        //   })
+        //   return
+        // }
         this.applyLoading = true
-        this.auditform.FirstAuditName = this.auditer
+        this.auditform.FirstAuditName = this.UnitOrg
         this.auditform.CertId = this.certId
         console.log("--this.audiform--", this.auditform)
         apiCert

+ 54 - 27
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -272,9 +272,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange()">
-              </el-cascader>
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :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">
@@ -293,18 +299,18 @@
       <el-form ref="searchForm" label-width="100px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="分办人员">
-              <el-input ref="selectAuditerFen" readonly v-model="auditerName" placeholder="请选择分办人">
-                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShowFen"></el-button>
-              </el-input>
-            </el-form-item>
-            <!--<el-form-item label="分办单位">-->
-              <!--<el-select filterable v-model="auditerName" maxlength="255"  clearable  placeholder="请选择分办单位" style="width: 100%" @change="orgunitChange()">-->
-                <!--<el-option  v-for="item in UnitOrgOptions" :key="item.Id" :label="item.Fullname"-->
-                            <!--:value="item.Id">-->
-                <!--</el-option>-->
-              <!--</el-select>-->
+            <!--<el-form-item label="分办人员">-->
+              <!--<el-input ref="selectAuditerFen" readonly v-model="auditerName" placeholder="请选择分办人">-->
+                <!--<el-button slot="append" icon="el-icon-search" @click="chooseAuditorShowFen"></el-button>-->
+              <!--</el-input>-->
             <!--</el-form-item>-->
+            <el-form-item label="分办单位">
+              <el-select filterable v-model="UnitOrg" maxlength="255"  clearable  placeholder="请选择分办单位" style="width: 100%" @change="orgunitChange">
+                <el-option  v-for="item in UnitOrgOptions" :key="item.Id" :label="item.Fullname"
+                            :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="说明">
@@ -409,6 +415,10 @@
         majorDept: [100000000, 100000001, 100000071], //专业可是
         userOptions: [],
         UnitOrgOptions: [],
+        orgauditOptions: [],
+        UnitOrg: '',
+        allorgunitOptions: [],
+        selectDept: 100000071,
         dialogVisibleCom: false,
         showReturn: 1,
         IsCompanyUser: 0,
@@ -634,7 +644,8 @@
         this.initDatas();
       }
       this.isAccess()
-      this.orgtreeChange(this.majorDept)
+      // this.orgtreeChange(this.majorDept)
+      this.changeOrgUnit(this.selectDept)
     },
     methods: {
       nextStep(){
@@ -707,11 +718,19 @@
           })
 
       },
-      orgunitChange () {
-        this.userOptions = []
-        let deptid = val[val.length - 1]
+      orgunitChange (val) {
+        let deptid = val
         let auditstepcode = 'SUB_OFFICE'
         api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.orgauditOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
+          console.log(res.data.item, 'res.data.item==')
           this.userOptions = res.data.item
         }).catch(err => {
           console.error(err)
@@ -1097,8 +1116,10 @@
         api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
-          console.log(res.data.items['UnitOrgList'], '===单位')
           this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.UnitOrg = res.data.items['Register'].CheckUnitId
+          this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.orgunitChange(this.UnitOrg)
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -1366,7 +1387,7 @@
           })
           return
         }
-        if (this.majorDept.length === 0) {
+        if (this.selectDept === 0) {
           this.$message({
             type: "warning",
             message: "请选择专业处室!"
@@ -1410,19 +1431,25 @@
           })
       },
       SubpEntity() {
-        if (this.auditer === "") {
+        if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
           this.$message({
-            type: "warning",
-            message: "请选择分办人!"
+            type: 'warning',
+            message: '该单位没有分办人员!'
           })
           return
         }
+        // if (this.auditer === "") {
+        //   this.$message({
+        //     type: "warning",
+        //     message: "请选择分办人!"
+        //   })
+        //   return
+        // }
         this.applyLoading = true
-        this.auditform.FirstAuditName = this.auditer
+        this.auditform.FirstAuditName = this.UnitOrg
         this.auditform.CertId = this.certId
         console.log("--this.audiform--", this.auditform)
-        apiCert
-          .auditEntity(this.certId, this.auditform, this.$axios)
+        apiCert.auditEntity(this.certId, this.auditform, this.$axios)
           .then(res => {
             if (res.data.code === 0) {
               // 保存成功后,初始化数据,变成修改
@@ -1477,5 +1504,5 @@
 <style>
   .mycard .el-card__header {
     padding : 8px;
-  } 
+  }
 </style>

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

@@ -263,9 +263,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
-              </el-cascader>
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :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">
@@ -285,10 +291,17 @@
       <el-form ref="searchForm" label-width="100px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="分办人员">
-              <el-input ref="selectAuditerFen" readonly v-model="auditerName" placeholder="请选择分办人">
-                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShowFen"></el-button>
-              </el-input>
+            <!--<el-form-item label="分办人员">-->
+              <!--<el-input ref="selectAuditerFen" readonly v-model="auditerName" placeholder="请选择分办人">-->
+                <!--<el-button slot="append" icon="el-icon-search" @click="chooseAuditorShowFen"></el-button>-->
+              <!--</el-input>-->
+            <!--</el-form-item>-->
+            <el-form-item label="分办单位">
+              <el-select filterable v-model="UnitOrg" maxlength="255"  clearable  placeholder="请选择分办单位" style="width: 100%" @change="orgunitChange">
+                <el-option  v-for="item in UnitOrgOptions" :key="item.Id" :label="item.Fullname"
+                            :value="item.Id">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -398,6 +411,11 @@
         majorDept: [],
         userOptions: [],
         secauditerOptions: [],
+        orgauditOptions: [],
+        UnitOrgOptions: [],
+        UnitOrg: '',
+        allorgunitOptions: [],
+        selectDept: '',
         dialogVisibleCom: false,
         dictData: null,
         applyLoading: false,
@@ -613,6 +631,7 @@
         this.initDatas()
       }
       this.orgtreeChange(this.majorDept)
+      // this.changeOrgUnit(this.selectDept)
     },
     methods: {
       nextStep(){
@@ -752,6 +771,23 @@
           console.error(err)
         })
       },
+      orgunitChange (val) {
+        let deptid = val
+        let auditstepcode = 'SUB_OFFICE'
+        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.orgauditOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(val, 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]
@@ -972,6 +1008,10 @@
           this.dictData = res.data.items
           this.organizeOption = res.data.items['Organizes']
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+          this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.UnitOrg = res.data.items['Register'].CheckUnitId
+          this.allorgunitOptions = res.data.items['Allunitorglist']
+          this.orgunitChange(this.UnitOrg)
           /* this.UnitRelationOptions = res.data.items['UnitRelation']
           this.getCityList(res.data.items['GaodeMapChinaAreas'])
           this.CompanyTypeOptions = res.data.items['CompanyType'] */
@@ -1247,7 +1287,7 @@
           })
           return
         }
-        if (this.majorDept.length === 0) {
+        if (this.selectDept === 0 || this.selectDept == '') {
           this.$message({
             type: "warning",
             message: "请选择专业处室!"
@@ -1287,15 +1327,22 @@
         })
       },
       SubpEntity() {
-        if (this.auditer === "") {
+        if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
           this.$message({
-            type: "warning",
-            message: "请选择分办人!"
+            type: 'warning',
+            message: '该单位没有分办人员!'
           })
           return
         }
+        // if (this.auditer === "") {
+        //   this.$message({
+        //     type: "warning",
+        //     message: "请选择分办人!"
+        //   })
+        //   return
+        // }
         this.applyLoading = true
-        this.auditform.FirstAuditName = this.auditer
+        this.auditform.FirstAuditName = this.UnitOrg
         this.auditform.CertId = this.certId
         console.log("--this.audiform--", this.auditform)
         apiCert

+ 31 - 11
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -301,9 +301,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
-              </el-cascader>
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">-->
+              <!--</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">
@@ -389,6 +395,8 @@
         auditerName: "",
         fushenauditer: '', //复审人员
         majorDept: [100000000, 100000128, 100000151],
+        allorgunitOptions: [],
+        selectDept: 100000151,
         auditform: {
           FirstAuditName: "",
           SecondAudit: "",
@@ -541,6 +549,7 @@
       }
       this.getDictOptions()
       this.initDatas()
+      this.changeOrgUnit(this.selectDept)
       // this.getorgtreelist()
       // this.getorgtreelistbydeptid()
     },
@@ -566,6 +575,14 @@
           this.shenheForm.AuditorRemark = ''
         }
       },
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       equipmentdialog() {
         this.$refs['equipmentList'].showDialog()
       },
@@ -705,6 +722,7 @@
         api.getDictListByStatus(params, this.$axios).then(res => {
           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.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -896,13 +914,15 @@
             })
             return
           }
-          // if (this.userOptions == null || this.userOptions.length === 0) {
-          //   this.$message({
-          //     type: 'warning',
-          //     message: '该专业科室未配置接收人!'
-          //   })
-          //   return
-          // }
+          if (this.formData.Status == '10') {
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
+          }
           // if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
           //   this.$message({
           //     type: 'warning',
@@ -926,7 +946,7 @@
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
-          majorDept: this.majorDept[this.majorDept.length - 1],
+          majorDept: this.selectDept,
           FirstAuditName: this.auditer,
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.majorDept[this.majorDept.length - 1],

+ 34 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

@@ -312,16 +312,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
-              </el-cascader>
-              <!--<el-select  v-model="formData.majorDept"-->
-                          <!--placeholder="请选择" style="width: 100%">-->
-                <!--{{orgtreelist}}-->
-                <!--<el-option  v-for="item in orgtreelist" :key="item.Id" :label="item.Fullname"-->
-                            <!--:value="item.Id">-->
-                <!--</el-option>-->
-              <!--</el-select>-->
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">-->
+              <!--</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">
@@ -406,12 +405,15 @@
         auditerCurOptions: [],
         organizeOption: [],
         orgtreelist: [],
+        allorgunitOptions: [],
         secorgtreelist: [],
         userOptions: [],
         auditer: "",
         auditerName: "",
         fushenauditer: '', //复审人员
-        majorDept: [100000000, 100000001, 100000071],
+        majorDept: [100000000, 100000001,100000071],
+        selectDept: 100000071,
+        orgauditOptions: [],
         auditform: {
           FirstAuditName: "",
           SecondAudit: "",
@@ -563,7 +565,8 @@
       }
       this.getDictOptions()
       this.initDatas()
-      this.orgtreeChange(this.majorDept)
+      // this.orgtreeChange(this.majorDept)
+      this.changeOrgUnit(this.selectDept)
       // this.getorgtreelist()
       // this.getorgtreelistbydeptid()
     },
@@ -589,6 +592,14 @@
           this.shenheForm.AuditorRemark = ''
         }
       },
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(val, 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]
@@ -737,6 +748,7 @@
         api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name') // res.data.items['UnitOrgList'] //
+          this.allorgunitOptions = res.data.items['Allunitorglist']
           // this.auditerOptions = res.data.items['Auditer']
           // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -926,13 +938,15 @@
             })
             return
           }
-          // if (this.userOptions == null || this.userOptions.length === 0) {
-          //   this.$message({
-          //     type: 'warning',
-          //     message: '该专业科室未配置接收人!'
-          //   })
-          //   return
-          // }
+          if (this.formData.Status == '10') {
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
+          }
           // if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
           //   this.$message({
           //     type: 'warning',
@@ -956,7 +970,7 @@
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
-          majorDept: this.majorDept[this.majorDept.length - 1],
+          majorDept: this.selectDept,
           FirstAuditName: this.auditer,
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.majorDept[this.majorDept.length - 1],

+ 31 - 12
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -299,9 +299,15 @@
               </el-select>
             </el-form-item>
             <el-form-item label="业务处室">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择业务处室">
-              </el-cascader>
+              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable-->
+                <!--style="width: 100%" v-model="majorDept" placeholder="请选择业务处室">-->
+              <!--</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">
@@ -381,6 +387,8 @@
         auditerCurOptions: [],
         orgtreelist: [],
         secorgtreelist: [],
+        allorgunitOptions: [],
+        selectDept: '',
         auditer: "",
         auditerName: "",
         fushenauditer: '', //复审人员
@@ -537,6 +545,7 @@
       }
       this.getDictOptions()
       this.initDatas()
+      // this.changeOrgUnit(this.selectDept)
       //this.getpreorgtreelist()
       //this.getorgtreelist()
       //this.getorgtreelistbydeptid()
@@ -563,6 +572,14 @@
           this.shenheForm.AuditorRemark = ''
         }
       },
+      changeOrgUnit (val) {
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       equipmentdialog() {
         this.$refs['equipmentList'].showDialog()
       },
@@ -704,7 +721,7 @@
           console.log(res.data.items, 'res.data.items')
           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.auditerOptions = res.data.items['Auditer']
           //this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
@@ -898,13 +915,15 @@
             })
             return
           }
-          // if (this.userOptions == null || this.userOptions.length === 0) {
-          //   this.$message({
-          //     type: 'warning',
-          //     message: '该专业科室未配置接收人!'
-          //   })
-          //   return
-          // }
+          if (this.formData.Status == '10') {
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
+          }
           // if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
           //   this.$message({
           //     type: 'warning',
@@ -928,7 +947,7 @@
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
-          majorDept: this.majorDept[this.majorDept.length - 1],
+          majorDept: this.selectDept,
           FirstAuditName: this.auditer,
           SecondAudit: this.fushenauditer,
           ThirdAudit: this.majorDept[this.majorDept.length - 1],