2
3
Prechádzať zdrojové kódy

前后:增项 年审入库可驳回

baichengfei 5 rokov pred
rodič
commit
401fef6867

+ 7 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/annualListener.go

@@ -157,6 +157,13 @@ func (this *OilAnnualListenerController) CheckNeedPay() {
 		// 准入类型是否付费有误!请联系管理员
 		result = 0
 	}
+	var paymentInfoEntity paymentinfo.OilPaymentInfo
+	s := paymentinfo.GetPaymentService(utils.DBE)
+	where := " isPay='2' and SrcId='" + annualId + "' and SupplierCertId='" + strconv.Itoa(annualEntity.CerId) + "'"
+	s.GetEntityByWhere("OilPaymentInfo", where, &paymentInfoEntity)
+	if paymentInfoEntity.Id > 0 {
+		result = 2 // 已交费, 不再需要交费
+	}
 
 	this.Data["json"] = result
 	this.ServeJSON()

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

@@ -1087,7 +1087,11 @@ func (this *AnnualAuditController) UpdateIsStorage() {
 			this.ServeJSON()
 		} else {
 			//返回正确结果
-			errinfo.Message = "入库成功"
+			if status == "1" {
+				errinfo.Message = "入库成功"
+			} else {
+				errinfo.Message = "退回成功"
+			}
 			errinfo.Code = 0
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
@@ -1110,7 +1114,8 @@ func (this *AnnualAuditController) UpdateIsStorage() {
 	if status == "1" {
 		AuditRemark = "审批通过已入库。"
 	} else {
-		AuditRemark = "已入库。"
+		status = "0"
+		AuditRemark = "入库退回。"
 	}
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
@@ -1118,7 +1123,7 @@ func (this *AnnualAuditController) UpdateIsStorage() {
 	ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
 	ActiComplete.BusinessKey = annualEntity.BusinessKey
 	ActiComplete.UserId = this.User.Id //审批人员
-	ActiComplete.Result = "1"          //前台审批[同意、不同意]
+	ActiComplete.Result = status         //前台审批[同意、不同意]
 	ActiComplete.Remarks = AuditRemark
 	ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
 	receiveVal := svcActiviti.TaskComplete(ActiComplete)

+ 41 - 33
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertAppendListener.go

@@ -4,6 +4,7 @@ import (
 	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappendsub"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
 	"dashoo.cn/backend/api/business/paymentinfo"
@@ -208,6 +209,13 @@ func (this *OilSupplierCertAppendListenerController) CheckNeedPay() {
 		// 准入类型是否付费有误!请联系管理员
 		result = 0
 	}
+	var paymentInfoEntity paymentinfo.OilPaymentInfo
+	s := paymentinfo.GetPaymentService(utils.DBE)
+	where := " isPay='2' and SrcId='" + supplierCertAppendId + "' and SupplierCertId='" + strconv.Itoa(supplierCertAppendEntity.SupplierCertId) + "'"
+	s.GetEntityByWhere("OilPaymentInfo", where, &paymentInfoEntity)
+	if paymentInfoEntity.Id > 0 {
+		result = 2 // 已交费, 不再需要交费
+	}
 
 	this.Data["json"] = result
 	this.ServeJSON()
@@ -325,41 +333,41 @@ func (this *OilSupplierCertAppendListenerController) WorkflowEndAudit() {
 	certAppendSrv.UpdateEntityBywheretbl(OilSupplierCertSubName, &appendSubFileModel, []string{"SupType"}, appendFileWhere)
 
 	//更新增项表 TODO 更新相关信息
-	//appdWhere := " SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and SupplierCertId = " + utils.ToStr(supplierCertAppendEntity.SupplierCertId) + " and Status = '6'"
-	//var appendModel suppliercertappend.OilSupplierCertAppend
-	//appendModel.Status = suppliercert.ALL_PASE_STATUS
-	//certAppendSrv.UpdateEntityBywheretbl(OilSupplierCertAppendName, &appendModel, []string{"Status"}, appdWhere)
-	//  信息变更 TODO 更新相关信息
-	//var infoItems []suppliercertappendsub.OilAppendChangeItem
-	//where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and InfoId = " + utils.ToStr(supplierCertAppendId)
-	//certAppendSrv.GetEntities(&infoItems, where)
-	//var _ error
-	//if len(infoItems) > 0 {
-	//	for i := 0; i < len(infoItems); i++ {
-	//		where := " Id = " + utils.ToStr(supplierCertAppendEntity.SupplierId)
-	//		var sql string
-	//		if infoItems[i].SelectItem == "SetupTime" {
-	//			sql = `UPDATE ` + OilSupplierName + ` set ` + infoItems[i].SelectItem + ` = '` + infoItems[i].ChangeInfo[0:10] + `' where ` + where
-	//		} else {
-	//			sql = `UPDATE ` + OilSupplierName + ` set ` + infoItems[i].SelectItem + ` = '` + infoItems[i].ChangeInfo + `' where ` + where
-	//		}
-	//		_, _ = certAppendSrv.DBE.Exec(sql)
-	//	}
-	//}
+	appdWhere := " SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and SupplierCertId = " + utils.ToStr(supplierCertAppendEntity.SupplierCertId) + " and Status = '6'"
+	var appendModel suppliercertappend.OilSupplierCertAppend
+	appendModel.Status = suppliercert.ALL_PASE_STATUS
+	certAppendSrv.UpdateEntityBywheretbl(OilSupplierCertAppendName, &appendModel, []string{"Status"}, appdWhere)
+	//信息变更 TODO 更新相关信息
+	var infoItems []suppliercertappendsub.OilAppendChangeItem
+	where := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and InfoId = " + utils.ToStr(supplierCertAppendId)
+	certAppendSrv.GetEntities(&infoItems, where)
+	var _ error
+	if len(infoItems) > 0 {
+		for i := 0; i < len(infoItems); i++ {
+			where := " Id = " + utils.ToStr(supplierCertAppendEntity.SupplierId)
+			var sql string
+			if infoItems[i].SelectItem == "SetupTime" {
+				sql = `UPDATE ` + OilSupplierName + ` set ` + infoItems[i].SelectItem + ` = '` + infoItems[i].ChangeInfo[0:10] + `' where ` + where
+			} else {
+				sql = `UPDATE ` + OilSupplierName + ` set ` + infoItems[i].SelectItem + ` = '` + infoItems[i].ChangeInfo + `' where ` + where
+			}
+			_, _ = certAppendSrv.DBE.Exec(sql)
+		}
+	}
 
 	// 更新资质 TODO 更新相关信息
-	//var qualDetail []suppliercertappendsub.OilAppendChangeDetail
-	//wheres := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and ParentId=" + supplierCertAppendId
-	//certAppendSrv.GetEntities(&qualDetail, wheres)
-	//if len(qualDetail) > 0 {
-	//	for i := 0; i < len(qualDetail); i++ {
-	//		var supFileModel supplierfile.OilSupplierFile
-	//		supFileModel.FileName = qualDetail[i].FileName
-	//		supFileModel.FileUrl = qualDetail[i].FileUrl
-	//		supFileModel.EffectDate = qualDetail[i].EffectDate
-	//		certAppendSrv.UpdateEntityBytbl(OilSupplierFileName, qualDetail[i].FileId, &supFileModel, []string{"FileName", "FileUrl", "EffectDate"})
-	//	}
-	//}
+	var qualDetail []suppliercertappendsub.OilAppendChangeDetail
+	wheres := "SupplierId = " + utils.ToStr(supplierCertAppendEntity.SupplierId) + " and ParentId=" + supplierCertAppendId
+	certAppendSrv.GetEntities(&qualDetail, wheres)
+	if len(qualDetail) > 0 {
+		for i := 0; i < len(qualDetail); i++ {
+			var supFileModel supplierfile.OilSupplierFile
+			supFileModel.FileName = qualDetail[i].FileName
+			supFileModel.FileUrl = qualDetail[i].FileUrl
+			supFileModel.EffectDate = qualDetail[i].EffectDate
+			certAppendSrv.UpdateEntityBytbl(OilSupplierFileName, qualDetail[i].FileId, &supFileModel, []string{"FileName", "FileUrl", "EffectDate"})
+		}
+	}
 	this.Data["json"] = 1
 	this.ServeJSON()
 }

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

@@ -1090,7 +1090,11 @@ func (this *OilSupplierCertAppendController) UpdateIsStorage() {
 			this.ServeJSON()
 		} else {
 			//返回正确结果
-			errinfo.Message = "入库成功"
+			if status == "1" {
+				errinfo.Message = "入库成功"
+			} else {
+				errinfo.Message = "退回成功"
+			}
 			errinfo.Code = 0
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
@@ -1113,7 +1117,8 @@ func (this *OilSupplierCertAppendController) UpdateIsStorage() {
 	if status == "1" {
 		AuditRemark = "审批通过已入库。"
 	} else {
-		AuditRemark = "已入库。"
+		status = "0"
+		AuditRemark = "入库退回。"
 	}
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
@@ -1121,7 +1126,7 @@ func (this *OilSupplierCertAppendController) UpdateIsStorage() {
 	ActiComplete.ProcessKey = workflow.OIL_ENUSER_APPEND_APPLY
 	ActiComplete.BusinessKey = supplierCertAppendEntity.BusinessKey
 	ActiComplete.UserId = this.User.Id //审批人员
-	ActiComplete.Result = "1"          //前台审批[同意、不同意]
+	ActiComplete.Result = status         //前台审批[同意、不同意]
 	ActiComplete.Remarks = AuditRemark
 	ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
 	receiveVal := svcActiviti.TaskComplete(ActiComplete)

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

@@ -30,7 +30,8 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="auditBtn && parseInt(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="commonAuditClick" v-if="auditBtn && this.formData.Status === '7'">审批入库</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirm" v-if="auditBtn && this.formData.Status === '7'" :loading="btnLoading">审批入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 8px" @click="backStatus" v-if="auditBtn && formData.Status == '7'" :loading="btnLoading">退回</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px;" onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -701,6 +702,22 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <el-dialog title="退回原因" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity">确定</el-button>
+      </span>
+    </el-dialog>
 
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
@@ -766,8 +783,10 @@
         }
       }
       return {
+        dialogVisibleBack: false,
         firOptions: [],
         btnloading: false,
+        btnLoading: false,
         activeName: '0',
         supplierId: '',
         backRemark: '',
@@ -1161,7 +1180,7 @@
             this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
           }
         } else {
-          if (this.formData.Status == '5') {
+          if (this.formData.Status === '5') {
             this.textplaceholder = ''
           } else {
             this.textplaceholder = '退回意见不能少于5个字'
@@ -1233,6 +1252,83 @@
           this.radioChange()
         }
       },
+      backEntity () {
+        let params = {
+          result: '0',
+          BackRemark: this.backRemark,
+          SupplierId: this.formData.SupplierId
+        }
+        this.btnLoading = true
+        console.log(params, '退回参数')
+        console.log(this.formData.Id, 'id')
+        api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+          this.dialogVisibleBack = false
+          if (this.$refs['WfHistory']) {
+            this.$refs['WfHistory'].getHistoryTask()
+          }
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.getEntityById()
+            this.isAccess()
+            // this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnLoading = false
+        }).catch(err => {
+          this.dialogVisibleBack = false
+          this.btnLoading = false
+          console.log(err)
+        })
+      },
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
+      confirm () {
+        this.btnLoading = true
+        this.$confirm('确认提交入库', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Status: '1',
+            SupplierId: this.formData.SupplierId
+          }
+          let _this = this
+          api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              _this.getEntityById()
+              _this.isAccess()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          this.btnLoading = false
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+          this.btnLoading = false
+        })
+      },
       // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核
       commonAuditClick () {
         console.log('审批公共会话框')
@@ -2107,7 +2203,7 @@
             let Format = fileurl[1].split('.')
             if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
               let pictureFormat = Format[1]
-              if (pictureFormat == 'jpg' || pictureFormat =='bmp' || pictureFormat =='png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
+              if (pictureFormat == 'jpg' || pictureFormat == 'bmp' || pictureFormat == 'png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
                 return false
               }
             }

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

@@ -31,7 +31,8 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">1{{auditTitle}}</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="auditBtn && parseInt(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="commonAuditClick" v-if="auditBtn && this.formData.Status === '7'">审批入库</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirm" v-if="auditBtn && this.formData.Status === '7'" :loading="btnLoading">审批入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" @click="backStatus" v-if="auditBtn && formData.Status == '7'" :loading="btnLoading">退回</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px;"  onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -787,6 +788,22 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <el-dialog title="退回原因" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity">确定</el-button>
+      </span>
+    </el-dialog>
 
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
@@ -851,8 +868,10 @@
         }
       }
       return {
+        dialogVisibleBack: false,
         firOptions: [],
         btnloading: false,
+        btnLoading: false,
         activeName: '0',
         supplierId: '',
         backRemark: '',
@@ -1460,6 +1479,84 @@
         }
         return true
       },
+      // 入库退回
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
+      backEntity () {
+        let params = {
+          result: '0',
+          BackRemark: this.backRemark,
+          SupplierId: this.formData.SupplierId
+        }
+        this.btnLoading = true
+        console.log(params, '退回参数')
+        console.log(this.formData.Id, 'id')
+        api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+          this.dialogVisibleBack = false
+          if (this.$refs['WfHistory']) {
+            this.$refs['WfHistory'].getHistoryTask()
+          }
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.getEntityById()
+            this.isAccess()
+            // this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnLoading = false
+        }).catch(err => {
+          this.dialogVisibleBack = false
+          this.btnLoading = false
+          console.log(err)
+        })
+      },
+      confirm () {
+        this.btnLoading = true
+        this.$confirm('确认提交入库', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Status: '1',
+            SupplierId: this.formData.SupplierId
+          }
+          let _this = this
+          api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              _this.getEntityById()
+              _this.isAccess()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          this.btnLoading = false
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+          this.btnLoading = false
+        })
+      },
       // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核
       commonAuditClick () {
         console.log('审批公共会话框')

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

@@ -30,7 +30,8 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="auditBtn && parseInt(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="commonAuditClick" v-if="auditBtn && this.formData.Status === '7'">审批入库</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirm" v-if="auditBtn && this.formData.Status === '7'" :loading="btnLoading">审批入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" @click="backStatus" v-if="auditBtn && formData.Status == '7'" :loading="btnLoading">退回</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px;"  onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -685,6 +686,22 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <el-dialog title="退回原因" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity">确定</el-button>
+      </span>
+    </el-dialog>
 
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
@@ -747,8 +764,10 @@
         }
       }
       return {
+        dialogVisibleBack: false,
         firOptions: [],
         btnloading: false,
+        btnLoading: false,
         activeName: '0',
         supplierId: '',
         backRemark: '',
@@ -1263,6 +1282,83 @@
           this.radioChange()
         }
       },
+      backEntity () {
+        let params = {
+          result: '0',
+          BackRemark: this.backRemark,
+          SupplierId: this.formData.SupplierId
+        }
+        this.btnLoading = true
+        console.log(params, '退回参数')
+        console.log(this.formData.Id, 'id')
+        api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+          this.dialogVisibleBack = false
+          if (this.$refs['WfHistory']) {
+            this.$refs['WfHistory'].getHistoryTask()
+          }
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.getEntityById()
+            this.isAccess()
+            // this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnLoading = false
+        }).catch(err => {
+          this.dialogVisibleBack = false
+          this.btnLoading = false
+          console.log(err)
+        })
+      },
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
+      confirm () {
+        this.btnLoading = true
+        this.$confirm('确认提交入库', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Status: '1',
+            SupplierId: this.formData.SupplierId
+          }
+          let _this = this
+          api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              _this.getEntityById()
+              _this.isAccess()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          this.btnLoading = false
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+          this.btnLoading = false
+        })
+      },
       // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核
       commonAuditClick () {
         console.log('审批公共会话框')

+ 102 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -32,7 +32,8 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="profAudit()" v-if="auditBtn && AnnualStatus == '3'">提交专业审核</el-button> &lt;!&ndash; 未用到 &ndash;&gt;-->
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="annualAudit()" v-if="auditBtn && AnnualStatus == '4'">专业审核</el-button>&lt;!&ndash; 未用到 &ndash;&gt;-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && AnnualStatus == '5'">审批</el-button><!-- 企业法规处 -->
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirmStorage()" v-if="auditBtn && AnnualStatus == '7'">入库审批</el-button><!-- 企业法规处 -->
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirm" v-if="auditBtn && AnnualStatus == '7'" :loading="btnLoading">入库审批</el-button><!-- 企业法规处 -->
+          <el-button type="warning" size="mini" style="margin-left: 8px" @click="backStatus" v-if="auditBtn && AnnualStatus == '7'" :loading="btnLoading">退回</el-button>
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="secUnitSeparateAuditClick" v-if="auditBtn && AnnualStatus == '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;" onclick="window.history.go(-1)">返回</el-button>
@@ -996,6 +997,22 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <el-dialog title="退回原因" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity">确定</el-button>
+      </span>
+    </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
                     :visible="chooseAuditorVisible"></choose-auditor>
   </div>
@@ -1163,6 +1180,9 @@ export default {
         }
       }
       return {
+        backRemark: '',
+        dialogVisibleBack: false,
+        btnLoading: false,
         firOptions: [],
         IsCompanyUser: 0,
         add_flat: true,
@@ -2556,6 +2576,87 @@ export default {
         this.shenheForm.AnnualId = parseInt(this.annualId)
         this.dialogMakeSure = true
       },
+      backEntity () {
+        let params = {
+          result: '0',
+          BackRemark: this.backRemark,
+          SupplierId: this.formData.Id
+        }
+        this.btnLoading = true
+        console.log(params, '退回参数')
+        console.log(this.shenheForm, 'id')
+        annualapi.updateIsStorage(this.AnnualId, params, this.$axios).then(res => {
+          this.dialogVisibleBack = false
+
+          if (this.$refs['WfHistory']) {
+            this.$refs['WfHistory'].getHistoryTask()
+          }
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.initDatas()
+            this.isAccess()
+            this.getstatus(this.AnnualId)
+            // this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnLoading = false
+        }).catch(err => {
+          this.dialogVisibleBack = false
+          this.btnLoading = false
+          console.log(err)
+        })
+      },
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
+      confirm () {
+        this.btnLoading = true
+        this.$confirm('确认提交入库', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Status: '1',
+            SupplierId: this.formData.Id
+          }
+          let _this = this
+          annualapi.updateIsStorage(this.$route.query.annualId, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.initDatas()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
+              _this.getstatus(this.$route.query.annualId)
+              _this.isAccess()
+              console.log('已强制刷新历史审批流程')
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          this.btnLoading = false
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+          this.btnLoading = false
+        })
+      },
       commonAuditClick () {
         console.log('审批公共会话框')
         this.shenheForm.AnnualId = parseInt(this.annualId)

+ 104 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/basicauditoperation.vue

@@ -32,7 +32,8 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="profAudit()" v-if="auditBtn && AnnualStatus == '3'">提交专业审核</el-button>-->
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="annualAudit()" v-if="auditBtn && AnnualStatus == '4'">专业审核</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && AnnualStatus == '5'">审批</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirmStorage" v-if="auditBtn && AnnualStatus == '7'">入库审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirm" v-if="auditBtn && AnnualStatus == '7'" :loading="btnLoading">入库审批</el-button>
+          <el-button type="warning" size="mini" style="margin-left: 8px" @click="backStatus" v-if="auditBtn && AnnualStatus == '7'" :loading="btnLoading">退回</el-button>
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="secUnitSeparateAuditClick" v-if="auditBtn && AnnualStatus == '10'">提交</el-button>
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && AnnualStatus == '6'">交费</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px;" onclick="window.history.go(-1)">返回</el-button>
@@ -887,6 +888,22 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <el-dialog title="退回原因" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity">确定</el-button>
+      </span>
+    </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
                     :visible="chooseAuditorVisible"></choose-auditor>
   </div>
@@ -1046,8 +1063,11 @@
         }
       }
       return {
+        backRemark: '',
         firOptions: [],
+        btnLoading: false,
         loading: false,
+        dialogVisibleBack: false,
         dialogCommonAuditMakeSureVisible: false,
         dialogSecUnitSeparateVisible: false,
         sizeProject: 10,
@@ -1427,6 +1447,7 @@
       this.AnnualStatus = this.$route.query.AnnualStatus
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.annualId = this.$route.query.annualId
+      console.log(this.$route.query.annualId, 'ID')
       this.Step = parseInt(this.$route.query.Step)
       // this.getDictOptions()
       this.formData.Id = this.serviceId
@@ -2156,7 +2177,88 @@
           console.error(err)
         })
       },
-
+      backEntity () {
+        let params = {
+          result: '0',
+          BackRemark: this.backRemark,
+          SupplierId: this.formData.Id
+        }
+        this.btnLoading = true
+        console.log(params, '退回参数')
+        console.log(this.$route.query.annualId, 'id')
+        console.log(this.shenheForm, 'id')
+        annualapi.updateIsStorage(this.$route.query.annualId, params, this.$axios).then(res => {
+          this.dialogVisibleBack = false
+          if (this.$refs['WfHistory']) {
+            this.$refs['WfHistory'].getHistoryTask()
+          }
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.initDatas()
+            this.isAccess()
+            this.getstatus(this.AnnualId)
+            // this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnLoading = false
+        }).catch(err => {
+          this.dialogVisibleBack = false
+          this.btnLoading = false
+          console.log(err)
+        })
+      },
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
+      confirm () {
+        this.btnLoading = true
+        this.$confirm('确认提交入库', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Status: '1',
+            SupplierId: this.formData.Id
+          }
+          let _this = this
+          console.log(this.$route.query.annualId, 'QWE')
+          annualapi.updateIsStorage(this.$route.query.annualId, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.initDatas()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
+              _this.getstatus(this.$route.query.annualId)
+              _this.isAccess()
+              console.log('已强制刷新历史审批流程')
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          this.btnLoading = false
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+          this.btnLoading = false
+        })
+      },
       commonAuditClick () {
         console.log('审批公共会话框')
         this.shenheForm.AnnualId = parseInt(this.annualId)

+ 102 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/techoperation.vue

@@ -32,7 +32,8 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="profAudit()" v-if="auditBtn && AnnualStatus == '3'">提交专业审核</el-button>-->
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="annualAudit()" v-if="auditBtn && AnnualStatus == '4'">专业审核</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && AnnualStatus == '5'">审批</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirmStorage" v-if="auditBtn && AnnualStatus == '7'">入库审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="confirm" v-if="auditBtn && AnnualStatus == '7'" :loading="btnLoading">入库审批</el-button>
+          <el-button type="warning" size="mini" style="margin-left: 8px" @click="backStatus" v-if="auditBtn && AnnualStatus == '7'" :loading="btnLoading">退回</el-button>
           <el-button type="primary" style="margin-left: 8px;" size="mini" @click="secUnitSeparateAuditClick" v-if="auditBtn && AnnualStatus == '10'">提交</el-button>
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && AnnualStatus == '6'">交费</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px;" onclick="window.history.go(-1)">返回</el-button>
@@ -807,6 +808,22 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <el-dialog title="退回原因" :visible.sync="dialogVisibleBack" width="520px">
+      <el-form ref="backForm" label-width="70px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="退回原因">
+              <el-input v-model="backRemark" type="textarea">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisibleBack = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="backEntity">确定</el-button>
+      </span>
+    </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
                     :visible="chooseAuditorVisible"></choose-auditor>
   </div>
@@ -974,6 +991,9 @@
         }
       }
       return {
+        backRemark: '',
+        dialogVisibleBack: false,
+        btnLoading: false,
         firOptions: [],
         sizeProject: 10,
         currentPageProject: 1,
@@ -2301,6 +2321,87 @@
         this.shenheForm.AnnualId = parseInt(this.annualId)
         this.dialogMakeSure = true
       },
+      backEntity () {
+        let params = {
+          result: '0',
+          BackRemark: this.backRemark,
+          SupplierId: this.formData.Id
+        }
+        this.btnLoading = true
+        console.log(params, '退回参数')
+        console.log(this.shenheForm, 'id')
+        annualapi.updateIsStorage(this.AnnualId, params, this.$axios).then(res => {
+          this.dialogVisibleBack = false
+
+          if (this.$refs['WfHistory']) {
+            this.$refs['WfHistory'].getHistoryTask()
+          }
+          if (res.data.code === 0) {
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.initDatas()
+            this.isAccess()
+            this.getstatus(this.AnnualId)
+            // this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnLoading = false
+        }).catch(err => {
+          this.dialogVisibleBack = false
+          this.btnLoading = false
+          console.log(err)
+        })
+      },
+      backStatus () {
+        this.dialogVisibleBack = true
+      },
+      confirm () {
+        this.btnLoading = true
+        this.$confirm('确认提交入库', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            Status: '1',
+            SupplierId: this.formData.Id
+          }
+          let _this = this
+          annualapi.updateIsStorage(this.$route.query.annualId, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.initDatas()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
+              _this.getstatus(this.$route.query.annualId)
+              _this.isAccess()
+              console.log('已强制刷新历史审批流程')
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          this.btnLoading = false
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+          this.btnLoading = false
+        })
+      },
       commonAuditClick () {
         console.log('审批公共会话框')
         this.shenheForm.AnnualId = parseInt(this.annualId)