huangbin 4 år sedan
förälder
incheckning
78a17ce4a8

+ 1 - 0
src/views/information/custom/compoments/add/index.vue

@@ -333,6 +333,7 @@ export default defineComponent({
                     taxpayernum: param.taxpayernum, // 纳税人识别号
                     email: param.email, // email
                 };
+                debugger
                 requestResultLoadingAndInfo(QueryAddUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['修改客户资料成功', '修改客户资料失败:']).then(() => {
                     cancel();
                     context.emit('refresh');

+ 134 - 76
src/views/information/custom/compoments/detail/index.vue

@@ -23,87 +23,145 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="企业名称">
+          <a-form-item label="企业名称"
+                       v-if="selectedRow.userinfotype === '2'">
             <span class="white">{{ formatValue(selectedRow.customername)}}</span>
           </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="企业简称">
-            <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件类型">
-            <span class="white">{{ getCardTypeEnumItemName(selectedRow.cardtype) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="法定代表人">
-            <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件号码">
-            <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="纳税人识别号">
-            <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="营业执照">
-            <div class="upload">
-              <div class="look">查看附件</div>
-            </div>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人手机号">
-            <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="状态">
-            <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="通讯地址">
-            <span class="white">{{ formatValue(selectedRow.address) }}</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="备注">
-            <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+          <a-form-item label="姓名">
+            <span class="white">{{ formatValue(selectedRow.customername)}}</span>
           </a-form-item>
         </a-col>
       </a-row>
+      <template v-if="selectedRow.userinfotype === '2'">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="企业简称">
+              <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件类型">
+              <span class="white">{{ getCardTypeEnumItemName(selectedRow.cardtype) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="法定代表人">
+              <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件号码">
+              <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="纳税人识别号">
+              <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="营业执照">
+              <div class="upload">
+                <div class="look">查看附件</div>
+              </div>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="联系人">
+              <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人手机号">
+              <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="联系电话">
+              <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="状态">
+              <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="通讯地址">
+              <span class="white">{{ formatValue(selectedRow.address) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="备注">
+              <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </template>
+      <template v-else>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="身份证号码">
+              <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="手机号码">
+              <span class="white">{{ getCardTypeEnumItemName(selectedRow.cardtype) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="身份证正面照">
+              <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="邮箱">
+              <span class="white">{{ getCardTypeEnumItemName(selectedRow.cardtype) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="身份证反面照">
+              <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系电话">
+              <span class="white">{{ getCardTypeEnumItemName(selectedRow.cardtype) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="通讯地址">
+              <span class="white">{{ formatValue(selectedRow.address) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item label="备注">
+              <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </template>
     </a-form>
   </a-modal>
 </template>

+ 5 - 1
src/views/information/custom/compoments/modify/index.vue

@@ -315,10 +315,14 @@ export default defineComponent({
         const countryid = ref<number>(0);
         watchEffect(() => {
             if (visible.value) {
+              console.log('selectedRow', props.selectedRow);
+              
                 userid.value = props.selectedRow.userid;
                 countryid.value = props.selectedRow.countryid;
                 mergeTwoObj(formState, props.selectedRow);
-                const { provinceid, cityid } = props.selectedRow;
+                const { provinceid, cityid, address, mobile } = props.selectedRow;
+                formState.cardaddress = address
+                formState.mobilephone = mobile
                 provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
                 cityid ? getDistrictList(cityid) : ((formState.cityid = undefined), (formState.districtid = undefined));
             }