Selaa lähdekoodia

fix:发票申请(新建发票)

snow 2 vuotta sitten
vanhempi
commit
da4dde4662
21 muutettua tiedostoa jossa 632 lisäystä ja 801 poistoa
  1. 0 0
      src/assets/layout-theme-default.css
  2. 1 1
      src/components/PageContent/src/actions/action-tag.tsx
  3. 7 4
      src/components/PageSearch/src/hooks/use-page-search.ts
  4. 18 0
      src/utils/calculation.ts
  5. 12 3
      src/views/InvoiceSales/capitalClaim/components/capital-detail/index.vue
  6. 38 0
      src/views/InvoiceSales/capitalClaim/config/configs.ts
  7. 57 10
      src/views/InvoiceSales/capitalPool/config/content.config.ts
  8. 5 0
      src/views/InvoiceSales/capitalPool/config/search.config.ts
  9. 114 73
      src/views/InvoiceSales/invoiceApply/components/add-edit-form/add-edit-form.vue
  10. 61 62
      src/views/InvoiceSales/invoiceApply/components/add-edit-form/columns.tsx
  11. 0 480
      src/views/InvoiceSales/invoiceApply/components/add-edit-form/invoice-show.vue
  12. 1 1
      src/views/InvoiceSales/invoiceApply/components/add-edit-form/invoice-title.vue
  13. 43 92
      src/views/InvoiceSales/invoiceApply/components/add-edit-form/order-dialog.vue
  14. 153 0
      src/views/InvoiceSales/invoiceApply/config/search.config.ts
  15. 5 0
      src/views/InvoiceSales/invoicePool/config/content.config.ts
  16. 5 0
      src/views/InvoiceSales/invoicePool/config/search.config.ts
  17. 48 5
      src/views/InvoiceSales/refund/config/content.config.ts
  18. 5 0
      src/views/InvoiceSales/refund/config/search.config.ts
  19. 58 56
      src/views/purchase/orderRecordQuery/config/content.config.ts
  20. 1 7
      src/views/purchase/ticketReturn/components/create-ticket-dialog/create-ticket-dialog.vue
  21. 0 7
      src/views/purchase/ticketReturn/config/configs.ts

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/assets/layout-theme-default.css


+ 1 - 1
src/components/PageContent/src/actions/action-tag.tsx

@@ -98,7 +98,7 @@ const ActionTag = defineComponent({
         addtagRun(
           httpBillAddTag({
             tag_id,
-            total_fee,
+            total_fee: String(total_fee),
             code: row[prop]
           })
         );

+ 7 - 4
src/components/PageSearch/src/hooks/use-page-search.ts

@@ -2,11 +2,13 @@
 import { ref } from "vue";
 import { PageContentInstance } from "/@/components/PageContent";
 
-export function usePageSearch(callback?: (params: any) => any) {
+type Fn = (params?: any) => any
+
+export function usePageSearch(searchCallback?: Fn, resetCallback?: Fn) {
   const pageContentRef = ref<PageContentInstance>(null);
 
   function handleSearchClick(params: any) {
-    const { result, deleteProps } = callback ? callback(params) : { result: {}, deleteProps: [] }
+    const { result, deleteProps } = searchCallback ? searchCallback(params) : { result: {}, deleteProps: [] }
 
     const mergeParams = {
       ...params,
@@ -15,11 +17,12 @@ export function usePageSearch(callback?: (params: any) => any) {
 
     deleteProps.forEach(key => delete mergeParams[key])
 
-    pageContentRef.value.getPageData(mergeParams);
+    pageContentRef.value?.getPageData(mergeParams);
   }
 
   function handleResetClick() {
-    pageContentRef.value.getPageData();
+    pageContentRef.value?.getPageData();
+    resetCallback && resetCallback()
   }
 
   return {

+ 18 - 0
src/utils/calculation.ts

@@ -13,3 +13,21 @@ export function accAdd(arg1, arg2) {
   m = Math.pow(10, Math.max(r1, r2));
   return (arg1 * m + arg2 * m) / m;
 }
+
+export function accSub(num1, num2) {
+  let baseNum, baseNum1, baseNum2;
+  try {
+    baseNum1 = num1.toString().split(".")[1].length;
+  } catch (e) {
+    baseNum1 = 0;
+  }
+  try {
+    baseNum2 = num2.toString().split(".")[1].length;
+  } catch (e) {
+    baseNum2 = 0;
+  }
+  baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
+  // 动态控制精度长度
+  const n = baseNum1 >= baseNum2 ? baseNum1 : baseNum2;
+  return Number(((num1 * baseNum - num2 * baseNum) / baseNum).toFixed(n));
+}

+ 12 - 3
src/views/InvoiceSales/capitalClaim/components/capital-detail/index.vue

@@ -8,13 +8,14 @@ import BasicDescriptions from "/@/components/BasicDescriptions";
 import { approval_process } from "../approval-process";
 import { CAPITAL_COLUMNS } from "/@/utils/details/tragelog";
 import PaymentReceipt from "../basic-claim/receipt-payment.vue";
+import { SALE_COLUMNS } from "/@/utils/details/sale";
 
 const { query } = useRoute();
 const { push } = useRouter();
 const responseHandle = useResponseHandle();
 const capitalDetail = ref<any>({});
 const tradeDetail = ref<any>({});
-const collapses = ref(["1", "2", "3"]);
+const collapses = ref(["1", "2", "3", "4"]);
 
 const logNo = computed(() => query.id);
 
@@ -88,8 +89,16 @@ watchEffect(() => tradeNo.value && requesetTradeDetail());
           <ElCollapseItem title="资金详情" name="1">
             <PaymentReceipt :trade-info="tradeDetail" />
           </ElCollapseItem>
+          <!-- 关联订单 -->
+          <ElCollapseItem title="关联订单" name="2">
+            <BasicDescriptions
+              :columns="SALE_COLUMNS"
+              :data="capitalDetail.orderinfo ? capitalDetail.orderinfo : {}"
+              :col-number="2"
+            />
+          </ElCollapseItem>
           <!-- 详情 -->
-          <ElCollapseItem title="认领资金详情" name="2">
+          <ElCollapseItem title="认领资金详情" name="3">
             <BasicDescriptions
               :columns="CAPITAL_COLUMNS"
               :data="capitalDetail"
@@ -99,7 +108,7 @@ watchEffect(() => tradeNo.value && requesetTradeDetail());
 
           <!-- 审核 -->
           <ElCollapseItem
-            name="3"
+            name="4"
             v-if="currentProcess"
             :title="currentProcess.title"
           >

+ 38 - 0
src/views/InvoiceSales/capitalClaim/config/configs.ts

@@ -1,3 +1,5 @@
+import { DescriptionColumns } from "/@/components/BasicDescriptions";
+
 export const order_columns = [
   {
     label: "订单编号",
@@ -280,3 +282,39 @@ export const capital_status = [
     label: "已认领"
   }
 ];
+
+//关联资金详情
+export const associatedOrder: DescriptionColumns = [
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  },
+  {
+    field: "companyName",
+    label: "业务公司名称"
+  }
+];

+ 57 - 10
src/views/InvoiceSales/capitalPool/config/content.config.ts

@@ -5,6 +5,7 @@ import dayjs from "dayjs";
 import { h } from "vue";
 import { ElTag } from "element-plus";
 import { CAPITAL_STATUS } from "/@/utils/details/tragelog";
+import { sale_source } from "../../capitalClaim/config/configs";
 
 const columns = [
   {
@@ -20,31 +21,33 @@ const columns = [
   },
   {
     label: "资金编号",
-    prop: "tradNo"
+    prop: "tradNo",
+    width: "120px"
   },
   {
     label: "资金认领编号",
-    prop: "logNo"
+    prop: "logNo",
+    width: "140px"
   },
   {
     label: "交易时间",
-    prop: "trade_time"
+    prop: "trade_time",
+    width: "120px"
   },
   {
     label: "交易银行",
-    prop: "trade_bank"
+    prop: "trade_bank",
+    width: "120px"
   },
   {
     label: "交易账户",
-    prop: "trade_account"
+    prop: "trade_account",
+    width: "120px"
   },
   {
     label: "认领资金总金额",
-    prop: "total_fee"
-  },
-  {
-    label: "申请人",
-    prop: "apply_name"
+    prop: "total_fee",
+    width: "140px"
   },
   {
     label: "状态",
@@ -56,11 +59,55 @@ const columns = [
       });
     }
   },
+  {
+    label: "销售单编号",
+    prop: "orderCode",
+    width: "120px"
+  },
+  {
+    label: "销售来源",
+    prop: "qrdSource",
+    width: "120px",
+    cellRenderer({ row }) {
+      return h(ElTag, null, {
+        default: () => sale_source.find(s => s.value === row.qrdSource)?.label
+      });
+    }
+  },
+  {
+    label: "商品编号",
+    prop: "goodNo",
+    width: "120px"
+  },
+  {
+    label: "商品名称",
+    prop: "goodName",
+    width: "120px"
+  },
+  // {
+  //   label: "商品来源",
+  //   prop: "returnCode",
+  //   width: "120px"
+  // },
+  // {
+  //   label: "订单所属平台",
+  //   prop: "returnCode",
+  //   width: "120px"
+  // },
+  // {
+  //   label: "平台订单编号",
+  //   prop: "returnCode",
+  //   width: "120px"
+  // },
   {
     label: "认领时间",
     prop: "addtime",
     formatter: ({ addtime }) => dayjs(addtime).format("YYYY-MM-DD HH:mm:ss")
   },
+  {
+    label: "申请人",
+    prop: "apply_name"
+  },
   {
     label: "操作",
     fixed: "right",

+ 5 - 0
src/views/InvoiceSales/capitalPool/config/search.config.ts

@@ -19,6 +19,11 @@ const searchFormConfig: FormConfig = {
       placeholder: "请选择认领状态",
       options: CAPITAL_STATUS
     },
+    {
+      field: "orderCode",
+      type: "input",
+      placeholder: "销售单编号"
+    },
     {
       field: "timer",
       type: "date_picker",

+ 114 - 73
src/views/InvoiceSales/invoiceApply/components/add-edit-form/add-edit-form.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
 import { FormRules, ElForm } from "element-plus";
-import { reactive, ref, watchEffect } from "vue";
+import { reactive, ref, watchEffect, watch } from "vue";
 import { httpAdd } from "/@/api/InvoiceSales/invoiceApply";
 import RemoteSelect from "/@/components/RemoteSelect";
 import { httpInvoiceList } from "/@/api/InvoiceSales/invoiceApply";
@@ -9,10 +9,10 @@ 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 { inv_type_list } from "./../../status";
 import InvoiceTitle from "./invoice-title.vue";
-import { convertInvoiceTitle } from "./columns";
+import { convertInvoiceTitle, convertInvoiceTitleData } from "./columns";
 import { ADD_EDIT_FORM_RULES, requriedEmail } from "./../../config/configs";
 
 enum FROM_TYPE {
@@ -36,7 +36,7 @@ const initform = {
   buy_id: "", //购买方公司抬头
   invtype: "", //开票类型
   email: "", //邮箱
-  remark: "", //备注
+  remark: "", //发票备注
   exam_remark: "", //申请备注
   orderArr: [], //开票销售单明细 obj:sequenceNo//销售单编号 inv_fee//销售单开票金额,
   companyType: "01"
@@ -58,8 +58,23 @@ function handleEdit({ row, inv_fee, num }) {
   };
 }
 
+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 } = orderList.value[index];
+  const { sequenceNo, poCode } = orderList.value[index];
+  removeRemarkPo(poCode, index);
   delete mapSequenceNoToInvfee.value[sequenceNo];
   orderList.value.splice(index, 1);
 };
@@ -102,11 +117,15 @@ function menu_type_change() {
 
 function handleAddOrder(list) {
   orderList.value = list;
-  list.forEach(({ sequenceNo, winv_fee, goodNum }) => {
+  ruleForm.value.remark = "";
+
+  list.forEach(({ sequenceNo, winv_fee, wsendNum, poCode }, index) => {
     mapSequenceNoToInvfee.value[sequenceNo] = {
       inv_fee: winv_fee,
-      num: goodNum
+      num: wsendNum
     };
+
+    ruleForm.value.remark += index === 0 ? poCode : ";" + poCode;
   });
 }
 
@@ -125,20 +144,17 @@ function handleInvoiceTitle(
   }
 
   _isSeller
-    ? (sellerInvoiceTitle.value = convertInvoiceTitle(invoiceTitle))
-    : (purchaserInvoiceTitle.value = invoiceTitle);
+    ? (sellerInvoiceTitle.value = convertInvoiceTitleData(
+        convertInvoiceTitle(invoiceTitle)
+      ))
+    : (purchaserInvoiceTitle.value = convertInvoiceTitleData(invoiceTitle));
 }
 
 const setSellerInvoiceTitle = handleInvoiceTitle.bind(null, true);
 const setPurchaserInvoiceTitle = handleInvoiceTitle.bind(null, false);
 
 watchEffect(() => {
-  const { companyNo, buy_id, invtype } = ruleForm.value;
-  if (!companyNo || !buy_id) {
-    orderList.value = [];
-    mapSequenceNoToInvfee.value = {};
-  }
-
+  const { invtype } = ruleForm.value;
   if (["3", "4"].includes(invtype)) {
     rules.email[0].required = true;
     rules.email[0].validator = requriedEmail;
@@ -147,6 +163,15 @@ watchEffect(() => {
     rules.email[0].validator = () => true;
   }
 });
+
+watch(
+  () => ruleForm.value.companyNo,
+  () => {
+    ruleForm.value.remark = "";
+    orderList.value = [];
+    mapSequenceNoToInvfee.value = {};
+  }
+);
 </script>
 
 <template>
@@ -221,14 +246,15 @@ watchEffect(() => {
         </el-col>
 
         <el-col :span="8">
-          <el-form-item label="票备注" prop="remark" label-width="135px">
+          <el-form-item label="票备注" prop="remark" label-width="135px">
             <el-input
               w-full
               v-model="ruleForm.remark"
               :rows="3"
               type="textarea"
-              maxlength="2000"
-              placeholder="申请备注"
+              maxlength="184"
+              show-word-limit
+              placeholder="发票备注"
             /> </el-form-item
         ></el-col>
 
@@ -244,62 +270,77 @@ watchEffect(() => {
             /> </el-form-item
         ></el-col>
         <el-col :span="24" v-show="TYPE === 'order'">
-          <el-table :data="orderList" stripe border>
-            <el-table-column
-              prop="sequenceNo"
-              label="销售订单编号"
-              width="200"
-            />
-            <el-table-column
-              prop="customerNo"
-              label="购买方公司编号"
-              width="200"
-            />
-            <el-table-column
-              prop="customerName"
-              label="购买方公司名称"
-              show-overflow-tooltip
-              width="200"
-            />
+          <el-form-item label="订单列表">
+            <div flex justify-between w-full mb-2>
+              <el-tag>共计:{{ orderList.length }}个订单</el-tag>
+              <el-button type="primary" @click="() => modelRef.show()"
+                >添加销售订单</el-button
+              >
+            </div>
+            <el-table :data="orderList" stripe border>
+              <el-table-column
+                prop="sequenceNo"
+                label="销售订单编号"
+                width="200"
+              />
+              <el-table-column
+                prop="poCode"
+                label="po编号"
+                show-overflow-tooltip
+                width="200"
+              />
+              <el-table-column
+                prop="customerNo"
+                label="购买方公司编号"
+                width="200"
+              />
+              <el-table-column
+                prop="customerName"
+                label="购买方公司名称"
+                show-overflow-tooltip
+                width="200"
+              />
+
+              <el-table-column prop="winv_fee" label="未开票" width="120" />
+              <el-table-column prop="wsendNum" label="未发数量" width="120" />
+
+              <el-table-column label="开票金额" width="110">
+                <template #="{ row }">{{
+                  mapSequenceNoToInvfee[row.sequenceNo].inv_fee
+                }}</template>
+              </el-table-column>
 
-            <el-table-column prop="ainv_fee" label="已开票" width="120" />
-            <el-table-column prop="inv_fee" label="开票中" width="120" />
-            <el-table-column prop="winv_fee" label="未开票" width="120" />
-
-            <el-table-column label="开票金额" width="110">
-              <template #="{ row }">{{
-                mapSequenceNoToInvfee[row.sequenceNo].inv_fee
-              }}</template>
-            </el-table-column>
-
-            <el-table-column>
-              <template #header>
-                <span>操作</span>
-                <el-button
-                  size="small"
-                  class="fr"
-                  @click="() => modelRef.show()"
-                  >添加订单</el-button
-                >
-              </template>
-              <template #default="scope">
-                <el-button
-                  size="small"
-                  type="primary"
-                  link
-                  @click="handleShowEditModal(scope.$index, scope.row)"
-                  >编辑</el-button
-                >
-                <el-button
-                  size="small"
-                  type="danger"
-                  link
-                  @click="handleDelete(scope.$index)"
-                  >删除</el-button
-                >
-              </template>
-            </el-table-column>
-          </el-table>
+              <el-table-column label="开票数量" width="110">
+                <template #="{ row }">{{
+                  mapSequenceNoToInvfee[row.sequenceNo].num
+                }}</template>
+              </el-table-column>
+
+              <el-table-column label="业务员" 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-row>
       <div class="flex justify-end mt-2">

+ 61 - 62
src/views/InvoiceSales/invoiceApply/components/add-edit-form/columns.tsx

@@ -13,45 +13,45 @@ export function useColumns() {
       minWidth: 160,
       showOverflowTooltip: true
     },
-
     {
-      label: "所属平台",
-      prop: "department",
+      label: "企业客户编号",
+      prop: "companyNo",
       minWidth: 160,
       showOverflowTooltip: true
     },
     {
-      label: "商品编码",
-      prop: "goodNo",
+      label: "企业客户名称",
+      prop: "companyName",
       minWidth: 160,
       showOverflowTooltip: true
     },
     {
-      label: "商品名称",
-      prop: "goodName",
+      label: "商品编码",
+      prop: "goodNo",
       minWidth: 160,
       showOverflowTooltip: true
     },
     {
-      label: "企业客户编号",
-      prop: "companyNo",
+      label: "商品名称",
+      prop: "goodName",
       minWidth: 160,
       showOverflowTooltip: true
     },
     {
-      label: "企业客户名称",
-      prop: "companyName",
-      minWidth: 160,
-      showOverflowTooltip: true
+      label: "po编号",
+      prop: "poCode",
+      minWidth: 160
     },
-
     {
       label: "订单总金额",
       prop: "totalPrice",
       minWidth: 110,
       showOverflowTooltip: true
     },
-
+    {
+      label: "商品数量",
+      prop: "goodNum"
+    },
     {
       label: "退货数量",
       prop: "th_fee",
@@ -64,30 +64,6 @@ export function useColumns() {
       width: 110,
       showOverflowTooltip: true
     },
-    {
-      label: "发货状态",
-      prop: "sendStatus",
-      minWidth: 110,
-      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: "ainv_fee",
@@ -106,7 +82,6 @@ export function useColumns() {
       minWidth: 110,
       showOverflowTooltip: true
     },
-
     {
       label: "发票核销状态",
       prop: "inv_type",
@@ -130,6 +105,30 @@ export function useColumns() {
         </el-tag>
       )
     },
+    {
+      label: "发货状态",
+      prop: "sendStatus",
+      minWidth: 110,
+      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: "ownerName",
@@ -206,18 +205,10 @@ export const order_detail_columns = [
  * @invoice_bankNo 开户账户
  */
 export const convertInvoiceTitle = (title: Record<string, string>) => {
-  const {
-    company_address,
-    contector,
-    mobile,
-    company_license,
-    bank_name,
-    bankNo
-  } = title;
+  const { company_address, mobile, company_license, bank_name, bankNo } = title;
 
   return {
     invoice_addr: company_address,
-    invoice_people: contector,
     invoice_mobile: mobile,
     invoice_code: company_license,
     invoice_bank: bank_name,
@@ -225,25 +216,33 @@ export const convertInvoiceTitle = (title: Record<string, string>) => {
   };
 };
 
+export const convertInvoiceTitleData = (title: Record<string, string>) => {
+  const {
+    invoice_addr,
+    invoice_mobile,
+    invoice_code,
+    invoice_bank,
+    invoice_bankNo
+  } = title;
+
+  return {
+    invoice_code,
+    addrAndmobile: invoice_addr + " " + invoice_mobile,
+    bankAndBankNo: invoice_bank + " " + invoice_bankNo
+  };
+};
+
 export const invoice_columns = [
   {
-    label: "联系方式",
-    field: "invoice_mobile"
-  },
-  {
-    label: "纳税识别号",
+    label: "纳税人识别号",
     field: "invoice_code"
   },
   {
-    label: "开户行",
-    field: "invoice_bank"
-  },
-  {
-    label: "开户账户",
-    field: "invoice_bankNo"
+    label: "地址、电话",
+    field: "addrAndmobile"
   },
   {
-    label: "公司注册地址",
-    field: "invoice_addr"
+    label: "开户行及账号",
+    field: "bankAndBankNo"
   }
 ];

+ 0 - 480
src/views/InvoiceSales/invoiceApply/components/add-edit-form/invoice-show.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>

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

@@ -14,7 +14,7 @@ defineProps<{
     v-if="Object.keys(detail).length !== 0"
     :data="detail"
     :columns="invoice_columns"
-    :col-number="2"
+    :col-number="1"
     label-width="100px"
   />
 </template>

+ 43 - 92
src/views/InvoiceSales/invoiceApply/components/add-edit-form/order-dialog.vue

@@ -5,9 +5,9 @@ import { responseHandle } from "/@/utils/responseHandle";
 import { useNav } from "/@/layout/hooks/nav";
 import { useColumns } from "./columns";
 import { type PaginationProps } from "@pureadmin/table";
+import { PageSearch, usePageSearch } from "/@/components/PageSearch";
+import searchFormConfig from "./../../config/search.config";
 import { ElMessage } from "element-plus";
-import { httpList as httpBuyList } from "/@/api/parameter/invoiceheader";
-import RemoteSelect from "/@/components/RemoteSelect";
 
 const { columns } = useColumns();
 const { logout } = useNav();
@@ -17,10 +17,6 @@ const dataList = ref([]);
 const tableRef = ref();
 const handleSelection = ref([]);
 
-// defineProps<{
-
-// }>()
-
 const pagination = reactive<PaginationProps>({
   total: 0,
   pageSize: 15,
@@ -28,6 +24,7 @@ const pagination = reactive<PaginationProps>({
   background: true
 });
 const emit = defineEmits(["reload", "save-btn-click"]);
+let otherParams: Record<any, any> = {};
 const initform = {
   page: 1,
   size: 10,
@@ -45,37 +42,34 @@ const initform = {
 };
 const ruleForm = ref({ ...initform });
 
-async function show() {
-  showModel.value = true;
-  await onSearch();
-}
-
-const startDisabledDate = (time: Date) => {
-  const { end } = ruleForm;
-  if (end ?? "") {
-    return time.getTime() > Date.now(end).valueOf();
-  }
-};
-const endDisabledDate = (time: Date) => {
-  const { start } = ruleForm;
-  if (start ?? "") {
-    return time.getTime() < Date.now(start).valueOf();
+const { handleSearchClick, handleResetClick } = usePageSearch(
+  params => {
+    otherParams = params;
+    onSearch();
+
+    return {
+      result: {},
+      deleteProps: []
+    };
+  },
+  () => {
+    otherParams = {};
+    console.log(123);
+    onSearch();
   }
-};
+);
 
-async function handleCurrentChange(val: number) {
-  ruleForm.value.page = val;
-  await onSearch();
-}
+const handleCurrentChange = (current: number) => {
+  ruleForm.value.page = current;
+  onSearch();
+};
 
-async function handleSizeChange(val: number) {
-  ruleForm.value.size = val;
-  ruleForm.value.page = 1;
+async function show() {
+  showModel.value = true;
   await onSearch();
 }
 
 function handleSelectionChange(val) {
-  console.log(val);
   handleSelection.value = val;
 }
 
@@ -84,8 +78,10 @@ async function onSearch() {
   loading.value = true;
   const { code, data, message } = await httpOrderList({
     cat_status: "1",
-    ...ruleForm.value
+    ...ruleForm.value,
+    ...otherParams
   });
+
   responseHandle({
     code,
     message,
@@ -101,15 +97,21 @@ async function onSearch() {
   loading.value = false;
 }
 
-async function companyNo_change() {
-  const { customerNo } = ruleForm.value;
-  console.log(customerNo);
-}
-
 function handleConfirm() {
   const selectList = unref(handleSelection);
   if (selectList.length === 0) return ElMessage.error("至少选择一个销售订单!");
 
+  //商品数量或开票金额为空
+  const noConfirm = selectList.filter(
+    o => o.goodNum === "0" || o.winv_fee === "0.00"
+  );
+
+  if (noConfirm.length !== 0) {
+    return ElMessage.error(
+      `销售单 ${noConfirm[0].SequenceNo} 开票金额或数量为空`
+    );
+  }
+
   emit("save-btn-click", selectList);
   showModel.value = false;
 }
@@ -131,61 +133,11 @@ defineExpose({
       title="添加销售订单"
       :width="'1040px'"
     >
-      <el-row :gutter="10" mb-2>
-        <el-col :span="12">
-          <RemoteSelect
-            v-model:value="ruleForm.customerNo"
-            :api="httpBuyList"
-            style="width: 100%"
-            placeholder="客户公司"
-            response-label-prop="invoice_title"
-            response-val-prop="checkNo"
-            @itemChange="companyNo_change()"
-          />
-        </el-col>
-        <el-col :span="10">
-          <el-date-picker
-            v-model="ruleForm.start"
-            type="daterange"
-            start-placeholder="开始时间"
-            end-placeholder="结束时间"
-            format="YYYY-MM-DD"
-            value-forma="YYYY-MM-DD"
-          />
-        </el-col>
-        <el-col :span="5">
-          <el-date-picker
-            v-model="ruleForm.start"
-            :disabled-date="startDisabledDate"
-            type="date"
-            style="width: 100%"
-            placeholder="申请开始时间"
-          />
-        </el-col>
-        <el-col :span="5">
-          <el-date-picker
-            v-model="ruleForm.end"
-            :disabled-date="endDisabledDate"
-            type="date"
-            style="width: 100%"
-            placeholder="申请结束时间"
-          />
-        </el-col>
-        <el-col :span="6">
-          <el-input
-            v-model="ruleForm.platName"
-            placeholder="平台名称"
-            clearable
-          />
-        </el-col>
-        <el-col :span="6">
-          <el-input
-            v-model="ruleForm.sequenceNo"
-            placeholder="订单编号"
-            clearable
-        /></el-col>
-      </el-row>
-
+      <PageSearch
+        @reset-btn-click="handleResetClick"
+        @search-btn-click="handleSearchClick"
+        :form-config="searchFormConfig"
+      />
       <div v-loading="loading">
         <PureTable
           ref="tableRef"
@@ -200,7 +152,6 @@ defineExpose({
           :paginationSmall="true"
           :header-cell-style="{ background: '#fafafa', color: '#606266' }"
           @selection-change="handleSelectionChange"
-          @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
         />
       </div>

+ 153 - 0
src/views/InvoiceSales/invoiceApply/config/search.config.ts

@@ -0,0 +1,153 @@
+import { FormConfig } from "/@/components/PageSearch";
+export const USE_STATUS = [
+  {
+    value: "0",
+    label: "未对账"
+  },
+  {
+    value: "1",
+    label: "参与对账"
+  },
+  {
+    value: "2",
+    label: "参与核销对账"
+  }
+];
+
+export const inv_open_status = [
+  {
+    value: "1",
+    label: "未开票"
+  },
+  {
+    value: "2",
+    label: "部分开票"
+  },
+  {
+    value: "3",
+    label: "已开票"
+  }
+];
+
+export const retrun_status = [
+  {
+    value: "1",
+    label: "未回款"
+  },
+  {
+    value: "2",
+    label: "部分回款"
+  },
+  {
+    value: "3",
+    label: "已回款"
+  }
+];
+
+export const good_type = [
+  {
+    value: "1",
+    label: "库存品"
+  },
+  {
+    value: "2",
+    label: "非库存"
+  },
+  {
+    value: "3",
+    label: "咨询"
+  }
+];
+
+export const good_source = [
+  {
+    value: "1",
+    label: "直接下单"
+  },
+  {
+    value: "2",
+    label: "咨询"
+  },
+  {
+    value: "3",
+    label: "项目"
+  },
+  {
+    value: "4",
+    label: "平台"
+  },
+  {
+    value: "5",
+    label: "有赞"
+  },
+  {
+    value: "6",
+    label: "售后补换货"
+  }
+];
+
+export const seend_type = [
+  {
+    value: "1",
+    label: "未发货"
+  },
+  {
+    value: "2",
+    label: "部分发货"
+  },
+  {
+    value: "3",
+    label: "已发货"
+  }
+];
+
+export const cat_status = [
+  {
+    value: "0",
+    label: "未设置"
+  },
+  {
+    value: "1",
+    label: "已设置"
+  }
+];
+
+const searchFormConfig: FormConfig = {
+  formItems: [
+    {
+      field: "order_timer",
+      type: "date_picker",
+      otherOptions: {
+        type: "daterange",
+        startPlaceholder: "下单起始时间",
+        endPlaceholder: "下单结束时间"
+      }
+    },
+    {
+      field: "sequenceNo",
+      type: "input",
+      placeholder: "订单编号"
+    },
+    {
+      field: "customer",
+      type: "input",
+      placeholder: "客户名称"
+    },
+    {
+      field: "inv_status",
+      type: "select",
+      placeholder: "开票状态",
+      options: inv_open_status,
+      span: 4
+    },
+    {
+      field: "sendstatus",
+      type: "select",
+      placeholder: "发货状态",
+      options: seend_type,
+      span: 4
+    }
+  ]
+};
+
+export default searchFormConfig;

+ 5 - 0
src/views/InvoiceSales/invoicePool/config/content.config.ts

@@ -23,6 +23,11 @@ const columns = [
     prop: "invNo",
     width: 160
   },
+  {
+    prop: "buyer_title",
+    label: "客户发票抬头",
+    width: 160
+  },
   {
     label: "业务企业编号",
     prop: "inv_out",

+ 5 - 0
src/views/InvoiceSales/invoicePool/config/search.config.ts

@@ -13,6 +13,11 @@ const searchFormConfig: FormConfig = {
       type: "input",
       placeholder: "业务企业公司"
     },
+    {
+      field: "buyer_name",
+      type: "input",
+      placeholder: "客户发票抬头"
+    },
     {
       field: "timer",
       type: "date_picker",

+ 48 - 5
src/views/InvoiceSales/refund/config/content.config.ts

@@ -6,6 +6,7 @@ import { ElTag, ElImage } from "element-plus";
 import { h } from "vue";
 import { RETRUN_STATUS } from "/@/utils/details/refund";
 import { refund_type } from "./search.config";
+import { sale_source } from "../../capitalClaim/config/configs";
 
 const columns = [
   {
@@ -21,19 +22,58 @@ const columns = [
   },
   {
     label: "退款编号",
-    prop: "returnCode"
+    prop: "returnCode",
+    width: "120px"
   },
   {
-    label: "资金编号",
-    prop: "tradNo"
+    label: "资金认领编号",
+    prop: "logNo",
+    width: 120
   },
   {
-    label: "资金认领编号",
-    prop: "logNo"
+    label: "销售单编号",
+    prop: "orderCode",
+    width: "120px"
+  },
+  {
+    label: "销售来源",
+    prop: "qrdSource",
+    width: "120px",
+    cellRenderer({ row }) {
+      return h(ElTag, null, {
+        default: () => sale_source.find(s => s.value === row.qrdSource)?.label
+      });
+    }
+  },
+  {
+    label: "商品编号",
+    prop: "goodNo",
+    width: "120px"
+  },
+  {
+    label: "商品名称",
+    prop: "goodName",
+    width: "120px"
   },
+  // {
+  //   label: "商品来源",
+  //   prop: "returnCode",
+  //   width: "120px"
+  // },
+  // {
+  //   label: "订单所属平台",
+  //   prop: "returnCode",
+  //   width: "120px"
+  // },
+  // {
+  //   label: "平台订单编号",
+  //   prop: "returnCode",
+  //   width: "120px"
+  // },
   {
     label: "退款回执",
     prop: "return_img",
+    width: "120px",
     cellRenderer: ({ row }) => {
       return h(ElImage, {
         src: row.return_img,
@@ -45,10 +85,12 @@ const columns = [
   },
   {
     label: "退款原因",
+    width: "120px",
     prop: "return_reason"
   },
   {
     label: "申请人id",
+    width: "120px",
     prop: "apply_id"
   },
   {
@@ -58,6 +100,7 @@ const columns = [
   {
     label: "退款类型",
     prop: "status",
+    width: "120px",
     cellRenderer: ({ row }) => {
       return h(ElTag, null, {
         default: () =>

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

@@ -43,6 +43,11 @@ const searchFormConfig: FormConfig = {
       type: "input",
       placeholder: "退款编号"
     },
+    {
+      field: "orderCode",
+      type: "input",
+      placeholder: "销售单编号"
+    },
     {
       field: "apply_id",
       type: "input",

+ 58 - 56
src/views/purchase/orderRecordQuery/config/content.config.ts

@@ -6,8 +6,7 @@ import dayjs from "dayjs";
 import { ElTag } from "element-plus";
 import { statusOptions } from "/@/utils/details/reconciliation";
 import { PAY_STATUS } from "/@/utils/details/purchase";
-import { TAG_TYPE } from "/@/utils/global";
-import { accAdd } from "/@/utils/calculation";
+import { accAdd, accSub } from "/@/utils/calculation";
 
 const columns = [
   {
@@ -23,57 +22,81 @@ const columns = [
     align: "left",
     hide: ({ checkList }) => !checkList.includes("序号列")
   },
+  // {
+  //   label: "对账编号",
+  //   prop: "payNo",
+  //   minWidth: 180,
+  //   align: "left"
+  // },
+  // {
+  //   label: "供应商编号",
+  //   prop: "supplierNo",
+  //   minWidth: 180,
+  //   align: "left"
+  // },
+  // {
+  //   label: "供应商名称",
+  //   prop: "supplierName",
+  //   minWidth: 180,
+  //   align: "left"
+  // },
   {
-    label: "对账编号",
-    prop: "payNo",
-    minWidth: 180,
-    align: "left"
+    label: "总额款",
+    prop: "total_fee",
+    minWidth: 120,
+    align: "total_fee"
   },
   {
-    label: "供应商编号",
-    prop: "supplierNo",
-    minWidth: 180,
+    label: "回票标签名称",
+    prop: "inv_tag_name",
+    minWidth: 120,
     align: "left"
   },
   {
-    label: "供应商名称",
-    prop: "supplierName",
-    minWidth: 180,
+    label: "回票标签金额",
+    prop: "inv_tag_fee",
+    minWidth: 120,
     align: "left"
   },
   {
-    label: "标签类型",
-    prop: "tag_id",
-    width: "120px",
-    cellRenderer: ({ row, props }) =>
-      h(
-        ElTag,
-        {
-          size: props.size
-        },
-        {
-          default: () =>
-            TAG_TYPE.find(t => t.value === row.tag_id)?.label || "无标签"
-        }
-      )
+    label: "未回票金额",
+    prop: "winv_fee",
+    minWidth: 180,
+    align: "left",
+    formatter: ({ inv_tag, winv_fee, inv_tag_fee }) =>
+      inv_tag === "1" ? Number(winv_fee) - Number(inv_tag_fee) : winv_fee
   },
   {
-    label: "标签金额",
-    prop: "tag_fee"
+    label: "回票中",
+    prop: "inv_fee",
+    minWidth: 180
   },
   {
-    label: "总额款",
-    prop: "total_fee",
+    label: "已回票金额",
+    prop: "ainv_fee",
     minWidth: 180,
-    align: "total_fee"
+    align: "left",
+    formatter: ({ inv_tag, ainv_fee, inv_tag_fee }) =>
+      inv_tag === "1" ? accAdd(ainv_fee, inv_tag_fee) : ainv_fee
+  },
+  {
+    label: "付款标签名称",
+    prop: "pay_tag_name",
+    minWidth: 120
+  },
+  {
+    label: "付款标签金额",
+    prop: "pay_tag_fee",
+    minWidth: 120,
+    align: "left"
   },
   {
     label: "未付款金额",
     prop: "wpay_fee",
     minWidth: 180,
     align: "left",
-    formatter: ({ tag_id, wpay_fee, tag_fee }) =>
-      tag_id === "1" ? Number(wpay_fee) - Number(tag_fee) : wpay_fee
+    formatter: ({ pay_tag, wpay_fee, pay_tag_fee }) =>
+      pay_tag === "1" ? accSub(wpay_fee, pay_tag_fee) : wpay_fee
   },
   {
     label: "付款中金额",
@@ -86,29 +109,8 @@ const columns = [
     prop: "apay_fee",
     minWidth: 180,
     align: "left",
-    formatter: ({ tag_id, apay_fee, tag_fee }) =>
-      tag_id === "1" ? accAdd(apay_fee, tag_fee) : apay_fee
-  },
-  {
-    label: "未回票金额",
-    prop: "winv_fee",
-    minWidth: 180,
-    align: "left",
-    formatter: ({ tag_id, winv_fee, tag_fee }) =>
-      tag_id === "2" ? Number(winv_fee) - Number(tag_fee) : winv_fee
-  },
-  {
-    label: "回票中",
-    prop: "inv_fee",
-    minWidth: 180
-  },
-  {
-    label: "已回票金额",
-    prop: "ainv_fee",
-    minWidth: 180,
-    align: "left",
-    formatter: ({ tag_id, ainv_fee, tag_fee }) =>
-      tag_id === "2" ? accAdd(ainv_fee, tag_fee) : ainv_fee
+    formatter: ({ pay_tag, apay_fee, pay_tag_fee }) =>
+      pay_tag === "1" ? accAdd(apay_fee, pay_tag_fee) : apay_fee
   },
   {
     label: "申请人",

+ 1 - 7
src/views/purchase/ticketReturn/components/create-ticket-dialog/create-ticket-dialog.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 import { dayjs, ElForm, ElInput, ElMessage, UploadProps } from "element-plus";
 import { ticketFormItems, ticketAddRules } from "../../config/configs";
-import { computed, ref, watch, watchEffect } from "vue";
+import { computed, ref, watch } from "vue";
 import { httpAdd } from "/@/api/purchase/ticketReturn";
 import { useResponseHandle } from "/@/hooks";
 import { httpImageUpload, baseUrl } from "/@/api/other";
@@ -132,12 +132,6 @@ watch(
   }
 );
 
-//增值税专票校验码不必填
-watchEffect(
-  () =>
-    (rules.value.checkNumber[0].required = formData.value.invoiceType !== "01")
-);
-
 const disabledDate = time => {
   return time.getTime() > Date.now();
 };

+ 0 - 7
src/views/purchase/ticketReturn/config/configs.ts

@@ -139,13 +139,6 @@ export const ticketAddRules: FormRules = {
       required: true
     }
   ],
-  checkNumber: [
-    {
-      trigger: "blur",
-      message: "请选择校验码",
-      required: true
-    }
-  ],
   open_time: [
     {
       trigger: "blur",

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä