Prechádzať zdrojové kódy

撤下企业变更用户端驳回字段限制

sugangqiang 2 rokov pred
rodič
commit
4047a46ecd

+ 33 - 5
app/enterprise/controller/Api.php

@@ -391,11 +391,38 @@ class Api extends EnterpriseController {
                     $record->newBank = $data['bank'];
                     $record->newBankNetwork = $data['bankNetwork'];
                 } else {
-                    $fields = array_filter(explode(",", $record->modify_fields));
-                    for ($i = 0; $i < count($fields); $i++) {
-                        $key = lcfirst(substr($fields[$i], 3));
-                        $record[$fields[$i]] = $data[$key]; //仅可修改选择的字段
+                    /* 注释变更驳回如果恢复,这段要去掉 */
+                    $record->newAgencyType = $data['agencyType'];
+                    $record->newName = htmlspecialchars($data['name']);
+                    $record->newIdCard = htmlspecialchars($data['idCard']);
+                    if ($data["agencyType"] == 1) {
+                        $record->newIndustryFieldNew = $data['industryFieldNew'];
+                        $record->newIndustryFieldOld = $data['industryFieldOld'];
+                    } else {
+                        $record->newIndustryFieldNew = null;
+                        $record->newIndustryFieldOld = null;
                     }
+                    $record->newStreet = $data['street'];
+                    $record->newAddress = $data['address'];
+                    $record->newLegal = $data['legal'];
+                    $record->newEphone = $data['ephone'];
+                    $record->newAgentName = $data['agentName'];
+                    $record->newAgentEmail = $data['agentEmail'];
+                    $record->newAgentPhone = $data['agentPhone'];
+                    $record->newEnterpriseTag = $data['enterpriseTag'];
+                    $record->newOrganizationTag = $data['organizationTag'];
+                    $record->newInstitutionTag = $data['institutionTag'];
+                    $record->newEnterpriseType = $data['enterpriseType'];
+                    $record->newBankCard = $data['bankCard'];
+                    $record->newBank = $data['bank'];
+                    $record->newBankNetwork = $data['bankNetwork'];
+                    /* 注释变更驳回如果恢复,这段要去掉 */
+
+                    /* 注释变更驳回$fields = array_filter(explode(",", $record->modify_fields));
+                      for ($i = 0; $i < count($fields); $i++) {
+                      $key = lcfirst(substr($fields[$i], 3));
+                      $record[$fields[$i]] = $data[$key]; //仅可修改选择的字段
+                      } */
                 }
                 if (!$record["newImgurl"]) {
                     if (strtotime($record["createTime"]) < strtotime($this->compatible_time)) {
@@ -456,7 +483,8 @@ class Api extends EnterpriseController {
                 $files = $this->request->file();
                 if ($files) {
                     $uploadapi = new UploadApi();
-                    $modify_files = array_filter(explode(",", $record->modify_files));
+                    //注释变更驳回$modify_files = array_filter(explode(",", $record->modify_files));
+                    $modify_files = ["newImgurl", "newBankImg", "newDomainImg", "newTypeImg", "newBeian"];
                     if (strtotime($record->createTime) < strtotime($this->compatible_time)) {
                         //旧typeid需要转换成新的禁用文件格式
                         $oldtypes = ["1161965644164075522" => "newImgurl", "1518753449987148467" => "newImgurl", "1518328155588131269" => "newBankImg", "1518926324960220206" => "newBankImg",

+ 2 - 2
app/enterprise/view/api/to_update.html

@@ -180,12 +180,12 @@
                         {if condition="$ecr['type'] eq 1"}
                         <div class="row" id="typeGroup">
                             <table style="width: 100%;border-collapse: collapse;" class="table table-bordered">
-                                <tr class="agencyType1" {if condition="$ecr['agencyType'] neq 1"}style="display:none;"{/if}>
+                                <tr class="agencyType1" {if condition="$ecr['newAgencyType'] neq 1"}style="display:none;"{/if}>
                                     <td colspan="3">
                                         <p style="color: #333;width:100%;white-space:normal;word-wrap:break-word;word-break:break-all;">备注:4341现代产业体系主要包括:“4”即鞋服、纺织、建材、食品4大传统优势产业,“3”即信息技术、智能装备、医疗健康3大新兴产业,“4”即商贸物流、文体旅游、研发创意、金融服务4大现代服务业,“1”即探索布局未来产业(数字经济等)</p>
                                     </td>
                                 </tr>
-                                <tr class='agencyType1' {if condition="$ecr['agencyType'] neq 1"}style="display:none;"{/if}>
+                                <tr class='agencyType1' {if condition="$ecr['newAgencyType'] neq 1"}style="display:none;"{/if}>
                                     <td>
                                         <div class="rowGroup">
                                             <label class="control-label spacing td-label"><span style="color: red">*</span>产业领域</label>

+ 2 - 2
public/static/modular/gate/enterprise/enterprise_change_edit.js

@@ -464,8 +464,8 @@ EpChangeEdit.submitToCheck = function () {
 EpChangeEdit.setFieldDisabled = function () {
     var checkState = $("#checkState").length > 0 ? $("#checkState").val() : 1;
     if (checkState != 1) {
-        $("#ecr_form :input").prop("disabled", true);
-        $("#ecr_form :button").css("display", "none");
+        //注释变更驳回$("#ecr_form :input").prop("disabled", true);
+        //注释变更驳回$("#ecr_form :button").css("display", "none");
         var fields = $("#fields").val().split(",");
         for (var i in fields) {
             $("#" + fields[i]).removeAttr("disabled");