snow преди 1 година
родител
ревизия
79f77c2b9c

+ 2 - 2
.vscode/settings.json

@@ -13,9 +13,9 @@
   "editor.acceptSuggestionOnCommitCharacter": false,
   "css.lint.propertyIgnoredDueToDisplay": "ignore",
   "editor.quickSuggestions": {
-    "other": true,
     "comments": true,
-    "strings": true
+    "strings": true,
+    "other": true
   },
   "files.associations": {
     "editor.snippetSuggestions": "top"

+ 6 - 1
src/api/reportForm/personnelReportRecord/index.ts

@@ -14,7 +14,12 @@ export const httpAdd = (data: object): ResponseType => {
 };
 // 列表
 export const httpList = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}execstatloglist`, { data });
+  return http.request("post", `${yewuApi}execstatloglist`, { 
+    data: {
+      ...data,
+      type: [3,4]
+    }
+   });
 };
 // 删除
 export const httpDelete = (data: object): ResponseType => {

+ 43 - 0
src/api/reportForm/warehouseRecords/index.ts

@@ -0,0 +1,43 @@
+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 httpAdd = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatlogadd`, {
+    data: {
+      ...data,
+      type: 5
+  } });
+};
+// 列表
+export const httpList = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatloglist`, { 
+    data: {
+      ...data,
+      type: 5
+    }
+   });
+};
+// 删除
+export const httpDelete = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execlogdel`, {
+    data: {
+      ...data,
+  } });
+};
+
+// 备选类型
+export const httpListAll = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatall`, {
+    data: {
+      ...data,
+      type: 4
+  } });
+};

+ 37 - 0
src/api/reportForm/warehouseeReport/index.ts

@@ -0,0 +1,37 @@
+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 httpAdd = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatadd`, {
+    data: {
+      ...data,
+      type: 4
+  } });
+};
+
+// 列表
+export const httpList = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatlist`, {
+    data: {
+      ...data,
+      type: 4
+    }});
+};
+
+// 状态
+export const httpStatus = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatus`, { data });
+};
+
+// 备选类型
+export const httpListAll = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}execstatactioninfo`, { data });
+};

+ 27 - 25
src/components/PageContent/src/page-content.tsx

@@ -1,15 +1,16 @@
 /* eslint-disable prettier/prettier */
 import { defineComponent, ref } from "vue";
+
 import PureTable from "@pureadmin/table";
 import { pageContentProps } from "./types";
 import { TableProBar } from "../../ReTable";
-import { createActionProps } from "./utils/create-operation";
+import { onBeforeRouteLeave } from "vue-router";
+import { useColumns } from "./hooks/use-columns";
+import { useActions } from "./hooks/use-actions";
 import { useRequeset } from "./hooks/use-request";
 import { useSelection } from "./hooks/use-selection";
 import { useRenderIcon } from "../../ReIcon/src/hooks";
-import { useColumns } from "./hooks/use-columns";
-import { useActions } from "./hooks/use-actions";
-import { onBeforeRouteLeave } from "vue-router";
+import { createActionProps } from "./utils/create-operation";
 
 import { useAppStoreHook } from "/@/store/modules/app";
 import { useUserInfo } from "/@/hooks/core/useUser";
@@ -18,11 +19,11 @@ import "./styles/index.scss";
 
 import {
   ElButton,
-  ElButtonGroup,
+  ElTooltip,
   ElCheckbox,
-  ElCheckboxGroup,
   ElScrollbar,
-  ElTooltip
+  ElButtonGroup,
+  ElCheckboxGroup
 } from "element-plus";
 
 const PageContent = defineComponent({
@@ -31,10 +32,10 @@ const PageContent = defineComponent({
   emits: [
     "createBtnClick",
     "updateBtnClick",
-    "previewBtnClick",
     "statusBtnClick",
-    "selectionChange",
     "getContentData",
+    "previewBtnClick",
+    "selectionChange",
   ],
   setup(props, { expose, emit, slots }) {
     //根据传入的api决定表格需要的操作
@@ -67,26 +68,26 @@ const PageContent = defineComponent({
       emit("selectionChange", value);
     }
 
-    /**
-     * 渲染需要的操作按钮
-     */
+    /**                 
+     * 渲染需要的操作按钮 
+     */                 
     function renderOperation(row) {
       const { contentConfig, powers } = props;
       const {
-        apis,
         inv,
+        apis,
+        payProps,
+        showStatus,
         notPreview,
         delTooltip,
-        showPreview,
         showDelete,
-        payProps,
         returnProps,
+        showPreview,
+        showPayTagFn,
+        showReturnTagFn,
         isRequesetArray,
         superUserNoAction,
         superUserNoPerview,
-        showPayTagFn,
-        showStatus,
-        showReturnTagFn
       } = contentConfig;
 
       const view = showPreview ? showPreview(row) : true;
@@ -148,7 +149,6 @@ const PageContent = defineComponent({
             <Operation.Status
               row={row}
               prop={contentConfig.statusProp}
-              // eslint-disable-next-line prettier/prettier
               statusRowProp={contentConfig.statusRowProp}
               onReload={() => onSearch()}
               isRequesetArray={isRequesetArray}
@@ -229,7 +229,7 @@ const PageContent = defineComponent({
           <ElScrollbar maxHeight={300} size="small">
             <ElCheckboxGroup v-model={displayColumns.value} size="small">
               {_raw.map(({ label, prop, fixed: fixedValue }, index) => {
-                if (!label || label === "序号" || label === "操作") return;
+                if (!label || label === "序号" || label === "z  ") return;
                 return (
                   <div class="fixed-group">
                     <ElButtonGroup size="small">
@@ -279,20 +279,22 @@ const PageContent = defineComponent({
       return (
         <PureTable
           ref={isTree && tableRef}
-          maxHeight={ maxHeight ? maxHeight : '660px'}
           border
+          stripe
           defaultExp
           align="left"
-          showOverflowTooltip
-          table-layout="auto"
           size="small"
-          stripe
           rowKey={rowKey}
+          table-layout="auto"
+          showOverflowTooltip
           columns={columns.value}
           treeProps={treeProps}
           data={dataList.value}
           checkList={checkList}
-          paginationSmall={size === "small" ? true : false}
+          maxHeight={ maxHeight ? maxHeight : '660px'}
+          paginationSmall={
+            size === "small" ? true : false
+          }
           headerCellStyle={{ background: "#fafafa", color: "#606266" }}
           onSelectionChange={handleSelection}
           {...paginationConfig}

+ 9 - 17
src/views/InvoiceSales/sheetOrderPool/index.vue

@@ -37,25 +37,17 @@ async function onDownloadOpenInv() {
   let arr = [];
   selects.value.forEach(si => {
     let model = JSON.parse(JSON.stringify(si));
-    model.qrdType_name =
-      xs_order_type_options.find(s => s.value === si.qrdType)?.label || "--";
-    model.sendStatus_name =
-      send_status_list.find(s => s.value === si.sendStatus)?.label || "--";
-    model.qrdSource_name =
-      xs_order_source_options.find(s => s.value === si.qrdSource)?.label ||
-      "--";
-    model.inv_status_name =
-      inv_open_status.find(s => s.value === si.inv_status)?.label || "--";
-    model.pay_status_name = retrun_status.find(
-      s => s.value === si.pay_status
-    )?.label;
-
+    model.qrdType_name = xs_order_type_options.find(s => s.value === si.qrdType)?.label || "--";
+    model.sendStatus_name = send_status_list.find(s => s.value === si.sendStatus)?.label || "--";
+    model.qrdSource_name = xs_order_source_options.find(s => s.value === si.qrdSource)?.label ||  "--";
+    model.inv_status_name = inv_open_status.find(s => s.value === si.inv_status)?.label || "--";
+    model.pay_status_name = retrun_status.find(s => s.value === si.pay_status)?.label;
     arr.push(model);
   });
 
   exportPageContent({
-    type: "front",
     data: arr,
+    type: "front",
     columns: frontColumns
   });
 }
@@ -71,9 +63,9 @@ async function onDownloadOpenInv() {
       @content-select-change="val => (selects = val)"
     >
       <template #content_header>
-        <ElButton size="small" @click="() => onDownloadOpenInv()"
-          >订单信息导出</ElButton
-        >
+        <ElButton size="small" @click="() => onDownloadOpenInv()">
+          订单信息导出
+        </ElButton>
       </template>
     </PageContainer>
     <SheetModal ref="sheetModalRef" />

+ 33 - 0
src/views/reportForm/warehouseRecords/config/_options.ts

@@ -0,0 +1,33 @@
+export const type_options = [
+  {
+    value: "3",
+    label: "立即执行"
+  },
+  {
+    value: "4",
+    label: "延迟执行"
+  }
+];
+
+export const tag_type = [
+  {
+    value: "1",
+    label: "待执行",
+    type: "warning"
+  },
+  {
+    value: "2",
+    label: "执行完成",
+    type: "success"
+  },
+  {
+    value: "3",
+    label: "执行失败",
+    type: "error"
+  },
+  {
+    value: "4",
+    label: "执行中",
+    type: ""
+  }
+];

+ 107 - 0
src/views/reportForm/warehouseRecords/config/content.config.ts

@@ -0,0 +1,107 @@
+import { ContentConfig } from "/@/components/PageContent";
+
+import {
+  httpList,
+  httpAdd,
+  httpDelete
+} from "/@/api/reportForm/warehouseRecords";
+
+import { h } from "vue";
+import dayjs from "dayjs";
+import { ElTag } from "element-plus";
+import { type_options, tag_type } from "./_options";
+
+const columns = [
+  {
+    type: "selection",
+    width: 40,
+    align: "center",
+    hide: ({ checkList }) => !checkList.includes("勾选列")
+  },
+  {
+    label: "序号",
+    type: "index",
+    width: 70,
+    hide: ({ checkList }) => !checkList.includes("序号列")
+  },
+  {
+    label: "报表名称",
+    prop: "name"
+  },
+  {
+    label: "执行类型",
+    prop: "type",
+    cellRenderer: ({ row, props }) =>
+      h(
+        ElTag,
+        {
+          size: props.size,
+          type: String(row.type) === "1" ? "" : "success"
+        },
+        {
+          default: () => "立即执行"
+        }
+      )
+  },
+  {
+    label: "状态",
+    prop: "status",
+    cellRenderer: ({ row, props }) => {
+      const { type, label } = tag_type.find(
+        s => String(row.status) === s.value
+      );
+      return h(
+        ElTag,
+        {
+          size: props.size,
+          type: type
+        },
+        {
+          default: () => label
+        }
+      );
+    }
+  },
+  // {
+  //   label: "开始时间",
+  //   prop: "start",
+  //   width: "140px",
+  //   formatter: ({ start }) => dayjs(start).format("YYYY-MM-DD HH:mm:ss")
+  // },
+  // {
+  //   label: "结束时间",
+  //   prop: "end",
+  //   width: "140px",
+  //   formatter: ({ end }) => dayjs(end).format("YYYY-MM-DD HH:mm:ss")
+  // },
+  {
+    label: "申请人",
+    prop: "apply_name",
+  },
+  {
+    label: "创建时间",
+    prop: "addtime",
+    formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
+  },
+  {
+    label: "操作",
+    fixed: "right",
+    width: 80,
+    slot: "operation"
+  }
+];
+
+const contentConfig: ContentConfig = {
+  title: "报表申请记录",
+  columns,
+  showDelete: row => {
+    return String(row.status) == "1" || String(row.status) === "3";
+  },
+  apis: {
+    httpList,
+    httpAdd,
+    httpDelete
+  }
+};
+
+export default contentConfig;

+ 44 - 0
src/views/reportForm/warehouseRecords/config/modal.config.ts

@@ -0,0 +1,44 @@
+import { ModalConfig } from "/@/components/PageModal/src/types";
+import { type_options } from "./_options";
+const modalConfig: ModalConfig = {
+  title: "报表申请",
+  colLayout: { span: 24 },
+  itemStyle: {},
+  formItems: [
+    {
+      field: "id",
+      type: "select",
+      label: "报表",
+      labelWidth: "120px",
+      placeholder: "请选择报表",
+      rules: [{ required: true, trigger: "change", message: "请选择报表" }],
+      options: [],
+      otherOptions: {
+        disabled: true
+      }
+    },
+    // {
+    //   field: "type",
+    //   type: "select",
+    //   label: "执行类型",
+    //   labelWidth: "120px",
+    //   placeholder: "执行类型",
+    //   rules: [{ required: true, trigger: "change", message: "请选择执行类型" }],
+    //   options: type_options
+    // },
+    // {
+    //   field: "create_timer",
+    //   type: "date_picker",
+    //   label: "报表时间",
+    //   labelWidth: "120px",
+    //   rules: [{ required: true, trigger: "change", message: "请选择报表时间" }],
+    //   otherOptions: {
+    //     placeholder: "请选择报表时间",
+    //     format: "YYYY-MM",
+    //     type: "month"
+    //   }
+    // }
+  ]
+};
+
+export default modalConfig;

+ 39 - 0
src/views/reportForm/warehouseRecords/config/search.config.ts

@@ -0,0 +1,39 @@
+import { type_options, tag_type } from "./_options";
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  colLayout: {
+    xl: 3,
+    lg: 4,
+    md: 6,
+    sm: 8,
+    xs: 12
+  },
+  formItems: [
+    {
+      field: "status",
+      type: "select",
+      placeholder: "执行状态",
+      options: tag_type
+    },
+
+    // {
+    //   field: "type",
+    //   type: "select",
+    //   placeholder: "执行类型",
+    //   options: type_options
+    // },
+    {
+      field: "name",
+      type: "input",
+      placeholder: "报表名称"
+    },
+    {
+      field: "apply_name",
+      type: "input",
+      placeholder: "申请人"
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 76 - 0
src/views/reportForm/warehouseRecords/index.vue

@@ -0,0 +1,76 @@
+<script setup lang="ts">
+import contentConfig from "./config/content.config";
+import searchConfig from "./config/search.config";
+import modalConfig from "./config/modal.config";
+import { usePageSearch, usePageModal, type PageHooks } from "/@/hooks/page";
+import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
+import { ElMessage } from "element-plus";
+import { httpListAll } from "/@/api/reportForm/warehouseRecords";
+import { ref, onMounted } from "vue";
+import dayjs from "dayjs";
+
+const PageName = "warehouseRecords";
+const refModalConfig = ref(modalConfig);
+const list = ref([]);
+
+async function get_list() {
+  const arr = [];
+  const { code, data } = await httpListAll({});
+
+  if (code === 0) {
+    data.forEach(si => {
+      const model = {
+        value: si.id,
+        label: si.name,
+        disabled: String(si.status) == "0"
+      };
+      arr.push(model);
+    });
+  }
+  list.value = arr;
+  refModalConfig.value.formItems[0].options = list.value;
+}
+
+const pageSearchHook = function () {
+  return usePageSearch(undefined, undefined, searchConfig);
+};
+
+const pageModalHook = function (pageContentRef) {
+  return usePageModal({
+    pageContentRef,
+    confirmCallback: ({ create_timer }) => {
+      return {};
+    }
+  });
+};
+
+const hooks: PageHooks = { pageSearchHook, pageModalHook };
+onMounted(() => get_list());
+</script>
+
+<template>
+  <PageAuth :pageName="PageName">
+    <PageContainer
+      :hooks="hooks"
+      :content-config="contentConfig"
+      :search-config="searchConfig"
+      :modal-config="refModalConfig"
+    >
+      <template #content_action="{ status, down_url }">
+        <el-link
+          :href="down_url"
+          v-if="String(status) === '2'"
+          target="_blank"
+          :underline="false"
+        >
+          <ElButton
+            link
+            size="small"
+            type="primary"
+            :icon="useRenderIcon('download-line')"
+          />
+        </el-link>
+      </template>
+    </PageContainer>
+  </PageAuth>
+</template>

+ 0 - 0
src/views/reportForm/warehouseRecords/仓库物流记录.md


+ 77 - 0
src/views/reportForm/warehouseeReport/config/content.config.ts

@@ -0,0 +1,77 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { ElTag } from "element-plus";
+import { h } from "vue";
+import dayjs from "dayjs";
+
+import {
+  httpList,
+  httpAdd,
+  httpStatus
+} from "/@/api/reportForm/warehouseeReport";
+
+const columns = [
+  {
+    type: "selection",
+    width: 40,
+    align: "center",
+    hide: ({ checkList }) => !checkList.includes("勾选列")
+  },
+  {
+    label: "序号",
+    type: "index",
+    width: 70,
+    hide: ({ checkList }) => !checkList.includes("序号列")
+  },
+  {
+    label: "报表名称",
+    prop: "name"
+  },
+  {
+    label: "状态",
+    prop: "status",
+    "min-width": "80px",
+    cellRenderer: ({ row, props }) =>
+      h(
+        ElTag,
+        {
+          size: props.size,
+          type: String(row.status) === "1" ? "success" : "danger"
+        },
+        {
+          default: () => (String(row.status) === "1" ? "启用" : "禁用")
+        }
+      )
+  },
+  {
+    label: "创建人",
+    prop: "apply_name",
+    "min-width": "80px"
+  },
+  {
+    label: "创建时间",
+    prop: "addtime",
+    "min-width": "140px",
+    formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
+  },
+  {
+    label: "操作",
+    fixed: "right",
+    width: 100,
+    slot: "operation"
+  }
+];
+
+const contentConfig: ContentConfig = {
+  title: "可申请报表",
+  superUserNoAction: false,
+  showCreate: isSuperUser => isSuperUser,
+  showStatus: isSuperUser => isSuperUser,
+  columns,
+  apis: {
+    httpList,
+    httpAdd,
+    httpStatus
+  }
+};
+
+export default contentConfig;

+ 37 - 0
src/views/reportForm/warehouseeReport/config/modal.config.ts

@@ -0,0 +1,37 @@
+import { ModalConfig } from "/@/components/PageModal/src/types";
+
+const modalConfig: ModalConfig = {
+  title: "可申请报表",
+  colLayout: { span: 24 },
+  itemStyle: {},
+  formItems: [
+    {
+      field: "name",
+      type: "input",
+      label: "报表名称",
+      labelWidth: "120px",
+      placeholder: "报表名称",
+      rules: [{ required: true, trigger: "change", message: "请输入报表名称" }],
+      otherOptions: {
+        disabled: true
+      }
+    },
+    {
+      field: "action",
+      type: "select",
+      label: "报表选项",
+      labelWidth: "120px",
+      placeholder: "报表选项",
+      rules: [
+        {
+          required: true,
+          trigger: "change",
+          message: "请选择报表选项"
+        }
+      ],
+      options: []
+    }
+  ]
+};
+
+export default modalConfig;

+ 29 - 0
src/views/reportForm/warehouseeReport/config/search.config.ts

@@ -0,0 +1,29 @@
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  colLayout: {
+    xl: 3,
+    lg: 4,
+    md: 6,
+    sm: 8,
+    xs: 12
+  },
+  formItems: [
+    {
+      field: "status",
+      type: "select",
+      placeholder: "状态",
+      options: [
+        { value: "0", label: "禁用" },
+        { value: "1", label: "启用" }
+      ]
+    },
+    {
+      field: "name",
+      type: "input",
+      placeholder: "报表名称"
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 70 - 0
src/views/reportForm/warehouseeReport/index.vue

@@ -0,0 +1,70 @@
+<script setup lang="ts">
+import { httpListAll } from "/@/api/reportForm/warehouseeReport";
+import { httpList } from "/@/api/parameter/finance";
+import { ref, watchEffect } from "vue";
+import contentConfig from "./config/content.config";
+import searchConfig from "./config/search.config";
+import modalConfig from "./config/modal.config";
+import { usePageSearch, usePageModal, type PageHooks } from "/@/hooks/page";
+// import { useCompany } from "/@/hooks/core/useCompany";
+const PageName = "warehouseeReport";
+const refModalConfig = ref(modalConfig);
+
+const modalRef = ref(null);
+
+const list = ref([]);
+const companyList = ref([]);
+
+async function get_list(type) {
+  const arr = [];
+  const { code, data } =
+    type == 1
+      ? await httpListAll({})
+      : await httpList({ page: 1, size: 10000 });
+  if (code === 0) {
+    (type == 1 ? data : data.list).forEach(si => {
+      const model = {
+        value: type == 1 ? si.action : si.companyNo,
+        label: type == 1 ? si.name : si.name
+      };
+      arr.push(model);
+    });
+  }
+  return arr;
+}
+
+const hooks: PageHooks = {
+  pageSearchHook: () => usePageSearch(undefined, undefined, searchConfig),
+  pageModalHook: pageContentRef =>
+    usePageModal({
+      pageContentRef
+    })
+};
+
+watchEffect(async () => {
+  list.value = await get_list(1);
+  companyList.value = await get_list(2);
+  refModalConfig.value.formItems[1].options = list.value;
+  refModalConfig.value.formItems[2].options = companyList.value;
+});
+
+modalConfig.onDataChange = function (data) {
+  const current = list.value.find(({ value }) => value === data.action);
+  return {
+    ...data,
+    name: current ? current.label : ""
+  };
+};
+</script>
+
+<template>
+  <PageAuth :pageName="PageName">
+    <PageContainer
+      :hooks="hooks"
+      :contentConfig="contentConfig"
+      :search-config="searchConfig"
+      :modal-config="refModalConfig"
+      :get-modal-ref="ref => (modalRef = ref)"
+    />
+  </PageAuth>
+</template>

+ 0 - 0
src/views/reportForm/warehouseeReport/可申请报表.md