wujianwei
2026-01-19 7d0c8a812777393ac2eefe40cbe3fa8b857e9b1f
ui/admin-ui3/src/views/tms/tmsCustomerInfo/index.vue
@@ -21,7 +21,9 @@
        @on-load="onLoad"
    >
      <template #menu-left>
        <el-button
         <el-button type="primary" icon="Plus" v-hasPermi="['tms:tmsCustomerInfo:add']" @click="handleAdd">新增
        </el-button>
        <!-- <el-button
            type="success"
            icon="Edit"
            :disabled="pageF.single"
@@ -35,7 +37,7 @@
            @click="handleDelete"
            v-hasPermi="['tms:tmsCustomerInfo:remove']"
        >删除
        </el-button>
        </el-button> -->
        <el-button
            type="warning"
            plain
@@ -44,6 +46,12 @@
            v-hasPermi="['tms:tmsCustomerInfo:export']"
        >导出
        </el-button>
      </template>
         <template #menu="{ size, row, index }">
        <el-link class="link-btn" type="primary" :underline="false" plain :size="size" icon="View"
          @click="handleFy(row)" v-hasPermi="['tms:tmsCustomerInfo:edit']"> 查看
        </el-link>
      </template>
    </avue-crud>
  </basicContainer>
@@ -64,7 +72,9 @@
import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
import {usePagePlus} from "@/hooks/usePagePlus";
import {hasPermission} from "@/utils/permissionUtils";
import {getTmsProject, listTmsProject} from "@/api/tms/tmsProject";
import {getTmsSettlementEntity, listTmsSettlementEntity} from "@/api/tms/tmsSettlementEntity";
import router from "@/router";
const {proxy} = useCurrentInstance();
const crudRef = ref();
@@ -92,17 +102,33 @@
  pageKey: 'TmsCustomerInfo',
  rowKey: 'id',
  labelWidth: 150,
  addBtn: false,
   viewBtn: false,
  searchLabelWidth: 150,
  group:[
    {
      label: '基本信息',
      prop: 'jbxx',
      column:{
        customerCode: {
          label: '客户编号',
          addDisplay: false, minWidth: 120,
          editDisplay: true,disabled: true,
          viewDisplay: true,
          hide: false,
          search: true,
          rules: [
            {
              required: true,
              message: "客户编号不能为空", trigger: "blur"
            }
          ],
        },
        customerType: {
          label: '客户类型', minWidth: 120,
          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
          addDisplay: true,
          editDisplay: true,
          editDisplay: true,value: '1',
          viewDisplay: true,
          hide: false,
          search: true,
@@ -124,20 +150,6 @@
            {
              required: true,
              message: "客户简称不能为空", trigger: "blur"
            }
          ],
        },
        customerCode: {
          label: '客户编号',
          addDisplay: true, minWidth: 120,
          editDisplay: true,
          viewDisplay: true,
          hide: false,
          search: true,
          rules: [
            {
              required: true,
              message: "客户编号不能为空", trigger: "blur"
            }
          ],
        },
@@ -216,62 +228,192 @@
        },
      }
    },
    {
      label : '商务对接信息',
      prop: 'swjdxx',
      column:{
        signCompany: {
          label: '签约公司',
          addDisplay: true, minWidth: 150,
          editDisplay: true,
          viewDisplay: true,
          hide: false,
          search: true,
          rules: [
            {
              required: true,
              message: "签约公司不能为空", trigger: "blur"
            }
          ],
        },
        bizContactName: {
          label: '商务对接人名称',
          addDisplay: true,
          editDisplay: true, minWidth: 120,
          viewDisplay: true,
          hide: false,
          search: true,
          rules: [
            {
              required: true,
              message: "商务对接人名称不能为空", trigger: "blur"
            }
          ],
        },
        bizContactPhone: {
          label: '商务对接人电话',
          addDisplay: true,
          editDisplay: true,
          viewDisplay: true,
          hide: true,
          search: false,
          rules: [
            {
              required: true,
              message: "商务对接人电话不能为空", trigger: "blur"
            }
          ],
        },
        bizContactEmail: {
          label: '商务对接人邮箱',
          addDisplay: true,
          editDisplay: true,
          viewDisplay: true,
          hide: true,
          search: false,
        },
      }
    },
    // {
    //   label : '商务对接信息',
    //   prop: 'swjdxx',
    //   column:{
    //     signCompanyId: {
    //       label: '签约公司',
    //       addDisplay: true, minWidth: 150,
    //       editDisplay: true,
    //       viewDisplay: true,
    //       hide: false,
    //       search: true,
    //       rules: [
    //         {
    //           required: true,
    //           message: "签约公司不能为空", trigger: "change"
    //         }
    //       ],
    //       type: 'table', suffixIcon: 'search',
    //       children: {
    //         border: true,
    //         searchMenuSpan: 5,
    //         column: {
    //           customerType: {
    //             label: '客户类型',
    //             type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           customerShortName: {
    //             label: '客户简称',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           customerCode: {
    //             label: '客户编号',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           contactName: {
    //             label: '联系人姓名',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           businessContactName: {
    //             label: '商务对接人名称',
    //             display: false,
    //             hide: false,minWidth:150,labelWidth:140,
    //             search: true,
    //             rules: [
    //               {
    //                 required: true,
    //                 message: "商务对接人名称不能为空", trigger: "blur"
    //               }
    //             ],
    //           },
    //           creditRating: {
    //             label: '客户信用评级',
    //             type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_credit_rating',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           creditLimitAmount: {
    //             label: '信用额度',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           creditLimitQuantity: {
    //             label: '信用额度',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           operatingStatus: {
    //             label: '经营状态',
    //             type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/business_status',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           contractStatus: {
    //             label: '合同状态',
    //             type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //           },
    //           dataStatus: {
    //             label: '数据状态',
    //             type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/data_status',
    //             display: false,
    //             hide: false,minWidth:150,
    //             search: true,
    //             rules: [
    //               {
    //                 required: true,
    //                 message: "数据状态不能为空", trigger: "change"
    //               }
    //             ],
    //           },
    //         },
    //
    //       },
    //       props: {
    //         label: 'customerShortName',
    //         value: 'id'
    //       },
    //       onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => {
    //         if (value) {
    //           let id = value;
    //           if (Array.isArray(value)) {
    //             id = value[0]
    //           }
    //           getTmsSettlementEntity(id).then(res => {
    //             return callback(res.data || {})
    //           })
    //         } else {
    //           listTmsSettlementEntity({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => {
    //             return callback({
    //               total: res.total,
    //               data: res.rows || [],
    //             })
    //           })
    //         }
    //
    //       },
    //       change: (val: any) => {
    //         const table = crudRef.value?.getPropRef?.('signCompanyId')?.$refs?.temp;
    //         if (!table) return;
    //         let active = table.active;
    //         if (Array.isArray(active)) active = active[0];
    //         if (active) {
    //           Object.assign(form.value, {
    //             signCompanyId: active.id,
    //             signCompanyName: active.customerShortName,
    //             bizContactEmail: active.businessContactEmail,
    //             bizContactPhone: active.businessContactPhone,
    //             bizContactName: active.businessContactName,
    //           });
    //         }
    //       },
    //     },
    //     bizContactName: {
    //       label: '商务对接人名称',
    //       addDisplay: true,
    //       editDisplay: true, minWidth: 120,
    //       viewDisplay: true,
    //       hide: false,
    //       search: true,
    //       rules: [
    //         {
    //           required: true,
    //           message: "商务对接人名称不能为空", trigger: "blur"
    //         }
    //       ],
    //
    //     },
    //     bizContactPhone: {
    //       label: '商务对接人电话',
    //       addDisplay: true,
    //       editDisplay: true,
    //       viewDisplay: true,
    //       hide: true,
    //       search: false,
    //       rules: [
    //         {
    //           required: true,
    //           message: "商务对接人电话不能为空", trigger: "blur"
    //         }
    //       ],
    //     },
    //     bizContactEmail: {
    //       label: '商务对接人邮箱',
    //       addDisplay: true,
    //       editDisplay: true,
    //       viewDisplay: true,
    //       hide: true,
    //       search: false,
    //     },
    //   }
    // },
    {
      label : '信用信息',
      prop: 'xyxx',    addDisplay: false,
@@ -419,18 +561,18 @@
      hide: false,
      search: true,
    },
    signCompany: {
      label: '签约公司',minWidth: 150,
      display:false,
      hide: false,
      search: true,
    },
    bizContactName: {
      label: '商务对接人名称', minWidth: 120,
      display:false,
      hide: false,
      search: true,
    },
    // signCompanyName: {
    //   label: '签约公司',minWidth: 150,
    //   display:false,
    //   hide: false,
    //   search: true,
    // },
    // bizContactName: {
    //   label: '商务对接人名称', minWidth: 120,
    //   display:false,
    //   hide: false,
    //   search: true,
    // },
    creditRating: {
      label: '客户信用评级', minWidth: 120,
      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_credit_rating',
@@ -478,7 +620,7 @@
      label: '更新时间', minWidth: 180,
      display:false,
      hide: false,
      search: true,
      // search: true,
    },
  }
})
@@ -520,5 +662,10 @@
  }
})
const handleAdd = () => {
  router.push('/customer/tmsCustomerInfo-info?formDisabled='+false)
}
const handleFy = (row) => {
  router.push('/customer/tmsCustomerInfo-info?id=' + row.id+'&formDisabled='+true)
}
</script>