Browse Source

fix:修复采购模块

snow 2 years ago
parent
commit
30aacd3c68
26 changed files with 808 additions and 33 deletions
  1. 5 0
      src/views/InvoiceSaleSettings/commodityCost/config/configs.ts
  2. 57 0
      src/views/InvoiceSaleSettings/commodityCost/config/content.config.ts
  3. 40 0
      src/views/InvoiceSaleSettings/commodityCost/config/modal.config.ts
  4. 46 0
      src/views/InvoiceSaleSettings/commodityCost/config/search.config.ts
  5. 22 0
      src/views/InvoiceSaleSettings/commodityCost/detail.vue
  6. 52 2
      src/views/InvoiceSaleSettings/commodityCost/index.vue
  7. 14 0
      src/views/InvoiceSaleSettings/commodityCost/types.ts
  8. 57 0
      src/views/InvoiceSaleSettings/consultingCost/config/content.config.ts
  9. 40 0
      src/views/InvoiceSaleSettings/consultingCost/config/modal.config.ts
  10. 46 0
      src/views/InvoiceSaleSettings/consultingCost/config/search.config.ts
  11. 5 0
      src/views/InvoiceSaleSettings/consultingCost/deatil.vue
  12. 52 2
      src/views/InvoiceSaleSettings/consultingCost/index.vue
  13. 14 0
      src/views/InvoiceSaleSettings/consultingCost/types.ts
  14. 3 3
      src/views/InvoiceSales/capitalClaim/components/sales-modal.vue
  15. 2 2
      src/views/InvoiceSales/capitalClaim/index.vue
  16. 60 0
      src/views/parameter/tagManage/config/content.config.ts
  17. 31 0
      src/views/parameter/tagManage/config/modal.config.ts
  18. 36 0
      src/views/parameter/tagManage/config/search.config.ts
  19. 52 0
      src/views/parameter/tagManage/index.vue
  20. 0 0
      src/views/parameter/tagManage/标签管理
  21. 1 1
      src/views/purchase/orderRecord/components/basic-purchase.vue
  22. 1 1
      src/views/purchase/orderRecord/config/configs.ts
  23. 75 0
      src/views/purchase/porder/columns.tsx
  24. 40 3
      src/views/purchase/porder/preview-dialog.vue
  25. 49 0
      src/views/purchase/purchPay/component/create-payment/add-order-modal.vue
  26. 8 19
      src/views/purchase/purchPay/component/create-payment/order-table.vue

+ 5 - 0
src/views/InvoiceSaleSettings/commodityCost/config/configs.ts

@@ -0,0 +1,5 @@
+// export const formItems = [
+//   {
+//     label:''
+//   }
+// ]

+ 57 - 0
src/views/InvoiceSaleSettings/commodityCost/config/content.config.ts

@@ -0,0 +1,57 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpList } from "/@/api/parameter/clients";
+
+import dayjs from "dayjs";
+
+const columns = [
+  {
+    type: "selection",
+    width: 55,
+    hide: ({ checkList }) => !checkList.includes("勾选列")
+  },
+  {
+    label: "序号",
+    type: "index",
+    width: 70,
+    hide: ({ checkList }) => !checkList.includes("序号列")
+  },
+  {
+    label: "客户编号",
+    prop: "companyNo"
+  },
+  {
+    label: "客户名称",
+    prop: "companyName"
+  },
+  {
+    label: "归属集团",
+    prop: "parent"
+  },
+  {
+    label: "联系人",
+    prop: "contactor"
+  },
+  {
+    label: "创建时间",
+    prop: "createTime",
+    formatter: ({ createTime }) =>
+      dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
+  },
+  {
+    label: "操作",
+    fixed: "right",
+    width: 80,
+    slot: "operation"
+  }
+];
+
+const contentConfig: ContentConfig = {
+  title: "销售成本类目设置",
+  columns,
+  notReuqiredInit: true,
+  apis: {
+    httpList
+  }
+};
+
+export default contentConfig;

+ 40 - 0
src/views/InvoiceSaleSettings/commodityCost/config/modal.config.ts

@@ -0,0 +1,40 @@
+import { ModalConfig } from "../../../../components/PageModal/src/types";
+
+const modalConfig: ModalConfig = {
+  title: "客户",
+  itemStyle: {},
+  formItems: [
+    {
+      field: "companyNo",
+      type: "input",
+      label: "客户编号",
+      labelWidth: "120px"
+    },
+    {
+      field: "companyName",
+      type: "input",
+      labelWidth: "120px",
+      label: "客户名称"
+    },
+    {
+      field: "parent",
+      type: "input",
+      labelWidth: "120px",
+      label: "归属集团"
+    },
+    {
+      field: "contactor",
+      type: "input",
+      labelWidth: "120px",
+      label: "联系人"
+    },
+    {
+      field: "createTime",
+      type: "input",
+      labelWidth: "120px",
+      label: "创建时间"
+    }
+  ]
+};
+
+export default modalConfig;

+ 46 - 0
src/views/InvoiceSaleSettings/commodityCost/config/search.config.ts

@@ -0,0 +1,46 @@
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "company",
+      type: "input",
+      placeholder: "商品分类"
+    },
+    {
+      field: "timer",
+      type: "date_picker",
+      placeholder: "联系人",
+      otherOptions: {
+        type: "daterange",
+        startPlaceholder: "开始时间",
+        endPlaceholder: "结束时间"
+      }
+    },
+    {
+      field: "timer",
+      type: "select",
+      placeholder: "设置状态",
+      options: [
+        {
+          label: "未设置"
+        },
+        {
+          label: "已设置"
+        }
+      ]
+    },
+    {
+      field: "timer",
+      type: "input",
+      placeholder: "商品名称"
+    },
+    {
+      field: "timer",
+      type: "input",
+      placeholder: "商品编码"
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 22 - 0
src/views/InvoiceSaleSettings/commodityCost/detail.vue

@@ -0,0 +1,22 @@
+<script setup lang="ts">
+import BasicForm from "/@/components/BasicForm/src/basic-form.vue";
+</script>
+
+<template>
+  <div class="commodity__content">
+    <el-descriptions :column="3" border>
+      <el-descriptions-item label="demo">详情</el-descriptions-item>
+      <el-descriptions-item label="demo">详情</el-descriptions-item>
+      <el-descriptions-item label="demo">详情</el-descriptions-item>
+      <el-descriptions-item label="demo">详情</el-descriptions-item>
+    </el-descriptions>
+
+    <BasicForm />
+  </div>
+</template>
+
+<style lang="scss" scoped>
+.commodity__content {
+  padding: 20px !important;
+}
+</style>

+ 52 - 2
src/views/InvoiceSaleSettings/commodityCost/index.vue

@@ -1,3 +1,53 @@
-<script setup lang="ts"></script>
+<script setup lang="ts">
+import { PageSearch, usePageSearch } from "/@/components/PageSearch";
+import { PageModal, usePageModal } from "/@/components/PageModal";
+import { PageContent } from "/@/components/PageContent";
+import searchFormConfig from "./config/search.config";
+import contentConfig from "./config/content.config";
+import modalConfig from "./config/modal.config";
 
-<template>成本</template>
+defineOptions({
+  name: "invoiceheader"
+});
+
+const { pageContentRef, handleResetClick, handleSearchClick } = usePageSearch();
+
+const {
+  pageModalRef,
+  handleUpdateData,
+  handleCreateData,
+  handlePreviewData,
+  handleConfrim,
+  defaultInfo
+} = usePageModal({ pageContentRef });
+</script>
+
+<template>
+  <div class="main role">
+    <PageSearch
+      :form-config="searchFormConfig"
+      @search-btn-click="handleSearchClick"
+      @reset-btn-click="handleResetClick"
+    />
+    <PageContent
+      ref="pageContentRef"
+      :content-config="contentConfig"
+      @create-btn-click="handleCreateData"
+      @update-btn-click="handleUpdateData"
+      @preview-btn-click="handlePreviewData"
+    />
+    <PageModal
+      ref="pageModalRef"
+      prview-description
+      :modal-config="modalConfig"
+      :default-info="defaultInfo"
+      @confirm-btn-click="handleConfrim"
+    />
+  </div>
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+</style>

+ 14 - 0
src/views/InvoiceSaleSettings/commodityCost/types.ts

@@ -0,0 +1,14 @@
+export interface IClinetsDetail {
+  addtime: string;
+  ainv_fee: string;
+  area: string;
+  companyName: string;
+  companyNo: string;
+  contactor: string;
+  depart: string;
+  mobile: "";
+  parent: string;
+  total_fee: string;
+  updatetime: string;
+  winv_fee: string;
+}

+ 57 - 0
src/views/InvoiceSaleSettings/consultingCost/config/content.config.ts

@@ -0,0 +1,57 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpList } from "/@/api/parameter/clients";
+
+import dayjs from "dayjs";
+
+const columns = [
+  {
+    type: "selection",
+    width: 55,
+    hide: ({ checkList }) => !checkList.includes("勾选列")
+  },
+  {
+    label: "序号",
+    type: "index",
+    width: 70,
+    hide: ({ checkList }) => !checkList.includes("序号列")
+  },
+  {
+    label: "客户编号",
+    prop: "companyNo"
+  },
+  {
+    label: "客户名称",
+    prop: "companyName"
+  },
+  {
+    label: "归属集团",
+    prop: "parent"
+  },
+  {
+    label: "联系人",
+    prop: "contactor"
+  },
+  {
+    label: "创建时间",
+    prop: "createTime",
+    formatter: ({ createTime }) =>
+      dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
+  },
+  {
+    label: "操作",
+    fixed: "right",
+    width: 80,
+    slot: "operation"
+  }
+];
+
+const contentConfig: ContentConfig = {
+  title: "咨询成本类目设置",
+  columns,
+  notReuqiredInit: true,
+  apis: {
+    httpList
+  }
+};
+
+export default contentConfig;

+ 40 - 0
src/views/InvoiceSaleSettings/consultingCost/config/modal.config.ts

@@ -0,0 +1,40 @@
+import { ModalConfig } from "../../../../components/PageModal/src/types";
+
+const modalConfig: ModalConfig = {
+  title: "客户",
+  itemStyle: {},
+  formItems: [
+    {
+      field: "companyNo",
+      type: "input",
+      label: "客户编号",
+      labelWidth: "120px"
+    },
+    {
+      field: "companyName",
+      type: "input",
+      labelWidth: "120px",
+      label: "客户名称"
+    },
+    {
+      field: "parent",
+      type: "input",
+      labelWidth: "120px",
+      label: "归属集团"
+    },
+    {
+      field: "contactor",
+      type: "input",
+      labelWidth: "120px",
+      label: "联系人"
+    },
+    {
+      field: "createTime",
+      type: "input",
+      labelWidth: "120px",
+      label: "创建时间"
+    }
+  ]
+};
+
+export default modalConfig;

+ 46 - 0
src/views/InvoiceSaleSettings/consultingCost/config/search.config.ts

@@ -0,0 +1,46 @@
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "company",
+      type: "input",
+      placeholder: "商品分类"
+    },
+    {
+      field: "timer",
+      type: "date_picker",
+      placeholder: "联系人",
+      otherOptions: {
+        type: "daterange",
+        startPlaceholder: "开始时间",
+        endPlaceholder: "结束时间"
+      }
+    },
+    {
+      field: "timer",
+      type: "select",
+      placeholder: "设置状态",
+      options: [
+        {
+          label: "未设置"
+        },
+        {
+          label: "已设置"
+        }
+      ]
+    },
+    {
+      field: "timer",
+      type: "input",
+      placeholder: "商品名称"
+    },
+    {
+      field: "timer",
+      type: "input",
+      placeholder: "商品编码"
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 5 - 0
src/views/InvoiceSaleSettings/consultingCost/deatil.vue

@@ -0,0 +1,5 @@
+<script setup lang="ts"></script>
+
+<template>
+  <div>项目</div>
+</template>

+ 52 - 2
src/views/InvoiceSaleSettings/consultingCost/index.vue

@@ -1,3 +1,53 @@
-<script setup lang="ts"></script>
+<script setup lang="ts">
+import { PageSearch, usePageSearch } from "/@/components/PageSearch";
+import { PageModal, usePageModal } from "/@/components/PageModal";
+import { PageContent } from "/@/components/PageContent";
+import searchFormConfig from "./config/search.config";
+import contentConfig from "./config/content.config";
+import modalConfig from "./config/modal.config";
 
-<template>成本</template>
+defineOptions({
+  name: "invoiceheader"
+});
+
+const { pageContentRef, handleResetClick, handleSearchClick } = usePageSearch();
+
+const {
+  pageModalRef,
+  handleUpdateData,
+  handleCreateData,
+  handlePreviewData,
+  handleConfrim,
+  defaultInfo
+} = usePageModal({ pageContentRef });
+</script>
+
+<template>
+  <div class="main role">
+    <PageSearch
+      :form-config="searchFormConfig"
+      @search-btn-click="handleSearchClick"
+      @reset-btn-click="handleResetClick"
+    />
+    <PageContent
+      ref="pageContentRef"
+      :content-config="contentConfig"
+      @create-btn-click="handleCreateData"
+      @update-btn-click="handleUpdateData"
+      @preview-btn-click="handlePreviewData"
+    />
+    <PageModal
+      ref="pageModalRef"
+      prview-description
+      :modal-config="modalConfig"
+      :default-info="defaultInfo"
+      @confirm-btn-click="handleConfrim"
+    />
+  </div>
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+</style>

+ 14 - 0
src/views/InvoiceSaleSettings/consultingCost/types.ts

@@ -0,0 +1,14 @@
+export interface IClinetsDetail {
+  addtime: string;
+  ainv_fee: string;
+  area: string;
+  companyName: string;
+  companyNo: string;
+  contactor: string;
+  depart: string;
+  mobile: "";
+  parent: string;
+  total_fee: string;
+  updatetime: string;
+  winv_fee: string;
+}

+ 3 - 3
src/views/InvoiceSales/capitalClaim/components/sales-modal.vue

@@ -64,11 +64,11 @@ onMounted(() => requesetTradeOrderList());
 <template>
   <el-dialog v-model="visible" title="销售单列表">
     <el-table
-      :data="saleOrderList"
       v-loading="loading"
+      :data="saleOrderList"
+      @selection-change="handleSelection"
       size="small"
       row-key="sequenceNo"
-      @selection-change="handleSelection"
     >
       <el-table-column
         v-for="(col, index) in sale_columns"
@@ -107,7 +107,7 @@ onMounted(() => requesetTradeOrderList());
 
       <div>
         <el-button type="primary" @click="handleSave">保存</el-button>
-        <el-button>取消</el-button>
+        <el-button @click="() => (visible = false)">取消</el-button>
       </div>
     </div>
   </el-dialog>

+ 2 - 2
src/views/InvoiceSales/capitalClaim/index.vue

@@ -1,14 +1,14 @@
 <script setup lang="ts">
 import { ref } from "vue";
 import { utils, writeFile } from "xlsx";
+import { useRouter } from "vue-router";
 import { PageSearch, usePageSearch } from "/@/components/PageSearch";
 import { PageModal, usePageModal } from "/@/components/PageModal";
 import { PageContent } from "/@/components/PageContent";
+import ExeclUpload from "./components/execl-upload.vue";
 import searchFormConfig from "./config/search.config";
 import contentConfig from "./config/content.config";
 import modalConfig from "./config/modal.config";
-import { useRouter } from "vue-router";
-import ExeclUpload from "./components/execl-upload.vue";
 
 defineOptions({
   name: "invoiceheader"

+ 60 - 0
src/views/parameter/tagManage/config/content.config.ts

@@ -0,0 +1,60 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpList } from "/@/api/parameter/clients";
+
+import dayjs from "dayjs";
+import { httpAdd } from "/@/api/InvoiceSales/capitalClaim";
+
+const columns = [
+  {
+    type: "selection",
+    width: 55,
+    hide: ({ checkList }) => !checkList.includes("勾选列")
+  },
+  {
+    label: "序号",
+    type: "index",
+    width: 70,
+    hide: ({ checkList }) => !checkList.includes("序号列")
+  },
+  {
+    label: "客户编号",
+    prop: "companyNo"
+  },
+  {
+    label: "客户名称",
+    prop: "companyName"
+  },
+  {
+    label: "归属集团",
+    prop: "parent"
+  },
+  {
+    label: "联系人",
+    prop: "contactor"
+  },
+  {
+    label: "创建时间",
+    prop: "createTime",
+    formatter: ({ createTime }) =>
+      dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
+  },
+  {
+    label: "操作",
+    fixed: "right",
+    width: 80,
+    slot: "operation"
+  }
+];
+
+const contentConfig: ContentConfig = {
+  title: "企业客户",
+  columns,
+  notReuqiredInit: true,
+  powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
+  apis: {
+    httpList,
+    httpAdd
+  }
+};
+
+export default contentConfig;

+ 31 - 0
src/views/parameter/tagManage/config/modal.config.ts

@@ -0,0 +1,31 @@
+import { ModalConfig } from "../../../../components/PageModal/src/types";
+
+const modalConfig: ModalConfig = {
+  title: "标签",
+  colLayout: { span: 24 },
+  itemStyle: {},
+  formItems: [
+    {
+      field: "invoice_title",
+      type: "select",
+      label: "类型",
+      labelWidth: "120px",
+      placeholder: "发票抬头名称",
+      rules: [
+        { required: true, trigger: "change", message: "请输入发票抬头名称" }
+      ]
+    },
+    {
+      field: "invoice_mobile",
+      type: "input",
+      label: "标签",
+      labelWidth: "120px",
+      placeholder: "企业联系方式",
+      rules: [
+        { required: true, trigger: "change", message: "请输入企业联系方式" }
+      ]
+    }
+  ]
+};
+
+export default modalConfig;

+ 36 - 0
src/views/parameter/tagManage/config/search.config.ts

@@ -0,0 +1,36 @@
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "invoice_title",
+      type: "input",
+      placeholder: "类型"
+    },
+    {
+      field: "invoice_code",
+      type: "input",
+      placeholder: "标题"
+    },
+    {
+      field: "status",
+      type: "select",
+      placeholder: "状态",
+      options: [
+        { value: "0", label: "禁用" },
+        { value: "1", label: "启用" }
+      ]
+    },
+    {
+      field: "timer",
+      type: "date_picker",
+      otherOptions: {
+        type: "daterange",
+        startPlaceholder: "开始时间",
+        endPlaceholder: "结束时间"
+      }
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 52 - 0
src/views/parameter/tagManage/index.vue

@@ -0,0 +1,52 @@
+<script setup lang="ts">
+import { PageSearch, usePageSearch } from "/@/components/PageSearch";
+import { PageModal, usePageModal } from "/@/components/PageModal";
+import { PageContent } from "/@/components/PageContent";
+import searchFormConfig from "./config/search.config";
+import contentConfig from "./config/content.config";
+import modalConfig from "./config/modal.config";
+
+defineOptions({
+  name: "invoiceheader"
+});
+
+const { pageContentRef, handleResetClick, handleSearchClick } = usePageSearch();
+
+const {
+  pageModalRef,
+  handleUpdateData,
+  handleCreateData,
+  handlePreviewData,
+  handleConfrim,
+  defaultInfo
+} = usePageModal({ pageContentRef });
+</script>
+
+<template>
+  <div class="main role">
+    <PageSearch
+      :form-config="searchFormConfig"
+      @search-btn-click="handleSearchClick"
+      @reset-btn-click="handleResetClick"
+    />
+    <PageContent
+      ref="pageContentRef"
+      :content-config="contentConfig"
+      @create-btn-click="handleCreateData"
+      @update-btn-click="handleUpdateData"
+      @preview-btn-click="handlePreviewData"
+    />
+    <PageModal
+      ref="pageModalRef"
+      :modal-config="modalConfig"
+      :default-info="defaultInfo"
+      @confirm-btn-click="handleConfrim"
+    />
+  </div>
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+</style>

+ 0 - 0
src/views/InvoiceSales/capitalClaim/types.ts → src/views/parameter/tagManage/标签管理


+ 1 - 1
src/views/purchase/orderRecord/components/basic-purchase.vue

@@ -47,7 +47,7 @@ function handleAddClick() {
   <el-table :data="purchaseOrderList" size="small">
     <el-table-column label="采购单编号" prop="sequenceNo" width="180" />
     <el-table-column label="采购单信息" show-overflow-tooltip>
-      <el-table-column label="贷款" show-overflow-tooltip />
+      <el-table-column label="贷款" prop="totalPrice" show-overflow-tooltip />
       <el-table-column
         label="供货商"
         prop="supplierName"

+ 1 - 1
src/views/purchase/orderRecord/config/configs.ts

@@ -84,7 +84,7 @@ export const detailcolumns = [
     label: "付款中"
   },
   {
-    field: "pay_fee",
+    field: "wpay_fee",
     label: "未付款"
   },
   {

+ 75 - 0
src/views/purchase/porder/columns.tsx

@@ -325,3 +325,78 @@ export const preview_columns: Array<{ field: string; label: string }> = [
     field: "thNum"
   }
 ];
+
+export const cgd_status = [
+  {
+    value: "0",
+    label: "未对账"
+  },
+  {
+    value: "1",
+    label: "对账"
+  }
+];
+
+export const cgd_type = [
+  {
+    value: "1",
+    label: "库存"
+  },
+  {
+    value: "2",
+    label: "非库存"
+  },
+  {
+    value: "3",
+    label: "咨询"
+  }
+];
+
+export const cgd_source = [
+  {
+    value: "1",
+    label: "直接下单"
+  },
+  {
+    value: "2",
+    label: "咨询"
+  },
+  {
+    value: "3",
+    label: "项目"
+  },
+  {
+    value: "4",
+    label: "平台"
+  },
+  {
+    value: "5",
+    label: "有赞"
+  }
+];
+
+export const product_type = [
+  {
+    value: "1",
+    label: "正常商品"
+  },
+  {
+    value: "2",
+    label: "赠品"
+  },
+  {
+    value: "3",
+    label: "样品"
+  }
+];
+
+export const send_type = [
+  {
+    value: "1",
+    label: "包邮"
+  },
+  {
+    value: "2",
+    label: "自提"
+  }
+];

+ 40 - 3
src/views/purchase/porder/preview-dialog.vue

@@ -1,8 +1,16 @@
 <script setup lang="ts">
 import { ref } from "vue";
-import { preview_columns } from "./columns";
+import {
+  cgd_status,
+  preview_columns,
+  cgd_type,
+  cgd_source,
+  product_type,
+  send_type
+} from "./columns";
+import { pay_status_list, send_status_list } from "/@/utils/status";
 const visible = ref(false);
-const data = ref({});
+const data = ref<any>({});
 
 defineExpose({
   onDisplay: _data => {
@@ -19,8 +27,37 @@ defineExpose({
         v-for="(item, index) in preview_columns"
         :label="item.label"
         :key="index"
-        >{{ data[item.field] }}</el-descriptions-item
       >
+        <el-tag v-if="item.field === 'status'">
+          {{ cgd_status.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <el-tag v-else-if="item.field === 'cgdType'">
+          {{ cgd_type.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <el-tag v-else-if="item.field === 'cgdSource'">
+          {{ cgd_source.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <el-tag v-else-if="item.field === 'goodType'">
+          {{ product_type.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <el-tag v-else-if="item.field === 'sendType'">
+          {{ send_type.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <el-tag v-else-if="item.field === 'pay_status'">
+          {{ pay_status_list.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <el-tag v-else-if="item.field === 'sendStatus'">
+          {{ send_status_list.find(c => data[item.field] === c.value)?.label }}
+        </el-tag>
+
+        <span v-else>{{ data[item.field] }}</span>
+      </el-descriptions-item>
     </el-descriptions>
   </el-dialog>
 </template>

+ 49 - 0
src/views/purchase/purchPay/component/create-payment/add-order-modal.vue

@@ -0,0 +1,49 @@
+<script setup lang="ts">
+import { ref, watchEffect } from "vue";
+import { columns } from "../../config/configs";
+import { ElTable } from "element-plus";
+
+const props = defineProps<{
+  paymentList: Array<Record<string, string>>;
+}>();
+
+const visible = ref(false);
+
+const emit = defineEmits(["change-payment-detail"]);
+const list = ref<Array<Record<string, string>>>([]);
+const tableRef = ref<InstanceType<typeof ElTable>>(null);
+
+function handleCurrentChange(value) {
+  value && emit("change-payment-detail", value);
+}
+
+//过滤审核成功的对账列表
+watchEffect(
+  () => (list.value = props.paymentList.filter(item => item.status === "3"))
+);
+
+defineExpose({
+  onDisplay: () => (visible.value = true)
+});
+</script>
+
+<template>
+  <el-dialog v-model="visible">
+    <el-table
+      border
+      ref="tableRef"
+      row-key="id"
+      :data="list"
+      highlight-current-row
+      size="small"
+      @current-change="handleCurrentChange"
+    >
+      <el-table-column
+        v-for="(col, index) in columns"
+        :key="index"
+        v-bind="col"
+        show-overflow-tooltip
+      />
+    </el-table>
+  </el-dialog>
+</template>

+ 8 - 19
src/views/purchase/purchPay/component/create-payment/order-table.vue

@@ -1,27 +1,19 @@
 <script setup lang="ts">
-import { ref, watchEffect } from "vue";
+import { ref } from "vue";
 import { columns } from "../../config/configs";
 import { ElTable } from "element-plus";
-
-const props = defineProps<{
-  paymentList: Array<Record<string, string>>;
-}>();
+import AddOrderModal from "./add-order-modal.vue";
 
 const emit = defineEmits(["change-payment-detail"]);
+const createOrderRef = ref(null);
 const list = ref<Array<Record<string, string>>>([]);
 const tableRef = ref<InstanceType<typeof ElTable>>(null);
-
-function handleCurrentChange(value) {
-  value && emit("change-payment-detail", value);
-}
-
-//过滤审核成功的对账列表
-watchEffect(
-  () => (list.value = props.paymentList.filter(item => item.status === "3"))
-);
 </script>
 
 <template>
+  <div flex w-full justify-end mb-2>
+    <el-button type="primary" @click="handleAdd">添加</el-button>
+  </div>
   <el-table
     border
     ref="tableRef"
@@ -29,7 +21,6 @@ watchEffect(
     :data="list"
     highlight-current-row
     size="small"
-    @current-change="handleCurrentChange"
   >
     <el-table-column
       v-for="(col, index) in columns"
@@ -37,9 +28,7 @@ watchEffect(
       v-bind="col"
       show-overflow-tooltip
     />
-
-    <!-- <el-table-column label="金额" fixed="right">
-      <el-input size="small" placeholder="" />
-    </el-table-column> -->
   </el-table>
+
+  <AddOrderModal ref="createOrderRef" />
 </template>