瀏覽代碼

年审修改

huahaiyan 6 年之前
父節點
當前提交
31913d2c44

+ 8 - 8
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -284,11 +284,11 @@ func (this *AnnualAuditController) AddEntity() {
 	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
 	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
 	firstAudit := this.GetString("firstAudit")
 	firstAudit := this.GetString("firstAudit")
 	json.Unmarshal(jsonBlob, &model)
 	json.Unmarshal(jsonBlob, &model)
-	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName
+	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName + "and Status < 4"
 	var auditentity []annualaudit.OilAnnualAudit
 	var auditentity []annualaudit.OilAnnualAudit
 	svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditentity)
 	svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditentity)
 	if len(auditentity) == 1 {
 	if len(auditentity) == 1 {
-		errinfo.Message = "已提交年审,请勿重复提交!"
+		errinfo.Message = "今年已提交年审,请勿重复提交!"
 		errinfo.Code = -1
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 		this.ServeJSON()
@@ -686,13 +686,13 @@ func (this *AnnualAuditController) AnnualAudit() {
 		ActiComplete.CallbackUrl = ""
 		ActiComplete.CallbackUrl = ""
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 		var auditmodel annualaudit.OilAnnualAudit
 		var auditmodel annualaudit.OilAnnualAudit
-		oldaplydate := auditmodel.ApplyTime
-		aplydatechange := oldaplydate.Format("2006-01-02 15:04:05")
-		local, _ := time.LoadLocation("Local")
-		oldtimeaply, _ := time.ParseInLocation("2006-01-02 15:04:05", aplydatechange, local)
+		oldaplydate := list.ApplyTime
+		//aplydatechange := oldaplydate.Format("2006-01-02")
+		//local, _ := time.LoadLocation("Local")
+		//oldtimeaply, _ := time.ParseInLocation("2006-01-02", aplydatechange, local)
 		auditmodel.Status = "4"
 		auditmodel.Status = "4"
 		auditmodel.Step = 3
 		auditmodel.Step = 3
-		auditmodel.ApplyTime = oldtimeaply.AddDate(1,0,0)
+		auditmodel.ApplyTime = oldaplydate.AddDate(1,0,0)
 		cols := []string{
 		cols := []string{
 			"Id",
 			"Id",
 			"Status",
 			"Status",
@@ -700,7 +700,7 @@ func (this *AnnualAuditController) AnnualAudit() {
 			"ApplyTime",
 			"ApplyTime",
 		}
 		}
 		var certmodel suppliercert.OilSupplierCert
 		var certmodel suppliercert.OilSupplierCert
-		certmodel.ApplyTime = oldtimeaply.AddDate(1,0,0)
+		certmodel.ApplyTime = oldaplydate.AddDate(1,0,0)
 		certmodel.AuditDate = time.Now()
 		certmodel.AuditDate = time.Now()
 		certcols := []string{
 		certcols := []string{
 			"Id",
 			"Id",

+ 39 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -170,12 +170,12 @@
 
 
 
 
         <el-tab-pane label="准入范围" :disabled="!certId">
         <el-tab-pane label="准入范围" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :canadd="add_flat" height="360px"
+          <business-list ref="businessList" :data.sync="businessList" :canadd="false" height="360px"
             style="margin-top: 20px"></business-list>
             style="margin-top: 20px"></business-list>
         </el-tab-pane>
         </el-tab-pane>
 
 
         <el-tab-pane label="企业资质" :disabled="!certId">
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" height="360px" style="margin-top: 20px"></subfile-list>
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="false" height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
         </el-tab-pane>
 
 
 
 
@@ -197,10 +197,15 @@
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <el-form-item label="专业科室" v-if="this.AnnualStatus == '0'">
         <el-form-item label="专业科室" v-if="this.AnnualStatus == '0'">
-          <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
+          <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
           </el-cascader>
           </el-cascader>
         </el-form-item>
         </el-form-item>
+        <!-- <el-form-item label="专业科室" v-if="this.AnnualStatus == '0'">
+          <el-cascader :options="orgtreelist" :props="proorgtreeprops" change-on-select :show-all-levels="false" filterable
+            style="width: 100%" v-model="majorDept" placeholder="请选择组织">
+          </el-cascader>
+        </el-form-item> -->
         <el-form-item label="审核状态">
         <el-form-item label="审核状态">
           <template>
           <template>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
             <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
@@ -217,13 +222,8 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
 
 
-    <el-dialog title="提交专业审批" :visible.sync="dialogProfAudit" width="420px">
+    <el-dialog title="分配" :visible.sync="dialogProfAudit" width="420px">
       <el-form ref="searchForm" label-width="110px">
       <el-form ref="searchForm" label-width="110px">
-        <el-form-item label="审批人部门">
-          <el-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-            filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
-          </el-cascader>
-        </el-form-item>
         <el-form-item label="审批人">
         <el-form-item label="审批人">
           <el-select ref="selectAuditer" v-model="ProfAuditThen" placeholder="请选择" style="width: 100%" filterable
           <el-select ref="selectAuditer" v-model="ProfAuditThen" placeholder="请选择" style="width: 100%" filterable
             allow-create default-first-option>
             allow-create default-first-option>
@@ -231,6 +231,9 @@
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="意见">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
       </el-form>
       </el-form>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="dialogProfAudit = false">取 消</el-button>
         <el-button size="mini" @click="dialogProfAudit = false">取 消</el-button>
@@ -292,6 +295,7 @@
         canUpdateSupplier: true,
         canUpdateSupplier: true,
         dictData: null,
         dictData: null,
         applyLoading: false,
         applyLoading: false,
+        subfileList:[],
         majorDept: [],
         majorDept: [],
         auditbusList: [], // 待审核业务
         auditbusList: [], // 待审核业务
         secauditerOptions: [], //专业审批人
         secauditerOptions: [], //专业审批人
@@ -403,7 +407,7 @@
         },
         },
         orgtreeprops: {
         orgtreeprops: {
           value: 'id',
           value: 'id',
-          label: 'Fullname',
+          label: 'name',
           children: 'children'
           children: 'children'
         },
         },
         formDataCert: {
         formDataCert: {
@@ -429,6 +433,7 @@
       }
       }
     },
     },
     created() {
     created() {
+      this.companyid = this.authUser.Profile.Superior
       this.serviceId = this.$route.params.opera;
       this.serviceId = this.$route.params.opera;
       if (this.$route.query.certid) {
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
         this.certId = this.$route.query.certid + ''
@@ -439,14 +444,14 @@
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.annualId = this.$route.query.annualId
       this.annualId = this.$route.query.annualId
       this.Step = parseInt(this.$route.query.Step)
       this.Step = parseInt(this.$route.query.Step)
-      this.getDictOptions()
+      //this.getDictOptions()
       this.formData.Id = this.serviceId
       this.formData.Id = this.serviceId
       this.initDatas()
       this.initDatas()
       this.backhistroy.certId = this.annualId
       this.backhistroy.certId = this.annualId
       this.backhistroy.workflowId = this.WorkflowId
       this.backhistroy.workflowId = this.WorkflowId
       
       
       this.getorgtreelist()
       this.getorgtreelist()
-      this.getorgtreelistbydeptid()
+      //this.getorgtreelistbydeptid()
     },
     },
     methods: {
     methods: {
       inputCompany(val) {
       inputCompany(val) {
@@ -614,17 +619,6 @@
         let params = {
         let params = {
           IsInnerOrganize: 1
           IsInnerOrganize: 1
         }
         }
-        // _this.$axios.get('organizes/orgalllist', {
-        //     params
-        //   })
-        //   .then(res => {
-        //     _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
-        //     if (_this.authUser.Profile.IsCompanyUser === 0) {
-        //       this.secOrganize = _this.authUser.Profile.Superior.split(',').map((val) => {
-        //         return parseInt(val)
-        //       })
-        //       this.auditOrgChang(this.secOrganize)
-        //     }
         api.getDictListByStatus(params, this.$axios).then(res => {
         api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
@@ -649,17 +643,35 @@
             console.error(err)
             console.error(err)
           })
           })
       },
       },
-      auditOrgChange(val) {
+      auditOrgChange() {
+        // let auditstepcode = ''
+        // if (this.AnnualStatus === '1') {
+        //   auditstepcode = 'PROF_AUDIT'
+        // } else {
+        //   return
+        // }
+        // let deptid = val[val.length - 1]
+        // this.auditerOptions = []
+        // api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+        //   this.secauditerOptions = res.data.item
+        // }).catch(err => {
+        //   console.error(err)
+        // })
         let auditstepcode = ''
         let auditstepcode = ''
-        if (this.AnnualStatus === '1') {
+        if (this.AnnualStatus == 1) {
           auditstepcode = 'PROF_AUDIT'
           auditstepcode = 'PROF_AUDIT'
         } else {
         } else {
           return
           return
         }
         }
-        let deptid = val[val.length - 1]
+        let deplist = []
+        deplist = this.companyid.split(",")
+        let deptid = deplist[deplist.length - 1]
+        console.log(deptid)
         this.auditerOptions = []
         this.auditerOptions = []
+        this.auditer = ''
         api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
         api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
           this.secauditerOptions = res.data.item
           this.secauditerOptions = res.data.item
+          console.log("--this.secauditerOptions----",this.secauditerOptions)
         }).catch(err => {
         }).catch(err => {
           console.error(err)
           console.error(err)
         })
         })
@@ -671,6 +683,7 @@
       },
       },
       profAudit() {
       profAudit() {
         this.shenheForm.AnnualId = parseInt(this.annualId)
         this.shenheForm.AnnualId = parseInt(this.annualId)
+        this.auditOrgChange()
         this.dialogProfAudit = true
         this.dialogProfAudit = true
       },
       },
       //审核通过
       //审核通过

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

@@ -268,8 +268,7 @@
     },
     },
     computed: {
     computed: {
       ...mapGetters({
       ...mapGetters({
-        authUser: 'authUser',
-        session: 'session'
+        authUser: 'authUser'
       })
       })
     },
     },
     name: 'basisdataOperation',
     name: 'basisdataOperation',

+ 1 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -237,8 +237,7 @@
     },
     },
     computed: {
     computed: {
       ...mapGetters({
       ...mapGetters({
-        authUser: 'authUser',
-        session: 'session'
+        authUser: 'authUser'
       })
       })
     },
     },
     watch: {
     watch: {

+ 1 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -243,8 +243,7 @@
     },
     },
     computed: {
     computed: {
       ...mapGetters({
       ...mapGetters({
-        authUser: 'authUser',
-        session: 'session'
+        authUser: 'authUser'
       })
       })
     },
     },
     name: 'oilsuppliercertappendsub',
     name: 'oilsuppliercertappendsub',