Ver Fonte

修改 千海金 客户资料

huangbin há 4 anos atrás
pai
commit
2d26b83046

+ 5 - 0
src/common/config/projectName.ts

@@ -22,4 +22,9 @@ export function isOemByEnum(type: OemType): boolean {
 // 是否是平安项目
 export function isPingAnOem() {
     return isOemByEnum(OemType.pingan)
+}
+
+// 是否是千海金
+export function isQianHaiJin() {
+    return isOemByEnum(OemType.qinghaijin)
 }

+ 2 - 2
src/services/proto/accountinfo/interface.ts

@@ -154,8 +154,8 @@ export interface TaaccountTransfersxmoneyRsp {
 // 客户资料操作请求 0 29 187
 export interface CustomerInfoOperateReq {
     operatetype: number // uint32 操作类型-1:新增 2:修改
-    userid: number // uint64 用户ID(修改时必填)
-    areaid: number // uint64 所属机构
+    userid?: number // uint64 用户ID(修改时必填)
+    areaid?: number // uint64 所属机构
     logincode?: string // string 登录帐号
     loginpwd?: string  // string 登录密码
     userinfotype: number // uint32 客户类型 1:个人  2:企业

+ 380 - 188
src/views/information/custom/compoments/add/index.vue

@@ -1,195 +1,374 @@
 <template>
-    <!-- 平安客户资料 -->
-    <a-modal class="add-custom" title="新增客户资料" v-model:visible="visible" @cancel="cancel" centered :maskClosable="false" v-if="isPingAnOem()" width="890px">
-        <template #footer>
-            <a-button key="submit" class="cancelBtn" :loading="loading" :disabled="loading" @click="submit(1)">完成 </a-button>
+  <!-- 平安客户资料 -->
+  <a-modal class="add-custom"
+           title="新增客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           v-if="isPingAnOem()"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit(1)">完成 </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+
+        <a-col :span="12">
+          <a-form-item label="客户类型"
+                       name="userinfotype">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.userinfotype"
+                      placeholder="请选择客户类型">
+              <a-select-option value="1"> 个人 </a-select-option>
+              <a-select-option value="2"> 企业 </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <template v-if="!isPersonal()">
+          <a-col :span="12">
+            <a-form-item label="企业名称"
+                         name="customername">
+              <a-input class="dialogInput"
+                       v-model:value="formState.customername"
+                       style="width: 200px"
+                       placeholder="请输入企业名称" />
+            </a-form-item>
+          </a-col>
+        </template>
+        <template v-else>
+          <a-col :span="12">
+            <a-form-item label="姓名"
+                         name="username">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.username"
+                       placeholder="请输入姓名" />
+            </a-form-item>
+          </a-col>
         </template>
-        <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
-            <a-row :gutter="24">
-                <a-col :span="12">
-                    <a-form-item label="客户类型" name="userinfotype">
-                        <a-select class="typeSelect" style="width: 200px" v-model:value="formState.userinfotype" placeholder="请选择客户类型">
-                            <a-select-option value="1"> 个人 </a-select-option>
-                            <a-select-option value="2"> 企业 </a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <template v-if="!isPersonal()">
-                    <a-col :span="12">
-                        <a-form-item label="企业名称" name="customername">
-                            <a-input class="dialogInput" v-model:value="formState.customername" style="width: 200px" placeholder="请输入企业名称" />
-                        </a-form-item>
-                    </a-col>
-                </template>
-                <template v-else>
-                    <a-col :span="12">
-                        <a-form-item label="姓名" name="username">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.username" placeholder="请输入姓名" />
-                        </a-form-item>
-                    </a-col>
-                </template>
-                <a-col :span="12">
-                    <a-form-item label="点价联系人" name="contactname">
-                        <a-input class="dialogInput" style="width: 200px" v-model:value="formState.contactname" placeholder="请输入联系人" />
-                    </a-form-item>
-                </a-col>
-                <a-col :span="12">
-                    <a-form-item label="联系人手机号" name="mobilephone">
-                        <a-input class="dialogInput" style="width: 200px" v-model:value="formState.mobilephone" placeholder="请输入联系人手机号" />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-        </a-form>
-    </a-modal>
-    <!-- 其他项目客户资料 -->
-    <a-modal class="add-custom" v-else title="新增客户资料" v-model:visible="visible" @cancel="cancel" centered :maskClosable="false" width="890px">
-        <template #footer>
-            <a-button key="submit" class="cancelBtn" :loading="loading" :disabled="loading" @click="submit(1)">保存草稿 </a-button>
-            <a-button key="submit" type="primary" :loading="loading" :disabled="loading" @click="submit(2)">提交审核 </a-button>
+        <a-col :span="12">
+          <a-form-item label="点价联系人"
+                       name="contactname">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.contactname"
+                     placeholder="请输入联系人" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="联系人手机号"
+                       name="mobilephone">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.mobilephone"
+                     placeholder="请输入联系人手机号" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+  <!-- 其他项目客户资料 -->
+  <a-modal class="add-custom"
+           v-else
+           title="新增客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit(1)">保存草稿 </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit(2)">提交审核 </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <template v-if="isQianHaiJin()">
+            <a-col :span="24">
+              <a-form-item label="所属机构"
+                           name="areaid">
+                <a-select class="typeSelect"
+                          style="width: 200px"
+                          v-model:value="formState.areaid"
+                          placeholder="请选择所属机构">
+                  <a-select-option v-for="item in areaList"
+                                   :key="item.userid">
+                    {{ item.accountname }}
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="登录账号"
+                           name="logincode">
+                <a-input class="dialogInput"
+                         v-model:value="formState.logincode"
+                         style="width: 200px"
+                         placeholder="请选择登录账号" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="登录密码"
+                           name="loginpwd">
+                <a-input class="dialogInput"
+                         v-model:value="formState.loginpwd"
+                         style="width: 200px"
+                         placeholder="请选择登录密码" />
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-form-item label="客户类型"
+                       name="userinfotype">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.userinfotype"
+                      placeholder="请选择客户类型">
+              <a-select-option value="1"> 个人 </a-select-option>
+              <a-select-option value="2"> 企业 </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <template v-if="!isPersonal()">
+          <a-col :span="12">
+            <a-form-item label="企业名称"
+                         name="customername">
+              <a-input class="dialogInput"
+                       v-model:value="formState.customername"
+                       style="width: 200px"
+                       placeholder="请输入企业名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="企业简称"
+                         name="nickname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.nickname"
+                       placeholder="请输入企业简称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件类型"
+                         name="cardtype">
+              <a-select class="inlineFormSelect"
+                        v-model:value="formState.cardtype"
+                        style="width: 200px"
+                        placeholder="请选择证件类型">
+                <a-select-option :value="item.enumitemname"
+                                 v-for="item in cardTypeList"
+                                 :key="item.autoid">
+                  {{ item.enumdicname }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="法定代表人"
+                         name="legalpersonname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.legalpersonname"
+                       placeholder="请输入法定代表人" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件号码"
+                         name="cardnum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.cardnum"
+                       placeholder="请输入证件号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="纳税人识别号"
+                         name="taxpayernum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.taxpayernum"
+                       placeholder="请输入纳税人识别号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="营业执照">
+              <UploadImg :visible="visible"
+                         @upload="attachmentUpLoad" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人"
+                         name="contactname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.contactname"
+                       placeholder="请输入联系人" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人手机号"
+                         name="mobilephone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.mobilephone"
+                       placeholder="请输入联系人手机号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系电话"
+                         name="telphone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.telphone"
+                       placeholder="请输入联系电话" />
+            </a-form-item>
+          </a-col>
         </template>
-        <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
-            <a-row :gutter="24">
-                <a-col :span="12">
-                    <a-form-item label="客户类型" name="userinfotype">
-                        <a-select class="typeSelect" style="width: 200px" v-model:value="formState.userinfotype" placeholder="请选择客户类型">
-                            <a-select-option value="1"> 个人 </a-select-option>
-                            <a-select-option value="2"> 企业 </a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <template v-if="!isPersonal()">
-                    <a-col :span="12">
-                        <a-form-item label="企业名称" name="customername">
-                            <a-input class="dialogInput" v-model:value="formState.customername" style="width: 200px" placeholder="请输入企业名称" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="企业简称" name="nickname">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.nickname" placeholder="请输入企业简称" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="证件类型" name="cardtype">
-                            <a-select class="inlineFormSelect" v-model:value="formState.cardtype" style="width: 200px" placeholder="请选择证件类型">
-                                <a-select-option :value="item.enumitemname" v-for="item in cardTypeList" :key="item.autoid">
-                                    {{ item.enumdicname }}
-                                </a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="法定代表人" name="legalpersonname">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.legalpersonname" placeholder="请输入法定代表人" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="证件号码" name="cardnum">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.cardnum" placeholder="请输入证件号码" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="纳税人识别号" name="taxpayernum">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.taxpayernum" placeholder="请输入纳税人识别号" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="营业执照">
-                            <UploadImg :visible="visible" @upload="attachmentUpLoad" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系人" name="contactname">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.contactname" placeholder="请输入联系人" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系人手机号" name="mobilephone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.mobilephone" placeholder="请输入联系人手机号" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系电话" name="telphone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.telphone" placeholder="请输入联系电话" />
-                        </a-form-item>
-                    </a-col>
-                </template>
-                <template v-else>
-                    <a-col :span="12">
-                        <a-form-item label="姓名" name="username">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.username" placeholder="请输入姓名" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="身份证号码" name="cardnum">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.cardnum" placeholder="请输入身份证号码" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="手机号码" name="mobilephone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.mobilephone" placeholder="请输入手机号码" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="身份证正面照" name="cardbackphotourl">
-                            <UploadImg :visible="visible" @upload="cardfrontphotourlUpLoad" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="邮箱" name="email">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.email" placeholder="请输入邮箱" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="24">
-                        <a-form-item label="身份证反面照" name="cardfrontphotourl">
-                            <UploadImg :visible="visible" @upload="cardbackphotourlUpLoad" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系电话" name="telphone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.telphone" placeholder="请输入联系电话" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item> &nbsp; </a-form-item>
-                    </a-col>
-                </template>
-                <a-col :span="24">
-                    <a-form-item label="通讯地址">
-                        <a-select class="inlineFormSelect" style="width: 205px" v-model:value="formState.provinceid" @change="getCityList" placeholder="请选择省">
-                            <a-select-option v-for="item in provinceList" :key="item.autoid" :value="item.autoid">
-                                {{ item.divisionname }}
-                            </a-select-option>
-                        </a-select>
-                        <a-select class="inlineFormSelect ml9" style="width: 205px" v-model:value="formState.cityid" @change="getDistrictList" placeholder="请选择市">
-                            <a-select-option v-for="item in cityList" :key="item.autoid" :value="item.autoid">
-                                {{ item.divisionname }}
-                            </a-select-option>
-                        </a-select>
-                        <a-select class="inlineFormSelect ml9" v-model:value="formState.districtid" style="width: 205px" placeholder="请选择县(区)">
-                            <a-select-option v-for="item in districtList" :key="item.autoid" :value="item.autoid">
-                                {{ item.divisionname }}
-                            </a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <a-col :span="24">
-                    <a-form-item label="&nbsp;" name="cardaddress">
-                        <a-input class="dialogInput" style="width: 635px" v-model:value="formState.cardaddress" placeholder="请输入详细地址" />
-                    </a-form-item>
-                </a-col>
-                <a-col :span="24">
-                    <a-form-item label="备注" name="remark">
-                        <a-input class="dialogInput" style="width: 635px" v-model:value="formState.remark" placeholder="请输入备注" />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-        </a-form>
-    </a-modal>
+        <template v-else>
+          <a-col :span="12">
+            <a-form-item label="姓名"
+                         name="username">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.username"
+                       placeholder="请输入姓名" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="身份证号码"
+                         name="cardnum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.cardnum"
+                       placeholder="请输入身份证号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="手机号码"
+                         name="mobilephone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.mobilephone"
+                       placeholder="请输入手机号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="身份证正面照"
+                         name="cardbackphotourl">
+              <UploadImg :visible="visible"
+                         @upload="cardfrontphotourlUpLoad" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="邮箱"
+                         name="email">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.email"
+                       placeholder="请输入邮箱" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="身份证反面照"
+                         name="cardfrontphotourl">
+              <UploadImg :visible="visible"
+                         @upload="cardbackphotourlUpLoad" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系电话"
+                         name="telphone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.telphone"
+                       placeholder="请输入联系电话" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item> &nbsp; </a-form-item>
+          </a-col>
+        </template>
+        <a-col :span="24">
+          <a-form-item label="通讯地址">
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      v-model:value="formState.provinceid"
+                      @change="getCityList"
+                      placeholder="请选择省">
+              <a-select-option v-for="item in provinceList"
+                               :key="item.autoid"
+                               :value="item.autoid">
+                {{ item.divisionname }}
+              </a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect ml9"
+                      style="width: 205px"
+                      v-model:value="formState.cityid"
+                      @change="getDistrictList"
+                      placeholder="请选择市">
+              <a-select-option v-for="item in cityList"
+                               :key="item.autoid"
+                               :value="item.autoid">
+                {{ item.divisionname }}
+              </a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect ml9"
+                      v-model:value="formState.districtid"
+                      style="width: 205px"
+                      placeholder="请选择县(区)">
+              <a-select-option v-for="item in districtList"
+                               :key="item.autoid"
+                               :value="item.autoid">
+                {{ item.divisionname }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <a-form-item label="&nbsp;"
+                       name="cardaddress">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     v-model:value="formState.cardaddress"
+                     placeholder="请输入详细地址" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <a-form-item label="备注"
+                       name="remark">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     v-model:value="formState.remark"
+                     placeholder="请输入备注" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
 import UploadImg from '@/common/components/uploadImg/index.vue';
-import { isPingAnOem } from '@/common/config/projectName';
+import { isPingAnOem, isQianHaiJin } from '@/common/config/projectName';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { validateAction } from '@/common/setup/form';
 import { _closeModal } from '@/common/setup/modal/modal';
@@ -199,9 +378,10 @@ import { getAddress } from '@/services/go/adress';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { addCustomerInfoOperate } from '@/services/proto/accountinfo';
 import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
+import { toBase64String } from '@/utils/storage/base64';
 import { defineComponent, ref } from 'vue';
 import { FormState } from './interface';
-import { getCardType, handleForm } from './setup';
+import { getCardType, handleForm, handleAreaList } from './setup';
 
 export default defineComponent({
     name: 'add-custom',
@@ -223,6 +403,11 @@ export default defineComponent({
         const { getFirstImg: getBackImg, uploadImgAction: cardbackphotourlUpLoad } = getUploadImg();
         // 正面证件照地址
         const { getFirstImg: getFrontImg, uploadImgAction: cardfrontphotourlUpLoad } = getUploadImg();
+        //查询所属机构列表
+        const { areaList, getAreaList } = handleAreaList();
+        if (isQianHaiJin()) {
+            getAreaList(loading);
+        }
         function isPersonal(): boolean {
             return formState.userinfotype === '1';
         }
@@ -231,8 +416,7 @@ export default defineComponent({
             validateAction<FormState>(formRef, formState).then((param) => {
                 const reqParam: CustomerInfoOperateReq = {
                     operatetype: 1, // 1: 新增
-                    // userid: 1, // 写死 必填
-                    userid: getUserId(), // 写死 必填
+                    userid: getUserId(), // 必填
                     areaid: getUserId(),
                     userinfotype: Number(param.userinfotype),
                     username: Number(param.userinfotype) === 1 ? param.username : param.customername,
@@ -257,6 +441,12 @@ export default defineComponent({
                     email: param.email, // email
                     proxystatementurl: '',
                 };
+                if (isQianHaiJin()) {
+                    reqParam.areaid = param.areaid as number;
+                    reqParam.logincode = param.logincode;
+                    reqParam.loginpwd = toBase64String(toBase64String(param.loginpwd));
+                    reqParam.userstate = 2;
+                }
                 requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
                     cancel(true);
                 });
@@ -275,12 +465,14 @@ export default defineComponent({
             cityList,
             districtList,
             provinceList,
+            areaList,
             getCityList,
             getDistrictList,
             attachmentUpLoad,
             cardbackphotourlUpLoad,
             cardfrontphotourlUpLoad,
             isPingAnOem,
+            isQianHaiJin,
         };
     },
 });

+ 4 - 0
src/views/information/custom/compoments/add/interface.ts

@@ -1,4 +1,8 @@
 export interface FormState {
+    areaid: number | undefined; //所属机构
+    logincode: string // string 登录帐号
+    loginpwd: string  // string 登录密码
+
     userinfotype: string; //客户类型
     customername: string; //客户名称(企业名称)
     nickname: string; //企业简称

+ 18 - 1
src/views/information/custom/compoments/add/setup.ts

@@ -1,11 +1,14 @@
 
 import { getCardTypeEnumList } from '@/common/constants/enumsList';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { validateCommon } from '@/common/setup/validate';
 import { QueryAddUserInfoApply } from '@/services/go/ermcp/customInfo';
 import { AddUserInfoApplyReq } from '@/services/go/ermcp/customInfo/interface';
+import { queryParentAreaList } from '@/services/go/ermcp/qhj';
+import { QhjParentAreaList } from '@/services/go/ermcp/qhj/interface';
 import { message } from 'ant-design-vue';
 import { RuleObject } from 'ant-design-vue/lib/form/interface';
-import { reactive, ref, UnwrapRef } from 'vue';
+import { reactive, Ref, ref, UnwrapRef } from 'vue';
 import { FormState } from './interface';
 
 /**
@@ -44,6 +47,9 @@ export function handleForm() {
  */
 export function initFormState(): FormState {
     return {
+        areaid: undefined,
+        logincode: '',
+        loginpwd: '',
         userinfotype: '2',
         customername: '',
         nickname: '',
@@ -81,4 +87,15 @@ export function handleApply() {
         }).finally(() => loading.value = false)
     }
     return { loading, applyAction }
+}
+
+// 查询所属机构列表
+export function handleAreaList() {
+    const areaList = ref<QhjParentAreaList[]>([])
+    function getAreaList(loading: Ref<boolean>) {
+        queryResultLoadingAndInfo(queryParentAreaList, loading).then(res => {
+            areaList.value = res
+        })
+    }
+    return { areaList, getAreaList }
 }

+ 271 - 137
src/views/information/custom/compoments/modify/index.vue

@@ -1,140 +1,261 @@
 <template>
-    <!-- 修改客户资料 -->
-    <a-modal class="commonModal modify-custom" title="修改客户资料" v-if="visible" v-model:visible="visible" centered :maskClosable="false" @cancel="cancel" width="890px">
-        <template #footer>
-            <a-button key="submit" class="cancelBtn" :loading="loading" :disabled="loading" @click="submit(1)">保存草稿</a-button>
-            <a-button key="submit" type="primary" :loading="loading" :disabled="loading" @click="submit(2)">提交修改</a-button>
+  <!-- 修改客户资料 -->
+  <a-modal class="commonModal modify-custom"
+           title="修改客户资料"
+           v-if="visible"
+           v-model:visible="visible"
+           centered
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit(2)">提交修改</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="24"
+               v-if="isQianHaiJin()">
+          <a-form-item label="所属机构"
+                       name="areaid">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.areaid"
+                      placeholder="请选择所属机构">
+              <a-select-option v-for="item in areaList"
+                               :key="item.userid">{{ item.accountname }}</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="客户类型"
+                       name="userinfotype">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.userinfotype"
+                      placeholder="请选择客户类型">
+              <a-select-option value="1">个人</a-select-option>
+              <a-select-option value="2">企业</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <template v-if="!isPersonal()">
+          <a-col :span="12">
+            <a-form-item label="企业名称"
+                         name="customername">
+              <a-input class="dialogInput"
+                       v-model:value="formState.customername"
+                       style="width: 200px"
+                       placeholder="请输入企业名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="企业简称"
+                         name="nickname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.nickname"
+                       placeholder="请输入企业简称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件类型"
+                         name="cardtype">
+              <a-select class="inlineFormSelect"
+                        v-model:value="formState.cardtype"
+                        style="width: 200px"
+                        placeholder="请选择证件类型">
+                <a-select-option :value="item.enumitemname"
+                                 v-for="item in cardTypeList"
+                                 :key="item.autoid">{{ item.enumdicname }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="法定代表人"
+                         name="legalpersonname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.legalpersonname"
+                       placeholder="请输入法定代表人" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件号码"
+                         name="cardnum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.cardnum"
+                       placeholder="请输入证件号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="纳税人识别号"
+                         name="taxpayernum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.taxpayernum"
+                       placeholder="请输入纳税人识别号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="营业执照">
+              <UploadImg :visible="visible"
+                         :imgList="attachmentImgList"
+                         @upload="attachmentUpload" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人"
+                         name="contactname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.contactname"
+                       placeholder="请输入联系人" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人手机号"
+                         name="mobilephone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.mobilephone"
+                       placeholder="请输入联系人手机号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系电话"
+                         name="telphone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.telphone"
+                       placeholder="请输入联系电话" />
+            </a-form-item>
+          </a-col>
         </template>
-        <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
-            <a-row :gutter="24">
-                <a-col :span="12">
-                    <a-form-item label="客户类型" name="userinfotype">
-                        <a-select class="typeSelect" style="width: 200px" v-model:value="formState.userinfotype" placeholder="请选择客户类型">
-                            <a-select-option value="1">个人</a-select-option>
-                            <a-select-option value="2">企业</a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <template v-if="!isPersonal()">
-                    <a-col :span="12">
-                        <a-form-item label="企业名称" name="customername">
-                            <a-input class="dialogInput" v-model:value="formState.customername" style="width: 200px" placeholder="请输入企业名称" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="企业简称" name="nickname">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.nickname" placeholder="请输入企业简称" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="证件类型" name="cardtype">
-                            <a-select class="inlineFormSelect" v-model:value="formState.cardtype" style="width: 200px" placeholder="请选择证件类型">
-                                <a-select-option :value="item.enumitemname" v-for="item in cardTypeList" :key="item.autoid">{{ item.enumdicname }}</a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="法定代表人" name="legalpersonname">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.legalpersonname" placeholder="请输入法定代表人" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="证件号码" name="cardnum">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.cardnum" placeholder="请输入证件号码" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="纳税人识别号" name="taxpayernum">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.taxpayernum" placeholder="请输入纳税人识别号" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="营业执照">
-                            <UploadImg :visible="visible" :imgList="attachmentImgList" @upload="attachmentUpload" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系人" name="contactname">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.contactname" placeholder="请输入联系人" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系人手机号" name="mobilephone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.mobilephone" placeholder="请输入联系人手机号" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系电话" name="telphone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.telphone" placeholder="请输入联系电话" />
-                        </a-form-item>
-                    </a-col>
-                </template>
-                <template v-else>
-                    <a-col :span="12">
-                        <a-form-item label="姓名" name="username">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.username" placeholder="请输入姓名" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="身份证号码" name="cardnum">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.cardnum" placeholder="请输入身份证号码" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="手机号码" name="mobilephone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.mobilephone" placeholder="请输入手机号码" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="身份证正面照" name="cardbackphotourl">
-                            <UploadImg :visible="visible" :imgList="cardfrontImgList" @upload="cardfrontUpload" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="邮箱" name="email">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.email" placeholder="请输入邮箱" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="24">
-                        <a-form-item label="身份证反面照" name="cardfrontphotourl">
-                            <UploadImg :visible="visible" :imgList="cardbackImgList" @upload="cardbackUpload" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="联系电话" name="telphone">
-                            <a-input class="dialogInput" style="width: 200px" v-model:value="formState.telphone" placeholder="请输入联系电话" />
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item>&nbsp;</a-form-item>
-                    </a-col>
-                </template>
-                <a-col :span="24">
-                    <a-form-item label="通讯地址">
-                        <a-select class="inlineFormSelect" style="width: 205px" v-model:value="formState.provinceid" @change="getCityList" placeholder="请选择省">
-                            <a-select-option v-for="item in provinceList" :key="item.autoid" :value="item.autoid">{{ item.divisionname }}</a-select-option>
-                        </a-select>
-                        <a-select class="inlineFormSelect ml9" style="width: 205px" v-model:value="formState.cityid" @change="getDistrictList" placeholder="请选择市">
-                            <a-select-option v-for="item in cityList" :key="item.autoid" :value="item.autoid">{{ item.divisionname }}</a-select-option>
-                        </a-select>
-                        <a-select class="inlineFormSelect ml9" v-model:value="formState.districtid" style="width: 205px" placeholder="请选择县(区)">
-                            <a-select-option v-for="item in districtList" :key="item.autoid" :value="item.autoid">{{ item.divisionname }}</a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <a-col :span="24">
-                    <a-form-item label="&nbsp;" name="cardaddress">
-                        <a-input class="dialogInput" style="width: 635px" v-model:value="formState.cardaddress" placeholder="请输入详细地址" />
-                    </a-form-item>
-                </a-col>
-                <a-col :span="24">
-                    <a-form-item label="备注" name="remark">
-                        <a-input class="dialogInput" style="width: 635px" v-model:value="formState.remark" placeholder="请输入备注" />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-        </a-form>
-    </a-modal>
+        <template v-else>
+          <a-col :span="12">
+            <a-form-item label="姓名"
+                         name="username">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.username"
+                       placeholder="请输入姓名" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="身份证号码"
+                         name="cardnum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.cardnum"
+                       placeholder="请输入身份证号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="手机号码"
+                         name="mobilephone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.mobilephone"
+                       placeholder="请输入手机号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="身份证正面照"
+                         name="cardbackphotourl">
+              <UploadImg :visible="visible"
+                         :imgList="cardfrontImgList"
+                         @upload="cardfrontUpload" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="邮箱"
+                         name="email">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.email"
+                       placeholder="请输入邮箱" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="身份证反面照"
+                         name="cardfrontphotourl">
+              <UploadImg :visible="visible"
+                         :imgList="cardbackImgList"
+                         @upload="cardbackUpload" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系电话"
+                         name="telphone">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.telphone"
+                       placeholder="请输入联系电话" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item>&nbsp;</a-form-item>
+          </a-col>
+        </template>
+        <a-col :span="24">
+          <a-form-item label="通讯地址">
+            <a-select class="inlineFormSelect"
+                      style="width: 205px"
+                      v-model:value="formState.provinceid"
+                      @change="getCityList"
+                      placeholder="请选择省">
+              <a-select-option v-for="item in provinceList"
+                               :key="item.autoid"
+                               :value="item.autoid">{{ item.divisionname }}</a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect ml9"
+                      style="width: 205px"
+                      v-model:value="formState.cityid"
+                      @change="getDistrictList"
+                      placeholder="请选择市">
+              <a-select-option v-for="item in cityList"
+                               :key="item.autoid"
+                               :value="item.autoid">{{ item.divisionname }}</a-select-option>
+            </a-select>
+            <a-select class="inlineFormSelect ml9"
+                      v-model:value="formState.districtid"
+                      style="width: 205px"
+                      placeholder="请选择县(区)">
+              <a-select-option v-for="item in districtList"
+                               :key="item.autoid"
+                               :value="item.autoid">{{ item.divisionname }}</a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <a-form-item label="&nbsp;"
+                       name="cardaddress">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     v-model:value="formState.cardaddress"
+                     placeholder="请输入详细地址" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <a-form-item label="备注"
+                       name="remark">
+            <a-input class="dialogInput"
+                     style="width: 635px"
+                     v-model:value="formState.remark"
+                     placeholder="请输入备注" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -152,7 +273,8 @@ import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
 import { mergeTwoObj } from '@/utils/objHandle';
 import { defineComponent, PropType, ref } from 'vue';
 import { FormState } from '../add/interface';
-import { getCardType, handleForm, initFormState } from '../add/setup';
+import { getCardType, handleAreaList, handleForm, initFormState } from '../add/setup';
+import { isPingAnOem, isQianHaiJin } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'modify-custom',
@@ -179,7 +301,11 @@ export default defineComponent({
         const { uploadImgAction: cardbackUpload, uploadImgList: cardbackImgList, handleImg: cardbackHandle } = getUploadImg();
         // 正面证件照地址
         const { uploadImgAction: cardfrontUpload, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
-
+        //查询所属机构列表
+        const { areaList, getAreaList } = handleAreaList();
+        if (isQianHaiJin()) {
+            getAreaList(loading);
+        }
         function isPersonal(): boolean {
             return formState.userinfotype === '1';
         }
@@ -242,6 +368,12 @@ export default defineComponent({
                     email: param.email, // email
                     proxystatementurl: '',
                 };
+                if (isQianHaiJin()) {
+                    reqParam.areaid = param.areaid as number;
+                    reqParam.logincode = param.logincode;
+                    reqParam.loginpwd = param.loginpwd;
+                    reqParam.userstate = 2;
+                }
                 requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
                     cancel(true);
                 });
@@ -268,6 +400,8 @@ export default defineComponent({
             cardbackImgList,
             cardfrontUpload,
             cardfrontImgList,
+            isQianHaiJin,
+            areaList,
         };
     },
 });

+ 66 - 30
src/views/information/custom/index.vue

@@ -1,43 +1,64 @@
 <template>
-    <!-- 客户资料 -->
-    <div class="plan_uncommitted" :loading="loading">
-        <Filter @search="updateColumn">
-            <mtp-table-button class="btn-list-sticky" :buttons="addButton" @click="openComponent" />
-        </Filter>
-        <a-table :columns="isPingAnOem() ? pingan_custom_column() : columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <mtp-table-button class="btn-list-sticky" :buttons="buttons" :record="record" @click="openComponent" />
-            </template>
-            <template #status="{ text }">
-                <a>{{ getStatusName(text) }}</a>
-            </template>
-            <template #userinfotype="{ text }">
-                <a>{{ getUserInfoTypeName(text) }}</a>
-            </template>
-            <template #attachment1="{ text,record }">
-                <a>{{ text }}</a><a>{{ record.attachment2 }}</a>
-            </template>
-            <template #cardtype="{ text }">
-                <a>{{ getCardTypeEnumItemName(text) }}</a>
-            </template>
-        </a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"> </component>
-    </div>
+  <!-- 客户资料 -->
+  <div class="plan_uncommitted"
+       :loading="loading">
+    <Filter @search="updateColumn">
+      <mtp-table-button class="btn-list-sticky"
+                        :buttons="addButton"
+                        @click="openComponent" />
+    </Filter>
+    <a-table :columns="getColumns(columns)"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <mtp-table-button class="btn-list-sticky"
+                          :buttons="buttons"
+                          :record="record"
+                          @click="openComponent" />
+      </template>
+      <template #status="{ text }">
+        <a>{{ getStatusName(text) }}</a>
+      </template>
+      <template #userinfotype="{ text }">
+        <a>{{ getUserInfoTypeName(text) }}</a>
+      </template>
+      <template #attachment1="{ text,record }">
+        <a>{{ text }}</a><a>{{ record.attachment2 }}</a>
+      </template>
+      <template #cardtype="{ text }">
+        <a>{{ getCardTypeEnumItemName(text) }}</a>
+      </template>
+    </a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="buttons"> </contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"> </component>
+  </div>
 </template>
 
 <script lang="ts">
-import { isPingAnOem } from '@/common/config/projectName';
+import { isPingAnOem, isQianHaiJin } from '@/common/config/projectName';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { ComposeTableParam, contextMenu, defineAsyncComponent, defineComponent, handleComposeTable, MtpTableButton, queryTableList, useRouteName } from '@/common/export/commonTable';
 import { getTableButton } from '@/common/setup/table/button';
 import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { getUserInfoTypeName, getStatusName ,getCardTypeEnumItemName} from '@/common/constants/enumsName';
+import { getUserInfoTypeName, getStatusName, getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import Filter from './compoments/filterTable/index.vue';
 import { pingan_custom_column } from './setup';
+import { ColumnType } from '@/common/methods/table';
+import { getTableColumns } from '@/common/setup/table';
 
 export default defineComponent({
     name: EnumRouterName.plan_audit,
@@ -77,6 +98,20 @@ export default defineComponent({
             }
         };
 
+        // 表头
+        const getColumns = (columns: ColumnType[]) => {
+            if (isPingAnOem()) {
+                // 平安
+                return pingan_custom_column();
+            } else if (isQianHaiJin()) {
+                // 千海金
+                const { columns: result, registerColumn } = getTableColumns();
+                registerColumn('table_pcweb_qhj_customer_info', []);
+                return result.value;
+            } else {
+                return columns;
+            }
+        };
         // 表格通用逻辑
         const param: ComposeTableParam = {
             queryFn: queryTableAction,
@@ -96,7 +131,8 @@ export default defineComponent({
             pingan_custom_column,
             isPingAnOem,
             getUserInfoTypeName,
-            getCardTypeEnumItemName
+            getCardTypeEnumItemName,
+            getColumns,
         };
     },
 });

+ 0 - 98
src/views/information/custom/list/checkpending/index.vue

@@ -1,98 +0,0 @@
-<template>
-  <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
-  <!-- 客户信息: 正常 -->
-  <div class="custom_info_checkpending"
-       :loading="loading">
-    <filterCustomTable @search="updateColumn">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="srcollYTable"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{}">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <template #userinfotype="{ text }">
-          <a>{{ text === 2 ? '企业' : '个人' }}</a>
-        </template>
-        <!-- 客户名称 -->
-        <template #customername="{ record }">
-          <a>{{ record.userinfotype === 2 ? record.customername : record.username }}</a>
-        </template>
-
-        <template #status="{ text }">
-          <a>{{ getStatusName(text) }}</a>
-        </template>
-        <template #cardtype="{ text }">
-          <a>{{ getCardTypeEnumItemName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <Middle :selectedRow="selectedRow"
-            @refresh="queryTable" />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-
-import { filterCustomTable } from '../../compoments';
-import { queryTableList, QueryCustomInfoType } from '../index';
-import { getStatusName } from '@/common/constants/enumsName';
-import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
-import Middle from '@/views/information/custom/compoments/controlModal/index.vue';
-
-export default defineComponent({
-    name: 'custom_info_checkpending',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QueryCustomInfoType>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_checkpending', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(2);
-
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_userinfo', ['userinfotype', 'nickname', 'contactname', 'mobile']);
-        });
-
-        return {
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            queryTable,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.custom_info_checkpending {
-}
-</style>

+ 0 - 6
src/views/information/custom/list/index.ts

@@ -1,6 +0,0 @@
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { queryTableList } from './setup';
-
-export { queryTableList };
-export type { QueryCustomInfoType };
-

+ 0 - 97
src/views/information/custom/list/normal-use/index.vue

@@ -1,97 +0,0 @@
-<template>
-    <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
-    <!-- 客户信息: 正常 -->
-    <div class="custom-normal" :loading="loading">
-        <filterCustomTable @search="updateColumn">
-            <BtnList :btnList="commonBtn" />
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{}">
-                    <BtnList :btnList="forDataBtn" />
-                </template>
-
-                <template v-if="isPingAnOem()" #index="{ index }">
-                    <span>{{ index + 1 }}</span>
-                </template>
-                <template #userinfotype="{ text }">
-                    <a>{{ text === 2 ? '企业' : '个人' }}</a>
-                </template>
-                <!-- 客户名称 -->
-                <template #customername="{ record }">
-                    <a>{{ record.userinfotype === 2 ? record.customername : record.username }}</a>
-                </template>
-                <template #status="{ text }">
-                    <a>{{ getStatusName(text) }}</a>
-                </template>
-                <template #cardtype="{ text }">
-                    <a>{{ getCardTypeEnumItemName(text) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <Middle :selectedRow="selectedRow" @refresh="queryTable" />
-    </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-
-import { filterCustomTable } from '../../compoments';
-import { queryTableList, QueryCustomInfoType } from '../index';
-import { getStatusName } from '@/common/constants/enumsName';
-import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
-import Middle from '@/views/information/custom/compoments/controlModal/index.vue';
-import { isPingAnOem } from '@/common/config/projectName';
-import { pingan_custom_column } from '../setup';
-
-export default defineComponent({
-    name: 'custom-normal',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QueryCustomInfoType>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_normal', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(3);
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_userinfo', ['userinfotype', 'nickname', 'customername', 'mobile']);
-            // 平安表头
-            if (isPingAnOem()) {
-                columns.value = pingan_custom_column();
-            }
-        });
-        return {
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            queryTable,
-            isPingAnOem,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.custom-normal {
-}
-</style>

+ 0 - 83
src/views/information/custom/list/setup.ts

@@ -1,83 +0,0 @@
-import { queryTableList as query } from '@/common/setup/table/list';
-import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { QueryCustomInfoEnum } from '@/services/go/ermcp/customInfo/type';
-
-/**
- * 获取表格列表数据
- * @param type
- * @returns
- */
-export function queryTableList(type: QueryCustomInfoEnum) {
-    const { loading, tableList, queryTable: temp } = query<QueryCustomInfoType>()
-    const fn = () => {
-        temp(QueryCustomInfo, type)
-    }
-    return { loading, tableList, queryTable: fn }
-}
-
-// 平安 客户资料 表头
-export function pingan_custom_column() {
-    return [
-        {
-            key: '9th',
-            dataIndex: 'index',
-            title: '序号',
-            align: 'center',
-            slots: {
-                customRender: 'index',
-            },
-            width: 80
-        },
-        {
-            key: '0th',
-            dataIndex: 'status',
-            title: '状态',
-            align: 'center',
-            slots: {
-                customRender: 'status',
-            },
-            width: 120
-        },
-        {
-            key: '1th',
-            dataIndex: 'userinfotype',
-            title: '客户类型',
-            align: 'center',
-            slots: {
-                customRender: 'userinfotype',
-            },
-            width: 120
-        },
-        {
-            key: '3th',
-            dataIndex: 'customername',
-            title: '客户名称',
-            align: 'center',
-            slots: {
-                customRender: 'customername',
-            },
-            width: 120
-        },
-        {
-            key: '6th',
-            dataIndex: 'contactname',
-            title: '点价联系人',
-            align: 'center',
-            slots: {
-                customRender: 'contactname',
-            },
-            width: 120
-        },
-        {
-            key: '7th',
-            dataIndex: 'mobile',
-            title: '联系人手机号码',
-            align: 'center',
-            slots: {
-                customRender: 'mobile',
-            },
-            width: 120
-        },
-    ]
-}

+ 0 - 98
src/views/information/custom/list/stop-use/index.vue

@@ -1,98 +0,0 @@
-<template>
-    <div style="background: red; color: #fff; padding: 5px 0">待修改</div>
-    <!-- 客户信息: 停用 -->
-    <div class="custom-normal" :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn" />
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns" class="srcollYTable" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{}">
-                    <BtnList :btnList="forDataBtn" />
-                </template>
-                <template v-if="isPingAnOem()" #index="{ index }">
-                    <span>{{ index + 1 }}</span>
-                </template>
-                <template #userinfotype="{ text }">
-                    <a>{{ text === 2 ? '企业' : '个人' }}</a>
-                </template>
-                <!-- 客户名称 -->
-                <template #customername="{ record }">
-                    <a>{{ record.userinfotype === 2 ? record.customername : record.username }}</a>
-                </template>
-                <template #status="{ text }">
-                    <a>{{ getStatusName(text) }}</a>
-                </template>
-                <template #cardtype="{ text }">
-                    <a>{{ getCardTypeEnumItemName(text) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <Middle :selectedRow="selectedRow" @refresh="queryTable" />
-    </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-
-import { filterCustomTable } from '../../compoments';
-
-import { queryTableList, QueryCustomInfoType } from '../index';
-import { getStatusName } from '@/common/constants/enumsName';
-import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
-import Middle from '@/views/information/custom/compoments/controlModal/index.vue';
-import { isPingAnOem } from '@/common/config/projectName';
-import { pingan_custom_column } from '../setup';
-
-export default defineComponent({
-    name: 'custom-normal',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QueryCustomInfoType>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_disabled', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(4);
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_userinfo', ['userinfotype', 'nickname', 'contactname', 'mobile']);
-            // 平安表头
-            if (isPingAnOem()) {
-                columns.value = pingan_custom_column();
-            }
-        });
-        return {
-            columns,
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            queryTable,
-            isPingAnOem,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.custom-normal {
-}
-</style
->;

+ 0 - 96
src/views/information/custom/list/unsubmit/index.vue

@@ -1,96 +0,0 @@
-<template>
-  <!-- 客户信息: 正常 -->
-  <div class="custom_info_unsubmit"
-       :loading="loading">
-    <filterCustomTable @search="updateColumn">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="srcollYTable"
-               :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
-               :pagination="false"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               rowKey="key"
-               :data-source="tableList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <template #userinfotype="{ text }">
-          <a>{{ text === 2 ? '企业' : '个人' }}</a>
-        </template>
-        <!-- 客户名称 -->
-        <template #customername="{ record }">
-          <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
-        </template>
-        <template #status="{ text }">
-          <a>{{ getStatusName(text) }}</a>
-        </template>
-        <template #cardtype="{ text }">
-          <a>{{ getCardTypeEnumItemName(text) }}</a>
-        </template>
-      </a-table>
-    </contextMenu>
-    <Middle :selectedRow="selectedRow"
-            @refresh="queryTable" />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-
-import { filterCustomTable } from '../../compoments';
-import { queryTableList, QueryCustomInfoType } from '../index';
-import { getStatusName } from '@/common/constants/enumsName';
-import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
-import Middle from '@/views/information/custom/compoments/controlModal/index.vue';
-
-export default defineComponent({
-    name: 'custom_info_unsubmit',
-    components: {
-        filterCustomTable,
-        contextMenu,
-        BtnList,
-        Middle,
-    },
-    setup() {
-        // 表头数据
-        const { columns, registerColumn, updateColumn } = getTableColumns();
-        // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<QueryCustomInfoType>({});
-        // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('custom_info_unsubmit', true);
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(1);
-        initData(() => {
-            // 获取列表数据
-            queryTable();
-            // 注册表头信息 过滤
-            registerColumn('table_pcweb_userinfo', ['userinfotype', 'nickname', 'contactname', 'mobile']);
-        });
-
-        return {
-            columns,
-
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-            commonBtn,
-            forDataBtn,
-            loading,
-            tableList,
-            updateColumn,
-            getStatusName,
-            getCardTypeEnumItemName,
-            queryTable,
-        };
-    },
-});
-</script>
-
-<style lang="less">
-.custom_info_unsubmit {
-}
-</style>