snow преди 2 години
родител
ревизия
abf17c777a
променени са 28 файла, в които са добавени 872 реда и са изтрити 2064 реда
  1. 27 18
      src/api/InvoiceSales/refund/index.ts
  2. 12 0
      src/views/InvoiceSales/capitalPool/config/content.config.ts
  3. 0 106
      src/views/InvoiceSales/refund/columns.tsx
  4. 0 430
      src/views/InvoiceSales/refund/components/addEditForm.vue
  5. 153 0
      src/views/InvoiceSales/refund/components/approval-process/approval-pending.vue
  6. 8 0
      src/views/InvoiceSales/refund/components/approval-process/index.ts
  7. 88 0
      src/views/InvoiceSales/refund/components/create-refund/capital-modal.vue
  8. 121 0
      src/views/InvoiceSales/refund/components/create-refund/index.vue
  9. 0 293
      src/views/InvoiceSales/refund/components/examStatusForm.vue
  10. 0 480
      src/views/InvoiceSales/refund/components/invoiceShow.vue
  11. 0 287
      src/views/InvoiceSales/refund/components/logisticsForm.vue
  12. 15 0
      src/views/InvoiceSales/refund/components/refund-detail/index.vue
  13. 0 20
      src/views/InvoiceSales/refund/components/viewDescriptions.vue
  14. 192 0
      src/views/InvoiceSales/refund/config/configs.ts
  15. 76 0
      src/views/InvoiceSales/refund/config/content.config.ts
  16. 36 0
      src/views/InvoiceSales/refund/config/search.config.ts
  17. 63 101
      src/views/InvoiceSales/refund/detail.vue
  18. 30 243
      src/views/InvoiceSales/refund/index.vue
  19. 0 63
      src/views/InvoiceSales/refund/status.ts
  20. 0 0
      src/views/InvoiceSales/refund/退款申请管理
  21. 18 6
      src/views/purchase/inputInvoice/config/configs.ts
  22. 3 3
      src/views/purchase/inputInvoice/config/content.config.ts
  23. 2 2
      src/views/purchase/ticketReturn/components/approval-process/authentication.vue
  24. 2 2
      src/views/purchase/ticketReturn/components/approval-process/confirm.vue
  25. 2 2
      src/views/purchase/ticketReturn/components/approval-process/financial-audit.vue
  26. 14 6
      src/views/purchase/ticketReturn/config/configs.ts
  27. 8 0
      src/views/purchase/ticketReturn/config/content.config.ts
  28. 2 2
      src/views/purchase/ticketReturn/detail.vue

+ 27 - 18
src/api/InvoiceSales/refund/index.ts

@@ -8,27 +8,36 @@ interface ResponseType extends Promise<any> {
   code?: number;
   msg?: string;
 }
-// 添加
-export const httpAdd = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}orderpayadd`, { data });
-};
-// 列表
+
+//退款单列表
 export const httpList = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}orderreturnlist`, { data });
+  return http.request("post", `${yewuApi}orderreturnlist`, {
+    data
+  });
 };
-// 详情
-export const httpDetail = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}tradeQuery`, { data });
+
+// 资金认领列表已通过审核的数据
+export const httpTradeList = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}tradeList`, { data });
 };
-// 更新
-export const httpUpdate = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}menusave`, { data });
+
+//资金认领详情
+export const httpTradeDetail = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}tradeloginfo`, {
+    data
+  });
 };
-// 状态
-export const httpStatus = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}orderreturnstatus`, { data });
+
+//新建退款单
+export const httpAdd = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}orderpayreturn`, {
+    data
+  });
 };
-// 删除
-export const httpDelete = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}menudel`, { data });
+
+//退款单详情
+export const httpDetail = (data: object): ResponseType => {
+  return http.request("post", `${yewuApi}returnpayinfo`, {
+    data
+  });
 };

+ 12 - 0
src/views/InvoiceSales/capitalPool/config/content.config.ts

@@ -2,6 +2,9 @@ import { ContentConfig } from "/@/components/PageContent";
 import { httpList } from "/@/api/InvoiceSales/capitalPool";
 
 import dayjs from "dayjs";
+import { h } from "vue";
+import { ElTag } from "element-plus";
+import { capital_status } from "./configs";
 
 const columns = [
   {
@@ -35,6 +38,15 @@ const columns = [
     label: "申请人",
     prop: "apply_name"
   },
+  {
+    label: "状态",
+    prop: "status",
+    cellRenderer: ({ row }) => {
+      return h(ElTag, null, {
+        default: () => capital_status.find(s => s.value === row.status)?.label
+      });
+    }
+  },
   {
     label: "认领时间",
     prop: "addtime",

+ 0 - 106
src/views/InvoiceSales/refund/columns.tsx

@@ -1,106 +0,0 @@
-import { ref } from "vue";
-import dayjs from "dayjs";
-import { statusList, inv_type_list } from "./status";
-export function useColumns() {
-  const columns = ref([
-    {
-      type: "selection",
-      width: 55,
-      hide: ({ checkList }) => !checkList.includes("勾选列")
-    },
-    {
-      label: "序号",
-      type: "index",
-      width: 70,
-      hide: ({ checkList }) => !checkList.includes("序号列")
-    },
-    {
-      label: "发票申请编号",
-      prop: "invNo",
-      width: 160
-    },
-
-    {
-      label: "企业客户编码",
-      prop: "inv_in",
-      width: 160
-    },
-    {
-      label: "企业客户名称",
-      prop: "username"
-    },
-
-    {
-      label: "发票额度",
-      prop: "inv_value",
-      width: 110
-    },
-    {
-      label: "状态",
-      prop: "status",
-      minWidth: 80,
-      cellRenderer: ({ row, props }) => (
-        <el-tag
-          size={props.size}
-          type={
-            (statusList.find(item => item.value == row.status + "") || {})
-              .type || "info"
-          }
-          effect="plain"
-        >
-          {(statusList.find(item => item.value == row.status + "") || {})
-            .label || "--"}
-        </el-tag>
-      )
-    },
-    {
-      label: "发票类型",
-      prop: "inv_type",
-      minWidth: 80,
-      cellRenderer: ({ row, props }) => (
-        <el-tag
-          size={props.size}
-          type={
-            (inv_type_list.find(item => item.value == row.inv_type + "") || {})
-              .type || "info"
-          }
-          effect="plain"
-        >
-          {(inv_type_list.find(item => item.value == row.inv_type + "") || {})
-            .label || "--"}
-        </el-tag>
-      )
-    },
-    {
-      label: "业务公司编码",
-      prop: "inv_out",
-      width: 160
-    },
-    {
-      label: "业务公司名称",
-      prop: "email"
-    },
-    {
-      label: "申请人",
-      prop: "apply_name",
-      width: 80
-    },
-    {
-      label: "创建时间",
-      width: 145,
-      prop: "createTime",
-      formatter: ({ createTime }) =>
-        dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
-    },
-    {
-      label: "操作",
-      fixed: "right",
-      width: 55,
-      slot: "operation"
-    }
-  ]);
-
-  return {
-    columns
-  };
-}

+ 0 - 430
src/views/InvoiceSales/refund/components/addEditForm.vue

@@ -1,430 +0,0 @@
-<script setup lang="ts">
-import { FormRules, ElForm } from "element-plus";
-import { reactive, ref } from "vue";
-import { httpUpdate, httpAdd } from "/@/api/system/menuOperator";
-import { responseHandle } from "/@/utils/responseHandle";
-import { useNav } from "/@/layout/hooks/nav";
-import { menuTypeList, menuPrivateList } from "/@/utils/status";
-import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
-const { logout } = useNav();
-import { ElMessage } from "element-plus";
-enum FROM_TYPE {
-  order = "order",
-  invoice = "invoice"
-}
-interface orderItem {
-  key: number;
-  sequenceNo: string;
-  inv_fee: string;
-}
-
-const TYPE = ref<FROM_TYPE>(FROM_TYPE.order);
-const formRef = ref<InstanceType<typeof ElForm>>(null);
-const loading = ref(false);
-const showModel = ref(false);
-const orderList = ref([]);
-
-const emit = defineEmits(["reload"]);
-const initform = {
-  buy_id: "", //开票销售方信息id
-  companyNo: "", //业务企业编号
-  khNo: "", //客户编号
-  invtype: "", //开票类型
-  email: "", //邮箱
-  remark: "", //备注
-  orderArr: [] //开票销售单明细 obj:sequenceNo//销售单编号 inv_fee//销售单开票金额
-};
-
-const ruleForm = ref({ ...initform });
-const rules = reactive<FormRules>({
-  buy_id: [
-    { required: true, message: "请输入菜单名称", trigger: "blur" },
-    { min: 1, max: 10, message: "长度在 1 到 10 个字符", trigger: "blur" }
-  ],
-  companyNo: [
-    {
-      required: true,
-      message: "请选择菜单类型",
-      trigger: "change"
-    }
-  ],
-  khNo: [
-    {
-      required: true,
-      message: "请选择菜单图标",
-      trigger: "change"
-    }
-  ],
-  invtype: [
-    {
-      required: true,
-      message: "请选择发票类型",
-      trigger: "change"
-    }
-  ],
-
-  email: [
-    {
-      required: true,
-      message: "请输入电子邮箱",
-      trigger: "blur"
-    }
-  ],
-  remark: [
-    {
-      required: true,
-      message: "请输入申请备注",
-      trigger: "blur"
-    }
-  ]
-  // orderArr
-});
-
-function handleUpdate() {
-  const data = {
-    ...ruleForm.value
-  };
-
-  return {
-    data,
-    api: httpUpdate
-  };
-}
-
-function handleCreate() {
-  const data = {
-    ...ruleForm.value
-  };
-
-  return {
-    data,
-    api: httpAdd
-  };
-}
-
-const handleEdit = (index: number, row: any) => {
-  if (index === -1) {
-    showModel.value = true;
-  }
-  console.log(index, row);
-};
-const handleDelete = (index: number, row: any) => {
-  console.log(index, row);
-};
-
-function handleSave() {
-  formRef.value.validate(async vaild => {
-    if (vaild) {
-      // if (loading.value) return;
-      // const handler =
-      //   TYPE.value === FROM_TYPE.create ? handleCreate : handleUpdate;
-      // loading.value = true;
-      // const { api, data } = handler();
-      // const { message, code } = await api(data);
-      // responseHandle({
-      //   code,
-      //   message,
-      //   logout,
-      //   handler: () => {
-      //     loading.value = false;
-      //     emit("reload");
-      //   }
-      // });
-    }
-  });
-}
-function menu_type_change() {
-  const { menu_type } = ruleForm.value;
-  rules.menu_url[0].required = menu_type === "2";
-}
-</script>
-
-<template>
-  <div class="addEditForm">
-    <el-form
-      ref="formRef"
-      v-loading="loading"
-      :model="ruleForm"
-      :rules="rules"
-      label-width="90px"
-      status-icon
-    >
-      <el-row>
-        <el-col :span="12">
-          <el-form-item
-            label="销售方公司抬头"
-            prop="buy_id"
-            label-width="135px"
-          >
-            <el-input
-              v-model="ruleForm.buy_id"
-              placeholder="销售方公司抬头"
-            /> </el-form-item
-        ></el-col>
-        <el-col :span="12">
-          <el-form-item
-            label="购买方公司抬头"
-            prop="companyNo"
-            label-width="135px"
-          >
-            <el-input
-              v-model="ruleForm.companyNo"
-              placeholder="购买方公司抬头"
-            /> </el-form-item
-        ></el-col>
-        <el-col :span="8">
-          <el-form-item label="发票类型" prop="invtype">
-            <el-select
-              v-model="ruleForm.invtype"
-              style="width: 100%"
-              @change="menu_type_change"
-              placeholder="发票类型"
-            >
-              <el-option
-                v-for="(si, sii) in menuTypeList"
-                :key="'type' + si.value + sii"
-                :label="si.label"
-                :value="si.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="电子邮箱" prop="email">
-            <el-input v-model="ruleForm.email" placeholder="电子邮箱"
-          /></el-form-item>
-        </el-col>
-
-        <el-col :span="16">
-          <el-form-item label="申请备注" prop="remark">
-            <el-input
-              v-model="ruleForm.remark"
-              :rows="3"
-              type="textarea"
-              maxlength="2000"
-              placeholder="申请备注"
-            /> </el-form-item
-        ></el-col>
-        <el-col :span="24" style="padding: 0 16px" v-show="TYPE === 'order'">
-          <el-table :data="orderList" stripe border style="width: 100%">
-            <el-table-column
-              prop="sequenceNo"
-              label="销售订单编号"
-              width="160"
-            />
-            <el-table-column
-              prop="address"
-              label="销售方公司编号"
-              width="160"
-            />
-            <el-table-column
-              prop="address"
-              label="销售方公司名称"
-              width="160"
-            />
-            <el-table-column
-              prop="address"
-              label="购买方公司编号"
-              width="160"
-            />
-            <el-table-column
-              prop="address"
-              label="购买方公司名称"
-              width="160"
-            />
-            <el-table-column prop="inv_fee" label="开票金额" width="110" />
-
-            <el-table-column>
-              <template #header>
-                <span>操作</span>
-                <el-button size="small" class="fr" @click="handleEdit(-1, {})"
-                  >添加订单</el-button
-                >
-              </template>
-              <template #default="scope">
-                <el-button
-                  size="small"
-                  @click="handleEdit(scope.$index, scope.row)"
-                  >编辑</el-button
-                >
-                <el-button
-                  size="small"
-                  type="danger"
-                  @click="handleDelete(scope.$index, scope.row)"
-                  >删除</el-button
-                >
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-col>
-      </el-row>
-      <div class="flex justify-end">
-        <el-button :loading="loading" type="primary" @click="handleSave"
-          >保存</el-button
-        >
-      </div>
-    </el-form>
-  </div>
-</template>
-<style lang="scss" scoped>
-.addEditForm {
-  .InvoiceTmpDiv {
-    font-size: 12px;
-    width: 100%;
-    .title {
-      font-size: 26px;
-      color: #b16363;
-      text-align: center;
-      line-height: 56px;
-    }
-    .extra {
-      color: #b15b16;
-      padding: 0 0 6px 0;
-      div {
-        line-height: 18px;
-      }
-      .content {
-        color: #181818;
-      }
-    }
-    .height84 {
-      [class*="el-col-"] {
-        border-right: 1px solid #b16363;
-        &:last-child {
-          border-right: 0px;
-        }
-      }
-      ul {
-        padding: 15px 0;
-        // border-right: 1px solid #b16363;
-        li {
-          height: 20px;
-          line-height: 20px;
-        }
-      }
-      .el-col-15 {
-        padding: 5px 10px;
-        div {
-          line-height: 20px;
-        }
-      }
-      .el-col-7 {
-        padding: 5px 10px;
-        line-height: 20px;
-      }
-    }
-    .row {
-      border: 1px solid #b16363;
-      border-bottom: none;
-      color: #b15b16;
-      &.con {
-        padding: 5px 0;
-        line-height: 22px;
-      }
-      .content {
-        color: #181818;
-      }
-      .col_1 {
-        width: 4.16%;
-      }
-      .col_2 {
-        width: 8.33%;
-      }
-      .col_3 {
-        width: 12.5%;
-      }
-      .col_5 {
-        width: 20.83%;
-      }
-      .col_6 {
-        width: 25%;
-      }
-      .col_7 {
-        width: 29.16%;
-      }
-      .col_8 {
-        width: 33.33%;
-      }
-      .col_14 {
-        width: 58.33%;
-      }
-      .col_15 {
-        width: 62.5%;
-      }
-      .col_17 {
-        width: 70.83%;
-      }
-      .col_18 {
-        width: 75%;
-      }
-      .col_24 {
-        width: 100%;
-      }
-      .col_1,
-      .col_2,
-      .col_3,
-      .col_4,
-      .col_5,
-      .col_6,
-      .col_7,
-      .col_8,
-      .col_14,
-      .col_15,
-      .col_17,
-      .col_18,
-      .col_24 {
-        display: inline-block;
-        padding: 8px;
-        box-sizing: border-box;
-        vertical-align: middle;
-        border-left: 1px solid #b16363;
-        height: 100%;
-        &.no-border {
-          border-left: none;
-        }
-      }
-    }
-    .row-div {
-      border: 1px solid #b16363;
-      // padding:7px 0;
-      border-bottom: 0px;
-      [class*="el-col-"] {
-        padding: 4px 0;
-        line-height: 22px;
-        border-right: 1px solid #b16363;
-        &:last-child {
-          border-right: 0px;
-        }
-      }
-      .el-row {
-        &:first-child {
-          [class*="el-col-"] {
-            padding-top: 8px;
-          }
-        }
-        &:last-child {
-          [class*="el-col-"] {
-            padding-bottom: 10px;
-          }
-        }
-      }
-    }
-
-    .last-row {
-      padding: 6px 0 0 0;
-      .content {
-        color: #181818;
-      }
-      color: #b15b16;
-      border-top: 1px solid #b16363;
-    }
-    .label {
-      width: 78px;
-      display: inline-block;
-      text-align-last: justify;
-      text-align: justify;
-    }
-    .title-label {
-      width: 52px;
-    }
-  }
-}
-</style>

+ 153 - 0
src/views/InvoiceSales/refund/components/approval-process/approval-pending.vue

@@ -0,0 +1,153 @@
+<script setup lang="ts">
+import { ElForm, ElMessage, UploadProps } from "element-plus";
+import { reactive, ref, watchEffect } from "vue";
+import { httpImageUpload, baseUrl } from "/@/api/other";
+import { useResponseHandle } from "/@/hooks";
+import { useUserStore } from "/@/store/modules/user";
+
+const emit = defineEmits(["changeStatus"]);
+
+const formData = reactive({
+  return_img: "",
+  status: "",
+  remark: ""
+});
+
+const types = ["image/png", "image/jpg", "image/bmp", "image/jpeg"];
+
+const rules = reactive({
+  return_img: [
+    {
+      required: true,
+      trigger: "change",
+      message: "请上传退款回执"
+    }
+  ],
+  status: [
+    {
+      required: true,
+      trigger: "change",
+      message: "选择审核状态"
+    }
+  ],
+  remark: [
+    {
+      required: true,
+      trigger: "change",
+      message: "请输入备注"
+    }
+  ]
+});
+
+const formRef = ref<InstanceType<typeof ElForm>>(null);
+const responseHandle = useResponseHandle();
+const userStore = useUserStore();
+
+const onBeforeReturnImageUpload: UploadProps["beforeUpload"] = ({
+  type,
+  size
+}) => {
+  if (!types.includes(type)) {
+    ElMessage.error("请上传jpg.png.bmp.jpeg类型图片");
+    return false;
+  }
+
+  if (size / 1024 / 1024 > 1) {
+    ElMessage.error("图片大小超过1M");
+    return false;
+  }
+};
+
+const handleRequeset: UploadProps["httpRequest"] = async ({ file }) => {
+  const _formData = new FormData();
+  _formData.append("img", file);
+  _formData.append("token", userStore.token);
+  const { message, code, data } = await httpImageUpload(_formData);
+
+  responseHandle({
+    message,
+    code,
+    handler: () => (formData.return_img = baseUrl + "/" + data[0].url)
+  });
+};
+
+const handlePaymentReceipt = () => {
+  formRef.value.validate(isValid => isValid && emit("changeStatus", formData));
+};
+
+watchEffect(() => {
+  rules.remark[0].required = formData.status === "3";
+});
+</script>
+
+<template>
+  <el-form
+    ref="formRef"
+    label-width="100px"
+    size="small"
+    :model="formData"
+    :rules="rules"
+  >
+    <el-form-item label="审批状态" prop="status" w-400px>
+      <el-select w-400px v-model="formData.status">
+        <el-option label="通过" value="2" />
+        <el-option label="不通过" value="3" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="备注" prop="remark" w-400px>
+      <el-input type="textarea" v-model="formData.remark" />
+    </el-form-item>
+
+    <el-form-item label="退款回执" prop="return_img">
+      <div>
+        <el-upload
+          class="upload"
+          :before-upload="onBeforeReturnImageUpload"
+          :http-request="handleRequeset"
+          :show-file-list="false"
+        >
+          <img
+            class="avatar"
+            v-if="formData.return_img"
+            :src="formData.return_img"
+          />
+          <div class="text" v-else>点击上传</div>
+        </el-upload>
+        <span text-sm>大小:小于1M; 尺寸:100*100; 类型:jpg.png.bmp.jpeg</span>
+      </div>
+    </el-form-item>
+
+    <el-form-item w-full flex justify-end>
+      <el-button type="primary" @click="handlePaymentReceipt">保存</el-button>
+    </el-form-item>
+  </el-form>
+</template>
+
+<style lang="scss">
+.upload {
+  width: 178px;
+  height: 178px;
+  display: block;
+  border: 1px dashed var(--el-border-color);
+
+  .text {
+    font-size: 20px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    text-align: center;
+    line-height: 178px;
+  }
+
+  &:hover {
+    border-color: var(--el-color-primary);
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+}
+</style>

+ 8 - 0
src/views/InvoiceSales/refund/components/approval-process/index.ts

@@ -0,0 +1,8 @@
+import ApprovalPending from "./approval-pending.vue";
+
+export const approval_process = {
+  "0": {
+    title: "待审批",
+    component: ApprovalPending
+  }
+};

+ 88 - 0
src/views/InvoiceSales/refund/components/create-refund/capital-modal.vue

@@ -0,0 +1,88 @@
+<script setup lang="ts">
+import { onMounted, ref, unref } from "vue";
+import { ElTable } from "element-plus";
+import { useResponseHandle } from "/@/hooks";
+import { httpTradeList } from "/@/api/InvoiceSales/refund";
+import { capital_columns } from "../../config/configs";
+
+const paymentList = ref<Array<Record<string, string>>>([]);
+const selectOrder = ref<Array<Record<string, string>>>([]);
+const visible = ref(false);
+
+const emit = defineEmits(["on-add-order"]);
+const tableRef = ref<InstanceType<typeof ElTable>>(null);
+const responseHandle = useResponseHandle();
+
+//初始化订单对账列表
+async function requestPaymentList() {
+  const { code, message, data } = await httpTradeList({
+    status: "2"
+  });
+
+  responseHandle({
+    code,
+    message,
+    handler: () => {
+      paymentList.value = data.list;
+    }
+  });
+}
+
+function handleConfirm() {
+  visible.value = false;
+  emit("on-add-order", unref(selectOrder.value[0]));
+}
+
+function handleSelectionChange(values) {
+  if (values.length > 1) {
+    const value = values.pop();
+    tableRef.value.clearSelection();
+    tableRef.value.toggleRowSelection(value, true);
+    selectOrder.value = [value];
+  } else {
+    selectOrder.value = [values[0]];
+  }
+}
+
+defineExpose({
+  onDisplay: () => (visible.value = true)
+});
+
+onMounted(() => requestPaymentList());
+</script>
+
+<template>
+  <el-dialog v-model="visible" title="资金认领" center>
+    <el-table
+      border
+      ref="tableRef"
+      :data="paymentList"
+      size="small"
+      row-key="id"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" />
+      <el-table-column
+        v-for="(col, index) in capital_columns"
+        :key="index"
+        v-bind="col"
+        show-overflow-tooltip
+      />
+    </el-table>
+
+    <div w-full flex justify-end mt-2>
+      <el-button type="primary" size="small" @click="handleConfirm"
+        >确定</el-button
+      >
+      <el-button size="small" @click="() => (visible = false)">取消</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<style lang="scss" scoped>
+:deep(.el-table__header) {
+  .el-checkbox {
+    display: none;
+  }
+}
+</style>

+ 121 - 0
src/views/InvoiceSales/refund/components/create-refund/index.vue

@@ -0,0 +1,121 @@
+<script setup lang="ts">
+import { reactive, ref } from "vue";
+import CapitalModal from "./capital-modal.vue";
+import BasicDescriptions from "/@/components/BasicDescriptions";
+import { capital_detail_columns } from "../../config/configs";
+import { httpTradeDetail } from "/@/api/InvoiceSales/refund";
+import { httpAdd } from "/@/api/InvoiceSales/refund";
+import { useResponseHandle } from "/@/hooks";
+import { ElForm } from "element-plus";
+import { useRouter } from "vue-router";
+
+const capitalModalRef = ref<InstanceType<typeof CapitalModal>>(null);
+const capitalDetail = ref<Record<string, string | null>>(null);
+const formRef = ref<InstanceType<typeof ElForm>>(null);
+const responseHandle = useResponseHandle();
+const { push } = useRouter();
+const loading = ref(false);
+
+const formData = reactive({
+  logNo: "",
+  type: "",
+  return_reason: "",
+  remark: ""
+});
+
+const rules = {
+  logNo: [{ required: true, trigger: "change", message: "请选择一笔资金" }],
+  type: [{ required: true, trigger: "change", message: "请选择申请类型" }],
+  return_reason: [
+    { required: true, trigger: "change", message: "请输入退款原因" }
+  ],
+  remark: [{ required: true, trigger: "change", message: "请输入备注" }]
+};
+
+async function requesetCapitalDetail(logNo) {
+  loading.value = true;
+  const { code, message, data } = await httpTradeDetail({
+    logNo
+  });
+
+  responseHandle({
+    code,
+    message,
+    handler: function () {
+      capitalDetail.value = data;
+      formData.logNo = data.logNo;
+      formRef.value.validateField("logNo");
+    }
+  });
+  loading.value = false;
+}
+
+function handleCreate() {
+  formRef.value.validate(async isVaild => {
+    if (!isVaild) return;
+
+    const { code, message } = await httpAdd(formData);
+
+    responseHandle({
+      code,
+      message,
+      handler: () => push("/InvoiceSales/refund")
+    });
+  });
+}
+</script>
+<template>
+  <h1 text-xl font-bold mb-2>创建退款申请</h1>
+
+  <el-form
+    :rules="rules"
+    :model="formData"
+    ref="formRef"
+    size="small"
+    label-width="100px"
+  >
+    <el-form-item label="资金认领" prop="logNo">
+      <div flex justify-end w-full mb-2>
+        <el-button
+          size="small"
+          type="primary"
+          @click="() => capitalModalRef.onDisplay()"
+          >选择</el-button
+        >
+      </div>
+
+      <BasicDescriptions
+        w-full
+        v-loading="loading"
+        v-if="capitalDetail"
+        :data="capitalDetail"
+        :col-number="2"
+        :columns="capital_detail_columns"
+      />
+    </el-form-item>
+
+    <el-form-item label="申请类型" prop="type">
+      <el-select v-model="formData.type" placeholder="请选择申请类型" w-380px>
+        <el-option value="1" label="退款" />
+        <el-option value="2" label="解除资金认领" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="退款原因" prop="return_reason" w-480px>
+      <el-input v-model="formData.return_reason" placeholder="请输入退款原因" />
+    </el-form-item>
+
+    <el-form-item label="备注" prop="remark" w-480px>
+      <el-input v-model="formData.remark" placeholder="请输入备注" />
+    </el-form-item>
+
+    <div flex w-full justify-end>
+      <el-button type="primary" @click="handleCreate">保存</el-button>
+    </div>
+  </el-form>
+
+  <CapitalModal
+    ref="capitalModalRef"
+    @on-add-order="({ logNo }) => requesetCapitalDetail(logNo)"
+  />
+</template>

+ 0 - 293
src/views/InvoiceSales/refund/components/examStatusForm.vue

@@ -1,293 +0,0 @@
-<script setup lang="ts">
-import { FormRules, ElForm } from "element-plus";
-import { reactive, ref } from "vue";
-import { httpUpdate, httpAdd } from "/@/api/system/menuOperator";
-import { responseHandle } from "/@/utils/responseHandle";
-import { useNav } from "/@/layout/hooks/nav";
-import { IMenuTree } from "../types";
-import { open_type_list, menuPrivateList } from "../status";
-enum FROM_TYPE {
-  create = "create",
-  edit = "edit",
-  view = "view"
-}
-const { logout } = useNav();
-const showModel = ref(false);
-const currentMenuId = ref("");
-const formRef = ref<InstanceType<typeof ElForm>>(null);
-const currentNode = ref<IMenuTree | null>(null);
-const loading = ref(false);
-const barCodeInput = ref("");
-const emit = defineEmits(["reload"]);
-interface formtype {
-  invNo?: string;
-  status?: string;
-  open_type?: string;
-  remark?: string;
-  invCode?: string;
-  invNum?: string;
-  open_date?: string;
-  total_fee?: string;
-  subtotal_fee?: string;
-}
-const initform = {
-  invNo: "",
-  status: "1",
-  open_type: "",
-  remark: "",
-  invCode: "",
-  invNum: "1",
-  open_date: "",
-  total_fee: "",
-  input_type: "1",
-  subtotal_fee: "1"
-};
-const ruleForm = reactive<Record<string, any>>({
-  ...initform
-});
-const rules = reactive<FormRules>({
-  status: [
-    {
-      required: true,
-      message: "请选择审核状态",
-      trigger: "change"
-    }
-  ],
-  open_type: [
-    {
-      required: true,
-      message: "请选择开票类型",
-      trigger: "change"
-    }
-  ],
-  remark: [
-    {
-      required: true,
-      message: "请输入审核备注",
-      trigger: "blur"
-    }
-  ],
-
-  invCode: [
-    {
-      required: true,
-      message: "请输入发票编号",
-      trigger: "blur"
-    }
-  ],
-  invNum: [
-    {
-      required: true,
-      message: "请输入发票代码",
-      trigger: "change"
-    }
-  ],
-  open_date: [
-    {
-      required: true,
-      message: "请选择开票日期",
-      trigger: "change"
-    }
-  ],
-  total_fee: [
-    {
-      required: true,
-      message: "请输入税后金额",
-      trigger: "blur"
-    }
-  ],
-
-  subtotal_fee: [
-    {
-      required: true,
-      message: "请输入税前金额",
-      trigger: "blur"
-    }
-  ]
-});
-
-function show(node: any, id: string, isCreate: string) {
-  console.log(initform);
-  currentNode.value = node;
-  Object.keys(ruleForm.value).forEach(key => {
-    console.log(isCreate === "create");
-    if (key == "private") {
-      ruleForm.value[key] = isCreate === "create" ? "1" : node["is_private"];
-    } else {
-      ruleForm.value[key] = isCreate === "create" ? initform[key] : node[key];
-    }
-  });
-  if (id !== "" && isCreate === "create") {
-    ruleForm.value.pid = id;
-  }
-
-  menu_type_change();
-  showModel.value = true;
-}
-
-function handleUpdate() {
-  const data = {
-    ...ruleForm.value
-  };
-
-  return {
-    data,
-    api: httpUpdate
-  };
-}
-
-function handleCreate() {
-  const data = {
-    ...ruleForm.value
-  };
-
-  return {
-    data,
-    api: httpAdd
-  };
-}
-
-function handleSave() {
-  formRef.value.validate(async vaild => {
-    if (vaild) {
-      if (loading.value) return;
-      const handler =
-        TYPE.value === FROM_TYPE.create ? handleCreate : handleUpdate;
-
-      loading.value = true;
-      const { api, data } = handler();
-      const { message, code } = await api(data);
-
-      responseHandle({
-        code,
-        message,
-        logout,
-        handler: () => {
-          showModel.value = false;
-          loading.value = false;
-          emit("reload");
-        }
-      });
-    }
-  });
-}
-function menu_type_change() {
-  // const { menu_type } = ruleForm.value;
-  // rules.menu_url[0].required = menu_type === "2";
-}
-
-defineExpose({
-  show,
-  changeCurrentMenuId: (id: string) => (currentMenuId.value = id)
-});
-</script>
-
-<template>
-  <div>
-    <el-form
-      v-loading="loading"
-      ref="formRef"
-      :model="ruleForm"
-      :rules="rules"
-      label-width="90px"
-      style="margin-top: -10px"
-      class="demo-ruleForm"
-      status-icon
-    >
-      <el-row>
-        <el-col :span="8">
-          <el-form-item label="审核状态" prop="status">
-            <el-input v-model="ruleForm.status" placeholder="菜单名称" />
-          </el-form-item>
-          <el-form-item label="开票类型" prop="open_type">
-            <el-select
-              v-model="ruleForm.open_type"
-              style="width: 100%"
-              @change="menu_type_change"
-              placeholder="菜单类型"
-            >
-              <el-option
-                v-for="(si, sii) in open_type_list"
-                :key="'type' + si.value + sii"
-                :label="si.label"
-                :value="si.value"
-              />
-            </el-select> </el-form-item
-        ></el-col>
-
-        <el-col :span="16">
-          <el-form-item label="审核备注" prop="remark">
-            <el-input
-              v-model="ruleForm.remark"
-              :rows="3"
-              type="textarea"
-              maxlength="2000"
-              placeholder="申请备注"
-            /> </el-form-item
-        ></el-col>
-        <el-col :span="6">
-          <el-form-item label="输入类型" prop="menu_route">
-            <el-select
-              v-model="ruleForm.open_type"
-              style="width: 100%"
-              @change="menu_type_change"
-              placeholder="菜单类型"
-            >
-              <el-option
-                v-for="(si, sii) in open_type_list"
-                :key="'type' + si.value + sii"
-                :label="si.label"
-                :value="si.value"
-              /> </el-select></el-form-item
-        ></el-col>
-        <el-col :span="12">
-          <el-form-item label="页面显示" prop="private">
-            <el-radio-group
-              v-model="ruleForm.private"
-              :disabled="TYPE === 'view'"
-            >
-              <el-radio
-                v-for="(si, sii) in menuPrivateList"
-                :key="si.value + sii"
-                :label="si.value"
-                :value="si.value"
-                >{{ si.label }}</el-radio
-              >
-            </el-radio-group>
-          </el-form-item></el-col
-        >
-
-        <el-col :span="24" v-show="ruleForm.menu_type === '2'">
-          <el-form-item label="页面地址" prop="menu_url">
-            <el-input
-              v-model="ruleForm.menu_url"
-              placeholder="页面地址"
-              :disabled="TYPE === 'view'"
-            >
-              <template #prepend>views/</template>
-              <template #append>.vue</template></el-input
-            >
-          </el-form-item></el-col
-        >
-
-        <el-col :span="12">
-          <el-form-item label="排序权重" prop="weight">
-            <el-input-number
-              v-model="ruleForm.weight"
-              :precision="0"
-              style="width: 100%"
-              :min="1"
-              :max="999"
-              :disabled="TYPE === 'view'"
-            /> </el-form-item
-        ></el-col>
-      </el-row>
-      <div class="flex justify-end">
-        <el-button :loading="loading" type="primary" @click="handleSave"
-          >保存</el-button
-        >
-        <el-button @click="showModel = false">取消</el-button>
-      </div>
-    </el-form>
-  </div>
-</template>

+ 0 - 480
src/views/InvoiceSales/refund/components/invoiceShow.vue

@@ -1,480 +0,0 @@
-<script setup lang="ts">
-import { reactive, ref } from "vue";
-import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
-
-interface Buyer {
-  title?: string;
-  apis?: string;
-  columns?: any;
-  notReuqiredInit?: boolean;
-  notPagination?: boolean;
-  statusProp?: string;
-  deleteProp?: string;
-  isTree?: boolean;
-}
-interface Seller {
-  title?: string;
-  apis?: string;
-  columns?: any;
-  notReuqiredInit?: boolean;
-  notPagination?: boolean;
-  statusProp?: string;
-  deleteProp?: string;
-  isTree?: boolean;
-}
-interface invoiceConfig {
-  title?: string;
-  apis?: string;
-  columns?: any;
-  notReuqiredInit?: boolean;
-  notPagination?: boolean;
-  statusProp?: string;
-  deleteProp?: string;
-  isTree?: boolean;
-}
-
-const BuyerItem = reactive<Record<string, any>>({
-  title: ""
-});
-const SellerItem = reactive<Record<string, any>>({
-  title: ""
-});
-const configItem = reactive<Record<string, any>>({
-  title: ""
-});
-const orderList = ref([]);
-const showHeader = ref(false);
-function show(
-  Buyer: Buyer,
-  Seller: Seller,
-  order: object[],
-  invoiceConfig: invoiceConfig
-) {
-  Object.keys(BuyerItem.value).forEach(key => {
-    BuyerItem.value[key] = Buyer[key] ?? "";
-  });
-  Object.keys(SellerItem.value).forEach(key => {
-    SellerItem.value[key] = Seller[key] ?? "";
-  });
-  Object.keys(configItem.value).forEach(key => {
-    configItem.value[key] = invoiceConfig[key] ?? "";
-  });
-  orderList.value = [];
-  orderList.value.push(...order);
-}
-
-function money(n) {
-  if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)) {
-    return "";
-  }
-
-  let unit = "仟佰拾亿仟佰拾万仟佰拾圆角分",
-    str = "";
-  n += "00";
-  let p = n.indexOf(".");
-  if (p >= 0) n = n.substring(0, p) + n.substr(p + 1, 2);
-
-  unit = unit.substr(unit.length - n.length);
-
-  for (let i = 0; i < n.length; i++)
-    str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);
-  return str
-    .replace(/零(仟|佰|拾|角)/g, "零")
-    .replace(/(零)+/g, "零")
-    .replace(/零(万|亿|圆)/g, "$1")
-    .replace(/(亿)万|壹(拾)/g, "$1$2")
-    .replace(/^圆零?|零分/g, "")
-    .replace(/圆$/g, "圆整");
-}
-
-function editItem() {}
-
-defineExpose({
-  show
-});
-</script>
-
-<template>
-  <div class="InvoiceTmpDiv">
-    <el-row v-if="showHeader">
-      <el-col :span="12" :offset="6" class="title no-border"
-        >XX市增值税XX票XX发票</el-col
-      >
-      <el-col :span="6" class="extra no-border">
-        <div>
-          <span class="label title-label">发票代码</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label title-label">发票号码</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label title-label">开票日期</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label title-label">校验码</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-      </el-col>
-    </el-row>
-    <el-row class="row height84">
-      <el-col :span="1" class="no-border">
-        <ul class="tc">
-          <li>购</li>
-          <li>买</li>
-          <li>方</li>
-        </ul>
-      </el-col>
-      <el-col :span="15">
-        <div>
-          <span class="label">名称</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label">纳税人识别号</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label">地址、电话</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label">开户行及账号</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-      </el-col>
-      <el-col :span="1">
-        <ul class="tc">
-          <li>密</li>
-          <li>码</li>
-          <li>区</li>
-        </ul></el-col
-      >
-      <el-col :span="7">
-        <el-button
-          class="fr"
-          type="primary"
-          :icon="useRenderIcon('eye-view')"
-          @click="editItem()"
-        >
-          查看销售订单详情
-        </el-button>
-      </el-col>
-    </el-row>
-    <div class="row-div">
-      <el-row>
-        <el-col :span="8" class="no-border">
-          <div class="tc">货物或应税劳务、服务名称</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">规格型号</div>
-        </el-col>
-        <el-col :span="1">
-          <div class="tc">单位</div>
-        </el-col>
-        <el-col :span="2">
-          <div class="tc">数量</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">单价</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">金额</div>
-        </el-col>
-        <el-col :span="1">
-          <div class="tc">税率</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">税额</div>
-        </el-col>
-      </el-row>
-      <el-row v-for="(si, sii) in orderList" :key="sii + si">
-        <el-col :span="8" class="no-border">
-          <div class="tc">{{ si[1] }}</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">{{ si[2] }}</div>
-        </el-col>
-        <el-col :span="1">
-          <div class="tc">{{ si[3] }}</div>
-        </el-col>
-        <el-col :span="2">
-          <div class="tc">{{ si[4] }}</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">{{ si[5] }}</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">{{ si[6] }}</div>
-        </el-col>
-        <el-col :span="1">
-          <div class="tc">{{ si[7] }}</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">{{ si[8] }}</div>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="8" class="no-border">
-          <div class="tc">合计</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-        <el-col :span="1">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-        <el-col :span="2">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-        <el-col :span="1">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-        <el-col :span="3">
-          <div class="tc">&nbsp;</div>
-        </el-col>
-      </el-row>
-    </div>
-    <el-row class="row con">
-      <el-col :span="8" class="no-border tc">价税合计(大写)</el-col>
-      <el-col :span="9" class="no-border tl">{{ money(num) }}</el-col>
-      <el-col :span="7" class="no-border tc"
-        >(小写)<span>¥ 111</span></el-col
-      >
-    </el-row>
-    <el-row class="row height84">
-      <el-col :span="1" class="no-border">
-        <ul class="tc">
-          <li>销</li>
-          <li>售</li>
-          <li>方</li>
-        </ul>
-      </el-col>
-      <el-col :span="15">
-        <div>
-          <span class="label">名称</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label">纳税人识别号</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label">地址、电话</span>:<span class="content"
-            >xxxxxxxxxxxxxxxx</span
-          >
-        </div>
-        <div>
-          <span class="label">开户行及账号</span>:<span class="content">{{
-            configItem.title
-          }}</span>
-        </div>
-      </el-col>
-      <el-col :span="1">
-        <ul class="tc">
-          <li>备</li>
-          <li>&nbsp;</li>
-          <li>注</li>
-        </ul>
-      </el-col>
-      <el-col :span="7"> {{}} </el-col>
-    </el-row>
-    <el-row class="last-row">
-      <el-col :span="6" class="no-border">
-        <span>收款人:</span>
-        <span class="content">{{ configItem.title }}</span>
-      </el-col>
-      <el-col :span="6" class="no-border">
-        <span>复核:</span>
-        <span class="content">{{ configItem.title }}</span>
-      </el-col>
-      <el-col :span="6" class="no-border">
-        <span>开票人:</span>
-        <span class="content">{{ configItem.title }}</span>
-      </el-col>
-      <el-col :span="5" class="no-border">
-        <span>销售方:(章)</span>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-<style lang="scss" scoped>
-.InvoiceTmpDiv {
-  font-size: 12px;
-  width: 100%;
-  .title {
-    font-size: 26px;
-    color: #b16363;
-    text-align: center;
-    line-height: 56px;
-  }
-  .extra {
-    color: #b15b16;
-    padding: 0 0 6px 0;
-    div {
-      line-height: 18px;
-    }
-    .content {
-      color: #181818;
-    }
-  }
-  .height84 {
-    [class*="el-col-"] {
-      border-right: 1px solid #b16363;
-      &:last-child {
-        border-right: 0px;
-      }
-    }
-    ul {
-      padding: 15px 0;
-      // border-right: 1px solid #b16363;
-      li {
-        height: 20px;
-        line-height: 20px;
-      }
-    }
-    .el-col-15 {
-      padding: 5px 10px;
-      div {
-        line-height: 20px;
-      }
-    }
-    .el-col-7 {
-      padding: 5px 10px;
-      line-height: 20px;
-    }
-  }
-  .row {
-    border: 1px solid #b16363;
-    border-bottom: none;
-    color: #b15b16;
-    &.con {
-      padding: 5px 0;
-      line-height: 22px;
-    }
-    .content {
-      color: #181818;
-    }
-    .col_1 {
-      width: 4.16%;
-    }
-    .col_2 {
-      width: 8.33%;
-    }
-    .col_3 {
-      width: 12.5%;
-    }
-    .col_5 {
-      width: 20.83%;
-    }
-    .col_6 {
-      width: 25%;
-    }
-    .col_7 {
-      width: 29.16%;
-    }
-    .col_8 {
-      width: 33.33%;
-    }
-    .col_14 {
-      width: 58.33%;
-    }
-    .col_15 {
-      width: 62.5%;
-    }
-    .col_17 {
-      width: 70.83%;
-    }
-    .col_18 {
-      width: 75%;
-    }
-    .col_24 {
-      width: 100%;
-    }
-    .col_1,
-    .col_2,
-    .col_3,
-    .col_4,
-    .col_5,
-    .col_6,
-    .col_7,
-    .col_8,
-    .col_14,
-    .col_15,
-    .col_17,
-    .col_18,
-    .col_24 {
-      display: inline-block;
-      padding: 8px;
-      box-sizing: border-box;
-      vertical-align: middle;
-      border-left: 1px solid #b16363;
-      height: 100%;
-      &.no-border {
-        border-left: none;
-      }
-    }
-  }
-  .row-div {
-    border: 1px solid #b16363;
-    // padding:7px 0;
-    border-bottom: 0px;
-    [class*="el-col-"] {
-      padding: 4px 0;
-      line-height: 22px;
-      border-right: 1px solid #b16363;
-      &:last-child {
-        border-right: 0px;
-      }
-    }
-    .el-row {
-      &:first-child {
-        [class*="el-col-"] {
-          padding-top: 8px;
-        }
-      }
-      &:last-child {
-        [class*="el-col-"] {
-          padding-bottom: 10px;
-        }
-      }
-    }
-  }
-
-  .last-row {
-    padding: 6px 0 0 0;
-    .content {
-      color: #181818;
-    }
-    color: #b15b16;
-    border-top: 1px solid #b16363;
-  }
-  .label {
-    width: 78px;
-    display: inline-block;
-    text-align-last: justify;
-    text-align: justify;
-  }
-  .title-label {
-    width: 52px;
-  }
-}
-</style>

+ 0 - 287
src/views/InvoiceSales/refund/components/logisticsForm.vue

@@ -1,287 +0,0 @@
-<script setup lang="ts">
-import { FormRules, ElForm } from "element-plus";
-import { reactive, ref } from "vue";
-import { httpUpdate, httpAdd } from "/@/api/system/menuOperator";
-import { responseHandle } from "/@/utils/responseHandle";
-import { useNav } from "/@/layout/hooks/nav";
-import { IMenuTree } from "../types";
-import { menuTypeList, menuPrivateList } from "/@/utils/status";
-import { IconSelect } from "/@/components/ReIcon";
-enum FROM_TYPE {
-  create = "create",
-  edit = "edit",
-  view = "view"
-}
-const { logout } = useNav();
-const showModel = ref(false);
-const currentMenuId = ref("");
-const TYPE = ref<FROM_TYPE>(FROM_TYPE.create);
-const formRef = ref<InstanceType<typeof ElForm>>(null);
-const currentNode = ref<IMenuTree | null>(null);
-const loading = ref(false);
-const titleType = ref("");
-
-const emit = defineEmits(["reload"]);
-const initform = {
-  menu_name: "",
-  menu_type: "1",
-  menu_img: "",
-  menu_route: "",
-  menu_url: "",
-  private: "1",
-  weight: "1",
-  pid: "",
-  id: ""
-};
-const ruleForm = ref({ ...initform });
-const rules = reactive<FormRules>({
-  menu_name: [
-    { required: true, message: "请输入菜单名称", trigger: "blur" },
-    { min: 1, max: 10, message: "长度在 1 到 10 个字符", trigger: "blur" }
-  ],
-  menu_type: [
-    {
-      required: true,
-      message: "请选择菜单类型",
-      trigger: "change"
-    }
-  ],
-  menu_img: [
-    {
-      required: true,
-      message: "请选择菜单图标",
-      trigger: "change"
-    }
-  ],
-  menu_route: [
-    {
-      required: true,
-      message: "请输入菜单路由",
-      trigger: "blur"
-    },
-    { min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" }
-  ],
-
-  menu_url: [
-    {
-      required: true,
-      message: "请输入文件地址",
-      trigger: "blur"
-    },
-    { min: 1, max: 100, message: "长度在 1 到 100 个字符", trigger: "blur" }
-  ],
-  private: [
-    {
-      required: true,
-      message: "请选择页面是否显示",
-      trigger: "change"
-    }
-  ],
-  weight: [
-    {
-      required: true,
-      message: "请输入排序权重",
-      trigger: "blur"
-    }
-  ]
-});
-
-function show(node: any, id: string, isCreate: string) {
-  console.log(initform);
-  currentNode.value = node;
-  Object.keys(ruleForm.value).forEach(key => {
-    console.log(isCreate === "create");
-    if (key == "private") {
-      ruleForm.value[key] = isCreate === "create" ? "1" : node["is_private"];
-    } else {
-      ruleForm.value[key] = isCreate === "create" ? initform[key] : node[key];
-    }
-  });
-  if (id !== "" && isCreate === "create") {
-    ruleForm.value.pid = id;
-  }
-  TYPE.value = isCreate;
-  switch (TYPE.value) {
-    case "create":
-      titleType.value = "新建菜单";
-      break;
-    case "edit":
-      titleType.value = "编辑菜单";
-      break;
-    case "view":
-      titleType.value = "菜单详情";
-      break;
-    default:
-      titleType.value = "新建菜单";
-  }
-  menu_type_change();
-  showModel.value = true;
-}
-
-function handleUpdate() {
-  const data = {
-    ...ruleForm.value
-  };
-
-  return {
-    data,
-    api: httpUpdate
-  };
-}
-
-function handleCreate() {
-  const data = {
-    ...ruleForm.value
-  };
-
-  return {
-    data,
-    api: httpAdd
-  };
-}
-
-function handleSave() {
-  formRef.value.validate(async vaild => {
-    if (vaild) {
-      if (loading.value) return;
-      const handler =
-        TYPE.value === FROM_TYPE.create ? handleCreate : handleUpdate;
-
-      loading.value = true;
-      const { api, data } = handler();
-      const { message, code } = await api(data);
-
-      responseHandle({
-        code,
-        message,
-        logout,
-        handler: () => {
-          showModel.value = false;
-          loading.value = false;
-          emit("reload");
-        }
-      });
-    }
-  });
-}
-function menu_type_change() {
-  const { menu_type } = ruleForm.value;
-  rules.menu_url[0].required = menu_type === "2";
-}
-
-defineExpose({
-  show,
-  changeCurrentMenuId: (id: string) => (currentMenuId.value = id)
-});
-</script>
-
-<template>
-  <div>
-    <el-dialog
-      v-model="showModel"
-      :close-on-press-escape="false"
-      center
-      append-to-body
-      destroy-on-close
-      :width="'700px'"
-      :title="titleType"
-      v-loading="loading"
-    >
-      <el-form
-        ref="formRef"
-        :model="ruleForm"
-        :rules="rules"
-        label-width="90px"
-        style="margin-top: -10px"
-        class="demo-ruleForm"
-        status-icon
-      >
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="菜单名称" prop="menu_name">
-              <el-input
-                v-model="ruleForm.menu_name"
-                :disabled="TYPE === 'view'"
-                placeholder="菜单名称"
-              /> </el-form-item
-          ></el-col>
-          <el-col :span="12">
-            <el-form-item label="菜单类型" prop="menu_type">
-              <el-select
-                v-model="ruleForm.menu_type"
-                style="width: 100%"
-                @change="menu_type_change"
-                :disabled="TYPE === 'view'"
-                placeholder="菜单类型"
-              >
-                <el-option
-                  v-for="(si, sii) in menuTypeList"
-                  :key="'type' + si.value + sii"
-                  :label="si.label"
-                  :value="si.value"
-                />
-              </el-select> </el-form-item
-          ></el-col>
-          <el-col :span="12">
-            <el-form-item label="菜单图标" prop="menu_img">
-              <IconSelect v-model="ruleForm.menu_img" /> </el-form-item
-          ></el-col>
-          <el-col :span="12">
-            <el-form-item label="菜单路由" prop="menu_route">
-              <el-input
-                v-model="ruleForm.menu_route"
-                :disabled="TYPE === 'view'"
-                placeholder="菜单路由" /></el-form-item
-          ></el-col>
-          <el-col :span="12">
-            <el-form-item label="页面显示" prop="private">
-              <el-radio-group
-                v-model="ruleForm.private"
-                :disabled="TYPE === 'view'"
-              >
-                <el-radio
-                  v-for="(si, sii) in menuPrivateList"
-                  :key="si.value + sii"
-                  :label="si.value"
-                  :value="si.value"
-                  >{{ si.label }}</el-radio
-                >
-              </el-radio-group>
-            </el-form-item></el-col
-          >
-
-          <el-col :span="24" v-show="ruleForm.menu_type === '2'">
-            <el-form-item label="页面地址" prop="menu_url">
-              <el-input
-                v-model="ruleForm.menu_url"
-                placeholder="页面地址"
-                :disabled="TYPE === 'view'"
-              >
-                <template #prepend>views/</template>
-                <template #append>.vue</template></el-input
-              >
-            </el-form-item></el-col
-          >
-
-          <el-col :span="12">
-            <el-form-item label="排序权重" prop="weight">
-              <el-input-number
-                v-model="ruleForm.weight"
-                :precision="0"
-                style="width: 100%"
-                :min="1"
-                :max="999"
-                :disabled="TYPE === 'view'"
-              /> </el-form-item
-          ></el-col>
-        </el-row>
-        <div class="flex justify-end">
-          <el-button :loading="loading" type="primary" @click="handleSave"
-            >保存</el-button
-          >
-          <el-button @click="showModel = false">取消</el-button>
-        </div>
-      </el-form>
-    </el-dialog>
-  </div>
-</template>

+ 15 - 0
src/views/InvoiceSales/refund/components/refund-detail/index.vue

@@ -0,0 +1,15 @@
+<script setup lang="ts">
+import BasicDescriptions from "/@/components/BasicDescriptions";
+import { refund_detail_columns } from "../../config/configs";
+
+defineProps<{
+  detail: any;
+}>();
+</script>
+<template>
+  <BasicDescriptions
+    :data="detail"
+    :col-number="3"
+    :columns="refund_detail_columns"
+  />
+</template>

+ 0 - 20
src/views/InvoiceSales/refund/components/viewDescriptions.vue

@@ -1,20 +0,0 @@
-<script setup lang="ts">
-import { useNav } from "/@/layout/hooks/nav";
-
-enum FROM_TYPE {
-  create = "create",
-  edit = "edit",
-  view = "view"
-}
-const { logout } = useNav();
-</script>
-
-<template>
-  <el-descriptions :column="1" border>
-    <!-- <template v-for="(item, index) in config.formItems" :key="index">
-      <el-descriptions-item :label="item.label" align="center">{{
-        defaultInfo[item.field]
-      }}</el-descriptions-item>
-    </template> -->
-  </el-descriptions>
-</template>

+ 192 - 0
src/views/InvoiceSales/refund/config/configs.ts

@@ -0,0 +1,192 @@
+import { ElTag } from "element-plus";
+import { h } from "vue";
+import { DescriptionColumns } from "/@/components/BasicDescriptions";
+export const capital_columns = [
+  {
+    label: "资金编号",
+    prop: "tradNo"
+  },
+  {
+    label: "资金认领编号",
+    prop: "logNo"
+  },
+  {
+    label: "交易时间",
+    prop: "trade_time"
+  },
+  {
+    label: "认领资金总金额",
+    width: "160px",
+    prop: "total_fee"
+  },
+  {
+    label: "申请人",
+    prop: "apply_name"
+  },
+  {
+    label: "认领时间",
+    prop: "addtime"
+  }
+];
+
+//资金详情列数据
+export const capital_detail_columns: DescriptionColumns = [
+  {
+    label: "资金编号",
+    field: "tradNo"
+  },
+  {
+    label: "资金认领编号",
+    field: "logNo"
+  },
+  {
+    label: "交易时间",
+    field: "trade_time"
+  },
+  {
+    label: "认领资金总金额",
+    field: "total_fee"
+  },
+  {
+    label: "申请人",
+    field: "apply_name"
+  },
+  {
+    label: "付款公司",
+    field: "trade_out"
+  },
+  {
+    label: "收款公司",
+    field: "trade_in"
+  },
+  {
+    label: "银行",
+    field: "trade_bank"
+  },
+  {
+    label: "资金余额",
+    field: "balance"
+  },
+  {
+    label: "资金使用金额",
+    field: "used_fee"
+  }
+];
+
+//资金退款列数据
+export const refund_detail_columns: DescriptionColumns = [
+  {
+    label: "退款编号",
+    field: "returnCode"
+  },
+  {
+    label: "资金认领编号",
+    field: "logNo"
+  },
+  {
+    label: "资金编号",
+    field: "tradNo"
+  },
+  {
+    label: "退款类型",
+    field: "type",
+    render(type) {
+      return h(ElTag, null, {
+        default: () => return_type.find(t => t.value === type)?.label
+      });
+    }
+  },
+  {
+    label: "申请人",
+    field: "apply_name"
+  },
+  {
+    label: "退款原因",
+    field: "return_reason"
+  },
+  {
+    label: "付款公司",
+    field: "trade_out"
+  },
+  {
+    label: "备注",
+    field: "remark"
+  },
+  {
+    label: "退款截图凭证",
+    field: "return_img"
+  },
+  {
+    label: "退款状态",
+    field: "status",
+    render(status) {
+      return h(ElTag, null, {
+        default: () => return_status.find(s => s.value === status)?.label
+      });
+    }
+  },
+  {
+    label: "退款时间",
+    field: "addtime"
+  },
+  {
+    label: "交易公司",
+    field: "trade_out"
+  },
+  {
+    label: "收款公司",
+    field: "trade_in"
+  },
+  {
+    label: "交易银行",
+    field: "trade_bank"
+  },
+  {
+    label: "总金额",
+    field: "total_fee"
+  },
+  {
+    label: "余额",
+    field: "balance"
+  },
+  {
+    label: "已认领金额",
+    field: "used_fee"
+  },
+  {
+    label: "认领金额",
+    field: "log_total_fee"
+  },
+  {
+    label: "认领申请人",
+    field: "log_apply_id"
+  }
+];
+
+//退款类型
+export const return_type = [
+  {
+    value: "1",
+    label: "退款"
+  },
+  {
+    value: "2",
+    label: "资金认领解除"
+  }
+];
+
+//退款状态
+export const return_status = [
+  {
+    value: "0",
+    label: "待审核"
+  },
+  {
+    value: "1",
+    label: "财务审核"
+  },
+  {
+    value: "2",
+    label: "财务驳回"
+  }
+];

+ 76 - 0
src/views/InvoiceSales/refund/config/content.config.ts

@@ -0,0 +1,76 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpList } from "/@/api/InvoiceSales/refund";
+
+import dayjs from "dayjs";
+import { ElTag } from "element-plus";
+import { h } from "vue";
+import { return_status } from "./configs";
+
+const columns = [
+  {
+    type: "selection",
+    width: 55,
+    hide: ({ checkList }) => !checkList.includes("勾选列")
+  },
+  {
+    label: "序号",
+    type: "index",
+    width: 70,
+    hide: ({ checkList }) => !checkList.includes("序号列")
+  },
+  {
+    label: "退款编号",
+    prop: "returnCode"
+  },
+  {
+    label: "资金编号",
+    prop: "tradNo"
+  },
+  {
+    label: "资金认领编号",
+    prop: "logNo"
+  },
+  {
+    label: "退款回执",
+    prop: "return_img"
+  },
+  {
+    label: "退款原因",
+    prop: "return_reason"
+  },
+  {
+    label: "申请人",
+    prop: "apply_name"
+  },
+  {
+    label: "状态",
+    prop: "status",
+    cellRenderer: ({ row }) => {
+      return h(ElTag, null, {
+        default: () => return_status.find(s => s.value === row.status)?.label
+      });
+    }
+  },
+  {
+    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: "退款申请管理",
+  powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
+  columns,
+  apis: {
+    httpList
+  }
+};
+
+export default contentConfig;

+ 36 - 0
src/views/InvoiceSales/refund/config/search.config.ts

@@ -0,0 +1,36 @@
+import { return_status, return_type } from "./configs";
+import { FormConfig } from "/@/components/PageSearch";
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "tradNo",
+      type: "input",
+      placeholder: "资金编号"
+    },
+    {
+      field: "logNo",
+      type: "input",
+      placeholder: "资金认领编号"
+    },
+    {
+      field: "returnCode",
+      type: "input",
+      placeholder: "退款编号"
+    },
+    {
+      field: "type",
+      type: "select",
+      placeholder: "退款类型",
+      options: return_type
+    },
+    {
+      field: "status",
+      type: "select",
+      placeholder: "退款状态",
+      options: return_status
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 63 - 101
src/views/InvoiceSales/refund/detail.vue

@@ -1,125 +1,87 @@
 <script setup lang="ts">
-import { useColumns } from "./columns";
-import { httpList } from "/@/api/InvoiceSales/refund";
-import { reactive, ref, onMounted } from "vue";
+import { computed, onMounted, ref } from "vue";
+import { useRoute, useRouter } from "vue-router";
+import CreateRefund from "./components/create-refund/index.vue";
+import RefundDetail from "./components/refund-detail/index.vue";
+import { httpDetail } from "/@/api/InvoiceSales/refund";
+import { approval_process } from "./components/approval-process";
+import { useResponseHandle } from "/@/hooks";
 
-import { TableProBar } from "/@/components/ReTable";
-import { type PaginationProps } from "@pureadmin/table";
-import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
-import { useNav } from "/@/layout/hooks/nav";
-import { statusList, inv_type_list } from "./status";
-import { useRouter } from "vue-router";
-import { responseHandle } from "/@/utils/responseHandle";
-import addEditForm from "./components/addEditForm.vue";
-import examStatusForm from "./components/examStatusForm.vue";
-const { logout } = useNav();
-defineOptions({
-  name: "InvoiceApplyDetail"
-});
-
-const initform = {
-  buy_id: "", //客户公司
-  companyNo: "", //业务企业公司
-  khNo: "", //申请人
-  invtype: "",
-  email: "",
-  remark: "",
-  orderArr: []
-};
-const id = ref("");
-const form = reactive({ ...initform });
-const startDisabledDate = (time: Date) => {
-  const { end } = form;
-  if (end ?? "") {
-    return time.getTime() > Date.now(end).valueOf();
-  }
-};
-const endDisabledDate = (time: Date) => {
-  const { start } = form;
-  if (start ?? "") {
-    return time.getTime() < Date.now(start).valueOf();
-  }
-};
+const { query } = useRoute();
 const { push } = useRouter();
-const dataList = ref([]);
-const loading = ref(false);
-const { columns } = useColumns();
 
-const pagination = reactive<PaginationProps>({
-  total: 0,
-  pageSize: 15,
-  currentPage: 1,
-  background: true
+const returnCode = computed(() => query.id);
+const collapses = ref(["1", "2"]);
+
+const isCreate = computed(() => !returnCode.value);
+const refundDetail = ref<Record<string, string>>({});
+const responseHandle = useResponseHandle();
+const currentProcess = computed(() => {
+  const { status } = refundDetail.value;
+  return approval_process[status];
 });
 
-async function handleCurrentChange(val: number) {
-  form.page = val;
-  await onSearch();
-}
+async function requesetRefundDetail() {
+  const { code, message, data } = await httpDetail({
+    returnCode: returnCode.value
+  });
 
-async function handleSizeChange(val: number) {
-  form.size = val;
-  form.page = 1;
-  await onSearch();
+  responseHandle({
+    code,
+    message,
+    handler: () => (refundDetail.value = data)
+  });
 }
 
-function handleSelectionChange(val) {
-  console.log("handleSelectionChange", val);
-}
+async function requesetRefundStatus(otherParmas) {
+  const { code, message } = await httpDetail({
+    returnCode: returnCode.value,
+    ...otherParmas
+  });
 
-async function onSearch() {
-  if (loading.value) return;
-  loading.value = true;
-  const { code, data, message } = await httpList(form);
   responseHandle({
     code,
     message,
-    logout,
-    handler: () => {
-      const { list, count } = data;
-      dataList.value = list ?? [];
-      pagination.total = count ?? 0;
-      pagination.pageSize = form.size;
-      pagination.currentPage = form.page;
-    }
+    handler: () => push("/InvoiceSales/refund")
   });
-
-  loading.value = false;
-}
-async function resetSearch() {
-  form.page = 1;
-  await onSearch();
 }
-//新建/详情页面
-function editItem(id) {
-  push({
-    path: "/InvoiceSales/refundDeatil",
-    query: {
-      id
-    }
-  });
-}
-async function resetForm() {
-  Object.keys(form.value).forEach(key => {
-    form.value[key] = initform[key];
-  });
-  await onSearch();
+
+function initalData() {
+  if (isCreate.value) return;
+  requesetRefundDetail();
 }
 
-onMounted(() => {
-  onSearch();
-});
+onMounted(() => initalData());
 </script>
-
 <template>
-  <div class="main bg-white">
-    <addEditForm />
-    <examStatusForm />
+  <div class="refund__content" bg-white>
+    <!-- 创建退款单 -->
+    <CreateRefund v-if="isCreate" />
+
+    <!-- 详情 -->
+    <ElCollapse v-else v-model="collapses">
+      <!-- 退款单详情 -->
+      <ElCollapseItem title="退款单详情" name="1">
+        <RefundDetail :detail="refundDetail" />
+      </ElCollapseItem>
+
+      <!-- 审核 -->
+      <ElCollapseItem
+        name="2"
+        v-if="currentProcess"
+        :title="currentProcess.title"
+      >
+        <component
+          :is="currentProcess.component"
+          @change-status="requesetRefundStatus"
+        />
+      </ElCollapseItem>
+    </ElCollapse>
   </div>
 </template>
 
-<style scoped lang="scss">
-:deep(.el-dropdown-menu__item i) {
-  margin: 0;
+<style lang="scss" scoped>
+.refund__content {
+  padding: 20px !important;
 }
 </style>

+ 30 - 243
src/views/InvoiceSales/refund/index.vue

@@ -1,260 +1,47 @@
 <script setup lang="ts">
-import { useColumns } from "./columns";
-import { httpList } from "/@/api/InvoiceSales/refund";
-import { reactive, ref, onMounted } from "vue";
-import { TableProBar } from "/@/components/ReTable";
-import { type PaginationProps } from "@pureadmin/table";
-import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
-import { useNav } from "/@/layout/hooks/nav";
-import { statusList, inv_type_list } from "./status";
+import { PageSearch, usePageSearch } from "/@/components/PageSearch";
+import { PageContent } from "/@/components/PageContent";
+import searchFormConfig from "./config/search.config";
+import contentConfig from "./config/content.config";
 import { useRouter } from "vue-router";
-import { responseHandle } from "/@/utils/responseHandle";
-const { logout } = useNav();
+
 defineOptions({
-  name: "refund"
+  name: "invoiceheader"
 });
-const initform = {
-  inv_in: "", //客户公司
-  inv_out: "", //业务企业公司
-  apply_name: "", //申请人
-  // apply_id:'',//申请人ID
-  status: "",
-  inv_type: "",
-  start: "",
-  end: "",
-  page: 1,
-  size: 15
-};
 
-const form = reactive({ ...initform });
-const startDisabledDate = (time: Date) => {
-  const { end } = form;
-  if (end ?? "") {
-    return time.getTime() > Date.now(end).valueOf();
-  }
-};
-const endDisabledDate = (time: Date) => {
-  const { start } = form;
-  if (start ?? "") {
-    return time.getTime() < Date.now(start).valueOf();
-  }
-};
 const { push } = useRouter();
-const dataList = ref([]);
-const loading = ref(false);
-const { columns } = useColumns();
-
-const pagination = reactive<PaginationProps>({
-  total: 0,
-  pageSize: 15,
-  currentPage: 1,
-  background: true
-});
-
-async function handleCurrentChange(val: number) {
-  form.page = val;
-  await onSearch();
-}
-
-async function handleSizeChange(val: number) {
-  form.size = val;
-  form.page = 1;
-  await onSearch();
-}
-
-function handleSelectionChange(val) {
-  console.log("handleSelectionChange", val);
-}
-
-async function onSearch() {
-  if (loading.value) return;
-  loading.value = true;
-  const { code, data, message } = await httpList(form);
-  responseHandle({
-    code,
-    message,
-    logout,
-    handler: () => {
-      const { list, count } = data;
-      dataList.value = list ?? [];
-      pagination.total = count ?? 0;
-      pagination.pageSize = form.size;
-      pagination.currentPage = form.page;
-    }
-  });
-
-  loading.value = false;
-}
-async function resetSearch() {
-  form.page = 1;
-  await onSearch();
-}
-//新建/详情页面
-function editItem(id) {
-  push({
-    path: "/InvoiceSales/refundDeatil",
-    query: {
-      id
-    }
-  });
-}
-async function resetForm() {
-  Object.keys(form.value).forEach(key => {
-    form.value[key] = initform[key];
-  });
-  await onSearch();
-}
-
-onMounted(() => {
-  onSearch();
-});
+const { pageContentRef, handleResetClick, handleSearchClick } = usePageSearch();
 </script>
 
 <template>
-  <div class="main">
-    <div class="bg-white p-4">
-      <el-row :gutter="10" class="pb-4">
-        <el-col :span="5">
-          <el-select
-            v-model="form.status"
-            style="width: 100%"
-            placeholder="发票申请状态"
-            clearable
-          >
-            <el-option
-              v-for="(si, sii) in statusList"
-              :key="'status' + si.value + sii"
-              :label="si.label"
-              :value="si.value"
-            />
-          </el-select>
-        </el-col>
-        <el-col :span="5">
-          <el-select
-            v-model="form.inv_type"
-            style="width: 100%"
-            placeholder="发票类型"
-            clearable
-          >
-            <el-option
-              v-for="(si, sii) in inv_type_list"
-              :key="'status' + si.value + sii"
-              :label="si.label"
-              :value="si.value"
-            />
-          </el-select>
-        </el-col>
-        <el-col :span="5">
-          <el-date-picker
-            v-model="form.start"
-            :disabled-date="startDisabledDate"
-            type="date"
-            style="width: 100%"
-            placeholder="申请开始时间"
-          />
-        </el-col>
-        <el-col :span="5">
-          <el-date-picker
-            v-model="form.end"
-            :disabled-date="endDisabledDate"
-            type="date"
-            style="width: 100%"
-            placeholder="申请结束时间"
-          />
-        </el-col>
-        <el-col :span="4">
-          <el-input
-            v-model="form.apply_name"
-            placeholder="申请人"
-            style="width: 100%"
-            clearable
-          />
-        </el-col>
-      </el-row>
-      <el-row :gutter="10">
-        <el-col :span="10">
-          <el-input
-            v-model="form.inv_in"
-            placeholder="企业客户名称"
-            style="width: 100%"
-            clearable
-          />
-        </el-col>
-
-        <el-col :span="10">
-          <el-input
-            v-model="form.inv_out"
-            placeholder="业务企业公司"
-            style="width: 100%"
-            clearable
-          />
-        </el-col>
-        <el-col :span="4">
-          <el-button
-            type="primary"
-            :icon="useRenderIcon('search')"
-            :loading="loading"
-            class="fl"
-            @click="resetSearch"
-          >
-            搜索
-          </el-button>
-          <el-button
-            :icon="useRenderIcon('refresh')"
-            class="fl"
-            @click="resetForm()"
-          >
-            重置
-          </el-button>
-        </el-col>
-      </el-row>
-    </div>
-
-    <TableProBar
-      title="发票申请管理"
-      :loading="loading"
-      :dataList="dataList"
-      @refresh="onSearch"
+  <div class="main role">
+    <PageSearch
+      :form-config="searchFormConfig"
+      @search-btn-click="handleSearchClick"
+      @reset-btn-click="handleResetClick"
+    />
+
+    <PageContent
+      ref="pageContentRef"
+      :content-config="contentConfig"
+      @preview-btn-click="
+        ({ returnCode }) =>
+          push({
+            path: '/InvoiceSales/refundDetail',
+            query: {
+              id: returnCode
+            }
+          })
+      "
     >
-      <template #buttons>
+      <template #create>
         <el-button
           type="primary"
-          :icon="useRenderIcon('add')"
-          @click="editItem('')"
-        >
-          新增发票申请
-        </el-button>
-      </template>
-      <template v-slot="{ size, checkList }">
-        <PureTable
-          border
-          align="left"
-          showOverflowTooltip
-          table-layout="auto"
-          :size="size"
-          :data="dataList"
-          :columns="columns"
-          :checkList="checkList"
-          :pagination="pagination"
-          :paginationSmall="size === 'small' ? true : false"
-          :header-cell-style="{ background: '#fafafa', color: '#606266' }"
-          @selection-change="handleSelectionChange"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
+          @click="() => push('/InvoiceSales/refundDetail')"
+          >创建</el-button
         >
-          <template #operation="{ row }">
-            <el-button
-              class="reset-margin"
-              link
-              type="primary"
-              :size="size"
-              @click="editItem(row.id)"
-              :icon="useRenderIcon('eye-view')"
-            />
-          </template>
-        </PureTable>
       </template>
-    </TableProBar>
+    </PageContent>
   </div>
 </template>
 

+ 0 - 63
src/views/InvoiceSales/refund/status.ts

@@ -1,63 +0,0 @@
-const statusList = [
-  { value: "0", label: "待财务开票", type: "primary" },
-  { value: "1", label: "待财务审核", type: "warning" },
-  { value: "2", label: "待填写物流", type: "warning" },
-  { value: "3", label: "开票完成", type: "warning" },
-  { value: "4", label: "开票失败/驳回", type: "warning" },
-  { value: "5", label: "财务驳回", type: "warning" },
-  { value: "6", label: "已退票", type: "warning" }
-];
-const inv_type_list = [
-  { value: "1", label: "纸质专用发票", type: "primary" },
-  { value: "2", label: "纸质普通发票", type: "success" },
-  { value: "3", label: "电子专用发票", type: "primary" },
-  { value: "4", label: "电子普通发票", type: "success" }
-];
-const menuPrivateList = [
-  { value: "1", label: "显示", type: "primary" },
-  { value: "0", label: "隐藏", type: "warning" }
-];
-const levelList = [
-  { value: "1", label: "管理员", type: "primary" },
-  { value: "2", label: "专员", type: "warning" }
-];
-const cg_order_type_options = [
-  { value: "1", label: "备库单" },
-  { value: "2", label: "非库存品" },
-  { value: "3", label: "采反" }
-];
-const xs_order_type_options = [
-  { value: "1", label: "库存品" },
-  { value: "2", label: "非库存品" },
-  { value: "3", label: "采购反馈" }
-];
-const cg_order_source_options = [
-  { value: "0", label: "备库单" },
-  // { value: "1", label: "直接下单" },
-  { value: "2", label: "竞价转单" },
-  { value: "3", label: "项目转单" },
-  { value: "4", label: "平台导入" },
-  { value: "5", label: "有赞平台" },
-  { value: "6", label: "售后补换货" }
-];
-const open_type_list = [
-  // { value: "0", label: "备库单" },
-  { value: "1", label: "金税开票" },
-  { value: "2", label: "金税线下" },
-  { value: "3", label: "纯线下" }
-];
-const input_type_list = [
-  { value: "1", label: "扫码枪输入" },
-  { value: "2", label: "手动输入" }
-];
-export {
-  statusList,
-  inv_type_list,
-  menuPrivateList,
-  levelList,
-  cg_order_type_options,
-  xs_order_type_options,
-  cg_order_source_options,
-  open_type_list,
-  input_type_list
-};

+ 0 - 0
src/views/InvoiceSales/refund/退款申请管理


+ 18 - 6
src/views/purchase/inputInvoice/config/configs.ts

@@ -29,27 +29,39 @@ export const status_options = [
     value: "3"
   },
   {
-    label: "认证成功待确认完成",
-    value: "7"
+    label: "待认证",
+    value: "4"
+  },
+  {
+    label: "认证成功待确认",
+    value: "5"
   },
   {
     label: "回票完成",
-    value: "8"
+    value: "6"
   },
   {
     label: "识别失败",
-    value: "9"
+    value: "7"
   },
   {
     label: "验证失败",
-    value: "10"
+    value: "8"
   },
   {
     label: "财务驳回",
-    value: "11"
+    value: "9"
   },
   {
     label: "认证失败",
+    value: "10"
+  },
+  {
+    label: "校验超过次数第二天校验",
+    value: "11"
+  },
+  {
+    label: "回票申请废弃已结束",
     value: "12"
   }
 ];

+ 3 - 3
src/views/purchase/inputInvoice/config/content.config.ts

@@ -47,6 +47,7 @@ const columns = [
   {
     label: "状态",
     prop: "status",
+    width: 160,
     cellRenderer: ({ row, props }) =>
       h(
         ElTag,
@@ -66,9 +67,8 @@ const columns = [
   },
   {
     label: "创建时间",
-    prop: "createTime",
-    formatter: ({ createTime }) =>
-      dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
+    prop: "addtime",
+    formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
   },
   {
     label: "操作",

+ 2 - 2
src/views/purchase/ticketReturn/components/approval-process/authentication.vue

@@ -4,8 +4,8 @@ import { useReviewProcess } from "/@/hooks";
 const emit = defineEmits(["changeStatus"]);
 
 const process_status = {
-  successStatus: "7",
-  failstatus: "12"
+  successStatus: "5",
+  failstatus: "10"
 };
 
 const { formRef, formRules, formData, handleChangeStatus } = useReviewProcess({

+ 2 - 2
src/views/purchase/ticketReturn/components/approval-process/confirm.vue

@@ -1,8 +1,8 @@
 <script setup lang="ts">
 import { useReviewProcess } from "/@/hooks";
 const process_status = {
-  successStatus: "8",
-  failstatus: "12"
+  successStatus: "6",
+  failstatus: "8"
 };
 
 const emit = defineEmits(["changeStatus"]);

+ 2 - 2
src/views/purchase/ticketReturn/components/approval-process/financial-audit.vue

@@ -2,8 +2,8 @@
 import { useReviewProcess } from "/@/hooks";
 
 const process_status = {
-  successStatus: "6",
-  failstatus: "11"
+  successStatus: "4",
+  failstatus: "9"
 };
 
 const emit = defineEmits(["changeStatus"]);

+ 14 - 6
src/views/purchase/ticketReturn/config/configs.ts

@@ -203,30 +203,38 @@ export const status_options = [
   },
   {
     label: "待认证",
-    value: "6"
+    value: "4"
   },
   {
     label: "认证成功待确认",
-    value: "7"
+    value: "5"
   },
   {
     label: "回票完成",
-    value: "8"
+    value: "6"
   },
   {
     label: "识别失败",
-    value: "9"
+    value: "7"
   },
   {
     label: "验证失败",
-    value: "10"
+    value: "8"
   },
   {
     label: "财务驳回",
-    value: "11"
+    value: "9"
   },
   {
     label: "认证失败",
+    value: "10"
+  },
+  {
+    label: "校验超过次数第二天校验",
+    value: "11"
+  },
+  {
+    label: "回票申请废弃已结束",
     value: "12"
   }
 ];

+ 8 - 0
src/views/purchase/ticketReturn/config/content.config.ts

@@ -34,15 +34,18 @@ const columns = [
   },
   {
     label: "发票类型",
+    width: 110,
     prop: "invoiceType_cn"
   },
   {
     label: "发票状态",
+    width: 110,
     prop: "invStatus_cn"
   },
   {
     label: "状态",
     prop: "status",
+    width: 160,
     cellRenderer: ({ row, props }) =>
       h(
         ElTag,
@@ -66,6 +69,11 @@ const columns = [
         previewTeleported: true
       })
   },
+  {
+    label: "发票票面额度",
+    width: "130px",
+    prop: "inv_subtotal_amount"
+  },
   {
     label: "开票时间",
     prop: "open_time",

+ 2 - 2
src/views/purchase/ticketReturn/detail.vue

@@ -67,10 +67,10 @@ onMounted(() => requesetInvDetail());
           <ElCollapseItem name="1" title="财务审核" v-if="status === 3">
             <FinancialAudit @change-status="requestChangeInvStatus" />
           </ElCollapseItem>
-          <ElCollapseItem name="2" title="待认证" v-if="status === 6">
+          <ElCollapseItem name="2" title="待认证" v-if="status === 4">
             <Authentication @change-status="requestChangeInvStatus" />
           </ElCollapseItem>
-          <ElCollapseItem name="3" title="待确认完成" v-if="status === 7">
+          <ElCollapseItem name="3" title="待确认完成" v-if="status === 5">
             <Confirm @change-status="requestChangeInvStatus" />
           </ElCollapseItem>
         </ElCollapse>