Преглед изворни кода

feat: 更新产品管理界面

laiqi пре 11 месеци
родитељ
комит
6b17c9be02

+ 5 - 0
apps/web-ele/src/api/product/index.ts

@@ -28,6 +28,11 @@ export async function getProductAndScqyListApi(params: ProductQueryParams) {
   return requestClient.post<any>('/api/query/list?pagevalue=121', {
     ...params,
     'productsmerchantid.like': params.productsmerchantid || '',
+    'scqyinfomc.like': params.scqyinfomc || '',
+    'productscategory.like': params.productscategory || '',
+    'productsjjlx.like': params.productsjjlx || '',
+    'productsmodel.like': params.productsmodel || '',
+    'productsname.like': params.productsname || '',
   });
 }
 

+ 4 - 4
apps/web-ele/src/views/examine-manage/examine-coupon/index.vue

@@ -43,7 +43,7 @@ const formOptions: VbenFormProps = {
       label: '优惠券名称',
       componentProps: {
         placeholder: $t('ui.placeholder.input'),
-        allowClear: true,
+        clearable: true,
       },
     },
     {
@@ -78,7 +78,7 @@ const formOptions: VbenFormProps = {
       label: '产品名称',
       componentProps: {
         placeholder: $t('ui.placeholder.input'),
-        allowClear: true,
+        clearable: true,
       },
     },
     {
@@ -87,7 +87,7 @@ const formOptions: VbenFormProps = {
       label: '产品型号',
       componentProps: {
         placeholder: $t('ui.placeholder.input'),
-        allowClear: true,
+        clearable: true,
       },
     },
     {
@@ -96,7 +96,7 @@ const formOptions: VbenFormProps = {
       label: '机具类型',
       componentProps: {
         placeholder: $t('ui.placeholder.input'),
-        allowClear: true,
+        clearable: true,
       },
     },
   ],

+ 10 - 6
apps/web-ele/src/views/product-manage/form.vue

@@ -84,14 +84,20 @@ const getTitle = computed(() => titleMap[formType.value]);
 
 // 判断是否有默认的渠道商ID
 const hasDefaultMerchantId = computed(() => {
-  return props.defaultMerchantId && 
-    (Array.isArray(props.defaultMerchantId) ? props.defaultMerchantId.length > 0 : props.defaultMerchantId);
+  return (
+    props.defaultMerchantId &&
+    (Array.isArray(props.defaultMerchantId)
+      ? props.defaultMerchantId.length > 0
+      : props.defaultMerchantId)
+  );
 });
 
 // 获取默认渠道商ID的数组形式
 const defaultMerchantIdArray = computed(() => {
   if (!props.defaultMerchantId) return [];
-  return Array.isArray(props.defaultMerchantId) ? props.defaultMerchantId : [props.defaultMerchantId];
+  return Array.isArray(props.defaultMerchantId)
+    ? props.defaultMerchantId
+    : [props.defaultMerchantId];
 });
 
 const [BaseForm, baseFormApi] = useVbenForm({
@@ -350,7 +356,7 @@ const [Modal, modalApi] = useVbenModal({
       if (hasDefaultMerchantId.value && data.value.formType === 'create') {
         // 设置默认值
         baseFormApi.setValues({
-          productsmerchantid: '',  // 设置为空的目的,是在接下来的经销商关联时,再去选择关联,而不是直接就进行关联
+          productsmerchantid: '', // 设置为空的目的,是在接下来的经销商关联时,再去选择关联,而不是直接就进行关联
         });
       }
 
@@ -380,8 +386,6 @@ const [Modal, modalApi] = useVbenModal({
   },
 });
 
-
-
 // 暴露modalApi供外部调用
 defineExpose({
   modalApi,

+ 45 - 8
apps/web-ele/src/views/product-manage/index.vue

@@ -42,7 +42,43 @@ const formOptions: VbenFormProps = {
       label: '产品名称',
       componentProps: {
         placeholder: $t('ui.placeholder.input'),
-        allowClear: true,
+        clearable: true,
+      },
+    },
+    {
+      component: 'Input',
+      fieldName: 'productsmodel',
+      label: '产品型号',
+      componentProps: {
+        placeholder: $t('ui.placeholder.input'),
+        clearable: true,
+      },
+    },
+    {
+      component: 'Input',
+      fieldName: 'productsjjlx',
+      label: '机具类型',
+      componentProps: {
+        placeholder: $t('ui.placeholder.input'),
+        clearable: true,
+      },
+    },
+    {
+      component: 'Input',
+      fieldName: 'scqyinfomc',
+      label: '生产企业',
+      componentProps: {
+        placeholder: $t('ui.placeholder.input'),
+        clearable: true,
+      },
+    },
+    {
+      component: 'Input',
+      fieldName: 'productscategory',
+      label: '产品类别',
+      componentProps: {
+        placeholder: $t('ui.placeholder.input'),
+        clearable: true,
       },
     },
   ],
@@ -91,22 +127,23 @@ const gridOptions: VxeGridProps<any> = {
   },
 
   columns: [
-    { title: '机具类型', field: 'productsjjlx', sortable: true, width: 120 },
+    { title: '序号', type: 'seq', width: 50 },
     { title: '产品名称', field: 'productsname', sortable: true, width: 240 },
+    { title: '产品型号', field: 'productsmodel', sortable: true, width: 220 },
+    { title: '机具类型', field: 'productsjjlx', sortable: true, width: 120 },
     {
       title: '产品类别',
       field: 'productscategory',
       sortable: true,
       width: 120,
     },
-    { title: '产品型号', field: 'productsmodel', sortable: true, width: 220 },
     { title: '生产企业', field: 'scqyinfomc', sortable: true, width: 220 },
     // { title: '产品sn号', field: 'productssn' },
-    { title: '品目', field: 'productspm', sortable: true, width: 120 },
-    { title: '一级分类', field: 'productsfl1', sortable: true, width: 120 },
-    { title: '二级分类', field: 'productsfl2', sortable: true, width: 120 },
-    { title: '分档名称', field: 'productsfdmc', sortable: true, width: 120 },
-    { title: '分档编号', field: 'productsfdbh', sortable: true, width: 120 },
+    // { title: '品目', field: 'productspm', sortable: true, width: 120 },
+    // { title: '一级分类', field: 'productsfl1', sortable: true, width: 120 },
+    // { title: '二级分类', field: 'productsfl2', sortable: true, width: 120 },
+    // { title: '分档名称', field: 'productsfdmc', sortable: true, width: 120 },
+    // { title: '分档编号', field: 'productsfdbh', sortable: true, width: 120 },
     {
       title: '产品原价',
       field: 'productsprice',