Browse Source

Merge branch 'v3.0' into sit

snow 3 months ago
parent
commit
b9e0e56952

+ 1 - 0
src/components/BasicForm/src/types.ts

@@ -33,6 +33,7 @@ export type FormItem = {
   type_field?: string;
   slot?: string;
   defaultValue?:any
+  selectWidth?: string
 };
 
 export type FormGorup = {

+ 15 - 3
src/views/InvoiceSales/batchImportYunlong/ProcessModal.vue

@@ -161,8 +161,21 @@ async function setFormData(groupData: any[]) {
 
         formData.value.orderArr[index].num = item.current_inv_num
         const { current_inv_fee, ainv_fee, inv_fee, apay_fee, sequenceNo, pay_tag_fee } = item
-        const invTotal = Number(current_inv_fee) + Number(ainv_fee) + Number(inv_fee)
-        const payTotal = + Number(pay_tag_fee) + Number(apay_fee)
+        
+        const invTotal = addition(addition(current_inv_fee, ainv_fee), inv_fee)
+        const payTotal = +  addition(pay_tag_fee, apay_fee)
+        // console.log(
+        //   '本次开票:' + current_inv_fee,
+        //   '已开票金额:' + ainv_fee,
+        //   '开票中金额:' + inv_fee
+        // )
+
+        //   '回款标签金额:' + pay_tag_fee,
+        //   '已回款金额' + apay_fee
+        // )
+
+        // console.log('票金额:' + invTotal)
+        // console.log('款金额:' + payTotal)
 
         if (invTotal > payTotal) {
           emit('updateSequenceNo', { sequenceNo, group: state.currentGroup, remark: '订单已开票金额+开票中金额+本次开票金额必须小于或等于已认款金额+回款标签金额', status: 3 })
@@ -183,7 +196,6 @@ async function setFormData(groupData: any[]) {
 
 
       // console.log('参数:',formData.value)
-
       const { code, message, data } = await httpAdd({
         ...formData.value,
         companyType: '01',

+ 33 - 30
src/views/InvoiceSales/capitalPool/base-form/choose-invoice-modal/config/content.config.ts

@@ -17,6 +17,37 @@ const columns = [
     fixed: "left",
     width: 150
   },
+  {
+    label: '客户机构名称',
+    width: 160,
+    prop: 'customerName'
+  },
+  {
+    label: '客户PO',
+    width: 120,
+    prop: 'poCode'
+  },
+  {
+    label: '平台物料名称',
+    width: 120,
+    prop: 'goodName'
+  },
+  {
+    label: '产品数量',
+    width: 120,
+    prop: 'goodNum'
+  },
+  {
+    label: '平台公司收入单价',
+    width: 120,
+    prop: 'platPrice'
+  },
+  {
+    label: '平台公司收入总价',
+    width: 120,
+    prop: 'plat_total'
+  },
+  
   {
     label: '批次号',
     width: 100,
@@ -51,11 +82,7 @@ const columns = [
     width: 120,
     prop: 'trade_time'
   },
-  {
-    label: '客户机构名称',
-    width: 160,
-    prop: 'customerName'
-  },
+
   {
     label: '客户付款银行户名',
     width: 120,
@@ -71,11 +98,7 @@ const columns = [
     width: 120,
     prop: 'trade_account'
   },
-  {
-    label: '客户PO',
-    width: 120,
-    prop: 'poCode'
-  },
+
   {
     label: '客户DN',
     width: 120,
@@ -91,26 +114,6 @@ const columns = [
     width: 120,
     prop: 'skuCode'
   },
-  {
-    label: '平台物料名称',
-    width: 120,
-    prop: 'goodName'
-  },
-  {
-    label: '产品数量',
-    width: 120,
-    prop: 'goodNum'
-  },
-  {
-    label: '平台公司收入单价',
-    width: 120,
-    prop: 'platPrice'
-  },
-  {
-    label: '平台公司收入总价',
-    width: 120,
-    prop: 'plat_total'
-  },
   {
     label: '业务公司收入单价',
     width: 120,

+ 2 - 1
src/views/InvoiceSales/capitalPool/base-form/choose-invoice-modal/config/search.config.ts

@@ -68,13 +68,14 @@ const searchFormConfig: FormConfig = {
       type_field: "group_type",
       type: "input_group",
       span: 8,
+      selectWidth: '80px',
       otherOptions: {
         inputGroupOptions: [
           { value: "tradNo", label: "资金编号" },
           { value: "palt_po", label: "平台采购PO" },
           { value: "pcCode", label: "批次号" },
           // { value: "name", label: "客户机构名称" },
-          { value: "poCode", label: "客户PO" },
+          // { value: "poCode", label: "客户PO" },
           { value: "NdCode", label: "客户DN" },
           { value: "skuCode", label: "泰e购SKU" },
           // { value: "goodName", label: "平台物料名称" },

+ 5 - 0
src/views/InvoiceSales/capitalPool/base-form/configs.ts

@@ -286,6 +286,11 @@ export const sale_columns = [
     width: 160,
     align: "left"
   },
+  {
+    label: "平台订单号",
+    field: "poCode",
+    width: 160,
+  },
   {
     field: "goodName",
     label: "商品名称",

+ 2 - 1
src/views/InvoiceSales/capitalPool/base-form/index.vue

@@ -27,6 +27,7 @@ const addTask = useTask({ success(){
     ElMessage.success('新建成功')
     formData.value = { tradNo: '', orderArr: [] }
     saleOrderList.value = []
+    mapSequenceNoToWpayfee.value = {}
     detailTask.data = null
   } else {
     ElMessage.success('新建成功')
@@ -151,7 +152,7 @@ function handleChoose(row = ({} as any)){
     </ElForm>
 
     <div flex justify-end mt-3 v-if="disabled">
-      <ElButton  @click="handleCreate">
+      <ElButton  @click="handleCreate(false)">
         保存并返回
        </ElButton>
 

+ 66 - 103
src/views/InvoiceSales/capitalPool/base-form/sales-modal.vue

@@ -22,6 +22,9 @@ const parameter = reactive({
 
 const data = ref<Record<string, any>>({
   timer: [],
+  poCode: '',
+  goodNo: '',
+  goodName: '',
   tag_id: '',
   cat_status: '',
   inv_status: '',
@@ -97,6 +100,9 @@ const search = (isReset?: boolean) => {
   if (isReset) {
     data.value = {
       timer: [],
+      poCode: '',
+      goodNo: '',
+      goodName: '',
       tag_id: '',
       cat_status: '',
       inv_status: '',
@@ -147,7 +153,7 @@ const searchOptions = [
   { value: "customerNo", label: "客户编码" },
   { value: "customer", label: "客户名称" },
   { value: "platName", label: "平台名称" },
-  { value: "poCode", label: "平台订单号" },
+  // { value: "poCode", label: "平台订单号" },
   { value: "department", label: "部门" },
   { value: "saler", label: "销售员" }
 ]
@@ -164,16 +170,8 @@ onMounted(() => requestSalelist());
 </script>
 
 <template>
-  <ElDialog
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    @close="() => (selectSaleOrder = [])"
-    v-model="visible"
-    width="1040px"
-    :title="title"
-    top="10px"
-    center
-  >
+  <ElDialog :close-on-click-modal="false" :close-on-press-escape="false" @close="() => (selectSaleOrder = [])"
+    v-model="visible" width="1040px" :title="title" top="10px" center>
     <ElRow :gutter="10" style="margin-bottom: 10px">
       <ElCol :span="8">
         <date-range size="small" v-model="data.timer" />
@@ -184,34 +182,14 @@ onMounted(() => requestSalelist());
       </ElCol> -->
 
       <ElCol :span="8">
-        <ElSelect
-          size="small"
-          class="w-full"
-          v-model="data.qrdsource"
-          placeholder="订单来源"
-          clearable
-        >
-          <ElOption
-            v-for="opt in xs_order_source_options"
-            :key="opt.value"
-            v-bind="opt"
-          />
+        <ElSelect size="small" class="w-full" v-model="data.qrdsource" placeholder="订单来源" clearable>
+          <ElOption v-for="opt in xs_order_source_options" :key="opt.value" v-bind="opt" />
         </ElSelect>
       </ElCol>
 
       <ElCol :span="8">
-        <el-select
-          class="w-full"
-          size="small"
-          clearable
-          v-model="data.qrdtype"
-          placeholder="商品类型"
-        >
-          <el-option
-            v-for="type in xs_order_type_options"
-            :key="type.value"
-            v-bind="type"
-          />
+        <el-select class="w-full" size="small" clearable v-model="data.qrdtype" placeholder="商品类型">
+          <el-option v-for="type in xs_order_type_options" :key="type.value" v-bind="type" />
         </el-select>
       </ElCol>
     </ElRow>
@@ -219,14 +197,11 @@ onMounted(() => requestSalelist());
     <ElRow :gutter="10" style="margin-bottom: 10px">
       <el-col :span="8">
         <el-select placeholder="开票状态" size="small" style="width:100%" v-model="data.inv_status" clearable>
-          <el-option 
-            v-for="opt in inv_open_status" 
-            v-bind="opt"
-          />
+          <el-option v-for="opt in inv_open_status" v-bind="opt" />
         </el-select>
       </el-col>
 
-       <el-col :span="8">
+      <el-col :span="8">
         <el-select placeholder="发货状态" size="small" style="width:100%" v-model="data.sendstatus" clearable>
           <el-option v-for="opt in send_status_list" v-bind="opt" />
         </el-select>
@@ -248,103 +223,102 @@ onMounted(() => requestSalelist());
     </ElRow>
 
     <el-row :gutter="10">
-        <el-col :span="8">
+      <el-col :span="8">
         <el-select placeholder="标签类型" size="small" style="width:100%" v-model="data.tag_id" clearable>
           <el-option v-for="opt in tag_type" v-bind="opt" />
         </el-select>
       </el-col>
 
+      <el-col :span="8">
+        <el-input size="small" placeholder="商品编码" v-model="data.goodNo" />
+      </el-col>
+
+      <el-col :span="8">
+        <el-input size="small" placeholder="商品名称" v-model="data.goodName" />
+      </el-col>
+
+
+
+
+
+      <!-- <el-col :span="8">
+        <el-input v-model="data.cxCode" placeholder="销售订单主编码" size="small" />
+      </el-col> -->
+    </el-row>
+
+    <ElRow :gutter="10" style="margin-top: 10px">
+      <el-col :span="8">
+        <el-input size="small" placeholder="平台订单号" v-model="data.poCode" />
+      </el-col>
+
       <el-col :span="8">
         <el-input size="small" v-model="parameter.value">
           <template #prepend>
-            <el-select  v-model="parameter.key" size="small">
+            <el-select v-model="parameter.key" size="small" style="width: 120px">
               <el-option v-for="opt in searchOptions" v-bind="opt" />
             </el-select>
           </template>
         </el-input>
       </el-col>
 
-      <!-- <el-col :span="8">
-        <el-input v-model="data.cxCode" placeholder="销售订单主编码" size="small" />
-      </el-col> -->
+
 
       <el-col :span="8">
-        <el-switch
-          v-model="data.platform_type"
-          size="small"
-          active-text="toC"
-          inactive-text="toB"
-          active-value="2"
-          inactive-value="1"
-        />
+        <el-switch v-model="data.platform_type" size="small" active-text="toC" inactive-text="toB" active-value="2"
+          inactive-value="1" />
       </el-col>
-    </el-row>
+    </ElRow>
+
 
     <div flex gap-2 justify-end mb-1>
       <el-button size="small" type="primary" @click="() => search()">搜索</el-button>
       <el-button size="small" @click="() => search(true)">重置</el-button>
     </div>
 
-    <el-table
-      v-loading="loading"
-      :data="saleOrderList"
-      @selection-change="handleSelectChange"
-      ref="tableRef"
-      border
-      size="small"
-      row-key="sequenceNo"
-      max-height="520px"
-    >
-      <el-table-column
-        v-for="(col, index) in sale_columns"
-        :prop="col.field"
-        :label="col.label"
-        :key="index"
-        :width="col.width + 'px'"
-        :fixed="col.fixed"
-        :type="col.type"
-        show-overflow-tooltip
-      >
+    <el-table v-loading="loading" :data="saleOrderList" @selection-change="handleSelectChange" ref="tableRef" border
+      size="small" row-key="sequenceNo" max-height="520px">
+      <el-table-column v-for="(col, index) in sale_columns" :prop="col.field" :label="col.label" :key="index"
+        :width="col.width + 'px'" :fixed="col.fixed" :type="col.type" show-overflow-tooltip>
         <template #default="{ row }">
           <el-tag v-if="col.field === 'qrdType'" size="small">
             {{
-              xs_order_type_options.find(s => s.value === row.qrdType)?.label ||
-              "--"
+            xs_order_type_options.find(s => s.value === row.qrdType)?.label ||
+            "--"
             }}
           </el-tag>
 
-           <el-tag v-if="col.field === 'cat_status'" size="small">
+          <el-tag v-if="col.field === 'cat_status'" size="small">
             {{
-              cat_status.find(s => s.value === row.cat_status)?.label ||
-              "--"
+            cat_status.find(s => s.value === row.cat_status)?.label ||
+            "--"
             }}
           </el-tag>
 
           <el-tag v-if="col.field === 'inv_status'" size="small">
             {{
-              inv_open_status.find(s => s.value === row.inv_status)?.label ||
-              "--"
+            inv_open_status.find(s => s.value === row.inv_status)?.label ||
+            "--"
             }}
           </el-tag>
 
           <el-tag v-else-if="col.field === 'qrdSource'" size="small">
             {{
-              xs_order_source_options.find(s => s.value === row.qrdSource)
-                ?.label || "--"
+            xs_order_source_options.find(s => s.value === row.qrdSource)
+            ?.label || "--"
             }}
           </el-tag>
 
           <el-tag v-else-if="col.field === 'sendStatus'">
             {{
-              send_status_list.find(p => String(row.sendStatus) === p.value)
-                ?.label
+            send_status_list.find(p => String(row.sendStatus) === p.value)
+            ?.label
             }}
           </el-tag>
 
           <el-tag v-if="col.field === 'platform_type'" size="small">
             {{
-              useTypeOptions.find(s => s.value === row.platform_type)?.label ||
-              "--"
+            useTypeOptions.find(s => s.value === row.platform_type)?.label ||
+            "--"
             }}
           </el-tag>
         </template>
@@ -352,24 +326,13 @@ onMounted(() => requestSalelist());
     </el-table>
 
     <div flex justify-between mt-2>
-      <el-pagination
-        v-model:current-page="pagination.currentPage"
-        v-model:page-size="pagination.pageSize"
-        :total="pagination.total"
-        :page-sizes="[15, 50, 100]"
-        @size-change="handleSizeChange"
-        layout="sizes, prev, pager, next"
-        @current-change="requestSalelist"
-        size="small"
-      />
+      <el-pagination v-model:current-page="pagination.currentPage" v-model:page-size="pagination.pageSize"
+        :total="pagination.total" :page-sizes="[15, 50, 100]" @size-change="handleSizeChange"
+        layout="sizes, prev, pager, next" @current-change="requestSalelist" size="small" />
 
       <div>
-        <el-button type="primary" @click="handleSave" size="small"
-          >保存</el-button
-        >
-        <el-button @click="() => (visible = false)" size="small"
-          >取消</el-button
-        >
+        <el-button type="primary" @click="handleSave" size="small">保存</el-button>
+        <el-button @click="() => (visible = false)" size="small">取消</el-button>
       </div>
     </div>
   </ElDialog>

+ 3 - 3
src/views/InvoiceSales/capitalPool/config/content.config.ts

@@ -41,7 +41,7 @@ const columns = [
     cellRenderer({ row }){
       return h('div', { class: 'flex flex-col' }, {
         default : () => ([
-          h('p', null, row.poCode + '/'),
+          h('p', null, row.pcCode + '/'),
           h('p', null, row.tradNo),
         ])
       })
@@ -83,8 +83,8 @@ const columns = [
     cellRenderer({ row }) {
       return h('div', { class: 'flex flex-col', style: { 'margin': '0px -10px' } }, {
         default: () => ([
-          h('p', { class: 'px-[10px]', style: { 'border-bottom': '1px solid #ebeef5', 'min-height': '24px', 'padding': '0 10px' } }, row.poCode),
-          h('p', { class: 'px-[10px]', style: { 'min-height': '24px', 'padding': '0 10px' } }, row.palt_po),
+          h('p', { class: 'px-[10px]', style: { 'border-bottom': '1px solid #ebeef5', 'min-height': '24px', 'padding': '0 10px' } }, row.order_poCode),
+          h('p', { class: 'px-[10px]', style: { 'min-height': '24px', 'padding': '0 10px' } }, row.poCode),
         ])
       })
     }

+ 2 - 12
src/views/InvoiceSales/capitalPool/index.vue

@@ -127,7 +127,6 @@ async function onDownloadOpenInv() {
     return
   }
 
-
   const { total } = pageContentRef.value.getPagination()
   if(total > 500){
     ElMessage.warning('导出页面数据不能超过500条')
@@ -135,12 +134,7 @@ async function onDownloadOpenInv() {
   }
   
   const { start, end, ...rest } = params
-  const parameter = { 
-    create_start: start, 
-    create_end: end,
-    ...rest
-  }
-
+  const parameter = { create_start: start, create_end: end, ...rest }
   // const delay = 24 * 60 * 60 * 1000;
   // const start_updatetime = new Date(params.start).valueOf();
   // const end_updatetime = new Date(params.end).valueOf() + delay;
@@ -164,11 +158,7 @@ async function onDownloadOpenInv() {
 async function handleBatchSubmit(){
   try{
     await formRef.value?.validate()
-    batchTask.run(httpBatchStatus({ 
-      idArr: selected.value.map(({ id }) => id),
-      status: formData.value.status,
-      remark: formData.value.remark
-    }))
+    batchTask.run(httpBatchStatus({ idArr: selected.value.map(({ id }) => id), status: formData.value.status, remark: formData.value.remark }))
   }catch(err){
     console.log(err)
   }

+ 5 - 5
src/views/InvoiceSales/currentcyOrderRecord/components/batch.vue

@@ -44,12 +44,12 @@ function handleList() {
     return;
   }
 
-  const isHasWaitSupplierConfirm = data.value.some(({cgd}) => cgd.cgd_status === '0')
+//   const isHasWaitSupplierConfirm = data.value.some(({cgd}) => cgd.cgd_status === '0')
 
-if (isHasWaitSupplierConfirm) {
-  ElMessage.warning("不能添加采购单状态为`待与供应商确认`的通用订单");
-  return;
-}
+// if (isHasWaitSupplierConfirm) {
+//   ElMessage.warning("不能添加采购单状态为`待与供应商确认`的通用订单");
+//   return;
+// }
 
   emit('list', data.value)
   data.value = [];

+ 5 - 6
src/views/InvoiceSales/currentcyOrderRecord/components/single.vue

@@ -50,13 +50,12 @@ function handleList() {
     return;
   }
 
+  // const isHasWaitSupplierConfirm = list.value.some(({cgd}) => cgd.cgd_status === '0')
 
-  const isHasWaitSupplierConfirm = list.value.some(({cgd}) => cgd.cgd_status === '0')
-
-  if (isHasWaitSupplierConfirm) {
-    ElMessage.warning("不能选择采购单状态为`待与供应商确认`的通用订单");
-    return;
-  }
+  // if (isHasWaitSupplierConfirm) {
+  //   ElMessage.warning("不能选择采购单状态为`待与供应商确认`的通用订单");
+  //   return;
+  // }
 
   emit('list', list.value)
   tableRef.value?.clearSelection();

+ 2 - 2
src/views/InvoiceSales/currentcyOrderRecord/detail.vue

@@ -5,10 +5,10 @@ import { useDetail } from "/@/hooks/core/useDetail";
 import { usePermission } from "/@/hooks/core/usePermission";
 import ReconciliationForm from "/@/components/ReconciliationForm";
 import { ElTabs, ElTabPane, ElCollapse, ElCollapseItem } from "element-plus"
+import { DefaultApprovalNode } from "/@/components/ApprovalNode";
+import { httpOldStatus } from "/@/api/purchase/orderRecord";
 import OrderForm from "./components/order-form.vue"
 import { useAsync } from "/@/hooks/core/useAsync";
-import { httpOldStatus } from "/@/api/purchase/orderRecord";
-import { DefaultApprovalNode } from "/@/components/ApprovalNode";
 import { useUserInfo } from "/@/hooks/core/useUser";
 
 const pageName = "currentcyOrderRecordDetail"

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

@@ -44,6 +44,11 @@ const searchFormConfig: FormConfig = {
       type: "input",
       placeholder: "发票申请编码"
     },
+    {
+      field: "inv_number",
+      type: "input",
+      placeholder: "发票号码"
+    },
     {
       field: "c",
       type: "range",

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

@@ -64,6 +64,11 @@ const columns = [
     minWidth: 130,
     ...renderIconLabelLeft("goodNo", "goodName", "商品编码:")
   },
+  {
+    label: "商品数量",
+    prop: "goodNum",
+    minWidth: 80,
+  },
   {
     label: "平台名称",
     prop: "platName",

+ 18 - 0
src/views/InvoiceSales/sheetOrderPool/config/frontColumns.ts

@@ -25,11 +25,29 @@ const columns = [
     prop: "platName",
     width: 100
   },
+  {
+    label: "平台订单号",
+    width: 100,
+    prop: "poCode"
+  },
+  {
+    label: "商品名称",
+    width: 100,
+    prop: "goodName"
+  },
   {
     label: "商品类型",
     width: 100,
     prop: "qrdType_name"
   },
+  {
+    label: '单价',
+    prop: 'goodPrice'
+  },
+  {
+    label: '数量',
+    prop: 'goodNum'
+  },
   {
     label: "发货状态",
     width: 100,

+ 31 - 30
src/views/InvoiceSales/sheetOrderPool/config/search.config.ts

@@ -7,29 +7,14 @@ import {
 } from "/@/utils/status";
 
 export const USE_STATUS = [
-  {
-    value: "0",
-    label: "未对账"
-  },
-  {
-    value: "1",
-    label: "参与对账"
-  },
-  {
-    value: "2",
-    label: "参与核销对账"
-  }
+  { value: "0", label: "未对账" },
+  { value: "1", label: "参与对账" },
+  { value: "2", label: "参与核销对账" }
 ];
 
 export const inv_open_status = [
-  {
-    value: "1",
-    label: "未开票"
-  },
-  {
-    value: "2",
-    label: "部分开票"
-  },
+  { value: "1", label: "未开票" },
+  { value: "2", label: "部分开票"  },
   {
     value: "3",
     label: "已开票"
@@ -158,14 +143,6 @@ const searchFormConfig: FormConfig = {
         endPlaceholder: "下单结束时间"
       }
     },
-
-    {
-      span: 4,
-      type: "select",
-      field: "qrdsource",
-      placeholder: "订单来源",
-      options: xs_order_source_options
-    },
     {
       field: "qrdtype",
       type: "select",
@@ -207,13 +184,37 @@ const searchFormConfig: FormConfig = {
           { value: "customerNo", label: "客户编码" },
           { value: "customer", label: "客户名称" },
           { value: "platName", label: "平台名称" },
-          { value: "poCode", label: "平台订单号" },
+          // { value: "poCode", label: "平台订单号" },
           { value: "department", label: "部门" },
           { value: "saler", label: "销售员" }
         ]
       }
     },
-
+    {
+      span: 4,
+      type: "select",
+      field: "qrdsource",
+      placeholder: "订单来源",
+      options: xs_order_source_options
+    },
+    {
+      field: "poCode",
+      type: "input",
+      placeholder: "平台订单号",
+      span: 4
+    },
+    {
+      field: "goodNo",
+      type: "input",
+      placeholder: "商品编号",
+      span: 4
+    },
+    {
+      field: "goodName",
+      type: "input",
+      placeholder: "商品名称",
+      span: 4
+    },
     {
       field: "sendstatus",
       type: "select",