2
3
lining 6 роки тому
батько
коміт
a71f22b462

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

@@ -127,6 +127,8 @@ const (
 	SUB_OFFICE_WZ string = "SUB_OFFICE_WZ"
 	SUB_OFFICE_JF string = "SUB_OFFICE_JF"
 	SUB_OFFICE_JS string = "SUB_OFFICE_JS"
+	SUB_OFFICE_BG string = "SUB_OFFICE_BG"
+
 
 	//业务步骤编码 初审
 	FIRST_TRIAL string = "FIRST_TRIAL"

+ 24 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -917,6 +917,30 @@ func (this *InfoChangeController) CommitAuditEntity() {
 	fushenauditer := this.GetString("fushenauditer")
 	Remark := this.GetString("Remark")
 	InfoId := this.GetString("MInfoId")
+
+	var setting auditsetting.Base_OilAuditSetting
+	var userlist []userRole.Base_User
+	usvc := userRole.GetUserService(utils.DBE)
+	where := ""
+	if this.User.IsCompanyUser == 1 {
+		where = "AuditStepCode='" + workflow.SUB_OFFICE_BG + "'"
+		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, ",")
+	}
+
+
 	//取出审批列表
 	svc := infochange.GetInfoChangeService(utils.DBE)
 	var infochangeentity infochange.OilInfoChange

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

@@ -127,6 +127,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 			if has {
 				todo.Id = listInfo.Id
 				todo.Type = todolist.INFOCHANGE
+				todo.SupplierId = strconv.Itoa(listInfo.SupplierId)
 				todo.SupplierName = listInfo.SupplierName
 				todo.UserName = this.User.Realname
 				todo.TaskName = item.TaskName
@@ -275,6 +276,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 			if has {
 				todo.Id = listInfo.Id
 				todo.Type = todolist.INFOCHANGE
+				todo.SupplierId = strconv.Itoa(listInfo.SupplierId)
 				todo.SupplierName = listInfo.SupplierName
 				todo.UserName = this.User.Realname
 				todo.TaskName = item.TaskName

+ 44 - 7
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -675,10 +675,25 @@
       <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">
@@ -820,8 +835,11 @@
         }
       }
       return {
+        UnitOrg: '',
         ComAuditdialogShow: false,
         chooseAuditorVisibleFen: false,
+        UnitOrgOptions: [],
+        userOptions: [],
         waituploads: [], // 等待上传的附件列表
         AccessCardNolist: [],
         AccessCardNo1: '',
@@ -1257,14 +1275,21 @@
     },
     methods: {
       SubpEntity () {
-        if (this.auditer === '') {
+        if (this.UnitOrg === '') {
           this.$message({
             type: 'warning',
-            message: '请选择分办!'
+            message: '请选择分办单位!'
           })
           return
         }
-        this.entityForm.auditer = this.auditer
+        if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
+          this.$message({
+            type: 'warning',
+            message: '该单位未配置分办人!'
+          })
+          return
+        }
+        this.entityForm.auditer = this.UnitOrg
         this.entityForm.MInfoId = this.MInfoId
         api.commitAuditEntity(this.supplierId, this.entityForm, this.$axios).then(res => {
           if (res.data.code === 0) {
@@ -1935,6 +1960,18 @@
             }
             this.companyReadonly = true
           }
+          this.UnitOrg = res.data.items['Register'].CheckUnitId
+          this.UnitOrgOptions = res.data.items['UnitOrgList']
+          this.orgunitChange(this.UnitOrg)
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      orgunitChange (val) {
+        let deptid = val
+        let auditstepcode = 'SUB_OFFICE_BG'
+        supplierapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.orgauditOptions = res.data.item
         }).catch(err => {
           console.error(err)
         })