snow преди 4 месеца
родител
ревизия
377afa735d

+ 13 - 28
src/utils/columnRenderHelper.ts

@@ -8,44 +8,29 @@ export function renderProp(options: any[], prop = "status") {
       const item = options.find(s => s.value === String(row[prop]));
       return h(
         ElTag,
-        {
-          type: item && item.type ? item.type : ""
-        },
-        {
-          default: () => item?.label || "--"
-        }
+        { type: item && item.type ? item.type : "" },
+        { default: () => item?.label || "--" }
       );
     }
   };
 }
 
-export function renderIconLabelLeft(leftProp, rightProp, label = "", okProp = "") {
-  
+export function renderIconLabelLeft(
+  leftProp, 
+  rightProp, 
+  label = "", 
+  okProp = ""
+) {
     return {
       cellRenderer({ row }) {
-        if (okProp && !row[okProp]) { 
-          return null
-        }
-        
+        if (okProp && !row[okProp]) {  return null }
         return [
-            h(
-              ElPopover,
-              {
-                content: label + row[leftProp],
-                placement:'left',
-                width: 300,
-              },
-              {
-                reference: () =>
-                  h(ElButton, {
-                    link: true,
-                    size:'large',
-                    icon: useRenderIcon("information-line")
-                  })
-              }
+            h(ElPopover,
+              { content: label + row[leftProp], placement:'left', width: 300, },
+              { reference: () => h(ElButton, { link: true, size:'large', icon: useRenderIcon("information-line") }) }
             ),
             h("text", null, row[rightProp] || '--')
           ]
     }
   };
-}
+}

+ 16 - 14
src/views/invoiceInOut/combindProductManager/components/BaseForm.vue

@@ -1,59 +1,61 @@
-<script setup lang="ts"></script>
+<script setup lang="ts">
+import { ElForm, ElFormItem, ElRow, ElCol } from 'element-plus';
+import { onMounted } from "vue"
+
+onMounted(() => { })
+</script>
 
 <template>
   <ElForm>
     <ElRow>
       <ElCol :span="12">
         <ElFormItem label="销售方公司">
-
         </ElFormItem>
       </ElCol>
 
       <ElCol :span="12">
         <ElFormItem label="购买方公司">
-
         </ElFormItem>
       </ElCol>
 
-
       <ElCol :span="8">
         <ElFormItem label="订单商品名称">
-
         </ElFormItem>
       </ElCol>
 
       <ElCol :span="8">
         <ElFormItem label="发票商品名称">
-
         </ElFormItem>
       </ElCol>
 
       <ElCol :span="8">
         <ElFormItem label="商品类型">
-
-
         </ElFormItem>
       </ElCol>
 
       <ElCol :span="6">
-        <ElFormItem label="规格"></ElFormItem>
+        <ElFormItem label="规格">
+        </ElFormItem>
       </ElCol>
 
       <ElCol :span="6">
-        <ElFormItem label="单位"></ElFormItem>
+        <ElFormItem label="单位">
+        </ElFormItem>
       </ElCol>
 
       <ElCol :span="6">
-        <ElFormItem label="税前单价"></ElFormItem>
+        <ElFormItem label="税前单价">
+        </ElFormItem>
       </ElCol>
 
       <ElCol :span="6">
-        <ElFormItem label="税后单价"></ElFormItem>
+        <ElFormItem label="税后单价">
+        </ElFormItem>
       </ElCol>
 
-
       <ElCol :span="6">
-        <ElFormItem label="重量"></ElFormItem>
+        <ElFormItem label="重量">
+        </ElFormItem>
       </ElCol>
     </ElRow>
   </ElForm>

+ 17 - 3
src/views/invoiceInOut/combindProductManager/detail.vue

@@ -5,7 +5,16 @@ import { goodColumns } from "./config/columns"
 
 import BaseForm from "./components/BaseForm.vue"
 
-const { id, title, isDetail, collapses } = useDetail({ baseName: '组合商品', collapseLen: 2 });
+const { 
+  title, 
+  isDetail, 
+  collapses 
+} = useDetail({ 
+  baseName: '组合类型', 
+  collapseLen: 2 
+});
+
+
 </script>
 
 <template>
@@ -14,8 +23,13 @@ const { id, title, isDetail, collapses } = useDetail({ baseName: '组合商品',
       <ElTabPane :label="title">
         <ElCollapse v-model="collapses">
           <ElCollapseItem :title="title" name="1">
-            <BasicDescriptions v-if="isDetail" :columns="goodColumns" :data="{}"  />
-            <BaseForm v-else />
+            <BasicDescriptions
+              v-if="isDetail" 
+              :columns="goodColumns"
+              :data="{}" 
+            />
+
+            <BaseForm v-else/>
           </ElCollapseItem>
         </ElCollapse>
       </ElTabPane>

+ 8 - 39
src/views/invoiceInOut/inOutManager/config/content.config.ts

@@ -4,45 +4,14 @@ import { httpList } from "/@/api/invoiceInOut/productManager";
 import { renderIconLabelLeft } from "/@/utils/columnRenderHelper";
 
 const columns = [
-  {
-    label: "业务编号",
-    prop: "TODO",
-    width: 150
-  },
-  {
-    label: "类型",
-    prop: "TODO",
-    width: 160
-  },
-  {
-    label: '订单来源',
-    width: 160
-  },
-  {
-    label: '销售方公司纳税识别号',
-    prop: 'TODO',
-    width: 100
-  },
-  {
-    label: '商品名称',
-    prop: 'TODO',
-    width: 150
-  },
-  {
-    label: "规格",
-    prop: "TODO",
-    width: 80
-  },
-  {
-    label: "单位",
-    prop: "TODO",
-    width: 80
-  },
-  {
-    label: "状态",
-    prop: "TODO",
-    width: 100
-  },
+  { label: "业务编号", prop: "TODO", width: 150 },
+  { label: "类型", prop: "TODO", width: 160 },
+  { label: '数据来源', width: 160 },
+  { label: "状态", prop: "TODO", width: 100 },
+  { label: '销售方公司纳税识别号', prop: 'TODO', width: 200 },
+  { label: '商品名称', prop: 'TODO', width: 150 },
+  { label: "规格", prop: "TODO", width: 80 },
+  { label: "单位", prop: "TODO", width: 80 },
   {
     label: '税前单价',
     prop: 'TODO',