snow 9 months ago
parent
commit
c06a640728
47 changed files with 2025 additions and 275 deletions
  1. 5 7
      src/api/InvoiceSales/sheetOrderPool/index.ts
  2. 5 0
      src/api/parameter/tagManage/index.ts
  3. 6 0
      src/api/purchase/orderRecord/index.ts
  4. 2 2
      src/components/PageContent/src/actions/action-status.tsx
  5. 2 5
      src/components/PageContent/src/actions/action-un-tag.tsx
  6. 1 1
      src/components/PageContent/src/hooks/use-request.ts
  7. 29 100
      src/components/PageContent/src/page-content.tsx
  8. 2 2
      src/components/PageContent/src/types.ts
  9. 3 3
      src/utils/auth.ts
  10. 3 1
      src/utils/btnList.ts
  11. 2 1
      src/views/InvoiceSales/capitalClaim/components/basic-claim/sales-modal.vue
  12. 2 1
      src/views/InvoiceSales/invoiceApply/components/add-edit-form/add-edit-form.vue
  13. 358 133
      src/views/InvoiceSales/invoiceApply/components/currentcy-form/add-edit-form.vue
  14. 11 14
      src/views/InvoiceSales/invoiceApply/components/currentcy-form/columns.tsx
  15. 3 2
      src/views/InvoiceSales/invoiceApply/components/currentcy-form/order-dialog.vue
  16. 1 0
      src/views/InvoiceSales/invoiceApply/components/currentcy-form/search-batch.vue
  17. 1 0
      src/views/InvoiceSales/invoiceApply/components/currentcy-form/search-check.vue
  18. 298 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/add-edit-form.vue
  19. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/choose-form.vue
  20. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/choose-modal.vue
  21. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/_details.ts
  22. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/_rules.ts
  23. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/content.config.ts
  24. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/search.config.ts
  25. 0 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/采购付款.md
  26. 290 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/columns.tsx
  27. 93 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/edit-order.vue
  28. 20 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/invoice-title.vue
  29. 74 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/order-dialog.vue
  30. 160 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/search-batch.vue
  31. 179 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/search-check.vue
  32. 32 0
      src/views/InvoiceSales/invoiceApply/components/form-copy/search.config.ts
  33. 13 1
      src/views/InvoiceSales/sheetOrderPool/config/content.config.ts
  34. 13 0
      src/views/InvoiceSales/sheetOrderRecord/config/_options.ts
  35. 78 0
      src/views/InvoiceSales/sheetOrderRecord/config/content.config.ts
  36. 40 0
      src/views/InvoiceSales/sheetOrderRecord/config/modal.config.ts
  37. 59 0
      src/views/InvoiceSales/sheetOrderRecord/config/search.config.ts
  38. 24 0
      src/views/InvoiceSales/sheetOrderRecord/index.vue
  39. 0 0
      src/views/InvoiceSales/sheetOrderRecord/确认单标签操作记录.md
  40. 1 1
      src/views/interest/company/config/content.config.ts
  41. 1 1
      src/views/interest/userGroup/config/content.config.ts
  42. 13 0
      src/views/purchase/orderRecordRecord/config/_options.ts
  43. 78 0
      src/views/purchase/orderRecordRecord/config/content.config.ts
  44. 40 0
      src/views/purchase/orderRecordRecord/config/modal.config.ts
  45. 59 0
      src/views/purchase/orderRecordRecord/config/search.config.ts
  46. 24 0
      src/views/purchase/orderRecordRecord/index.vue
  47. 0 0
      src/views/purchase/orderRecordRecord/对账单标签操作记录.md

+ 5 - 7
src/api/InvoiceSales/sheetOrderPool/index.ts

@@ -3,6 +3,7 @@ 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;
@@ -10,11 +11,8 @@ interface ResponseType extends Promise<any> {
 }
 
 //销售订单列表
-export const httpList = (data: any): any => {
-  return http.request("post", `${yewuApi}orderlist`, { data });
-};
-
+export const httpList = (data: any): any => { return http.request("post", `${yewuApi}orderlist`, { data });};
 //详情
-export const httpDetail = (data: object): ResponseType => {
-  return http.request("post", `${yewuApi}saleinfo`, { data });
-};
+export const httpDetail = (data: object): ResponseType => { return http.request("post", `${yewuApi}saleinfo`, { data }); };
+//标签操作记录
+export const httpRecord = (data: object): ResponseType => { return http.request("post", VITE_PROXY_USER_REAL +  `/admin/tagGood/logList`, { data }); };

+ 5 - 0
src/api/parameter/tagManage/index.ts

@@ -40,3 +40,8 @@ export const httpBillAddTag = (data: object): any => {
 export const httpUnTag = (data: object): any => {
   return http.request("post", `${yewuApi}TagGood/checkTag`, { data });
 };
+
+export const httpReturnTag = (data: object): any => {
+  return http.request("post", `${yewuApi}tagGood/returnTag`, { data });
+};
+

+ 6 - 0
src/api/purchase/orderRecord/index.ts

@@ -13,6 +13,12 @@ export const httpDetail = (data: object): any => {
   return http.request("post", `${yewuApi}payinfo`, { data });
 };
 
+//通用对账单列表
+export const httpCommonList = (data: object): any => {
+  return http.request("post", `${yewuApi}ComonOrder/list`, { data });
+};
+
+
 //通用对账单详情
 export const httpCommonDetail = (data: object): any => {
   return http.request("post", `${yewuApi}ComonOrder/payInfo`, { data });

+ 2 - 2
src/components/PageContent/src/actions/action-status.tsx

@@ -25,14 +25,14 @@ const ActionStatus = defineComponent({
     const responseHandle = useResponseHandle();
 
     async function handleStatus() {
-      const { config, row, isRequesetArray, statusRowProp } = props;
+      const { config, row, isRequestArray, statusRowProp } = props;
       const { status: rawStatus, id } = row;
 
       const status = String(rawStatus) === "1" ? "0" : "1";
       const { code, message } = await config.api({
         ...(props.prop
           ? { [props.prop]: row[props.prop] }
-          : { id: isRequesetArray ? [id] : id }),
+          : { id: isRequestArray ? [id] : id }),
         ...(statusRowProp ? statusRowProp(row) : {}),
         status
       });

+ 2 - 5
src/components/PageContent/src/actions/action-un-tag.tsx

@@ -1,5 +1,5 @@
 import { defineComponent, ref, watchEffect, nextTick, computed } from "vue";
-import { httpUnTag } from "/@/api/parameter/tagManage";
+import { httpUnTag, httpReturnTag } from "/@/api/parameter/tagManage";
 import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
 import SingleVue from "/@/components/ImageUpload/src/single.vue";
 import { useAsync } from "/@/hooks/core/useAsync";
@@ -81,10 +81,7 @@ const ActionUnTag = defineComponent({
       const { row } = props;
       const { tagProps } = props;
       const { type } = tagProps;
-
-      addtagRun(
-        httpUnTag({ logid: type === "1" ? row.pay_tag_id : row.inv_tag_id })
-      );
+      addtagRun(httpReturnTag({ orderCode: type === '3' || type === '4' ? row.sequenceNo : row.payNo, type }));
     };
 
     const title = computed(() => {

+ 1 - 1
src/components/PageContent/src/hooks/use-request.ts

@@ -12,7 +12,7 @@ import { useUserInfo } from "/@/hooks/core/useUser";
 import { httpSupplierList } from "/@/api/supplierManage/supplierAccoutManage";
 import { httpCompanyList } from "/@/api/InvoiceSales/invoiceApply";
 
-export function useRequeset(props: PageContentProps) {
+export function useRequest(props: PageContentProps) {
   const { contentConfig } = props;
   const { mockData, notNeedCompanyFilter } = contentConfig;
 

+ 29 - 100
src/components/PageContent/src/page-content.tsx

@@ -7,7 +7,7 @@ import { TableProBar } from "../../ReTable";
 import { onBeforeRouteLeave } from "vue-router";
 import { useColumns } from "./hooks/use-columns";
 import { useActions } from "./hooks/use-actions";
-import { useRequeset } from "./hooks/use-request";
+import { useRequest } from "./hooks/use-request";
 import { useSelection } from "./hooks/use-selection";
 import { useRenderIcon } from "../../ReIcon/src/hooks";
 import { createActionProps } from "./utils/create-operation";
@@ -53,24 +53,20 @@ const PageContent = defineComponent({
       getPagination,
       onBeforeAction,
       paginationConfig
-    } = useRequeset(props);
+    } = useRequest(props);
 
     const { selects } = useSelection();
-    const { action } = useActions(props.contentConfig);
     const { isSuperUser } = useUserInfo();
+    const { action } = useActions(props.contentConfig);
+    const { columns, fixed, displayColumns, _raw, reset } = useColumns(props.contentConfig.columns);
 
-    const { columns, fixed, displayColumns, _raw, reset } = useColumns(
-      props.contentConfig.columns
-    );
-
-    function handleSelection(value) {
+    // 
+    function handleSelection(value: any) {
       selects.value = value;
       emit("selectionChange", value);
     }
 
-    /**
-     * 渲染需要的操作按钮
-     */
+    /* 渲染需要的操作按钮 */ 
     function renderOperation(row) {
       const { contentConfig, powers } = props;
       const {
@@ -84,104 +80,44 @@ const PageContent = defineComponent({
         returnProps,
         showPreview,
         showPayTagFn,
-        showReturnTagFn,
         showUnPayTagFn,
+        showReturnTagFn,
         showUnReturnTagFn,
-        isRequesetArray,
+        isRequestArray,
         superUserNoAction,
         superUserNoPerview,
       } = contentConfig;
 
       const view = showPreview ? showPreview(row) : true;
-
-      const del = showDelete ? showDelete(row) : true;
-
-      const noAction =
-        (superUserNoAction && !isSuperUser.value) || !superUserNoAction;
-
-      const noPerview =
-        (superUserNoPerview && !isSuperUser.value) || !superUserNoPerview;
-
+      const del = showPreview ? showDelete(row) : true;
+      const noAction = (superUserNoAction && !isSuperUser.value) || !superUserNoAction;
+      const noPerview = (superUserNoPerview && !isSuperUser.value) || !superUserNoPerview;
       const showPay = showPayTagFn ? showPayTagFn(row, powers) : true;
       const showReturn = showReturnTagFn ? showReturnTagFn(row, powers) : true;
+      const showUnPay = showUnPayTagFn ? showUnPayTagFn(row,powers) && Number(row.pay_tag) !== 0 : false;
+      const showUnReturn = showUnReturnTagFn ? showUnReturnTagFn(row, powers)  && Number(row.inv_tag) !== 0 : false;
 
-      const showUnPay = showUnPayTagFn ? showUnPayTagFn(row,powers) && Number(row.pay_tag_id) !== 0 : false;
-      const showUnReturn = showUnReturnTagFn ? showUnReturnTagFn(row, powers)  && Number(row.inv_tag_id) !== 0 : false;
-
-      const _showStatus = showStatus
-        ? showStatus(isSuperUser.value)
-        : action.status &&
-        noAction &&
-        ((powers.some(i => i == "003") && row.status + "" === "0") ||
-          (powers.some(i => i == "004") && row.status + "" === "1"));
+      const _showStatus = showStatus ? showStatus(isSuperUser.value) : action.statis && noAction && ((powers.some(i => i == "003") && row.status + "" === "0") || (powers.some(i => i == "004") && row.status + "" === "1"));
 
       return (
         <>
-          {!notPreview && view && noPerview && powers.some(i => i == "007") && (
-            <Operation.Preview
-              isInv={inv}
-              onPreview={() => emit("previewBtnClick", row)}
-            />
-          )}
-
+          {!notPreview && view && noPerview && powers.some(i => i == "007") && ( <Operation.Preview isInv={inv} onPreview={() => emit("previewBtnClick", row)} /> )}
           {slots.custom && slots.custom(row)}
-
-          {returnProps && noAction && showReturn && (
-            <Operation.Tag
-              row={row}
-              tagProps={returnProps}
-              onReload={() => onSearch()}
-            />
-          )}
-
-          {payProps && noAction && showPay  && (
-            <Operation.Tag
-              row={row}
-              tagProps={payProps}
-              isPay
-              onReload={() => onSearch()}
-            />
-          )}
-
-{
-            returnProps && showUnReturn && (
-              <Operation.UnTag 
-                row={row}
-                tagProps={returnProps}
-                onReload={() => onSearch()}
-              />
-            )
-          }
-
-          {
-            payProps && showUnPay && (
-              <Operation.UnTag 
-                row={row}
-                isPay
-                tagProps={payProps}
-                onReload={() => onSearch()}
-              />
-            )
-          }
-
-          {action.update && powers.some(i => i == "005") && noAction && (
-            <Operation.Update
-              onUpdate={() => emit("updateBtnClick", row)}
-              {...createActionProps("update", apis)}
-            />
-          )}
-
+          {returnProps && noAction && showReturn && (<Operation.Tag row={row} tagProps={returnProps} onReload={() => onSearch()} /> )}
+          {payProps && noAction && showPay  && ( <Operation.Tag row={row} tagProps={payProps} isPay onReload={() => onSearch()} /> )}
+          {returnProps && showUnReturn && (<Operation.UnTag row={row} tagProps={returnProps} onReload={() => onSearch()} />)}
+          {payProps && showUnPay && (<Operation.UnTag  row={row} isPay tagProps={payProps} onReload={() => onSearch()} />)}
+          {action.update && powers.some(i => i == "005") && noAction && (<Operation.Update onUpdate={() => emit("updateBtnClick", row)} {...createActionProps("update", apis)} />)}
           {_showStatus && (
             <Operation.Status
-              row={row}
-              prop={contentConfig.statusProp}
               statusRowProp={contentConfig.statusRowProp}
-              onReload={() => onSearch()}
-              isRequesetArray={isRequesetArray}
               {...createActionProps("status", apis)}
+              prop={contentConfig.statusProp}
+              isRequestArray={isRequestArray}
+              onReload={() => onSearch()}
+              row={row}
             />
           )}
-
           {del && noAction && action.delete && powers.some(i => i == "006") && (
             <Operation.Delete
               row={row}
@@ -208,12 +144,7 @@ const PageContent = defineComponent({
 
       return (
         (slots.create && slots.create()) ||
-        (action.create && powers.some(i => i == "002") && (
-          <Operation.Create
-            {...createActionProps("create", contentConfig.apis)}
-            onCreate={() => emit("createBtnClick")}
-          />
-        ))
+        (action.create && powers.some(i => i == "002") && (<Operation.Create {...createActionProps("create", contentConfig.apis)} onCreate={() => emit("createBtnClick")} />))
       );
     }
 
@@ -300,7 +231,7 @@ const PageContent = defineComponent({
 
     function renderPureTable(size, checkList) {
       const { contentConfig } = props;
-      const { treeProps, rowKey, isTree,maxHeight,tableRowClassName } = contentConfig;
+      const { treeProps, rowKey, isTree,maxHeight, tableRowClassName } = contentConfig;
 
       return (
         <PureTable
@@ -317,11 +248,9 @@ const PageContent = defineComponent({
           treeProps={treeProps}
           data={dataList.value}
           checkList={checkList}
-          maxHeight={ maxHeight ? maxHeight : '660px'}
-          paginationSmall={
-            size === "small" ? true : false
-          }
           rowClassName={tableRowClassName}
+          maxHeight={ maxHeight ? maxHeight : '660px'}
+          paginationSmall={ size === "small" ? true : false }
           headerCellStyle={{ background: "#fafafa", color: "#606266" }}
           onSelectionChange={handleSelection}
           {...paginationConfig}

+ 2 - 2
src/components/PageContent/src/types.ts

@@ -32,7 +32,7 @@ export interface ContentConfig {
   returnProps?: Record<string, string>;
   delTooltip?: string;
   inv?: boolean;
-  isRequesetArray?: boolean;
+  isRequestArray?: boolean;
   openStatus?: string;
   stopStatus?: string;
   notNeedCompanyFilter?: boolean;
@@ -111,7 +111,7 @@ export const actionProps = {
   config: {
     type: Object as PropType<{ api: API }>
   },
-  isRequesetArray: {
+  isRequestArray: {
     type: Boolean
   },
   statusConfig: {

+ 3 - 3
src/utils/auth.ts

@@ -3,11 +3,11 @@ import Cookies from "js-cookie";
 const RelaComNoKey = "compute-Console-RelaComNo";
 const RelaComNameKey = "compute-Console-RelaComName";
 const superKey = "compute-Console-superUser";
-const MenuKey = "compute-Console-Menu";
-const BtnKey = "compute-Console-MenuBtn";
 const NoticeKey = "compute-Console-Notice";
-const InfoKey = "compute-Console-Info";
 const ActionKey = "compute-Console-Action";
+const BtnKey = "compute-Console-MenuBtn";
+const MenuKey = "compute-Console-Menu";
+const InfoKey = "compute-Console-Info";
 
 export const TokenKey = "compute-Console-Token";
 

+ 3 - 1
src/utils/btnList.ts

@@ -56,6 +56,8 @@ const btnList = [
   { code: "055", name: "解除采购对账付款标签" },
   { code: "056", name: "解除采购对账回票标签" },
   { code: "057", name: "资金信息导出" },
-  { code: "058", name: "上传发票" }
+  { code: "058", name: "上传发票" },
+  { code: "059", name: "解除销售对账付款标签" },
+  { code: "060", name: "解除销售对账回票标签" },
 ];
 export default btnList;

+ 2 - 1
src/views/InvoiceSales/capitalClaim/components/basic-claim/sales-modal.vue

@@ -25,7 +25,8 @@ const data = ref<Record<string, any>>({
   customer: "",
   platName: "",
   cxCode: "",
-  platform_type: "1"
+  platform_type: "1",
+  is_comon: '0'
 });
 
 const { currentCompany } = useCompany();

+ 2 - 1
src/views/InvoiceSales/invoiceApply/components/add-edit-form/add-edit-form.vue

@@ -141,7 +141,8 @@ function handleSave() {
     const { code, message } = await httpAdd({
       relaComNo: ruleForm.value.companyNo,
       ...ruleForm.value,
-      ...generatorOrderArr()
+      ...generatorOrderArr(),
+      is_comon:'0'
     });
 
     responseHandle({

+ 358 - 133
src/views/InvoiceSales/invoiceApply/components/currentcy-form/add-edit-form.vue

@@ -1,44 +1,159 @@
 <script setup lang="ts">
-import { convertInvoiceTitle, convertInvoiceTitleData } from "./columns";
-import { httpList as httpCompanylist } from "/@/api/parameter/finance";
-import { reactive, ref, nextTick, onMounted, shallowRef } from "vue";
-import { httpCreate} from "/@/api/InvoiceSales/invoiceApply";
-import { useCompany } from "/@/hooks/core/useCompany";
-import ChooseForm from "./chooseForm/choose-form.vue";
+import { reactive, ref, watch, nextTick, onMounted } from "vue";
 import { FormRules, ElForm, ElMessage } from "element-plus";
-import InvoiceTitle from "./invoice-title.vue";
+import { httpAdd } from "/@/api/InvoiceSales/invoiceApply";
+import RemoteSelect from "/@/components/RemoteSelect";
+import { httpInvoiceList } from "/@/api/InvoiceSales/invoiceApply";
+import { httpList as httpCompanylist } from "/@/api/parameter/finance";
+import OrderDialog from "./order-dialog.vue";
+import EditOrder from "./edit-order.vue";
 import { useResponseHandle } from "/@/hooks";
 import { useRouter } from "vue-router";
+import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
+import InvoiceTitle from "./invoice-title.vue";
+import { convertInvoiceTitle, convertInvoiceTitleData } from "./columns";
+import { useCompany } from "/@/hooks/core/useCompany";
 
 import { ADD_EDIT_FORM_RULES } from "./../../config/configs";
-import { xs_inv_type_list } from "/@/utils/status";
+import { xs_inv_type_list, useTypeOptions } from "/@/utils/status";
+
+enum FROM_TYPE {
+  order = "order",
+  invoice = "invoice"
+}
 
+const TYPE = ref<FROM_TYPE>(FROM_TYPE.order);
+
+const { companyList } = useCompany();
 const { push } = useRouter();
-const { companyList, currentCompany } = useCompany();
-const formRef = ref<InstanceType<typeof ElForm> | null>(null)
-const chooseFormRef = ref<InstanceType<typeof ChooseForm> | null>(null);
 
+const modelRef = ref<InstanceType<typeof OrderDialog>>(null);
+const editOrderRef = ref<InstanceType<typeof EditOrder>>(null);
+const formRef = ref<InstanceType<typeof ElForm>>(null);
+const mapSequenceNoToInvfee = ref<Record<string, any>>({});
 const responseHandle = useResponseHandle();
-const loading = shallowRef(false);
-const denomination = shallowRef(0);
+const loading = ref(false);
+const orderList = ref([]);
+
+const { currentCompany } = useCompany();
+
+//最大开票金额
+const denomination = ref(0);
+
+const max = 150;
 
 const initform = {
-  buyer:"",
+  companyNo: "", //销售方公司抬头
+  buy_id: "", //购买方公司抬头
+  invtype: "", //开票类型
   email: "", //邮箱
   remark: "", //发票备注
-  invtype: "", //开票类型
-  companyNo: "", //销售方公司抬头
   exam_remark: "", //申请备注
+  orderArr: [], //开票销售订单明细 obj:sequenceNo//销售订单编码 inv_fee//销售订单开票金额,
   companyType: "01",
-  platform_type: "",
-  orderArr: [] //开票销售订单明细 obj:sequenceNo//销售订单编码 inv_fee//销售订单开票金额,
+  platform_type: ""
 };
 
-const invoiceTypes = ref([]);
 const ruleForm = ref({ ...initform });
+const invoiceTypes = ref([]);
 const rules = reactive<FormRules>({ ...ADD_EDIT_FORM_RULES });
 
-function onInvTypeChange() {
+function handleShowEditModal(_, row: any) {
+  editOrderRef.value.onDisplay({
+    row
+  });
+}
+
+function handleEdit({ row, inv_fee, num }) {
+  mapSequenceNoToInvfee.value[row.sequenceNo] = {
+    inv_fee,
+    num,
+    platform_type: row.platform_type
+  };
+}
+
+const removeRemarkPo = (poCode: string, index: number) => {
+  const isLast = index === orderList.value.length - 1;
+  const isOnly = orderList.value.length === 1;
+
+  if (isOnly)
+    return (ruleForm.value.remark = ruleForm.value.remark
+      .split(poCode)
+      .join(""));
+
+  ruleForm.value.remark = ruleForm.value.remark
+    .split(isLast ? ";" + poCode : poCode + ";")
+    .join("");
+};
+
+const handleDelete = (index: number) => {
+  const { sequenceNo, poCode } = orderList.value[index];
+  removeRemarkPo(poCode, index);
+  delete mapSequenceNoToInvfee.value[sequenceNo];
+  orderList.value.splice(index, 1);
+};
+
+function generatorOrderArr() {
+  const keys = Object.keys(mapSequenceNoToInvfee.value);
+  const orderArr = keys.map(sequenceNo => {
+    const { inv_fee, num, platform_type } =
+      mapSequenceNoToInvfee.value[sequenceNo];
+
+    return {
+      platform_type,
+      sequenceNo,
+      inv_fee,
+      num
+    };
+  });
+
+  return { orderArr };
+}
+
+function handleSave() {
+  formRef.value.validate(async isValid => {
+    if (!isValid) return;
+
+    if (ruleForm.value.remark.length > 184) {
+      return ElMessage.error("发票备注不能超过184个字符");
+    }
+
+    if (orderList.value.length > max) {
+      return ElMessage.error(`订单数量不能超过${max}个`);
+    }
+
+    const { orderArr } = generatorOrderArr();
+    const total = orderArr.reduce(
+      (prev, { inv_fee }) => prev + Number(inv_fee),
+      0
+    );
+
+    if (ruleForm.value.invtype === "fully_digitalized_special_electronic" || ruleForm.value.invtype === "fully_digitalized_normal_electronic") {
+      if (total > (1000 * 10000)) {
+        return ElMessage.error("订单总金额不能超过1000万");
+      }
+    } else {
+       if (total > denomination.value) {
+         return ElMessage.error(`订单总金额超过最大开票面额`);
+       }
+    }
+
+    const { code, message } = await httpAdd({
+      relaComNo: ruleForm.value.companyNo,
+      ...ruleForm.value,
+      ...generatorOrderArr(),
+      is_comon:'1'
+    });
+
+    responseHandle({
+      code,
+      message,
+      handler: () => push("/InvoiceSales/invoiceApply")
+    });
+  });
+}
+
+function menu_type_change() {
   const { invtype } = ruleForm.value;
   rules.email[0].required = (
     invtype === "special_electronic" || 
@@ -47,6 +162,30 @@ function onInvTypeChange() {
     invtype === "fully_digitalized_normal_electronic");
 }
 
+function handleAddModalShow() {
+  const { companyNo, platform_type } = ruleForm.value;
+  if (!companyNo) return ElMessage.warning("请选择销售公司抬头");
+  if (!platform_type) return ElMessage.warning("请选择平台类型");
+  modelRef.value.show(companyNo, platform_type);
+}
+
+function handleAddOrder(list) {
+  ruleForm.value.remark = "";
+
+  list.forEach((item, index) => {
+    const { sequenceNo, platform_type, winv_fee, winv_num, poCode } = item;
+
+    if (!mapSequenceNoToInvfee.value[sequenceNo]) {
+      mapSequenceNoToInvfee.value[sequenceNo] = {
+        inv_fee: winv_fee,
+        num: winv_num,
+        platform_type
+      };
+      orderList.value.push(item);
+      ruleForm.value.remark += index === 0 ? poCode : ";" + poCode;
+    }
+  });
+}
 
 //设置发票抬头详情
 const sellerInvoiceTitle = ref<Record<string, string>>({});
@@ -56,7 +195,13 @@ function handleInvoiceTitle(
   _isSeller: boolean,
   invoiceTitle: Record<string, string>
 ) {
-  if (!invoiceTitle) { return _isSeller ? (sellerInvoiceTitle.value = {}) : (purchaserInvoiceTitle.value = {})}
+  if (!invoiceTitle) {
+    if (_isSeller) {
+      return (sellerInvoiceTitle.value = {});
+    }
+
+    return (purchaserInvoiceTitle.value = {});
+  }
 
   if (_isSeller) {
     //支持的开票方式
@@ -64,123 +209,85 @@ function handleInvoiceTitle(
     denomination.value = Number(_denomination) * 10000;
     const chunks = invoiceType.split(",");
     ruleForm.value.invtype = "";
-    invoiceTypes.value = xs_inv_type_list.filter(({ value }) => chunks.includes(value));
+
+    invoiceTypes.value = xs_inv_type_list.filter(({ value }) =>
+      chunks.includes(value)
+    );
+
+    // invoiceTypes.value = [
+    //   ...invoiceTypes.value,
+    //   { label: "全电专用发票", value: "fully_digitalized_special_electronic", scanValue: "31" },
+    //   { label: "全电普通发票", value: "fully_digitalized_normal_electronic", scanValue: "32" }
+    // ];
+    // console.log(chunks);
   }
 
   _isSeller
-    ? (sellerInvoiceTitle.value = convertInvoiceTitleData(convertInvoiceTitle(invoiceTitle)))
-    : (purchaserInvoiceTitle.value = convertInvoiceTitleData(convertInvoiceTitle(invoiceTitle)));
+    ? (sellerInvoiceTitle.value = convertInvoiceTitleData(
+        convertInvoiceTitle(invoiceTitle)
+      ))
+    : (purchaserInvoiceTitle.value = convertInvoiceTitleData(invoiceTitle));
 }
 
 const setSellerInvoiceTitle = handleInvoiceTitle.bind(null, true);
 const setPurchaserInvoiceTitle = handleInvoiceTitle.bind(null, false);
 
-async function handleCompanyChange(companyNo, isSeller = true) {
-  ruleForm.value[isSeller ? 'companyNo' : 'buyer']  = companyNo;
-  const { code, data, message } = await httpCompanylist({ companyNo });
-  nextTick(() => { if (formRef.value) {  formRef.value.validateField("companyNo");}});
-  responseHandle({
-    code,
-    message,
-    handler: () => setSellerInvoiceTitle(data.list[0])
+async function handleCompanyChange(companyNo) {
+  ruleForm.value.companyNo = companyNo;
+  const { code, data, message } = await httpCompanylist({
+    companyNo
   });
-}
 
-async function handleSupplierChange({ companyNo, companyName }) {
-  ruleForm.value.buyer = companyName;
-
-  const { code, data, message } = await httpCompanylist({ noRela: true, size:1000 });
+  nextTick(() => {
+    if (formRef.value) {
+      formRef.value.validateField("companyNo");
+    }
+  });
 
   responseHandle({
     code,
     message,
-    handler: () => {
-      const item = data.list.find(({ companyNo: _code }) => _code === companyNo);
-      setPurchaserInvoiceTitle(item || {});
-    }
-  })
+    handler: () => setSellerInvoiceTitle(data.list[0])
+  });
 }
 
-async function handleOpenInv() {
-  try {
-    const { data, orderArr, totalCommonPrice, totalCommonCount } = chooseFormRef.value?.getOpenInvInfo() || ({} as any);
-    const { winv_fee, payNo } = data;
-
-    console.log(orderArr);
-
-    await formRef.value.validate();
-
-    if (!payNo) { 
-      ElMessage.warning('请选择对账单');
-      return
-    }
-
-    if (orderArr.length === 0) {
-      ElMessage.warning('请至少选中一个订单')
-      return
-    }
-
-    if (Number(totalCommonPrice) > Number(winv_fee)) { 
-      ElMessage.warning('开票总金额不能大于未开票金额');
-      return;
-    }
-
-
-    if (ruleForm.value.invtype === "fully_digitalized_special_electronic" || ruleForm.value.invtype === "fully_digitalized_normal_electronic") {
-      if (Number(totalCommonPrice) > (1000 * 10000)) {
-        return ElMessage.error("订单总金额不能超过1000万");
-      }
-    } else {
-      if (Number(totalCommonPrice) > Number((sellerInvoiceTitle.value.denomination.split('万元'))[0] * 10000)) {
-        ElMessage.warning('开票总金额不能超过销售方公司开票最大面额');
-        return
-       }
-    }
-
-
-    if (totalCommonCount > 150) { 
-      ElMessage.warning('选择的通用订单不能超过150个')
-      return
-    }
-
-    const { invtype, email, remark, exam_remark } = ruleForm.value
-    loading.value = true;
-    const { code, message } = await httpCreate({ email, payNo, remark, invtype, orderArr, exam_remark });
-    loading.value = false;
-    responseHandle({
-       code,
-       message,
-       handler: () => push("/InvoiceSales/invoiceApply")
-    });
-  } catch (err) {
-    const { warn } = console;
-    warn(err);
+watch(
+  () => ruleForm.value.platform_type,
+  () => {
+    ruleForm.value.remark = "";
+    orderList.value = [];
+    mapSequenceNoToInvfee.value = {};
+  },
+  {
+    immediate: true
   }
-}
+);
 
-onMounted(() => handleCompanyChange(currentCompany.value.companyNo));
+onMounted(() => {
+  handleCompanyChange(currentCompany.value.companyNo);
+});
 </script>
 
 <template>
   <div class="addEditForm">
     <el-form
+      ref="formRef"
       v-loading="loading"
       :model="ruleForm"
       :rules="rules"
-      ref="formRef"
       status-icon
       size="small"
     >
-      <el-row gutter="10">
+      <el-row>
         <el-col :span="12">
           <el-form-item
             label="销售方公司抬头"
             prop="companyNo"
           >
             <el-select
-              disabled
               style="width: 100%"
               placeholder="销售方公司抬头"
+              disabled
               v-model="ruleForm.companyNo"
             >
               <el-option
@@ -191,41 +298,37 @@ onMounted(() => handleCompanyChange(currentCompany.value.companyNo));
               />
             </el-select>
           </el-form-item>
-
           <InvoiceTitle :detail="sellerInvoiceTitle" />
         </el-col>
 
         <el-col :span="12">
           <el-form-item
             label="购买方公司抬头"
-            prop="companyNo"
+            prop="buy_id"
           >
-            <el-select
+            <RemoteSelect
+              is-root
+              v-model:value="ruleForm.buy_id"
+              :api="httpInvoiceList"
               style="width: 100%"
               placeholder="购买方公司抬头"
-              disabled
-              v-model="ruleForm.buyer"
-            >
-              <el-option
-                v-for="c in companyList"
-                :key="c.companyCode"
-                :value="c.companyCode"
-                :label="c.companyName"
-              />
-            </el-select>
+              request-prop="name"
+              response-label-prop="invoice_title"
+              response-val-prop="id"
+              @item-change="setPurchaserInvoiceTitle"
+            />
           </el-form-item>
-
-          <InvoiceTitle v-if="ruleForm.buyer" :detail="purchaserInvoiceTitle" />
+          <InvoiceTitle :detail="purchaserInvoiceTitle" />
         </el-col>
-
+        
         <el-col :span="6">
           <el-form-item label="发票类型" prop="invtype">
             <el-select
               v-model="ruleForm.invtype"
               style="width: 100%"
-              @change="onInvTypeChange"
-              no-data-text="请选择其他销售方公司"
+              @change="menu_type_change"
               placeholder="发票类型"
+              no-data-text="请选择其他销售方公司"
             >
               <el-option
                 v-for="si in invoiceTypes"
@@ -235,11 +338,24 @@ onMounted(() => handleCompanyChange(currentCompany.value.companyNo));
               />
             </el-select>
           </el-form-item>
-
           <el-form-item label="电子邮箱" prop="email">
             <el-input v-model="ruleForm.email" placeholder="电子邮箱" />
           </el-form-item>
-        </el-col> 
+
+          <el-form-item
+            label="平台类型"
+            prop="platform_type"
+          >
+            <el-switch
+              v-model="ruleForm.platform_type"
+              size="small"
+              active-text="toC"
+              inactive-text="toB"
+              active-value="2"
+              inactive-value="1"
+            />
+          </el-form-item>
+        </el-col>
 
         <el-col :span="18">
           <el-form-item label="申请备注" prop="exam_remark">
@@ -254,6 +370,119 @@ onMounted(() => handleCompanyChange(currentCompany.value.companyNo));
             />
           </el-form-item>
         </el-col>
+        <el-col :span="24" v-show="TYPE === 'order'">
+          <el-form-item label="订单列表">
+            <div flex justify-between w-full mb-2>
+              <el-tag :type="orderList.length > max ? 'danger' : 'info'"
+                >{{ orderList.length }} / {{ max }}</el-tag
+              >
+              <el-button type="primary" @click="handleAddModalShow"
+                >添加</el-button
+              >
+            </div>
+            <el-table :data="orderList" stripe border max-height="300">
+              <el-table-column
+                prop="sequenceNo"
+                label="销售订单编码"
+                show-overflow-tooltip
+                width="150"
+              />
+              <el-table-column
+                prop="poCode"
+                label="平台订单编码"
+                show-overflow-tooltip
+                width="150"
+              />
+              <el-table-column
+                prop="customerNo"
+                label="购买方公司编码"
+                width="150"
+                show-overflow-tooltip
+              />
+              <el-table-column
+                prop="customerName"
+                label="购买方公司名称"
+                show-overflow-tooltip
+                width="200"
+              />
+              <el-table-column
+                prop="plat_pay_fee"
+                label="平台公司已回款"
+                show-overflow-tooltip
+                width="110"
+              />
+              <el-table-column
+                prop="winv_num"
+                label="未开票数量"
+                show-overflow-tooltip
+                width="110"
+              />
+              <el-table-column
+                prop="winv_fee"
+                label="未开票金额"
+                show-overflow-tooltip
+                width="110"
+              />
+              <el-table-column
+                label="平台类型"
+                width="110"
+                show-overflow-tooltip
+              >
+                <template #="{ row }">
+                  <el-tag size="small">{{
+                    useTypeOptions.find(
+                      p => p.value === String(row.platform_type)
+                    )?.label
+                  }}</el-tag>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="开票金额"
+                width="110"
+                show-overflow-tooltip
+              >
+                <template #="{ row }">{{
+                  mapSequenceNoToInvfee[row.sequenceNo].inv_fee
+                }}</template>
+              </el-table-column>
+
+              <el-table-column label="开票数量" show-overflow-tooltip>
+                <template #="{ row }">{{
+                  mapSequenceNoToInvfee[row.sequenceNo].num
+                }}</template>
+              </el-table-column>
+
+              <el-table-column
+                label="业务员"
+                show-overflow-tooltip
+                prop="ownerName"
+                width="80"
+              />
+
+              <el-table-column fixed="right" width="70">
+                <template #header>
+                  <span>操作</span>
+                </template>
+                <template #default="scope">
+                  <el-button
+                    size="small"
+                    type="primary"
+                    link
+                    :icon="useRenderIcon('edits')"
+                    @click="handleShowEditModal(scope.$index, scope.row)"
+                  />
+                  <el-button
+                    size="small"
+                    type="danger"
+                    link
+                    :icon="useRenderIcon('delete')"
+                    @click="handleDelete(scope.$index)"
+                  />
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-form-item>
+        </el-col>
 
         <el-col :span="24">
           <el-form-item label="发票备注" prop="remark">
@@ -271,21 +500,17 @@ onMounted(() => handleCompanyChange(currentCompany.value.companyNo));
           </el-form-item>
         </el-col>
 
-        <el-col :span="24">
-          <el-form-item label="订单对账">
-            <ChooseForm 
-              ref="chooseFormRef"
-              @get-buyer="buyer =>  handleSupplierChange(buyer)" 
-              :platformType="ruleForm.platform_type" 
-             />
-          </el-form-item>
+        <el-col :span="24" flex justify-end>
+          <el-button :loading="loading" type="primary" @click="handleSave"
+            >保存</el-button
+          >
         </el-col>
-
-        <div class="flex justify-end w-full">
-          <ElButton type="primary" size="" @click="handleOpenInv">保存</ElButton>
-        </div>
       </el-row>
     </el-form>
+
+    <OrderDialog ref="modelRef" @save-btn-click="handleAddOrder" />
+
+    <EditOrder ref="editOrderRef" @save-btn-click="handleEdit" />
   </div>
 </template>
 

+ 11 - 14
src/views/InvoiceSales/invoiceApply/components/currentcy-form/columns.tsx

@@ -100,10 +100,16 @@ export function useColumns() {
       width: 110,
       showOverflowTooltip: true
     },
+    {
+      label: '平台公司已回款',
+      prop:'plat_pay_fee',
+      width: 110,
+    },
     {
       label: "未开票数量",
       prop: "winv_num",
-      width: 110
+      width: 110,
+      showOverflowTooltip: true
     },
     {
       label: "已开票金额",
@@ -226,8 +232,7 @@ export const convertInvoiceTitle = (title: Record<string, string>) => {
     company_license,
     bank_name,
     bankNo,
-    company_name,
-    denomination
+    company_name
   } = title;
 
   return {
@@ -236,8 +241,7 @@ export const convertInvoiceTitle = (title: Record<string, string>) => {
     invoice_code: company_license,
     invoice_bank: bank_name,
     invoice_bankNo: bankNo,
-    invoice_title: company_name,
-    denomination: denomination
+    invoice_title: company_name
   };
 };
 
@@ -248,16 +252,14 @@ export const convertInvoiceTitleData = (title: Record<string, string>) => {
     invoice_code,
     invoice_bank,
     invoice_bankNo,
-    invoice_title,
-    denomination
+    invoice_title
   } = title;
 
   return {
     invoice_code,
     invoice_title,
     addrAndmobile: invoice_addr + " " + invoice_mobile,
-    bankAndBankNo: invoice_bank + " " + invoice_bankNo,
-    denomination: denomination + '万元'
+    bankAndBankNo: invoice_bank + " " + invoice_bankNo
   };
 };
 
@@ -267,11 +269,6 @@ export const invoice_columns = [
     span: 24,
     field: "invoice_title"
   },
-  {
-    label: '最大面额',
-    span: 24,
-    field: 'denomination'
-  },
   {
     label: "纳税人识别号",
     span: 24,

+ 3 - 2
src/views/InvoiceSales/invoiceApply/components/currentcy-form/order-dialog.vue

@@ -14,7 +14,8 @@ const emit = defineEmits(["reload", "save-btn-click"]);
 
 const payload = shallowReactive({
   companyNo: "",
-  platform_type: ""
+  platform_type: "",
+  is_comon: "0"
 });
 
 async function show(_companyNo, _platform_type) {
@@ -42,7 +43,7 @@ defineExpose({
     :close-on-press-escape="false"
     append-to-body
     destroy-on-close
-    title="添加销售订单"
+    title="添加通用订单"
     :width="'1040px'"
   >
     <el-switch

+ 1 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/search-batch.vue

@@ -38,6 +38,7 @@ async function onSearch(sequenceNo = []) {
   const { code, data, message } = await httpBatchOrderList({
     ...props.payload,
     sequenceNo: sequenceNo.join(","),
+    is_comon: "1",
     inv_is: "1",
     cat_status: "2",
     inv_status: "0",

+ 1 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/search-check.vue

@@ -75,6 +75,7 @@ async function onSearch() {
     ...otherParams,
     page,
     size,
+    is_comon: '1',
     ...ruleForm.value
   });
 

+ 298 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/add-edit-form.vue

@@ -0,0 +1,298 @@
+<script setup lang="ts">
+import { convertInvoiceTitle, convertInvoiceTitleData } from "./columns";
+import { httpList as httpCompanylist } from "/@/api/parameter/finance";
+import { reactive, ref, nextTick, onMounted, shallowRef } from "vue";
+import { httpCreate} from "/@/api/InvoiceSales/invoiceApply";
+import { useCompany } from "/@/hooks/core/useCompany";
+import ChooseForm from "./chooseForm/choose-form.vue";
+import { FormRules, ElForm, ElMessage } from "element-plus";
+import InvoiceTitle from "./invoice-title.vue";
+import { useResponseHandle } from "/@/hooks";
+import { useRouter } from "vue-router";
+
+import { ADD_EDIT_FORM_RULES } from "./../../config/configs";
+import { xs_inv_type_list } from "/@/utils/status";
+
+const { push } = useRouter();
+const { companyList, currentCompany } = useCompany();
+const formRef = ref<InstanceType<typeof ElForm> | null>(null)
+const chooseFormRef = ref<InstanceType<typeof ChooseForm> | null>(null);
+
+const responseHandle = useResponseHandle();
+const loading = shallowRef(false);
+const denomination = shallowRef(0);
+
+const initform = {
+  buyer:"",
+  email: "", //邮箱
+  remark: "", //发票备注
+  invtype: "", //开票类型
+  companyNo: "", //销售方公司抬头
+  exam_remark: "", //申请备注
+  companyType: "01",
+  platform_type: "",
+  orderArr: [] //开票销售订单明细 obj:sequenceNo//销售订单编码 inv_fee//销售订单开票金额,
+};
+
+const invoiceTypes = ref([]);
+const ruleForm = ref({ ...initform });
+const rules = reactive<FormRules>({ ...ADD_EDIT_FORM_RULES });
+
+function onInvTypeChange() {
+  const { invtype } = ruleForm.value;
+  rules.email[0].required = (
+    invtype === "special_electronic" || 
+    invtype === "electronic" ||
+    invtype === "fully_digitalized_special_electronic" ||
+    invtype === "fully_digitalized_normal_electronic");
+}
+
+
+//设置发票抬头详情
+const sellerInvoiceTitle = ref<Record<string, string>>({});
+const purchaserInvoiceTitle = ref<Record<string, string>>({});
+
+function handleInvoiceTitle(
+  _isSeller: boolean,
+  invoiceTitle: Record<string, string>
+) {
+  if (!invoiceTitle) { return _isSeller ? (sellerInvoiceTitle.value = {}) : (purchaserInvoiceTitle.value = {})}
+
+  if (_isSeller) {
+    //支持的开票方式
+    const { invoiceType, denomination: _denomination } = invoiceTitle;
+    denomination.value = Number(_denomination) * 10000;
+    const chunks = invoiceType.split(",");
+    ruleForm.value.invtype = "";
+    invoiceTypes.value = xs_inv_type_list.filter(({ value }) => chunks.includes(value));
+  }
+
+  _isSeller
+    ? (sellerInvoiceTitle.value = convertInvoiceTitleData(convertInvoiceTitle(invoiceTitle)))
+    : (purchaserInvoiceTitle.value = convertInvoiceTitleData(convertInvoiceTitle(invoiceTitle)));
+}
+
+const setSellerInvoiceTitle = handleInvoiceTitle.bind(null, true);
+const setPurchaserInvoiceTitle = handleInvoiceTitle.bind(null, false);
+
+async function handleCompanyChange(companyNo, isSeller = true) {
+  ruleForm.value[isSeller ? 'companyNo' : 'buyer']  = companyNo;
+  const { code, data, message } = await httpCompanylist({ companyNo });
+  nextTick(() => { if (formRef.value) {  formRef.value.validateField("companyNo");}});
+  responseHandle({
+    code,
+    message,
+    handler: () => setSellerInvoiceTitle(data.list[0])
+  });
+}
+
+async function handleSupplierChange({ companyNo, companyName }) {
+  ruleForm.value.buyer = companyName;
+
+  const { code, data, message } = await httpCompanylist({ noRela: true, size:1000 });
+
+  responseHandle({
+    code,
+    message,
+    handler: () => {
+      const item = data.list.find(({ companyNo: _code }) => _code === companyNo);
+      setPurchaserInvoiceTitle(item || {});
+    }
+  })
+}
+
+async function handleOpenInv() {
+  try {
+    const { data, orderArr, totalCommonPrice, totalCommonCount } = chooseFormRef.value?.getOpenInvInfo() || ({} as any);
+    const { winv_fee, payNo } = data;
+
+    console.log(orderArr);
+
+    await formRef.value.validate();
+
+    if (!payNo) { 
+      ElMessage.warning('请选择对账单');
+      return
+    }
+
+    if (orderArr.length === 0) {
+      ElMessage.warning('请至少选中一个订单')
+      return
+    }
+
+    if (Number(totalCommonPrice) > Number(winv_fee)) { 
+      ElMessage.warning('开票总金额不能大于未开票金额');
+      return;
+    }
+
+
+    if (ruleForm.value.invtype === "fully_digitalized_special_electronic" || ruleForm.value.invtype === "fully_digitalized_normal_electronic") {
+      if (Number(totalCommonPrice) > (1000 * 10000)) {
+        return ElMessage.error("订单总金额不能超过1000万");
+      }
+    } else {
+      if (Number(totalCommonPrice) > Number((sellerInvoiceTitle.value.denomination.split('万元'))[0] * 10000)) {
+        ElMessage.warning('开票总金额不能超过销售方公司开票最大面额');
+        return
+       }
+    }
+
+
+    if (totalCommonCount > 150) { 
+      ElMessage.warning('选择的通用订单不能超过150个')
+      return
+    }
+
+    const { invtype, email, remark, exam_remark } = ruleForm.value
+    loading.value = true;
+    const { code, message } = await httpCreate({ email, payNo, remark, invtype, orderArr, exam_remark });
+    loading.value = false;
+    responseHandle({
+       code,
+       message,
+       handler: () => push("/InvoiceSales/invoiceApply")
+    });
+  } catch (err) {
+    const { warn } = console;
+    warn(err);
+  }
+}
+
+onMounted(() => handleCompanyChange(currentCompany.value.companyNo));
+</script>
+
+<template>
+  <div class="addEditForm">
+    <el-form
+      v-loading="loading"
+      :model="ruleForm"
+      :rules="rules"
+      ref="formRef"
+      status-icon
+      size="small"
+    >
+      <el-row gutter="10">
+        <el-col :span="12">
+          <el-form-item
+            label="销售方公司抬头"
+            prop="companyNo"
+          >
+            <el-select
+              disabled
+              style="width: 100%"
+              placeholder="销售方公司抬头"
+              v-model="ruleForm.companyNo"
+            >
+              <el-option
+                v-for="c in companyList"
+                :key="c.companyCode"
+                :value="c.companyCode"
+                :label="c.companyName"
+              />
+            </el-select>
+          </el-form-item>
+
+          <InvoiceTitle :detail="sellerInvoiceTitle" />
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item
+            label="购买方公司抬头"
+            prop="companyNo"
+          >
+            <el-select
+              style="width: 100%"
+              placeholder="购买方公司抬头"
+              disabled
+              v-model="ruleForm.buyer"
+            >
+              <el-option
+                v-for="c in companyList"
+                :key="c.companyCode"
+                :value="c.companyCode"
+                :label="c.companyName"
+              />
+            </el-select>
+          </el-form-item>
+
+          <InvoiceTitle v-if="ruleForm.buyer" :detail="purchaserInvoiceTitle" />
+        </el-col>
+
+        <el-col :span="6">
+          <el-form-item label="发票类型" prop="invtype">
+            <el-select
+              v-model="ruleForm.invtype"
+              style="width: 100%"
+              @change="onInvTypeChange"
+              no-data-text="请选择其他销售方公司"
+              placeholder="发票类型"
+            >
+              <el-option
+                v-for="si in invoiceTypes"
+                :key="si.value"
+                :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="18">
+          <el-form-item label="申请备注" prop="exam_remark">
+            <el-input
+              w-full
+              v-model="ruleForm.exam_remark"
+              :rows="5"
+              type="textarea"
+              maxlength="2000"
+              placeholder="申请备注"
+              show-word-limit
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="发票备注" prop="remark">
+            <div w-full>
+              <el-input
+                w-full
+                v-model="ruleForm.remark"
+                :rows="3"
+                type="textarea"
+                maxlength="2000"
+                show-word-limit
+                placeholder="发票备注"
+              />
+            </div>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="订单对账">
+            <ChooseForm 
+              ref="chooseFormRef"
+              @get-buyer="buyer =>  handleSupplierChange(buyer)" 
+              :platformType="ruleForm.platform_type" 
+             />
+          </el-form-item>
+        </el-col>
+
+        <div class="flex justify-end w-full">
+          <ElButton type="primary" size="" @click="handleOpenInv">保存</ElButton>
+        </div>
+      </el-row>
+    </el-form>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+:deep(.el-descriptions) {
+  padding: 0px !important;
+  padding-left: 30px !important;
+  padding-bottom: 10px !important;
+}
+</style>

+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/choose-form.vue → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/choose-form.vue


+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/choose-modal.vue → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/choose-modal.vue


+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/config/_details.ts → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/_details.ts


+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/config/_rules.ts → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/_rules.ts


+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/config/content.config.ts → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/content.config.ts


+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/config/search.config.ts → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/search.config.ts


+ 0 - 0
src/views/InvoiceSales/invoiceApply/components/currentcy-form/chooseForm/config/采购付款.md → src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/config/采购付款.md


+ 290 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/columns.tsx

@@ -0,0 +1,290 @@
+import { ref } from "vue";
+import dayjs from "dayjs";
+import { send_status_list } from "/@/utils/status";
+export function useColumns() {
+  const columns = ref([
+    {
+      type: "selection",
+      width: 40,
+      align: "center",
+      fixed: "left"
+    },
+    {
+      label: "销售订单编码",
+      prop: "sequenceNo",
+      width: 150,
+      showOverflowTooltip: true
+    },
+    {
+      label: "销售订单主编码",
+      prop: "cxCode",
+      width: 150,
+      showOverflowTooltip: true
+    },
+    // {
+    //   label: "名称",
+    //   prop: "name",
+    //   minWidth: 160,
+    //   showOverflowTooltip: true
+    // },
+    {
+      label: "平台订单编码",
+      prop: "poCode",
+      width: 150,
+      showOverflowTooltip: true
+    },
+    {
+      label: "商品编码",
+      prop: "goodNo",
+      width: 150,
+      showOverflowTooltip: true
+    },
+    {
+      label: "商品名称",
+      prop: "goodName",
+      minWidth: 160,
+      showOverflowTooltip: true
+    },
+    {
+      label: "平台类型",
+      prop: "platform_type",
+      width: "80px",
+      slot: "platform_type",
+      showOverflowTooltip: true
+    },
+    {
+      label: "发货状态",
+      prop: "sendStatus",
+      width: "95px",
+      showOverflowTooltip: true,
+      cellRenderer: ({ row, props }) => (
+        <el-tag
+          size={props.size}
+          type={
+            (
+              send_status_list.find(
+                item => item.value == row.sendStatus + ""
+              ) || {}
+            ).type || "info"
+          }
+          effect="plain"
+        >
+          {(
+            send_status_list.find(item => item.value == row.sendStatus + "") ||
+            {}
+          ).label || "--"}
+        </el-tag>
+      )
+    },
+    {
+      label: "客户编码",
+      prop: "customerNo",
+      width: 150,
+      showOverflowTooltip: true
+    },
+    {
+      label: "客户名称",
+      prop: "customerName",
+      minWidth: 160,
+      showOverflowTooltip: true
+    },
+    {
+      label: "订单总金额",
+      prop: "totalPrice",
+      width: 110,
+      showOverflowTooltip: true
+    },
+    {
+      label: "商品数量",
+      prop: "goodNum",
+      width: 110,
+      showOverflowTooltip: true
+    },
+    {
+      label: "未开票数量",
+      prop: "winv_num",
+      width: 110
+    },
+    {
+      label: "已开票金额",
+      prop: "ainv_fee",
+      width: 110,
+      showOverflowTooltip: true
+    },
+    {
+      label: "开票中金额",
+      prop: "inv_fee",
+      width: 110,
+      showOverflowTooltip: true
+    },
+    {
+      label: "未开票金额",
+      prop: "winv_fee",
+      width: 110,
+      showOverflowTooltip: true
+    },
+    {
+      label: "业务员",
+      prop: "ownerName",
+      width: 80,
+      showOverflowTooltip: true
+    },
+    {
+      label: "创建时间",
+      width: 140,
+      prop: "createTime",
+      showOverflowTooltip: true,
+      formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
+    }
+  ]);
+
+  return {
+    columns
+  };
+}
+
+export const order_detail_columns = [
+  {
+    field: "sequenceNo",
+    label: "销售订单编码"
+  },
+  {
+    field: "ownerName",
+    label: "销售员"
+  },
+  {
+    field: "department",
+    label: "平台名称"
+  },
+  {
+    field: "goodPrice",
+    label: "商品单价"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称",
+    span: 12
+  },
+  {
+    field: "customerName",
+    label: "客户名称",
+    span: 12
+  },
+
+  {
+    field: "goodName",
+    label: "商品名称",
+    span: 24
+  },
+  {
+    field: "goodNum",
+    label: "商品总数量"
+  },
+  {
+    field: "ainv_num",
+    label: "已开票数量"
+  },
+  {
+    field: "inv_num",
+    label: "开票中数量"
+  },
+  {
+    field: "winv_num",
+    label: "未开票数量"
+  },
+  {
+    field: "totalPrice",
+    label: "订单总金额"
+  },
+  {
+    field: "ainv_fee",
+    label: "已开票金额"
+  },
+  {
+    field: "inv_fee",
+    label: "开票中金额"
+  },
+
+  {
+    field: "winv_fee",
+    label: "未开票金额"
+  }
+];
+
+/**
+ * @invoice_addr 公司注册地址
+ * @invoice_people  法人
+ * @invoice_mobile 联系方式
+ * @invoice_code 纳税识别号
+ * @invoice_bank 开户行
+ * @invoice_bankNo 开户账户
+ */
+export const convertInvoiceTitle = (title: Record<string, string>) => {
+  const {
+    company_address,
+    mobile,
+    company_license,
+    bank_name,
+    bankNo,
+    company_name,
+    denomination
+  } = title;
+
+  return {
+    invoice_addr: company_address,
+    invoice_mobile: mobile,
+    invoice_code: company_license,
+    invoice_bank: bank_name,
+    invoice_bankNo: bankNo,
+    invoice_title: company_name,
+    denomination: denomination
+  };
+};
+
+export const convertInvoiceTitleData = (title: Record<string, string>) => {
+  const {
+    invoice_addr,
+    invoice_mobile,
+    invoice_code,
+    invoice_bank,
+    invoice_bankNo,
+    invoice_title,
+    denomination
+  } = title;
+
+  return {
+    invoice_code,
+    invoice_title,
+    addrAndmobile: invoice_addr + " " + invoice_mobile,
+    bankAndBankNo: invoice_bank + " " + invoice_bankNo,
+    denomination: denomination + '万元'
+  };
+};
+
+export const invoice_columns = [
+  {
+    label: "抬头",
+    span: 24,
+    field: "invoice_title"
+  },
+  {
+    label: '最大面额',
+    span: 24,
+    field: 'denomination'
+  },
+  {
+    label: "纳税人识别号",
+    span: 24,
+    field: "invoice_code"
+  },
+  {
+    label: "地址、电话",
+    span: 24,
+    field: "addrAndmobile"
+  },
+  {
+    label: "开户行及账号",
+    span: 24,
+    field: "bankAndBankNo"
+  }
+];

+ 93 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/edit-order.vue

@@ -0,0 +1,93 @@
+<script setup lang="ts">
+import { computed, ref, unref, watchEffect } from "vue";
+import BasicDescriptions from "/@/components/BasicDescriptions";
+import { order_detail_columns } from "./columns";
+
+const visible = ref(false);
+const data = ref<Record<string, string>>({});
+const emit = defineEmits(["save-btn-click"]);
+
+const total = ref(0);
+const inv_fee = ref(0);
+
+function handleSave() {
+  visible.value = false;
+
+  emit("save-btn-click", {
+    row: unref(data),
+    inv_fee: unref(inv_fee),
+    num: unref(total)
+  });
+}
+
+const totalNum = computed(() => {
+  const { winv_num } = data.value as any;
+  return winv_num;
+});
+
+watchEffect(() => {
+  total.value = totalNum.value;
+});
+
+defineExpose({
+  onDisplay({ row: _data }) {
+    visible.value = true;
+    data.value = _data;
+    inv_fee.value = data.value.winv_fee as any;
+  }
+});
+</script>
+
+<template>
+  <el-dialog
+    v-model="visible"
+    title="编辑销售订单"
+    center
+    width="1040px"
+    :close-on-click-modal="false"
+  >
+    <BasicDescriptions
+      :data="data"
+      :col-number="2"
+      :columns="order_detail_columns"
+    >
+      <template #custom>
+        <el-row>
+          <div class="col-item" style="width: 247px">
+            <p class="col-label">开票数量</p>
+            <p class="col-value">
+              <el-input-number
+                size="small"
+                placeholder="开票数量"
+                :min="0.1"
+                style="width: 100%"
+                :max="totalNum"
+                v-model="total"
+              />
+            </p>
+          </div>
+
+          <div class="col-item" style="width: 248px">
+            <p class="col-label">开票金额</p>
+            <p class="col-value">
+              <el-input-number
+                placeholder="开票金额"
+                :precision="2"
+                :min="0.1"
+                size="small"
+                style="width: 100%"
+                v-model="inv_fee"
+              />
+            </p>
+          </div>
+        </el-row>
+      </template>
+    </BasicDescriptions>
+
+    <div flex w-full justify-end mt-2>
+      <el-button size="small" type="primary" @click="handleSave"
+        >保存</el-button
+      >
+    </div>
+  </el-dialog>
+</template>

+ 20 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/invoice-title.vue

@@ -0,0 +1,20 @@
+<script setup lang="ts">
+import { invoice_columns } from "./columns";
+import BasicDescriptions from "/@/components/BasicDescriptions";
+
+defineProps<{
+  detail: Record<string, string>;
+}>();
+</script>
+
+<template>
+  <BasicDescriptions
+    px-8
+    pb-5
+    v-if="Object.keys(detail).length !== 0"
+    :data="detail"
+    :columns="invoice_columns"
+    :col-number="1"
+    label-width="130"
+  />
+</template>

+ 74 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/order-dialog.vue

@@ -0,0 +1,74 @@
+<script setup lang="ts">
+import { shallowRef, shallowReactive } from "vue";
+import SearchCheck from "./search-check.vue";
+import SeaechBatch from "./search-batch.vue";
+
+enum SearchMode {
+  check,
+  batch
+}
+
+const showModel = shallowRef(false);
+const currentSearchMode = shallowRef(SearchMode.check);
+const emit = defineEmits(["reload", "save-btn-click"]);
+
+const payload = shallowReactive({
+  companyNo: "",
+  platform_type: ""
+});
+
+async function show(_companyNo, _platform_type) {
+  showModel.value = true;
+  payload.companyNo = _companyNo;
+  payload.platform_type = _platform_type;
+}
+
+function handleConfirm(selected) {
+  emit("save-btn-click", selected);
+  showModel.value = false;
+}
+
+defineExpose({
+  show
+});
+</script>
+
+<template>
+  <el-dialog
+    top="5vh"
+    center
+    v-model="showModel"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    destroy-on-close
+    title="添加销售订单"
+    :width="'1040px'"
+  >
+    <el-switch
+      v-model="currentSearchMode"
+      active-text="批量查找"
+      inactive-text="勾选查找"
+      :active-value="SearchMode.batch"
+      :inactive-value="SearchMode.check"
+    />
+
+    <template v-if="currentSearchMode === SearchMode.check">
+      <SearchCheck :payload="payload" @confirm="handleConfirm" />
+    </template>
+
+    <template v-else>
+      <SeaechBatch :payload="payload" @confirm="handleConfirm" />
+    </template>
+  </el-dialog>
+</template>
+
+<style lang="scss" scoped>
+:deep(.el-pagination) {
+  justify-content: flex-start !important;
+}
+
+.search {
+  padding: 0px !important;
+}
+</style>

+ 160 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/search-batch.vue

@@ -0,0 +1,160 @@
+<script setup lang="ts">
+import { reactive, ref, shallowRef, unref } from "vue";
+import { httpBatchOrderList } from "/@/api/InvoiceSales/invoiceApply";
+import { responseHandle } from "/@/utils/responseHandle";
+import { useNav } from "/@/layout/hooks/nav";
+import { ElMessage } from "element-plus";
+import { useColumns } from "./columns";
+import { useTypeOptions } from "/@/utils/status";
+
+const emit = defineEmits(["reload", "confirm"]);
+
+const { columns } = useColumns();
+
+columns.value = columns.value.slice(1);
+
+const { logout } = useNav();
+const loading = ref(false);
+const selected = ref([]);
+const tableRef = ref();
+
+const pagination = reactive({
+  total: 0,
+  pageSize: 15,
+  currentPage: 1,
+  background: true,
+  pageSizes: [15, 50, 100]
+});
+
+const props = defineProps<{
+  payload: object;
+}>();
+
+const sourceText = shallowRef("");
+//列表展示
+async function onSearch(sequenceNo = []) {
+  loading.value = true;
+  const { currentPage: page, pageSize: size } = pagination;
+  const { code, data, message } = await httpBatchOrderList({
+    ...props.payload,
+    sequenceNo: sequenceNo.join(","),
+    inv_is: "1",
+    cat_status: "2",
+    inv_status: "0",
+    page,
+    size
+  });
+
+  responseHandle({
+    code,
+    message,
+    logout,
+    handler: () => {
+      // const { li } = data ?? {};
+      selected.value = data ?? [];
+      // pagination.total = count ?? 0;
+      sourceText.value = "";
+    }
+  });
+  loading.value = false;
+}
+
+const $space = " ";
+const $wrap = "\n";
+const replaceTextWrapAndSpace = function (text = "") {
+  if (!text) return "";
+  let _text = text;
+  const hasSpace = _text.includes($space);
+  const hasWrap = _text.includes($wrap);
+  if (hasSpace) _text = _text.split($space).join("");
+  if (hasWrap) _text = _text.split($wrap).join("");
+  return _text;
+};
+
+function handleEnter() {
+  const text = replaceTextWrapAndSpace(sourceText.value);
+  /* 去掉回车和空格 **/
+  if (text.length === 0) {
+    ElMessage.warning("不能解析空文本");
+    sourceText.value = text;
+    return;
+  }
+
+  /* 统一替换字符 **/
+  const parserText = text.replace(/[,。;、; .]/g, ",");
+  const sequenceNo = parserText.split(",");
+  onSearch(sequenceNo);
+}
+
+function handleConfirm() {
+  if (selected.value.length === 0) {
+    return ElMessage.error("至少添加一个销售订单!");
+  }
+
+  //商品数量或开票金额为空
+  const noConfirm = selected.value.filter(o => o.winv_fee === "0.00");
+  const noInvNum = selected.value.filter(o => String(o.winv_num) === "0");
+
+  if (noConfirm.length !== 0) {
+    return ElMessage.error(`销售订单 ${noConfirm[0].sequenceNo} 开票金额为零`);
+  }
+
+  if (noInvNum.length !== 0) {
+    return ElMessage.error(`销售订单 ${noInvNum[0].sequenceNo} 开票数量为零`);
+  }
+
+  emit("confirm", unref(selected));
+}
+</script>
+
+<template>
+  <div relative>
+    <ElInput
+      :rows="4"
+      v-model="sourceText"
+      style="margin-bottom: 10px"
+      placeholder="输入销售单编码(小于100条),系统支持的分割符为逗号(,)、句号(.)、分号(;)、顿号(、),回车后开始解析。"
+      type="textarea"
+      @keydown.enter="handleEnter"
+    />
+
+    <div v-loading="loading">
+      <PureTable
+        ref="tableRef"
+        border
+        align="left"
+        row-key="id"
+        table-layout="auto"
+        :size="'small'"
+        :data="selected"
+        :columns="columns"
+        max-height="560px"
+        :header-cell-style="{ background: '#fafafa', color: '#606266' }"
+      >
+        <template #platform_type="scope">
+          <el-tag>{{
+            useTypeOptions.find(
+              ({ value }) => value === scope.row.platform_type
+            )?.label || "--"
+          }}</el-tag>
+        </template>
+      </PureTable>
+    </div>
+
+    <div class="flex justify-end mt-10px">
+      <el-button type="primary" @click="handleConfirm" size="small"
+        >保存</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<style lang="scss" scoped>
+:deep(.el-pagination) {
+  justify-content: flex-start !important;
+}
+
+.search {
+  padding: 0px !important;
+}
+</style>

+ 179 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/search-check.vue

@@ -0,0 +1,179 @@
+<script setup lang="ts">
+import { reactive, ref, unref } from "vue";
+import { httpOrderList } from "/@/api/InvoiceSales/invoiceApply";
+import { PageSearch, usePageSearch } from "/@/components/PageSearch";
+import searchFormConfig from "./search.config";
+import { responseHandle } from "/@/utils/responseHandle";
+import { useNav } from "/@/layout/hooks/nav";
+import { ElMessage } from "element-plus";
+import { useColumns } from "./columns";
+import { useTypeOptions } from "/@/utils/status";
+
+const { columns } = useColumns();
+const { logout } = useNav();
+const loading = ref(false);
+const dataList = ref([]);
+const selected = ref([]);
+const tableRef = ref();
+
+const pagination = reactive({
+  total: 0,
+  pageSize: 15,
+  currentPage: 1,
+  background: true,
+  pageSizes: [15, 50, 100]
+});
+
+const props = defineProps<{
+  payload: object;
+}>();
+
+const emit = defineEmits(["confirm"]);
+let otherParams: Record<any, any> = {};
+const ruleForm = ref({});
+const { handleSearchClick, handleResetClick } = usePageSearch(
+  params => {
+    otherParams = params;
+    pagination.currentPage = 1;
+    onSearch();
+
+    return {
+      result: {},
+      deleteProps: []
+    };
+  },
+  () => {
+    otherParams = {};
+    onSearch();
+  }
+);
+
+const handleCurrentChange = (current: number) => {
+  pagination.currentPage = current;
+  onSearch();
+};
+
+function handleReset() {
+  pagination.currentPage = 1;
+  pagination.pageSize = 15;
+  handleResetClick();
+}
+
+function selectedChange(val) {
+  selected.value = val;
+}
+
+//列表展示
+async function onSearch() {
+  loading.value = true;
+  const { currentPage: page, pageSize: size } = pagination;
+  const { code, data, message } = await httpOrderList({
+    ...props.payload,
+    inv_is: "1",
+    cat_status: "2",
+    inv_status: "0",
+    ...otherParams,
+    page,
+    size,
+    ...ruleForm.value
+  });
+
+  responseHandle({
+    code,
+    message,
+    logout,
+    handler: () => {
+      const { list, count } = data ?? {};
+      dataList.value = list ?? [];
+      pagination.total = count ?? 0;
+    }
+  });
+  loading.value = false;
+}
+
+function handleSizeChange(val) {
+  pagination.pageSize = val;
+  pagination.currentPage = 1;
+  onSearch();
+}
+
+function handleConfirm() {
+  if (selected.value.length === 0) {
+    return ElMessage.error("至少添加一个销售订单!");
+  }
+
+  //商品数量或开票金额为空
+  const noConfirm = selected.value.filter(o => o.winv_fee === "0.00");
+  const noInvNum = selected.value.filter(o => String(o.winv_num) === "0");
+
+  if (noConfirm.length !== 0) {
+    return ElMessage.error(`销售订单 ${noConfirm[0].sequenceNo} 开票金额为零`);
+  }
+
+  if (noInvNum.length !== 0) {
+    return ElMessage.error(`销售订单 ${noInvNum[0].sequenceNo} 开票数量为零`);
+  }
+
+  emit("confirm", unref(selected));
+}
+
+onSearch();
+</script>
+
+<template>
+  <div relative>
+    <PageSearch
+      class="search"
+      @reset-btn-click="handleReset"
+      @search-btn-click="handleSearchClick"
+      :form-config="searchFormConfig"
+    />
+    <div v-loading="loading">
+      <PureTable
+        ref="tableRef"
+        border
+        align="left"
+        row-key="id"
+        table-layout="auto"
+        :size="'small'"
+        :data="dataList"
+        :columns="columns"
+        :pagination="pagination"
+        :paginationSmall="true"
+        max-height="560px"
+        :header-cell-style="{ background: '#fafafa', color: '#606266' }"
+        @selection-change="selectedChange"
+        @current-change="handleCurrentChange"
+        @size-change="handleSizeChange"
+      >
+        <template #platform_type="scope">
+          <el-tag>{{
+            useTypeOptions.find(
+              ({ value }) => value === scope.row.platform_type
+            )?.label || "--"
+          }}</el-tag>
+        </template>
+      </PureTable>
+    </div>
+
+    <el-button
+      absolute
+      bottom-0px
+      right="20px"
+      type="primary"
+      @click="handleConfirm"
+      size="small"
+      >保存</el-button
+    >
+  </div>
+</template>
+
+<style lang="scss" scoped>
+:deep(.el-pagination) {
+  justify-content: flex-start !important;
+}
+
+.search {
+  padding: 0px !important;
+}
+</style>

+ 32 - 0
src/views/InvoiceSales/invoiceApply/components/form-copy/search.config.ts

@@ -0,0 +1,32 @@
+import { FormConfig } from "/@/components/PageSearch";
+import { INV_OPEN_STATUS } from "/@/utils/details/inv-open";
+
+const searchFormConfig: FormConfig = {
+  colLayout: { span: 8 },
+  formItems: [
+    {
+      field: "customer",
+      type: "input",
+      placeholder: "客户名称"
+    },
+    {
+      field: "sequenceNo",
+      type: "input",
+      placeholder: "销售订单编码"
+    },
+    {
+      field: "cxCode",
+      type: "input",
+      placeholder: "销售订单主编码"
+    },
+    {
+      field: "status",
+      type: "select",
+      placeholder: "状态",
+      span: 4,
+      options: INV_OPEN_STATUS
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 13 - 1
src/views/InvoiceSales/sheetOrderPool/config/content.config.ts

@@ -116,6 +116,11 @@ const columns = [
           inv_open_status.find(s => s.value === row.inv_status)?.label || "--"
       })
   },
+  {
+    label: '平台公司已回款',
+    prop: 'plat_pay_fee',
+    width: 120
+  },
   {
     label: "已开票",
     prop: "ainv_fee",
@@ -213,7 +218,7 @@ const columns = [
   {
     label: "操作",
     fixed: "right",
-    width: 120,
+    width: 205,
     slot: "operation"
   }
 ];
@@ -230,8 +235,15 @@ const contentConfig: ContentConfig = {
     prop: "sequenceNo",
     type: "4"
   },
+  // 付款标签
   showPayTagFn: ({ is_comon }, permissions) => permissions.includes("016") && String(is_comon) !== "1",
+  // 回票标签
   showReturnTagFn: ({ is_comon }, permissions) => permissions.includes("015") && String(is_comon) !== "1",
+  // 解除付款标签
+  showUnPayTagFn: ({ status, is_comon }, permissions) => permissions.includes("059") && String(is_comon) !== "1",
+  // 解除回票标签
+  showUnReturnTagFn: ({ status, is_comon }, permissions) => permissions.includes("060") && String(is_comon) !== "1",
+  
   apis: {
     httpList
   }

+ 13 - 0
src/views/InvoiceSales/sheetOrderRecord/config/_options.ts

@@ -0,0 +1,13 @@
+export const statusOptions = [
+  { value: '0',label:'解除' },
+  { value: '1',label:'添加' },
+  { value: '2',label:'修改' },
+]
+
+export const typeOptions = [
+  { value: '1',label:'采购单付款' },
+  { value: '2',label:'采购单回票' },
+  { value: '3',label:'销售回款' },
+  { value: '4',label:'销售开票' },
+]
+

+ 78 - 0
src/views/InvoiceSales/sheetOrderRecord/config/content.config.ts

@@ -0,0 +1,78 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpRecord } from "/@/api/InvoiceSales/sheetOrderPool";
+import { h } from "vue";
+import { ElTag } from "element-plus";
+import { typeOptions, statusOptions } from "./_options";
+
+const columns = [
+  {
+    label: '记录ID',
+    prop: 'id',
+    width: '60px'
+  },
+  {
+    label: '订单编号',
+    prop: 'code',
+    width: '160px'
+  },
+  {
+    label: '卖出方公司',
+    prop: 'supplierName',
+    width: '200px'
+  },
+  {
+    label: '买入方公司',
+    prop: 'companyName',
+    width: '200px'
+  },
+  {
+    label: '业务类型',
+    prop: 'type',
+    width: '100px',
+    cellRenderer({row}){
+      return h(ElTag,null, {
+        default: () => typeOptions.find(({value}) => String(value) === String(row.type))?.label || '--'
+      })
+    }
+  },
+  {
+    label: '功能类型',
+    prop: 'status',
+    width: '70px',
+    cellRenderer({row}){
+      return h(ElTag,null, {
+        default: () => statusOptions.find(({value}) => String(value) === String(row.status))?.label || '--'
+      })
+    }
+  },
+  {
+    label: '标签名称',
+    prop: 'tag_name'
+  },
+  {
+    label: '标签金额',
+    width: '80px',
+    prop: 'tag_fee'
+  },
+  {
+    label: '创建人',
+    prop: 'creater'
+  },
+  {
+    label: '申请时间',
+    prop: 'addtime'
+  }
+];
+
+
+
+const contentConfig: ContentConfig = {
+  title: "销售订单公海池",
+  columns,
+  superUserNoAction: true,
+  apis: {
+    httpList:(params = {}) => httpRecord({ ...params, order_type: '1' })
+  }
+};
+
+export default contentConfig;

+ 40 - 0
src/views/InvoiceSales/sheetOrderRecord/config/modal.config.ts

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

+ 59 - 0
src/views/InvoiceSales/sheetOrderRecord/config/search.config.ts

@@ -0,0 +1,59 @@
+import { statusOptions, typeOptions } from "./_options";
+import { FormConfig } from "/@/components/PageSearch";
+
+export const businessOptions = [
+  { value: '0', label: '开票标签' },
+  { value: '1', label: '认款标签' },
+]
+
+export const functionalOptions = [
+  { value: '0', label: '添加' },
+  { value: '1', label: '修改' },
+  { value: '2', label: '解除' }
+]
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "order_timer",
+      type: "date_picker",
+      otherOptions: {
+        type: "daterange",
+        startProp: "start",
+        endProp: "end",
+        startPlaceholder: "创建起始时间",
+        endPlaceholder: "创建结束时间"
+      }
+    },
+
+    {
+      field: "supplierNo",
+      type: "supplier-query",
+      placeholder: "卖出方公司"
+    },
+    {
+      field: "type",
+      type: "select",
+      placeholder: "业务类型",
+      options: typeOptions
+    },
+    {
+      field: "status",
+      type: "select",
+      placeholder: "功能类型",
+      options: statusOptions
+    },
+    {
+      field:'orderCode',
+      type:'input',
+      placeholder: '订单编号'
+    },
+    {
+      field:'creater',
+      type:'input',
+      placeholder: '创建人'
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 24 - 0
src/views/InvoiceSales/sheetOrderRecord/index.vue

@@ -0,0 +1,24 @@
+<script setup lang="ts">
+import { ref } from "vue";
+import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
+import contentConfig from "./config/content.config";
+import searchConfig from "./config/search.config";
+
+const PageName = "sheetOrderRecord";
+
+const hooks: PageHooks = {
+  pageSearchHook: () => usePageSearch(undefined, undefined, searchConfig)
+};
+</script>
+
+<template>
+  <PageAuth :pageName="PageName">
+    <PageContainer
+      :hooks="hooks"
+      :events="events"
+      :contentConfig="contentConfig"
+      :search-config="searchConfig"
+    >
+    </PageContainer>
+  </PageAuth>
+</template>

+ 0 - 0
src/views/InvoiceSales/sheetOrderRecord/确认单标签操作记录.md


+ 1 - 1
src/views/interest/company/config/content.config.ts

@@ -91,7 +91,7 @@ const contentConfig: ContentConfig = {
   title: "数据共享",
   powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
   columns,
-  isRequesetArray: true,
+  isRequestArray: true,
   apis: {
     httpList,
     httpStatus,

+ 1 - 1
src/views/interest/userGroup/config/content.config.ts

@@ -76,7 +76,7 @@ const columns = [
 const contentConfig: ContentConfig = {
   title: "用户组",
   powers: ["001", "002", "003", "004", "005", "006", "007", "008"],
-  isRequesetArray: true,
+  isRequestArray: true,
   columns,
   apis: {
     httpList,

+ 13 - 0
src/views/purchase/orderRecordRecord/config/_options.ts

@@ -0,0 +1,13 @@
+export const statusOptions = [
+  { value: '0',label:'解除' },
+  { value: '1',label:'添加' },
+  { value: '2',label:'修改' },
+]
+
+export const typeOptions = [
+  { value: '1',label:'采购单付款' },
+  { value: '2',label:'采购单回票' },
+  { value: '3',label:'销售回款' },
+  { value: '4',label:'销售开票' },
+]
+

+ 78 - 0
src/views/purchase/orderRecordRecord/config/content.config.ts

@@ -0,0 +1,78 @@
+import { ContentConfig } from "/@/components/PageContent";
+import { httpRecord } from "/@/api/InvoiceSales/sheetOrderPool";
+import { h } from "vue";
+import { ElTag } from "element-plus";
+import { typeOptions, statusOptions } from "./_options";
+
+const columns = [
+  {
+    label: '记录ID',
+    prop: 'id',
+    width: '60px'
+  },
+  {
+    label: '订单编号',
+    prop: 'code',
+    width: '160px'
+  },
+  {
+    label: '卖出方公司',
+    prop: 'supplierName',
+    width: '200px'
+  },
+  {
+    label: '买入方公司',
+    prop: 'companyName',
+    width: '200px'
+  },
+  {
+    label: '业务类型',
+    prop: 'type',
+    width: '100px',
+    cellRenderer({row}){
+      return h(ElTag,null, {
+        default: () => typeOptions.find(({value}) => String(value) === String(row.type))?.label || '--'
+      })
+    }
+  },
+  {
+    label: '功能类型',
+    prop: 'status',
+    width: '70px',
+    cellRenderer({row}){
+      return h(ElTag,null, {
+        default: () => statusOptions.find(({value}) => String(value) === String(row.status))?.label || '--'
+      })
+    }
+  },
+  {
+    label: '标签名称',
+    prop: 'tag_name'
+  },
+  {
+    label: '标签金额',
+    width: '80px',
+    prop: 'tag_fee'
+  },
+  {
+    label: '创建人',
+    prop: 'creater'
+  },
+  {
+    label: '申请时间',
+    prop: 'addtime'
+  }
+];
+
+
+
+const contentConfig: ContentConfig = {
+  title: "销售订单公海池",
+  columns,
+  superUserNoAction: true,
+  apis: {
+    httpList:(params = {}) => httpRecord({ ...params, order_type: '2' })
+  }
+};
+
+export default contentConfig;

+ 40 - 0
src/views/purchase/orderRecordRecord/config/modal.config.ts

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

+ 59 - 0
src/views/purchase/orderRecordRecord/config/search.config.ts

@@ -0,0 +1,59 @@
+import { statusOptions, typeOptions } from "./_options";
+import { FormConfig } from "/@/components/PageSearch";
+
+export const businessOptions = [
+  { value: '0', label: '开票标签' },
+  { value: '1', label: '认款标签' },
+]
+
+export const functionalOptions = [
+  { value: '0', label: '添加' },
+  { value: '1', label: '修改' },
+  { value: '2', label: '解除' }
+]
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "order_timer",
+      type: "date_picker",
+      otherOptions: {
+        type: "daterange",
+        startProp: "start",
+        endProp: "end",
+        startPlaceholder: "创建起始时间",
+        endPlaceholder: "创建结束时间"
+      }
+    },
+
+    {
+      field: "supplierNo",
+      type: "supplier-query",
+      placeholder: "卖出方公司"
+    },
+    {
+      field: "type",
+      type: "select",
+      placeholder: "业务类型",
+      options: typeOptions
+    },
+    {
+      field: "status",
+      type: "select",
+      placeholder: "功能类型",
+      options: statusOptions
+    },
+    {
+      field:'orderCode',
+      type:'input',
+      placeholder: '订单编号'
+    },
+    {
+      field:'creater',
+      type:'input',
+      placeholder: '创建人'
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 24 - 0
src/views/purchase/orderRecordRecord/index.vue

@@ -0,0 +1,24 @@
+<script setup lang="ts">
+import { ref } from "vue";
+import { usePageSearch, type PageHooks, type PageEvents } from "/@/hooks/page";
+import contentConfig from "./config/content.config";
+import searchConfig from "./config/search.config";
+
+const PageName = "orderRecordRecord";
+
+const hooks: PageHooks = {
+  pageSearchHook: () => usePageSearch(undefined, undefined, searchConfig)
+};
+</script>
+
+<template>
+  <PageAuth :pageName="PageName">
+    <PageContainer
+      :hooks="hooks"
+      :events="events"
+      :contentConfig="contentConfig"
+      :search-config="searchConfig"
+    >
+    </PageContainer>
+  </PageAuth>
+</template>

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