zhangback
2025-11-18 794057ab9c4e347eed13cdb85f9e3fb5f4956e91
ui/admin-ui3/src/views/tms/tmsCustomerInfo/index.vue
@@ -64,6 +64,8 @@
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";
const {proxy} = useCurrentInstance();
const crudRef = ref();
@@ -220,7 +222,7 @@
      label : '商务对接信息',
      prop: 'swjdxx',
      column:{
        signCompany: {
        signCompanyId: {
          label: '签约公司',
          addDisplay: true, minWidth: 150,
          editDisplay: true,
@@ -230,9 +232,138 @@
          rules: [
            {
              required: true,
              message: "签约公司不能为空", trigger: "blur"
              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: '商务对接人名称',
@@ -247,6 +378,7 @@
              message: "商务对接人名称不能为空", trigger: "blur"
            }
          ],
        },
        bizContactPhone: {
          label: '商务对接人电话',
@@ -419,7 +551,7 @@
      hide: false,
      search: true,
    },
    signCompany: {
    signCompanyName: {
      label: '签约公司',minWidth: 150,
      display:false,
      hide: false,