zhangback
2025-11-18 f7490c5b05906399fe754fecdb1f32172a01170d
ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
@@ -133,7 +133,7 @@
              contactName: {
                label: '联系人姓名',minWidth: 120,
              },
              signCompany: {
              signCompanyName: {
                label: '签约公司', minWidth: 150,
              },
            },
@@ -161,7 +161,19 @@
              })
            }
          }
          },
          change: (val: any) => {
            const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
            if (!table) return;
            let active = table.active;
            if (Array.isArray(active)) active = active[0];
            if (active) {
              Object.assign(form.value, {
                customerId: active.id,
                customer: active.customerShortName,
              });
            }
          },
        },
        productCode: {
          label: '货品编码',
@@ -541,25 +553,6 @@
  }
})
onMounted(() => {
  watch(() => form.value.customerId, () => {
    if (!form.value.customerId){
      return;
    }
    const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
    if (!table) return;
    let active = table.active;
    if (Array.isArray(active)) active = active[0];
    if (active) {
      Object.assign(form.value, {
        customerId: active.id,
        customer: active.customerShortName,
      });
    }
  });
});
</script>