2
3
Prechádzať zdrojové kódy

删除未审核通过,及 formData.Status 状态的判断

yuedefeng 5 rokov pred
rodič
commit
a760a670a7

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

@@ -166,6 +166,34 @@ func (this *ActivitiService) TaskComplete(ActiComplete ActiCompleteVM) string {
 	return string(p)
 }
 
+func (this *ActivitiService) SuspendComplete(deleteProcessVM DeleteProcessVM) string {
+
+	jsonParams, err := json.Marshal(deleteProcessVM)
+	if err != nil {
+		fmt.Println(err, "生成json字符串错误")
+	}
+	params := string(jsonParams)
+	fmt.Println(params)
+	//token = Authorization(this.Username, this.Password)
+	retVal := this.Post("/suspend-process-instance", params, "")
+	p, _ := ioutil.ReadAll(retVal.Body)
+	return string(p)
+}
+
+func (this *ActivitiService) DeleteComplete(deleteProcessVM DeleteProcessVM) string {
+
+	jsonParams, err := json.Marshal(deleteProcessVM)
+	if err != nil {
+		fmt.Println(err, "生成json字符串错误")
+	}
+	params := string(jsonParams)
+	fmt.Println(params)
+	//token = Authorization(this.Username, this.Password)
+	retVal := this.Post("/delete-process-instance", params, "")
+	p, _ := ioutil.ReadAll(retVal.Body)
+	return string(p)
+}
+
 /*func (this *ActivitiService) MultiTaskComplete(processKey string, formEntityId string, userNames string, multiOrgAudits []MultiOrgAuditVM, userId string, result string, remarks string, callbackUrl string) string {
 
 var ActiComplete MultiActiCompleteVM

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

@@ -67,6 +67,11 @@ type AposeVM struct {
 	Watermark  string `json:"watermark"`
 }
 
+type DeleteProcessVM struct {
+	ProcessInstanceId string `json:"processInstanceId"`
+	DeleteReason  string `json:"deleteReason"`
+}
+
 type WordTemplateVM struct {
 	Datas       map[string]interface{} `json:"datas"`
 	TemplateUrl string                 `json:"templateUrl"`

+ 22 - 13
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1830,23 +1830,32 @@ func (this *OilSupplierController) DeleteAllEntity() {
 		return
 	}
 	svc := supplier.GetOilSupplierService(utils.DBE)
-	err := svc.DeleteEntityBytbl(OilSupplierCertSubName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
-	err = svc.DeleteEntityBytbl(OilSupplierFileName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
-	err = svc.DeleteEntityBytbl(OilSupplierCertName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
-
-	// TODO: 删除准入范围和资质对应关系表
-	// err = svc.DeleteEntityBytbl(OilSupplierCert2FileName, "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'")
-	/* var model1 suppliercertsub.OilSupplierCert2File
-	count1, _ := svc.GetCount(&model1, "SupplierId="+Id)
-	if count1 == 0 {
-		err = svc.DeleteEntityBytbl(OilSupplierFileName, "SupplierId="+Id)
-	}*/
+	deleteWhere := "SupplierId="+Id+" and SupplierTypeCode='"+SupplierTypeCode+"'"
+	err := svc.DeleteEntityBytbl(OilSupplierCertSubName, deleteWhere)
+	err = svc.DeleteEntityBytbl(OilSupplierFileName, deleteWhere)
+
+	var modelList []suppliercert.OilSupplierCert
+	svc.GetEntityByWhere(OilSupplierCertName, deleteWhere, &modelList)
+	// 删除工作流
+	activitiService := workflow.GetActivitiService(utils.DBE)
+	var deleteProcessVM workflow.DeleteProcessVM
+	for _, supplierCertItem := range modelList {
+		// 按条件查询,正常情况下只有一条
+		if supplierCertItem.WorkflowId != "" && supplierCertItem.WorkflowId != "0" {
+			deleteProcessVM.ProcessInstanceId = supplierCertItem.WorkflowId
+			deleteProcessVM.DeleteReason = "审批未通过,删除"
+			activitiService.DeleteComplete(deleteProcessVM)
+		}
+	}
+	// 删除SupplierCert表
+	err = svc.DeleteEntityBytbl(OilSupplierCertName, deleteWhere)
 
-	var model2 suppliercert.OilSupplierCert
+	/* var model2 suppliercert.OilSupplierCert
 	count2, _ := svc.GetCount(&model2, "SupplierId="+Id)
 	if count2 == 0 {
 		err = svc.DeleteEntityBytbl(OilSupplierName, "Id="+Id)
-	}
+	} */
+
 	if err == nil {
 		errinfo.Message = "删除成功"
 		errinfo.Code = 0

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

@@ -1888,6 +1888,16 @@ func (this *OilSupplierCertController) ReInput() {
 
 	err = session.Commit()
 	if err == nil {
+		//TODO: 删除工作流, 年审、增项、信息变更等有流程的都要删除
+		activitiService := workflow.GetActivitiService(utils.DBE)
+		var deleteProcessVM workflow.DeleteProcessVM
+		for _, supplierCertItem := range model {
+			if supplierCertItem.WorkflowId != "" && supplierCertItem.WorkflowId != "0" {
+				deleteProcessVM.ProcessInstanceId = supplierCertItem.WorkflowId
+				deleteProcessVM.DeleteReason = "企业重新入库"
+				activitiService.DeleteComplete(deleteProcessVM)
+			}
+		}
 		errinfo.Message = "提交成功!"
 		errinfo.Code = 0
 		this.Data["json"] = &errinfo

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

@@ -405,6 +405,14 @@ func (this *OilSupplierCertAppendController) DeleteEntity() {
 	err = session.Commit()
 
 	if err == nil {
+		activitiService := workflow.GetActivitiService(utils.DBE)
+		var deleteProcessVM workflow.DeleteProcessVM
+		if model.WorkFlowId != "" && model.WorkFlowId != "0" {
+			deleteProcessVM.ProcessInstanceId = model.WorkFlowId
+			deleteProcessVM.DeleteReason = "未审批通过,被申请人删除"
+			activitiService.DeleteComplete(deleteProcessVM)
+		}
+
 		errinfo.Message = "删除成功"
 		errinfo.Code = 0
 		this.Data["json"] = &errinfo

+ 19 - 17
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -25,13 +25,13 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="itemsshow">查看变更项</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px"
-                     v-if="formData.Id != '' && formData.Status <= 0" @click="saveinfochange">保存
+                     v-if="formData.Id != '' && currentStatus <= 0" @click="saveinfochange">保存
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-            v-if="formData.Id != '' && formData.Status <= 0 && parseInt(IsCompanyUser) === 0">提交审核
+            v-if="formData.Id != '' && currentStatus <= 0 && parseInt(IsCompanyUser) === 0">提交审核
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
-            v-if="formData.Id != '' && formData.Status <= 0 && parseInt(IsCompanyUser) === 1">提交
+            v-if="formData.Id != '' && currentStatus <= 0 && parseInt(IsCompanyUser) === 1">提交
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -391,7 +391,7 @@
               <div slot="header">
                 <span><i class="icon icon-table2"></i> 增项信息</span>
                 <el-button style="float: right; padding: 3px 0" type="text"
-                           v-if="formData.Status <= 0 && formData.Status != -5" @click="saveEntity()">保存信息</el-button>
+                           v-if="currentStatus <= 0 && currentStatus != -5" @click="saveEntity()">保存信息</el-button>
               </div>
               <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
                 <el-row>
@@ -407,7 +407,7 @@
                   </el-col>
                   <el-col :span="6">
                     <el-form-item label="准入方式">
-                      <el-select ref="SpecType" v-model="formData.InStyle" :disabled="this.formData.Status > '0'"
+                      <el-select ref="SpecType" v-model="formData.InStyle" :disabled="currentStatus > 0"
                                  placeholder="请选择" style="width: 100%">
                         <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" v-if="item.Value != '2' && item.Value != '3'"
                                    :value="item.Value">
@@ -417,7 +417,7 @@
                   </el-col>
                   <el-col :span="12">
                     <el-form-item label="备注" prop="Remark">
-                      <el-input :disabled="formData.Status>0" type="textarea" v-model="formData.Remark"
+                      <el-input :disabled="currentStatus>0" type="textarea" v-model="formData.Remark"
                                 placeholder="请输入">
                       </el-input>
                     </el-form-item>
@@ -429,15 +429,15 @@
             <el-card class="box-card" style="margin-top: 10px;">
               <div slot="header" class="clearfix">
                 <span><i class="icon icon-table2"></i> 企业资质</span>
-                <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="formData.Status <= 0">添加</el-button>
+                <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="currentStatus <= 0">添加</el-button>
               </div>
               <el-table size="mini" highlight-current-row :data="subfileList1" border>
                 <el-table-column label="操作" width="150" align="center" fixed>
                   <template slot-scope="scope">
-                    <el-button type="primary" plain size="mini" title="文件变更" :disabled="formData.Status > 0" @click="openDialog(scope.row)">
+                    <el-button type="primary" plain size="mini" title="文件变更" :disabled="currentStatus > 0" @click="openDialog(scope.row)">
                       变更</el-button>
                     <el-button type="danger" plain size="mini" title="文件删除" @click="delFile(scope.row)"
-                               v-if="formData.Status <= 0 && scope.row.FileType == 0 && scope.row.OldFileUrl == ''">
+                               v-if="currentStatus <= 0 && scope.row.FileType == 0 && scope.row.OldFileUrl == ''">
                       删除</el-button>
                   </template>
                 </el-table-column>
@@ -488,7 +488,7 @@
                           </a>
                         </div>
                       </el-col>
-                      <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
+                      <el-col :span="4" v-if="scope.row.FileUrl != '' && currentStatus <= 0 && currentStatus != -5">
                         <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length)  + 'px',}" @click="iconclear(scope.row)"></i>
                       </el-col>
                     </el-row> -->
@@ -511,7 +511,7 @@
                           </div>
                         </viewer>
                       </el-col>
-                      <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
+                      <el-col :span="4" v-if="scope.row.FileUrl != '' && currentStatus <= 0 && currentStatus != -5">
                         <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length)  + 'px',}" @click="iconclear(scope.row)"></i>
                       </el-col>
                     </el-row>
@@ -533,13 +533,13 @@
                   <div slot="header">
                     <span><i class="icon icon-table2"></i> 全部准入范围</span>
                     <!-- <el-button style="float: right; padding: 3px 0" type="text"
-                      v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button> -->
+                      v-if="currentStatus <= 0 && currentStatus != -5" @click="addSortData()">添加</el-button> -->
                   </div>
                   <el-table :data="entityList" size="mini" border style="width: 100%" height="calc(100vh - 428px)" @sort-change="orderby">
                     <!-- <el-table-column label="操作" min-width="100" align="center" fixed>
                       <template slot-scope="scope">
                         <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                          :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                          :disabled="scope.row.Type == '1'||currentStatus > 0">删除</el-button>
                       </template>
                     </el-table-column> -->
                     <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
@@ -560,13 +560,13 @@
                   <div slot="header">
                     <span><i class="icon icon-table2"></i> 新增准入范围</span>
                     <el-button style="float: right; padding: 3px 0" type="text"
-                               v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+                               v-if="currentStatus <= 0 && currentStatus != -5" @click="addSortData()">添加</el-button>
                   </div>
                   <el-table :data="myentityList" size="mini" border style="width: 100%" height="calc(100vh - 428px)" @sort-change="orderby">
                     <el-table-column label="操作" min-width="100" align="center" fixed>
                       <template slot-scope="scope">
                         <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                                   :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                                   :disabled="scope.row.Type == '1'||currentStatus > 0">删除</el-button>
                       </template>
                     </el-table-column>
                     <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
@@ -582,10 +582,10 @@
             </el-row>
             <div style="float: right; margin: 20px;">
               <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-                         v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审核
+                         v-if="formData.Id !='' && currentStatus <= 0 && currentStatus != -5 && IsCompanyUser == 0">提交审核
               </el-button>
               <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
-                         v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
+                         v-if="formData.Id !='' && currentStatus <= 0 && currentStatus != -5 && IsCompanyUser == 1">提交
               </el-button>
             </div>
           </el-tab-pane>
@@ -1007,6 +1007,7 @@
         }
       }
       return {
+        currentStatus: 0,
         lostTableDataInfo: '',
         lostTableData: [],
         firOptions: [],
@@ -2409,6 +2410,7 @@
         let _this = this
         api2.getEntityById(_this.Id, _this.$axios).then(res => {
           _this.formData = res.data
+          _this.currentStatus = parseInt(res.data.Status) || 0
           this.entrydetail.process = this.formData.ProcessKey
           this.entrydetail.business = _this.Id
           this.entrydetail.instance = this.formData.WorkFlowId

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

@@ -24,13 +24,13 @@
           </el-popover>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="itemsshow">查看变更项</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" v-if="formData.Id !='' && formData.Status <= 0" @click="saveinfochange">保存
+          <el-button type="primary" size="mini" style="margin-left: 8px" v-if="formData.Id !='' && currentStatus <= 0" @click="saveinfochange">保存
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-            v-if="formData.Id !='' && formData.Status <= 0 && IsCompanyUser == 0">提交审核
+            v-if="formData.Id !='' && currentStatus <= 0 && IsCompanyUser == 0">提交审核
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
-            v-if="formData.Id !='' && formData.Status <= 0 && IsCompanyUser == 1">提交
+            v-if="formData.Id !='' && currentStatus <= 0 && IsCompanyUser == 1">提交
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/goodslist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -444,7 +444,7 @@
               <div slot="header">
                 <span><i class="icon icon-table2"></i> 增项信息</span>
                 <el-button style="float: right; padding: 3px 0" type="text"
-                           v-if="formData.Status <= 0 && formData.Status != -5" @click="saveEntity()">保存信息</el-button>
+                           v-if="currentStatus <= 0 && currentStatus != -5" @click="saveEntity()">保存信息</el-button>
               </div>
               <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
                 <el-row>
@@ -461,7 +461,7 @@
                   <el-col :span="6">
                     <el-form-item label="准入方式">
                       <el-select ref="inStyle" v-model="formData.InStyle"
-                                 :disabled="this.formData.Status > '0'"
+                                 :disabled="currentStatus > 0"
                                  placeholder="请选择"
                                  style="width: 100%">
                         <el-option v-for="item in InOptions"
@@ -474,7 +474,7 @@
                   </el-col>
                   <el-col :span="12">
                     <el-form-item label="备注" prop="Remark">
-                      <el-input :disabled="formData.Status>0" type="textarea" v-model="formData.Remark" placeholder="请输入">
+                      <el-input :disabled="currentStatus>0" type="textarea" v-model="formData.Remark" placeholder="请输入">
                       </el-input>
                     </el-form-item>
                   </el-col>
@@ -484,15 +484,15 @@
             <el-card class="box-card" style="margin-top: 10px;">
               <div slot="header" class="clearfix">
                 <span><i class="icon icon-table2"></i> 企业资质</span>
-                <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="formData.Status <= 0">添加</el-button>
+                <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="currentStatus <= 0">添加</el-button>
               </div>
               <el-table size="mini" highlight-current-row :data="subfileList1" border>
                 <el-table-column label="操作" width="150" align="center" fixed>
                   <template slot-scope="scope">
-                    <el-button type="primary" plain size="mini" title="文件变更" :disabled="formData.Status > 0" @click="openDialog(scope.row)">
+                    <el-button type="primary" plain size="mini" title="文件变更" :disabled="currentStatus > 0" @click="openDialog(scope.row)">
                       变更</el-button>
                     <el-button type="danger" plain size="mini" title="文件删除" @click="delFile(scope.row)"
-                               v-if="formData.Status <= 0 && scope.row.FileType == 0 && scope.row.OldFileUrl == ''">
+                               v-if="currentStatus <= 0 && scope.row.FileType == 0 && scope.row.OldFileUrl == ''">
                       删除</el-button>
                   </template>
                 </el-table-column>
@@ -550,7 +550,7 @@
                           </div>
                         </viewer>
                       </el-col>
-                      <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
+                      <el-col :span="4" v-if="scope.row.FileUrl != '' && currentStatus <= 0 && currentStatus != -5">
                         <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length)  + 'px',}" @click="iconclear(scope.row)"></i>
                       </el-col>
                     </el-row>
@@ -564,7 +564,7 @@
                           </a>
                         </div>
                       </el-col>
-                      <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
+                      <el-col :span="4" v-if="scope.row.FileUrl != '' && currentStatus <= 0 && currentStatus != -5">
                         <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length)  + 'px',}" @click="iconclear(scope.row)"></i>
                       </el-col>
                     </el-row> -->
@@ -589,7 +589,7 @@
                   <div slot="header">
                     <span><i class="icon icon-table2"></i> 全部准入范围</span>
                     <!-- <el-button style="float: right; padding: 3px 0" type="text"
-                      v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button> -->
+                      v-if="currentStatus <= 0 && currentStatus != -5" @click="addSortData()">添加</el-button> -->
                   </div>
                   <el-table :data="entityList" size="mini" border style="width: 100%;"  height="calc(100vh - 428px)" @sort-change="orderby">
                     <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
@@ -625,9 +625,9 @@
                   <div slot="header">
                     <span><i class="icon icon-table2"></i> 新增准入范围</span>
                     <!--<el-button style="float: right; padding: 3px 0" type="text"-->
-                    <!--v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>-->
+                    <!--v-if="currentStatus <= 0 && currentStatus != -5" @click="addSortData()">添加</el-button>-->
                     <el-button style="float: right; padding: 3px 0" type="text"
-                               v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData1()">添加</el-button>
+                               v-if="currentStatus <= 0 && currentStatus != -5" @click="addSortData1()">添加</el-button>
                   </div>
                   <el-table :data="myentityList"
                             v-loading="tableloading"
@@ -636,7 +636,7 @@
                     <el-table-column label="操作" min-width="100" align="center" fixed>
                       <template slot-scope="scope">
                         <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                                   :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                                   :disabled="scope.row.Type == '1'||currentStatus > 0">删除</el-button>
                       </template>
                     </el-table-column>
                     <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
@@ -667,10 +667,10 @@
             </el-row>
             <div style="float: right; margin: 20px;">
               <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-                         v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审核
+                         v-if="formData.Id !='' && currentStatus <= 0 && currentStatus != -5 && IsCompanyUser == 0">提交审核
               </el-button>
               <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
-                         v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
+                         v-if="formData.Id !='' && currentStatus <= 0 && currentStatus != -5 && IsCompanyUser == 1">提交
               </el-button>
             </div>
           </el-tab-pane>
@@ -1271,7 +1271,7 @@
         }
       }
       return {
-        // 456
+        currentStatus: 0,
         firOptions: [],
         btnloading: false,
         fileList: [],
@@ -2134,7 +2134,7 @@
         this.getCodeById(item[item.length - 1]) // 根据分类Id获取Code
       },
       type_change (val) {
-        if (this.formData.Status <= 0 && this.formData.Status != -5) {
+        if (this.currentStatus <= 0 && this.currentStatus != -5) {
           if (val.row.IsManufacturer == 2) {
             this.tableloading = true
             let IsManufacturer = 2
@@ -2236,6 +2236,7 @@
         let _this = this
         api2.getEntityById(_this.Id, _this.$axios).then(res => {
           _this.formData = res.data
+          _this.currentStatus = parseInt(res.data.Status) || 0
           this.entrydetail.process = this.formData.ProcessKey
           this.entrydetail.business = _this.Id
           this.entrydetail.instance = this.formData.WorkFlowId

+ 17 - 15
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -25,13 +25,13 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="itemsshow">查看变更项</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px"
-                     v-if="formData.Id !='' && formData.Status <= 0" @click="saveinfochange">保存
+                     v-if="formData.Id !='' && currentStatus <= 0" @click="saveinfochange">保存
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-            v-if="formData.Id !='' && formData.Status <= 0 && IsCompanyUser == 0">提交审核
+            v-if="formData.Id !='' && currentStatus <= 0 && IsCompanyUser == 0">提交审核
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
-            v-if="formData.Id !='' && formData.Status <= 0 && IsCompanyUser == 1">提交
+            v-if="formData.Id !='' && currentStatus <= 0 && IsCompanyUser == 1">提交
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -385,7 +385,7 @@
             <el-card class="box-card">
               <div slot="header">
                 <span><i class="icon icon-table2"></i> 增项信息</span>
-                <el-button style="float: right; padding: 3px 0" type="text" v-if="formData.Status <= 0 && formData.Status != -5" @click="saveEntity()">保存信息</el-button>
+                <el-button style="float: right; padding: 3px 0" type="text" v-if="currentStatus <= 0 && currentStatus != -5" @click="saveEntity()">保存信息</el-button>
               </div>
               <el-form label-width="150px" ref="EntityForm" :rules="appendRules" :model="formData">
                 <el-row>
@@ -409,7 +409,7 @@
                   </el-col>
                   <el-col :span="6">
                     <el-form-item label="准入方式">
-                      <el-select ref="SpecType" v-model="formData.InStyle" :disabled="this.formData.Status > '0'"
+                      <el-select ref="SpecType" v-model="formData.InStyle" :disabled="currentStatus > 0"
                                  placeholder="请选择" style="width: 100%">
                         <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" v-if="item.Value != '2' && item.Value != '3'"
                                    :value="item.Value">
@@ -424,7 +424,7 @@
                   </el-col> -->
                   <el-col :span="12">
                     <el-form-item label="备注" prop="Remark">
-                      <el-input :disabled="formData.Status>0" type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
+                      <el-input :disabled="currentStatus>0" type="textarea" v-model="formData.Remark" placeholder="请输入"></el-input>
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -433,15 +433,15 @@
             <el-card class="box-card" style="margin-top: 10px;">
               <div slot="header" class="clearfix">
                 <span><i class="icon icon-table2"></i> 企业资质</span>
-                <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="formData.Status <= 0">添加</el-button>
+                <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="currentStatus <= 0">添加</el-button>
               </div>
               <el-table size="mini" highlight-current-row :data="subfileList1" border>
                 <el-table-column label="操作" width="150" align="center" fixed>
                   <template slot-scope="scope">
-                    <el-button type="primary" plain size="mini" title="文件变更" :disabled="formData.Status > 0" @click="openDialog(scope.row)">
+                    <el-button type="primary" plain size="mini" title="文件变更" :disabled="currentStatus > 0" @click="openDialog(scope.row)">
                       变更</el-button>
                     <el-button type="danger" plain size="mini" title="文件删除" @click="delFile(scope.row)"
-                               v-if="formData.Status <= 0 && scope.row.FileType == 0 && scope.row.OldFileUrl == ''">
+                               v-if="currentStatus <= 0 && scope.row.FileType == 0 && scope.row.OldFileUrl == ''">
                       删除</el-button>
                   </template>
                 </el-table-column>
@@ -501,7 +501,7 @@
                           </div>
                         </viewer>
                       </el-col>
-                      <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
+                      <el-col :span="4" v-if="scope.row.FileUrl != '' && currentStatus <= 0 && currentStatus != -5">
                         <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length)  + 'px',}" @click="iconclear(scope.row)"></i>
                       </el-col>
                     </el-row>
@@ -515,7 +515,7 @@
                           </a>
                         </div>
                       </el-col>
-                      <el-col :span="4" v-if="scope.row.FileUrl != '' && formData.Status <= 0 && formData.Status != -5">
+                      <el-col :span="4" v-if="scope.row.FileUrl != '' && currentStatus <= 0 && currentStatus != -5">
                         <i class="el-icon-close" :style="{'float': 'right', 'height': '100%','line-height': lineheight(scope.row.FileUrlList.length)  + 'px',}" @click="iconclear(scope.row)"></i>
                       </el-col>
                     </el-row> -->
@@ -550,13 +550,13 @@
                   <div slot="header">
                     <span><i class="icon icon-table2"></i> 新增准入范围</span>
                     <el-button style="float: right; padding: 3px 0" type="text"
-                               v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+                               v-if="currentStatus <= 0 && currentStatus != -5" @click="addSortData()">添加</el-button>
                   </div>
                   <el-table :data="myentityList" size="mini" border style="width: 100%;" height="calc(100vh - 428px)" @sort-change="orderby">
                     <el-table-column label="操作" min-width="100" align="center" fixed>
                       <template slot-scope="scope">
                         <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                                   :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                                   :disabled="scope.row.Type == '1'||currentStatus > 0">删除</el-button>
                       </template>
                     </el-table-column>
                     <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
@@ -568,10 +568,10 @@
             </el-row>
             <div style="float: right; margin: 20px;">
               <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-                         v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审核
+                         v-if="formData.Id !='' && currentStatus <= 0 && currentStatus != -5 && IsCompanyUser == 0">提交审核
               </el-button>
               <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
-                         v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
+                         v-if="formData.Id !='' && currentStatus <= 0 && currentStatus != -5 && IsCompanyUser == 1">提交
               </el-button>
             </div>
           </el-tab-pane>
@@ -1004,6 +1004,7 @@
         }
       }
       return {
+        currentStatus: 0,
         firOptions: [],
         isFirstOpen: true,
         node_had: {},
@@ -1913,6 +1914,7 @@
         let _this = this
         api2.getEntityById(_this.Id, _this.$axios).then(res => {
           _this.formData = res.data
+          _this.currentStatus = parseInt(res.data.Status) || 0
           this.entrydetail.process = this.formData.ProcessKey
           this.entrydetail.business = _this.Id
           this.entrydetail.instance = this.formData.WorkFlowId

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/basislist.vue

@@ -48,7 +48,7 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item :command="GetCommand('History', scope.row)">审批流程</el-dropdown-item>
-                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="scope.row.Status != 0"
+                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="(parseInt(scope.row.Status) || 0) > 0"
                     divided>
                     删除数据</el-dropdown-item>
                 </el-dropdown-menu>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/goodslist.vue

@@ -47,7 +47,7 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item :command="GetCommand('History', scope.row)">审批流程</el-dropdown-item>
-                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="scope.row.Status != 0"
+                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="(parseInt(scope.row.Status) || 0) > 0"
                     divided>
                     删除数据</el-dropdown-item>
                 </el-dropdown-menu>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/index.vue

@@ -52,7 +52,7 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item :command="GetCommand('History', scope.row)">审批流程</el-dropdown-item>
-                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="scope.row.Status != 0" divided>
+                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="(parseInt(scope.row.Status) || 0) > 0" divided>
                     删除数据</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/techlist.vue

@@ -48,7 +48,7 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item :command="GetCommand('History', scope.row)">审批流程</el-dropdown-item>
-                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="scope.row.Status != 0"
+                  <el-dropdown-item :command="GetCommand('Delete', scope.row.Id)" :disabled="(parseInt(scope.row.Status) || 0) > 0"
                     divided>
                     删除数据</el-dropdown-item>
                 </el-dropdown-menu>