li.shaoyi před 4 roky
rodič
revize
cca1db6b32

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

@@ -169,7 +169,7 @@ export interface CustomerInfoOperateReq {
     referral?: string // string 推荐码(个人)
     legalpersonname: string // string 法定代表人(企业)
     taxpayernum: string // string 纳税人识别号(企业)
-    proxystatementurl: string // string 营业执照(企业)
+    proxystatementurl?: string // string 营业执照(企业)
     contactname: string // string 联系人(企业)
     mobilephone: string // string 手机号码、联系人手机号
     telphone: string // string 联系电话

+ 87 - 85
src/views/business/exposure/list/futures/index.vue

@@ -1,35 +1,35 @@
 <template>
-    <!-- 敞口: 期货头寸-->
-    <div class="exposure-futures table-height" :loading="loading">
-        <filterCustomTable @search="updateColumn"> </filterCustomTable>
-        <a-table :columns="columns" class="topTable" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="tableList">
-            <template #totalydqty="{ record }">
-                <span>{{ record.totalydqty + ' 手' }}</span>
-            </template>
-            <template #increaseqty="{ record }">
-                <span>{{ record.increaseqty + ' 手' }}</span>
-            </template>
-            <template #decreaseqty="{ record }">
-                <span>{{ record.decreaseqty + ' 手' }}</span>
-            </template>
-            <template #totalcurqty="{ record }">
-                <span>{{ record.totalcurqty + ' 手' }}</span>
-            </template>
-        </a-table>
-        <!-- 明细 -->
-        <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
-            <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
-                <!-- 买卖方向 -->
-                <template #buyorsell="{ record }">
-                    <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
-                </template>
-                <!-- 开屏方向 -->
-                <template #channelbuildtype="{ record }">
-                    <span>{{ getChannelBuildName(record.channelbuildtype) }}</span>
-                </template>
-            </a-table>
-        </Description>
-    </div>
+  <!-- 敞口: 期货头寸-->
+  <div class="exposure-futures table-height" :loading="loading">
+    <filterCustomTable @search="updateColumn"> </filterCustomTable>
+    <a-table :columns="columns" class="topTable" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :pagination="false" rowKey="key" :data-source="tableList">
+      <template #totalydqty="{ record }">
+        <span>{{ record.totalydqty + ' 手' }}</span>
+      </template>
+      <template #increaseqty="{ record }">
+        <span>{{ record.increaseqty + ' 手' }}</span>
+      </template>
+      <template #decreaseqty="{ record }">
+        <span>{{ record.decreaseqty + ' 手' }}</span>
+      </template>
+      <template #totalcurqty="{ record }">
+        <span>{{ record.totalcurqty + ' 手' }}</span>
+      </template>
+    </a-table>
+    <!-- 明细 -->
+    <Description v-if="visible" @close="closeDrawer" @changeTab="changeTab" :tabList="tabList">
+      <a-table :columns="columnsDetail" class="topTable" :pagination="false" rowKey="key" :data-source="detailTableList" :scroll="{ x: '100%', y: '175px' }">
+        <!-- 买卖方向 -->
+        <template #buyorsell="{ record }">
+          <span>{{ getBuyOrSellName(record.buyorsell) }}</span>
+        </template>
+        <!-- 开屏方向 -->
+        <template #channelbuildtype="{ record }">
+          <span>{{ getChannelBuildName(record.channelbuildtype) }}</span>
+        </template>
+      </a-table>
+    </Description>
+  </div>
 </template>
 
 <script lang="ts">
@@ -47,65 +47,67 @@ import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { getBuyOrSellName, getChannelBuildName } from '@/common/constants/enumsName';
 import { getTableButton } from '@/common/setup/table/button';
 import { columns, columnsDetail } from './setup';
+import moment from 'moment';
 
 export default defineComponent({
-    name: EnumRouterName.exposure_futures,
-    components: {
-        filterCustomTable,
-        Description,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<ErmcpHedgePosition>();
-        // 获取列表数据
-        const queryTableAction = () => queryTable(QueryExposureHedgePosition);
-        const param: ComposeTableDetailParam = {
-            queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_exposure_futuresposition', // 表头key
-            tableFilterKey: ['MiddleGoodsName'], // 表格过滤字段
-            menuType: EnumRouterName.exposure_futures, // 当前tab页对应的code
-        };
-        const {
-            visible,
-            closeDrawer, // 控制 drawer 组件是否显示
-            updateColumn, //  表头数据
-            registerColumnDetail,
-            detailTableList, // 明细表头数据
-            expandedRowKeys,
-            selectedRow,
-            Rowclick,
-        } = handleComposeTable_detail<ErmcpHedgePosition>(param);
+  name: EnumRouterName.exposure_futures,
+  components: {
+    filterCustomTable,
+    Description,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<ErmcpHedgePosition>();
+    // 获取列表数据
+    const queryTableAction = () => queryTable(QueryExposureHedgePosition);
+    const param: ComposeTableDetailParam = {
+      queryFn: queryTableAction, // 查询表格数据
+      tableName: 'table_pcweb_exposure_futuresposition', // 表头key
+      tableFilterKey: ['MiddleGoodsName'], // 表格过滤字段
+      menuType: EnumRouterName.exposure_futures, // 当前tab页对应的code
+    };
+    const {
+      visible,
+      closeDrawer, // 控制 drawer 组件是否显示
+      updateColumn, //  表头数据
+      registerColumnDetail,
+      detailTableList, // 明细表头数据
+      expandedRowKeys,
+      selectedRow,
+      Rowclick,
+    } = handleComposeTable_detail<ErmcpHedgePosition>(param);
 
-        // 底部明细标签
-        const tabList = getTableButton(['position_futures_details']);
+    // 底部明细标签
+    const tabList = getTableButton(['position_futures_details']);
 
-        // 切换明细
-        function changeTab(index: number, current: TabList) {
-            const { code, lable } = current;
-            if (code === 'position_futures_details') {
-                // 现货明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_exposure_futuresposition_detail', []);
-            } else {
-                console.error(`${lable}没有配置对应的code: ${code},`);
-                return;
-            }
-            const goodsId = selectedRow.value?.goodsid;
-            if (goodsId) {
-                queryResultLoadingAndInfo(QueryExposureHedgePositionDetail, loading, { goodsId }).then((res) => {
-                    detailTableList.value = res;
-                });
-            }
-        }
-        watchEffect(() => {
-            if (visible.value) {
-                if (tabList.length) {
-                    changeTab(0, tabList[0]);
-                }
-            }
+    // 切换明细
+    function changeTab(index: number, current: TabList) {
+      const { code, lable } = current;
+      if (code === 'position_futures_details') {
+        // 现货明细
+        // 注册表头
+        registerColumnDetail('table_pcweb_exposure_futuresposition_detail', []);
+      } else {
+        console.error(`${lable}没有配置对应的code: ${code},`);
+        return;
+      }
+      const goodsId = selectedRow.value?.goodsid;
+      if (goodsId) {
+        queryResultLoadingAndInfo(QueryExposureHedgePositionDetail, loading, { goodsId }).then((res) => {
+          // 日期降序排序
+          detailTableList.value = res.sort((a, b) => moment(b.ts).valueOf() - moment(a.ts).valueOf());
         });
-        return { loading, tableList, visible, closeDrawer, columns, changeTab, updateColumn, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, getBuyOrSellName, getChannelBuildName };
-    },
+      }
+    }
+    watchEffect(() => {
+      if (visible.value) {
+        if (tabList.length) {
+          changeTab(0, tabList[0]);
+        }
+      }
+    });
+    return { loading, tableList, visible, closeDrawer, columns, changeTab, updateColumn, columnsDetail, detailTableList, expandedRowKeys, selectedRow, Rowclick, tabList, getBuyOrSellName, getChannelBuildName };
+  },
 });
 </script>
 

+ 5 - 6
src/views/iframe/setup.ts

@@ -244,13 +244,12 @@ export function getIframeUrl() {
         // 管理端地址
         const serviceUrl = serviceURL.pcMangerUrl + route.meta.url;
         // 根据当前路由 name(code) 查找出对应的 iframeCode
-        const item = iframeCode.find((item) => item.code === route.name);
+        const tab = iframeCode.find((item) => item.code === route.name);
 
-        if (item) {
-            const auth = route.meta.auth as OperationTabMenuAuth[];
-            const param = auth.reduce((res, item) => res + `:${item.code}`, '');
-            url.value = `${serviceUrl}?token=${getToken()}&tabindex=${item.tabIndex}&resourcepcmenu=${param}`;
-        }
+        const auth = route.meta.auth as OperationTabMenuAuth[];
+        const param = auth.reduce((res, item) => res + `:${item.code}`, '');
+
+        url.value = `${serviceUrl}?token=${getToken()}&tabindex=${tab?.tabIndex ?? 0}&resourcepcmenu=${param}`;
     }
 
     initData(() => {

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

@@ -27,6 +27,7 @@ export interface FormState {
     username: string;//用户姓名
     cardbackphotourl: string;//背面证件照地址
     cardfrontphotourl: string;//正面证件照地址
+    proxystatementurl: string;//营业执照地址
     email: string;//Email地址(加密存储)
     birthday?: string;//客户生日(yyyy-mm-dd)
     teammanageruserid?: number;//客户经理

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

@@ -80,6 +80,7 @@ export function initFormState(): FormState {
         username: '',
         cardbackphotourl: '',
         cardfrontphotourl: '',
+        proxystatementurl: '',
         email: '',
         birthday: '',
         teammanageruserid: undefined,

+ 133 - 138
src/views/information/custom/compoments/common-detail/index.vue

@@ -1,13 +1,8 @@
 <template>
   <div>
-    <Des :list="desList"
-         @onClick="imgClick" />
-    <a-modal :visible="previewVisible"
-             :footer="null"
-             @cancel="cancelImg">
-      <img alt="预览附件"
-           style="width: 100%"
-           :src="previewImage" />
+    <Des :list="desList" @onClick="imgClick" />
+    <a-modal :visible="previewVisible" :footer="null" @cancel="cancelImg">
+      <img alt="预览附件" style="width: 100%" :src="previewImage" />
     </a-modal>
   </div>
 
@@ -26,137 +21,137 @@ import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
 import { formatTime } from '@/common/methods';
 
 export default defineComponent({
-    name: 'custom-detail-desc',
-    components: { Des },
-    props: {
-        selectedRow: {
-            type: Object as PropType<QhjCustomer>,
-            default: {},
-        },
-    },
-    setup(props) {
-        console.log('dddd', props.selectedRow);
-        function isPersonal() {
-            return props.selectedRow.userinfotype === 1;
-        }
-        const { desList, getDesList } = handleDesList();
-        // 预览附件
-        const { previewVisible, previewImage, cancelImg, previewImg, getImgName } = handlePreviewImg();
-        //
-        function imgClick({ label }: DescriptionsList) {
-            const { attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
-            switch (label) {
-                case '营业执照':
-                    previewImg(cardfrontphotourl);
-                    break;
-                case '身份证正面照':
-                    previewImg(cardfrontphotourl);
-                    break;
-                case '身份证反面照':
-                    previewImg(cardbackphotourl);
-                    break;
-            }
-        }
-        watchEffect(() => {
-            // if (props.selectedRow.customername) {
-            const data = props.selectedRow;
-            if (isPingAnOem()) {
-                const person = [
-                    { label: '客户类型', value: '个人' },
-                    { label: '姓名', value: formatValue(data.username) },
-                    { label: '点价联系人', value: formatValue(data.contactname) },
-                    { label: '联系人手机号', value: formatValue(data.mobile) },
-                    { label: '状态', value: getStatusName(data.status), className: 'green' },
-                ];
-                const company = [
-                    { label: '客户类型', value: '企业' },
-                    { label: '企业名称', value: formatValue(data.customername) },
-                    { label: '点价联系人', value: formatValue(data.contactname) },
-                    { label: '联系人手机号', value: formatValue(data.mobile) },
-                    { label: '状态', value: getStatusName(data.status), className: 'green' },
-                ];
-                getDesList(isPersonal() ? person : company);
-            } else if (isQianHaiJin()) {
-                // 个人
-                const person = [
-                    { label: '所属机构', value: formatValue(data.parentusername) },
-                    { label: '所属客户经理', value: formatValue(data.brokername) },
-                    { label: '客户类型', value: '个人' },
-                    { label: '姓名', value: formatValue(data.username) },
-                    { label: '性别', value: data.sex === 1 ? '男' : data.sex === 0 ? '女' : '--' },
-                    { label: '生日', value: formatValue(formatTime(data.birthday, 'd')) },
-                    { label: '身份证号码', value: formatValue(data.cardnum) },
-                    { label: '手机号码', value: formatValue(data.mobile) },
-                    { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
-                    { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
-                    { label: '邮箱', value: formatValue(data.email) },
-                    { label: '联系电话', value: formatValue(data.telphone) },
-                    { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
-                    { label: '备注', value: formatValue(data.remark) },
-                ];
-                // 企业
-                const company = [
-                    { label: '所属机构', value: formatValue(data.parentusername) },
-                    { label: '所属客户经理', value: formatValue(data.brokername) },
-                    { label: '客户类型', value: '企业' },
-                    { label: '企业名称', value: data.customername },
-                    { label: '企业简称', value: formatValue(data.nickname) },
-                    { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
-                    { label: '法定代表人', value: formatValue(data.legalpersonname) },
-                    { label: '证件号码', value: formatValue(data.cardnum) },
-                    { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
-                    { label: '营业执照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
-                    { label: '联系人', value: formatValue(data.contactname) },
-                    { label: '联系人手机号', value: formatValue(data.mobile) },
-                    { label: '联系电话', value: formatValue(data.telphone) },
-                    { label: '状态', value: getStatusName(data.status), className: 'green' },
-                    { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
-                    { label: '备注', value: formatValue(data.remark) },
-                ];
-                getDesList(isPersonal() ? person : company);
-            } else {
-                // 个人
-                const person = [
-                    { label: '客户类型', value: '个人' },
-                    { label: '姓名', value: formatValue(data.username) },
-                    { label: '身份证号码', value: formatValue(data.cardnum) },
-                    { label: '手机号码', value: formatValue(data.mobile) },
-                    { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
-                    { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
-                    { label: '邮箱', value: formatValue(data.email) },
-                    { label: '联系电话', value: formatValue(data.telphone) },
-                    { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
-                    { label: '备注', value: formatValue(data.remark) },
-                ];
-                // 企业
-                const company = [
-                    { label: '客户类型', value: '企业' },
-                    { label: '企业名称', value: data.customername },
-                    { label: '企业简称', value: formatValue(data.nickname) },
-                    { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
-                    { label: '法定代表人', value: formatValue(data.legalpersonname) },
-                    { label: '证件号码', value: formatValue(data.cardnum) },
-                    { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
-                    { label: '营业执照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
-                    { label: '联系人', value: formatValue(data.contactname) },
-                    { label: '联系人手机号', value: formatValue(data.mobile) },
-                    { label: '联系电话', value: formatValue(data.telphone) },
-                    { label: '状态', value: getStatusName(data.status), className: 'green' },
-                    { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
-                    { label: '备注', value: formatValue(data.remark) },
-                ];
-                getDesList(isPersonal() ? person : company);
-                // }
-            }
-        });
-        return {
-            desList,
-            previewVisible,
-            previewImage,
-            cancelImg,
-            imgClick,
-        };
+  name: 'custom-detail-desc',
+  components: { Des },
+  props: {
+    selectedRow: {
+      type: Object as PropType<QhjCustomer>,
+      default: {},
     },
+  },
+  setup(props) {
+    console.log('dddd', props.selectedRow);
+    function isPersonal() {
+      return props.selectedRow.userinfotype === 1;
+    }
+    const { desList, getDesList } = handleDesList();
+    // 预览附件
+    const { previewVisible, previewImage, cancelImg, previewImg, getImgName } = handlePreviewImg();
+    //
+    function imgClick({ label }: DescriptionsList) {
+      const { proxystatementurl, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
+      switch (label) {
+        case '营业执照':
+          previewImg(proxystatementurl);
+          break;
+        case '身份证正面照':
+          previewImg(cardfrontphotourl);
+          break;
+        case '身份证反面照':
+          previewImg(cardbackphotourl);
+          break;
+      }
+    }
+    watchEffect(() => {
+      // if (props.selectedRow.customername) {
+      const data = props.selectedRow;
+      if (isPingAnOem()) {
+        const person = [
+          { label: '客户类型', value: '个人' },
+          { label: '姓名', value: formatValue(data.username) },
+          { label: '点价联系人', value: formatValue(data.contactname) },
+          { label: '联系人手机号', value: formatValue(data.mobile) },
+          { label: '状态', value: getStatusName(data.status), className: 'green' },
+        ];
+        const company = [
+          { label: '客户类型', value: '企业' },
+          { label: '企业名称', value: formatValue(data.customername) },
+          { label: '点价联系人', value: formatValue(data.contactname) },
+          { label: '联系人手机号', value: formatValue(data.mobile) },
+          { label: '状态', value: getStatusName(data.status), className: 'green' },
+        ];
+        getDesList(isPersonal() ? person : company);
+      } else if (isQianHaiJin()) {
+        // 个人
+        const person = [
+          { label: '所属机构', value: formatValue(data.parentusername) },
+          { label: '所属客户经理', value: formatValue(data.brokername) },
+          { label: '客户类型', value: '个人' },
+          { label: '姓名', value: formatValue(data.username) },
+          { label: '性别', value: data.sex === 1 ? '男' : data.sex === 0 ? '女' : '--' },
+          { label: '生日', value: formatValue(formatTime(data.birthday, 'd')) },
+          { label: '身份证号码', value: formatValue(data.cardnum) },
+          { label: '手机号码', value: formatValue(data.mobile) },
+          { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+          { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
+          { label: '邮箱', value: formatValue(data.email) },
+          { label: '联系电话', value: formatValue(data.telphone) },
+          { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
+          { label: '备注', value: formatValue(data.remark) },
+        ];
+        // 企业
+        const company = [
+          { label: '所属机构', value: formatValue(data.parentusername) },
+          { label: '所属客户经理', value: formatValue(data.brokername) },
+          { label: '客户类型', value: '企业' },
+          { label: '企业名称', value: data.customername },
+          { label: '企业简称', value: formatValue(data.nickname) },
+          { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
+          { label: '法定代表人', value: formatValue(data.legalpersonname) },
+          { label: '证件号码', value: formatValue(data.cardnum) },
+          { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
+          { label: '营业执照', value: formatValue(getImgName(data.proxystatementurl)), className: 'blue' },
+          { label: '联系人', value: formatValue(data.contactname) },
+          { label: '联系人手机号', value: formatValue(data.mobile) },
+          { label: '联系电话', value: formatValue(data.telphone) },
+          { label: '状态', value: getStatusName(data.status), className: 'green' },
+          { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
+          { label: '备注', value: formatValue(data.remark) },
+        ];
+        getDesList(isPersonal() ? person : company);
+      } else {
+        // 个人
+        const person = [
+          { label: '客户类型', value: '个人' },
+          { label: '姓名', value: formatValue(data.username) },
+          { label: '身份证号码', value: formatValue(data.cardnum) },
+          { label: '手机号码', value: formatValue(data.mobile) },
+          { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+          { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
+          { label: '邮箱', value: formatValue(data.email) },
+          { label: '联系电话', value: formatValue(data.telphone) },
+          { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
+          { label: '备注', value: formatValue(data.remark) },
+        ];
+        // 企业
+        const company = [
+          { label: '客户类型', value: '企业' },
+          { label: '企业名称', value: data.customername },
+          { label: '企业简称', value: formatValue(data.nickname) },
+          { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
+          { label: '法定代表人', value: formatValue(data.legalpersonname) },
+          { label: '证件号码', value: formatValue(data.cardnum) },
+          { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
+          { label: '营业执照', value: formatValue(getImgName(data.proxystatementurl)), className: 'blue' },
+          { label: '联系人', value: formatValue(data.contactname) },
+          { label: '联系人手机号', value: formatValue(data.mobile) },
+          { label: '联系电话', value: formatValue(data.telphone) },
+          { label: '状态', value: getStatusName(data.status), className: 'green' },
+          { label: '通讯地址', value: formatValue(data.provincename + data.cityname + data.districtname + data.address) },
+          { label: '备注', value: formatValue(data.remark) },
+        ];
+        getDesList(isPersonal() ? person : company);
+        // }
+      }
+    });
+    return {
+      desList,
+      previewVisible,
+      previewImage,
+      cancelImg,
+      imgClick,
+    };
+  },
 });
 </script>
 

+ 191 - 288
src/views/information/custom/compoments/modify/index.vue

@@ -1,45 +1,21 @@
 <template>
   <!-- 修改客户资料 -->
-  <a-modal class="commonModal modify-custom"
-           title="修改客户资料"
-           v-if="visible"
-           v-model:visible="visible"
-           centered
-           :maskClosable="false"
-           @cancel="cancel"
-           width="890px">
+  <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>
+      <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-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-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-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>
@@ -47,158 +23,92 @@
         </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 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 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-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 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 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 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" />
+              <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 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 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 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 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 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 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 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 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 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 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">
@@ -207,50 +117,25 @@
         </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 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 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 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 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 label="备注" name="remark">
+            <a-input class="dialogInput" style="width: 635px" v-model:value="formState.remark" placeholder="请输入备注" />
           </a-form-item>
         </a-col>
       </a-row>
@@ -267,7 +152,7 @@ import { getUploadImg } from '@/common/setup/upload';
 import { getUserId } from '@/services/bus/user';
 import { getAddress } from '@/services/go/adress';
 import { AllEnums } from '@/services/go/commonService/interface';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
+import { QhjCustomer } from '@/services/go/ermcp/qhj/interface';
 import { addCustomerInfoOperate } from '@/services/proto/accountinfo';
 import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
 import { mergeTwoObj } from '@/utils/objHandle';
@@ -277,133 +162,151 @@ import { getCardType, handleAreaList, handleForm, initFormState } from '../add/s
 import { isPingAnOem, isQianHaiJin } from '@/common/config/projectName';
 
 export default defineComponent({
-    name: 'modify-custom',
-    emits: ['cancel', 'update'],
-    components: { UploadImg },
-    props: {
-        selectedRow: {
-            default: initFormState,
-            type: Object as PropType<QueryCustomInfoType>,
-        },
+  name: 'modify-custom',
+  emits: ['cancel', 'update'],
+  components: { UploadImg },
+  props: {
+    selectedRow: {
+      default: initFormState,
+      type: Object as PropType<QhjCustomer>,
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const loading = ref<boolean>(false);
-        // 证件类型
-        const cardTypeList = ref<AllEnums[]>(getCardType());
-        // 表单
-        const { formRef, formState, rules } = handleForm();
-        // 地址
-        const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
-        // 营业执照
-        const { uploadImgAction: attachmentUpload, uploadImgList: attachmentImgList, handleImg: attachmentHandle } = getUploadImg();
-        // 背面证件照地址
-        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';
-        }
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const loading = ref<boolean>(false);
+    // 证件类型
+    const cardTypeList = ref<AllEnums[]>(getCardType());
+    // 表单
+    const { formRef, formState, rules } = handleForm();
+    // 地址
+    const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
+    // 营业执照
+    const { imgs: attachmentImgs, uploadImgAction: attachmentUpload, uploadImgList: attachmentImgList, handleImg: attachmentHandle } = getUploadImg();
+    // 背面证件照地址
+    const { imgs: cardbackImgs, uploadImgAction: cardbackUpload, uploadImgList: cardbackImgList, handleImg: cardbackHandle } = getUploadImg();
+    // 正面证件照地址
+    const { imgs: cardfrontImgs, uploadImgAction: cardfrontUpload, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
+    //查询所属机构列表
+    const { areaList, getAreaList } = handleAreaList();
+    if (isQianHaiJin()) {
+      getAreaList(loading);
+    }
+    function isPersonal(): boolean {
+      return formState.userinfotype === '1';
+    }
 
-        const userid = ref<number>(0);
-        const countryid = ref<number>(0);
+    const userid = ref<number>(0);
+    const countryid = ref<number>(0);
 
-        userid.value = props.selectedRow.userid;
-        countryid.value = props.selectedRow.countryid;
-        mergeTwoObj(formState, props.selectedRow);
-        formState.userinfotype = formState.userinfotype.toString();
-        if (isPersonal()) {
-            formState.username = props.selectedRow.customername;
-        } else {
-            formState.username = props.selectedRow.username;
-        }
-        const { provinceid, cityid, address, mobile, attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
-        formState.cardaddress = address;
-        formState.mobilephone = mobile;
-        provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
-        cityid ? getDistrictList(cityid) : ((formState.cityid = undefined), (formState.districtid = undefined));
-        if (cardfrontphotourl) {
-            // 营业执照
-            attachmentImgList.value = attachmentHandle(cardfrontphotourl);
+    userid.value = props.selectedRow.userid;
+    countryid.value = props.selectedRow.countryid;
+    mergeTwoObj(formState, props.selectedRow);
+    formState.userinfotype = formState.userinfotype.toString();
+    if (isPersonal()) {
+      formState.username = props.selectedRow.customername;
+    } else {
+      formState.username = props.selectedRow.username;
+    }
+    const { provinceid, cityid, address, mobile, proxystatementurl, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
+    formState.cardaddress = address;
+    formState.mobilephone = mobile;
+    provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
+    cityid ? getDistrictList(cityid) : ((formState.cityid = undefined), (formState.districtid = undefined));
+    if (proxystatementurl) {
+      // 营业执照
+      attachmentImgList.value = attachmentHandle(proxystatementurl);
+    }
+    if (cardbackphotourl) {
+      // 背面证件照地址
+      cardbackImgList.value = cardbackHandle(cardbackphotourl);
+    }
+    if (cardfrontphotourl) {
+      // 正面证件照地址
+      cardfrontImgList.value = cardfrontHandle(cardfrontphotourl);
+    }
+
+    function submit(OperateType: 1 | 2) {
+      validateAction<FormState>(formRef, formState).then((param) => {
+        const reqParam: CustomerInfoOperateReq = {
+          operatetype: 2, // 1: 新增 2:修改
+          username: param.userinfotype === '1' ? param.username : param.customername,
+          userid: userid.value,
+          areaid: getUserId(),
+          userinfotype: Number(param.userinfotype),
+          userstate: OperateType, // 1: 保存草稿 2: 新增
+          cardtype: (param.cardtype as number) !== undefined ? (param.cardtype as number) : 0, // 证件类型
+          cardnum: param.cardnum, // 证件号码
+          nickname: param.nickname, // 昵称
+          remark: param.remark, // 备注
+          mobilephone: param.mobilephone, //  手机号码
+          telphone: param.telphone, // 电话
+          ipaddress: param.cardaddress, // 证件地址
+          cityid: (param.cityid as number) !== undefined ? (param.cityid as number) : 0, //城市
+          districtid: (param.districtid as number) !== undefined ? (param.districtid as number) : 0, // 地区
+          // countryid: param.,9
+          provinceid: (param.provinceid as number) !== undefined ? (param.provinceid as number) : 0, //省
+          // countryid: countryid.value,
+          contactname: param.contactname, // 联系人
+          legalpersonname: param.legalpersonname, // 法人姓名(企业)
+          taxpayernum: param.taxpayernum, // 纳税人识别号
+          email: param.email, // email
+          cardfrontphotourl: param.cardfrontphotourl,
+          cardbackphotourl: param.cardbackphotourl,
+          proxystatementurl: param.proxystatementurl,
+        };
+
+        // 正面照片
+        if (cardfrontImgs.value.length) {
+          reqParam.cardfrontphotourl = cardfrontImgs.value[0].replace('./', '/');
         }
-        if (cardbackphotourl) {
-            // 背面证件照地址
-            cardbackImgList.value = cardbackHandle(cardbackphotourl);
+
+        // 反面照片
+        if (cardbackImgs.value.length) {
+          reqParam.cardbackphotourl = cardbackImgs.value[0].replace('./', '/');
         }
-        if (cardbackphotourl) {
-            // 正面证件照地址
-            cardfrontImgList.value = cardfrontHandle(cardbackphotourl);
+
+        // 营业执照
+        if (attachmentImgs.value.length) {
+          reqParam.proxystatementurl = attachmentImgs.value[0].replace('./', '/');
         }
 
-        function submit(OperateType: 1 | 2) {
-            validateAction<FormState>(formRef, formState).then((param) => {
-                const reqParam: CustomerInfoOperateReq = {
-                    operatetype: 2, // 1: 新增 2:修改
-                    username: param.userinfotype === '1' ? param.username : param.customername,
-                    userid: userid.value,
-                    areaid: getUserId(),
-                    userinfotype: Number(param.userinfotype),
-                    userstate: OperateType, // 1: 保存草稿 2: 新增
-                    cardtype: (param.cardtype as number) !== undefined ? (param.cardtype as number) : 0, // 证件类型
-                    cardnum: param.cardnum, // 证件号码
-                    nickname: param.nickname, // 昵称
-                    remark: param.remark, // 备注
-                    mobilephone: param.mobilephone, //  手机号码
-                    telphone: param.telphone, // 电话
-                    cardfrontphotourl: param.cardfrontphotourl, // 正面照片
-                    ipaddress: param.cardaddress, // 证件地址
-                    cityid: (param.cityid as number) !== undefined ? (param.cityid as number) : 0, //城市
-                    districtid: (param.districtid as number) !== undefined ? (param.districtid as number) : 0, // 地区
-                    // countryid: param.,9
-                    provinceid: (param.provinceid as number) !== undefined ? (param.provinceid as number) : 0, //省
-                    // countryid: countryid.value,
-                    contactname: param.contactname, // 联系人
-                    legalpersonname: param.legalpersonname, // 法人姓名(企业)
-                    taxpayernum: param.taxpayernum, // 纳税人识别号
-                    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);
-                });
-            });
+        if (isQianHaiJin()) {
+          reqParam.areaid = param.areaid as number;
+          reqParam.logincode = param.logincode;
+          reqParam.loginpwd = param.loginpwd;
+          reqParam.userstate = 2;
         }
-        return {
-            formState,
-            rules,
-            formRef,
-            cardTypeList,
-            isPersonal,
-            visible,
-            cancel,
-            submit,
-            loading,
-            cityList,
-            districtList,
-            provinceList,
-            getCityList,
-            getDistrictList,
-            attachmentUpload,
-            attachmentImgList,
-            cardbackUpload,
-            cardbackImgList,
-            cardfrontUpload,
-            cardfrontImgList,
-            isQianHaiJin,
-            areaList,
-        };
-    },
+
+        requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
+          cancel(true);
+        });
+      });
+    }
+    return {
+      formState,
+      rules,
+      formRef,
+      cardTypeList,
+      isPersonal,
+      visible,
+      cancel,
+      submit,
+      loading,
+      cityList,
+      districtList,
+      provinceList,
+      getCityList,
+      getDistrictList,
+      attachmentUpload,
+      attachmentImgList,
+      cardbackUpload,
+      cardbackImgList,
+      cardfrontUpload,
+      cardfrontImgList,
+      isQianHaiJin,
+      areaList,
+    };
+  },
 });
 </script>