snow 8 mēneši atpakaļ
vecāks
revīzija
6c1fd65983

BIN
dist-zip/build.zip


+ 18 - 0
src/api/invCategory/invCategory/index.ts

@@ -0,0 +1,18 @@
+import { http } from "/@/utils/http";
+import { loadEnv } from "@build/index";
+const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
+const userAPi = VITE_PROXY_DOMAIN_REAL;
+const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
+
+interface ResponseType extends Promise<any> {
+  data?: object;
+  code?: number;
+  msg?: string;
+}
+
+//销售订单列表
+export const httpList = (data: any): any => { return http.request("post", `${yewuApi}catlist`, { data });};
+//详情
+export const httpDetail = (data: object): ResponseType => { return http.request("post", `${yewuApi}saleinfo`, { data }); };
+//标签操作记录
+export const httpRecord = (data: object): ResponseType => { return http.request("post", VITE_PROXY_USER_REAL +  `/admin/tagGood/logList`, { data }); };

+ 5 - 0
src/views/invCategory/invCategory/config/_options.ts

@@ -0,0 +1,5 @@
+export const statusOptions = [
+  { value: '2',label:'是', type:'success' },
+  { value: '3',label:'否', type:'warning' }
+]
+

+ 77 - 0
src/views/invCategory/invCategory/config/content.config.ts

@@ -0,0 +1,77 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpList } from "/@/api/invCategory/invCategory";
+import { h } from "vue";
+import { ElTag } from "element-plus";
+import { statusOptions } from "./_options";
+
+const columns = [
+  {
+    label: '税收分类编码',
+    prop: 'merge_code',
+    minWidth: '160px'
+  },
+  {
+    label: '货物和劳务名称',
+    prop: 'cat_name',
+    minWidth: '200px'
+  },
+  {
+    label: '税目',
+    prop: 'short_name',
+    minWidth: '200px'
+  },
+  {
+    label: '税率',
+    prop: 'supplierName',
+    minWidth: '80px',
+    cellRenderer({ row }){
+      return row.tax[0]
+    }
+  },
+  {
+    label: '元隆是否能开票',
+    prop: 'status',
+    width: '110px',
+    align: 'center',
+    cellRenderer({row}){
+      return h(ElTag,{
+        type: statusOptions.find(({value}) => String(value) === String(row.status))?.type || 'danger'
+      }, {
+        default: () => statusOptions.find(({value}) => String(value) === String(row.status))?.label || '--'
+      })
+    }
+  },
+  {
+    label: '建议开票税目',
+    prop: 'supplierName',
+    minWidth: '200px'
+  },
+  {
+    label: '备注',
+    prop: 'supplierName',
+    minWidth: '200px'
+  },
+];
+
+
+
+const contentConfig: ContentConfig = {
+  title: "元隆可开票类目",
+  columns,
+  superUserNoAction: true,
+  apis: {
+    httpList:(params = {} as any) => {
+      if(params.status === '3'){
+        params.status = ['3']
+      }else  if(params.status === '2'){
+        params.status = ['2']
+      } else {
+        params.status = ['2', '3']
+      }
+
+      return httpList(params)
+    }
+  }
+};
+
+export default contentConfig;

+ 40 - 0
src/views/invCategory/invCategory/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",
+      labelWidth: "120px",
+      label: "客户名称",
+      type: "input"
+    },
+    {
+      labelWidth: "120px",
+      field: "parent",
+      label: "归属集团",
+      type: "input"
+    },
+    {
+      labelWidth: "120px",
+      field: "contactor",
+      label: "联系人",
+      type: "input"
+    },
+    {
+      field: "createTime",
+      type: "input",
+      labelWidth: "120px",
+      label: "创建时间"
+    }
+  ]
+};
+
+export default modalConfig;

+ 25 - 0
src/views/invCategory/invCategory/config/search.config.ts

@@ -0,0 +1,25 @@
+import { statusOptions } from "./_options";
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: 'cat_code',
+      type: "input",
+      placeholder: "税收分类编码",
+    },
+    {
+      field: 'cat_name',
+      type: "input",
+      placeholder: "税目",
+    },
+    {
+      field: "status",
+      type: "select",
+      placeholder: "元隆是否能开票",
+      options: statusOptions
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 36 - 0
src/views/invCategory/invCategory/index.vue

@@ -0,0 +1,36 @@
+<script setup lang="ts">
+import { usePageSearch, type PageHooks } from "/@/hooks/page";
+import contentConfig from "./config/content.config";
+import searchConfig from "./config/search.config";
+
+import dayjs from "dayjs"
+
+const PageName = "invCategory";
+
+const hooks: PageHooks = {
+  pageSearchHook: () => usePageSearch((params = {}) => {
+    const { order_timer, ... result } = params
+
+    if(order_timer && order_timer.length === 2){ 
+      const [start, end] = order_timer
+      result['betweenTime'] = [dayjs(start).format('YYYY-MM-DD'), dayjs(end).format('YYYY-MM-DD')]
+     }
+
+    return {
+      result,
+      deleteProps: ['start','end']
+    }
+  }, undefined, searchConfig)
+};
+</script>
+
+<template>
+  <PageAuth :pageName="PageName">
+    <PageContainer
+      :hooks="hooks"
+      :contentConfig="contentConfig"
+      :search-config="searchConfig"
+    >
+    </PageContainer>
+  </PageAuth>
+</template>

+ 0 - 0
src/views/invCategory/invCategory/对账单标签操作记录.md