已修改14个文件
已添加1个文件
1025 ■■■■■ 文件已修改
src/api/salesManagement/receiptPayment.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/viewIndex.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Echarts/echarts.vue 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 383 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentEntry/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentLedger/index.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/thePaymentLedger/index.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceRegistration/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPayment/index.vue 130 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPaymentLedger/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/index.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/salesManagement/receiptPayment.js
@@ -36,3 +36,21 @@
        data: query
    })
}
// æŸ¥è¯¢å·²ç»ç»‘定发票的开票台账
export function bindInvoiceNoRegPage(query) {
    return request({
        url: '/receiptPayment/bindInvoiceNoRegPage',
        method: 'get',
        params: query
    })
}
// å¼€ç¥¨å°è´¦è¯¦æƒ…
export function invoiceInfo(query) {
    return request({
        url: '/receiptPayment/invoiceInfo',
        method: 'get',
        params: query
    })
}
src/api/viewIndex.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
// é¦–页接口
import request from '@/utils/request'
// æœ¬æœˆåˆåŒé‡‘额
export const getContractAmount = () => {
    return request({
        url: '/sales/ledger/getContractAmount',
        method: 'get'
    })
}
// æœ¬æœˆå¼€ç¥¨é‡‘额
export const getInvoiceAmount = () => {
    return request({
        url: '/invoiceLedger/getInvoiceAmount',
        method: 'get'
    })
}
// æœ¬æœˆå›žæ¬¾é‡‘额
export const getReceiptAmount = () => {
    return request({
        url: '/receiptPayment/getReceiptAmount',
        method: 'get'
    })
}
// å®¢æˆ·åˆåŒé‡‘额TOP5统计
export const getTopFiveList = () => {
    return request({
        url: '/sales/ledger/getTopFiveList',
        method: 'get'
    })
}
// å›žæ¬¾é¥¼çж图
export const getAmountMouth = () => {
    return request({
        url: '/receiptPayment/getAmountMouth',
        method: 'get'
    })
}
// ä»˜æ¬¾é¥¼çж图
export const paymentMonthList = () => {
    return request({
        url: '/purchase/paymentRegistration/paymentMonthList',
        method: 'get'
    })
}
// çº¿å½¢å›¾
export const getAmountHalfYear = () => {
    return request({
        url: '/sales/ledger/getAmountHalfYear',
        method: 'get'
    })
}
src/components/Echarts/echarts.vue
@@ -51,15 +51,15 @@
  },
  lineColors: {
    type: Array,
    default: () => ['#A4EEDA', '#86C1F4', '#91A0FC', '#F6C18B', '#F09595']
    default: () => []
  },
  barColors: {
    type: Array,
    default: () => ['#A4EEDA', '#86C1F4', '#91A0FC', '#F6C18B', '#F09595']
    default: () => []
  },
  pieColors: {
    type: Array,
    default: () => ['#A4EEDA', '#86C1F4', '#91A0FC', '#F6C18B', '#F09595']
    default: () => []
  },
  loadingOption: {
    type: Object,
@@ -73,30 +73,34 @@
  }
})
import { watch } from 'vue'
// Refs
const chartRef = ref(null)
let chartInstance = null
// Methods
function generateChart(option) {
  if (option.series && option.series.length > 0) {
    option.series.forEach((s, index) => {
      if (s.type === 'line') {
        s.itemStyle = {
          color: props.lineColors[index] || props.lineColors[0]
        }
        s.lineStyle = {
          color: props.lineColors[index] || props.lineColors[0]
        }
      } else if (s.type === 'bar') {
        s.itemStyle = {
          color: props.barColors[index] || props.barColors[0]
        }
      }
    })
  }
  const copiedOption = JSON.parse(JSON.stringify(option)) // âœ… æ·±æ‹·è´
  
  chartInstance.setOption(option)
  // if (copiedOption.series && copiedOption.series.length > 0) {
  //   copiedOption.series.forEach((s, index) => {
  //     if (s.type === 'line') {
  //       s.itemStyle = {
  //         color: props.lineColors[index] || props.lineColors[0]
  //       }
  //       s.lineStyle = {
  //         color: props.lineColors[index] || props.lineColors[0]
  //       }
  //     } else if (s.type === 'bar') {
  //       s.itemStyle = {
  //         color: props.barColors[index] || props.barColors[0]
  //       }
  //     }
  //   })
  // }
  chartInstance.setOption(copiedOption)
}
function renderChart() {
@@ -136,12 +140,13 @@
})
// Watch all reactive props that affect the chart
watchEffect(() => {
  // é¿å…åœ¨ mounted å‰è§¦å‘
  if (chartInstance) {
    renderChart()
  }
}, {
  flush: 'post'
})
watch(
    () => [props.xAxis, props.series],
    () => {
      if (chartInstance) {
        renderChart()
      }
    },
    { deep: true, immediate: true }
)
</script>
src/main.js
@@ -61,7 +61,7 @@
app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.selectDictLabel = selectDictLabel
app.config.globalProperties.selectDictLabels = selectDictLabels
app.config.globalProperties.javaApi = 'http://192.168.1.35:8080'
app.config.globalProperties.javaApi = 'http://114.132.189.42:7003'
app.config.globalProperties.HaveJson = (val) => {
  return JSON.parse(JSON.stringify(val));
};
src/views/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="app-container home">
    <div>
    <div style="display: flex;">
      <div>
        <div class="card-top-left">
          <div class="title">
@@ -9,21 +9,21 @@
          <div class="card-group">
            <div class="info-card">
              <div class="info-message">
                <div class="info-number">6789,000</div>
                <div class="info-number">{{contractAmount}}</div>
                <div class="info-title">合同金额(元)</div>
              </div>
              <img src="@/assets/images/icon1.png" alt="" style="width: 63px;height: 63px">
            </div>
            <div class="info-card1">
              <div class="info-message">
                <div class="info-number">6789,000</div>
                <div class="info-number">{{invoiceAmount}}</div>
                <div class="info-title">开票金额(元)</div>
              </div>
              <img src="@/assets/images/icon2.png" alt="" style="width: 63px;height: 63px">
            </div>
            <div class="info-card2">
              <div class="info-message">
                <div class="info-number">6789,000</div>
                <div class="info-number">{{receiptAmount}}</div>
                <div class="info-title">回款金额(元)</div>
              </div>
              <img src="@/assets/images/icon%203.png" alt="" style="width: 63px;height: 63px">
@@ -46,12 +46,12 @@
                </div>
                <div class="info-message2">
                  <div class="info-message1">
                    <div class="pie-title">本月回款数量</div>
                    <div class="pie-info"><span class="pie-number">8,000</span>元   <span class="pie-number">15.0</span>%</div>
                    <div class="pie-title">本月回款金额</div>
                    <div class="pie-info"><span class="pie-number">{{receiveAmount}}</span>元   <span class="pie-number">{{receiveAmountPercentage}}</span>%</div>
                  </div>
                  <div class="info-message1">
                    <div class="pie-title">应收款金额</div>
                    <div class="pie-info"><span class="pie-number">8,000</span>元   <span class="pie-number">15.0</span>%</div>
                    <div class="pie-info"><span class="pie-number">{{contractAmountMonth}}</span>元</div>
                  </div>
                </div>
              </div>
@@ -63,17 +63,17 @@
                           :options="options"
                           :legend="pieLegend"
                           :chartStyle="chartStyle"
                           :series="materialPieSeries"
                           :tooltip="pieTooltip"></Echarts>
                           :series="materialPieSeries1"
                           :tooltip="pieTooltip1"></Echarts>
                </div>
                <div class="info-message2">
                  <div class="info-message1">
                    <div class="pie-title">本月回款数量</div>
                    <div class="pie-info"><span class="pie-number">8,000</span>元   <span class="pie-number">15.0</span>%</div>
                    <div class="pie-title1">本月付款金额</div>
                    <div class="pie-info"><span class="pie-number1">{{paymentAmount}}</span>元   <span class="pie-number1">{{payableAmountPercentage}}</span>%</div>
                  </div>
                  <div class="info-message1">
                    <div class="pie-title">应收款金额</div>
                    <div class="pie-info"><span class="pie-number">8,000</span>元   <span class="pie-number">15.0</span>%</div>
                    <div class="pie-title1">应付款金额</div>
                    <div class="pie-info"><span class="pie-number1">{{payableAmount}}</span>元</div>
                  </div>
                </div>
              </div>
@@ -81,20 +81,73 @@
          </div>
        </div>
      </div>
      <div></div>
      <div>
        <div class="card-top-right">
          <div class="title">
            <span style="font-weight: bold">客户合同金额TOP5统计</span>
          </div>
          <div>
            <Echarts ref="chart"
                     :chartStyle="chartStyle1"
                     :grid="grid"
                     :legend="barLegend"
                     :series="barSeries"
                     :tooltip="tooltip"
                     :xAxis="xAxis1"
                     :yAxis="yAxis1"
                     style="height: 42vh;"></Echarts>
          </div>
        </div>
      </div>
    </div>
    <div>
      <div>
        <div class="card-bottom">
          <div class="title">
            <span style="font-weight: bold">回款、开票近半年走势图</span>
          </div>
          <div>
            <Echarts ref="chart"
                     :chartStyle="chartStyle1"
                     :grid="grid"
                     :legend="barLegend"
                     :series="lineSeries"
                     :tooltip="tooltipLine"
                     :xAxis="xAxis2"
                     :yAxis="yAxis2"
                     style="height: 27vh;"></Echarts>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup name="Index">
const { proxy } = getCurrentInstance()
import * as echarts from 'echarts';
import Echarts from "@/components/Echarts/echarts.vue";
import {
  getAmountHalfYear,
  getAmountMouth,
  getContractAmount,
  getInvoiceAmount,
  getReceiptAmount,
  getTopFiveList, paymentMonthList
} from "@/api/viewIndex.js";
const pieLegend = reactive({
  show: false,
})
const contractAmount = ref(0)
const invoiceAmount = ref(0)
const receiptAmount = ref(0)
const receiveAmount = ref(0)
const contractAmountMonth = ref(0)
const receiveAmountPercentage = ref(0)
const paymentAmount = ref(0)
const payableAmount = ref(0)
const payableAmountPercentage = ref(0)
const options = reactive({
  graphic: {
    type: 'circle',
@@ -103,19 +156,22 @@
    shape: {
      r: '70%' // åœ†å½¢åŠå¾„与饼图外圈相同
    },
    style: {
      fill: 'none',
      stroke: '#ccc', // ç°è‰²è¾¹æ¡†
      lineWidth: 2
    },
    z: -10 // ç¡®ä¿è¾¹æ¡†åœ¨é¥¼å›¾ä¸‹é¢
  }
})
const pieTooltip = reactive({
  trigger: 'item',
  formatter: function (params) {
    // åŠ¨æ€ç”Ÿæˆæç¤ºä¿¡æ¯ï¼ŒåŸºäºŽæ•°æ®é¡¹çš„ name å±žæ€§
    const description = params.name === '本月回款数量' ? '本月回款数量' : '应收款金额';
    const description = params.name === '本月回款金额' ? '本月回款金额' : '应收款金额';
    return `${description} ${formatNumber(params.value)}元 ${params.percent}%`;
  },
  position: 'right'
})
const pieTooltip1 = reactive({
  trigger: 'item',
  formatter: function (params) {
    // åŠ¨æ€ç”Ÿæˆæç¤ºä¿¡æ¯ï¼ŒåŸºäºŽæ•°æ®é¡¹çš„ name å±žæ€§
    const description = params.name === '本月付款金额' ? '本月付款金额' : '应付款金额';
    return `${description} ${formatNumber(params.value)}元 ${params.percent}%`;
  },
  position: 'right'
@@ -137,8 +193,26 @@
     show:false
    },
    data: [
      { value: 0, name: '本月回款数量', itemStyle: { color: '#2D99FF' }  },
      { value: 0, name: '本月回款金额', itemStyle: { color: '#2D99FF' }  },
      { value: 0, name: '应收款金额', itemStyle: { color: '#D4DDFF' } },
    ]
  }
])
const materialPieSeries1 = ref([
  {
    type: 'pie',
    radius: '92%',
    avoidLabelOverlap: false,
    itemStyle: {
      borderColor: '#fff',
      borderWidth: 2
    },
    label: {
     show:false
    },
    data: [
      { value: 0, name: '本月付款金额', itemStyle: { color: '#1EBFAC' }  },
      { value: 0, name: '应付款金额', itemStyle: { color: '#D0EFE1' } },
    ]
  }
])
@@ -146,6 +220,230 @@
  width: '150%',
  height: '120%' // è®¾ç½®å›¾è¡¨å®¹å™¨çš„高度
}
const chartStyle1 = {
  width: '100%',
  height: '100%' // è®¾ç½®å›¾è¡¨å®¹å™¨çš„高度
}
const grid = {
  show: false
}
const tooltip = {
  trigger: 'axis',
  axisPointer: {
    type: 'shadow'
  }
}
const tooltipLine = {
  trigger: 'axis',
}
const yAxis1 = ref([
  {
    type: 'value',
  }
])
const xAxis1 = ref([
  {
    type: 'category',
    data: []
  }
])
const yAxis2 = ref([
  {
    type: 'value',
  }
])
const xAxis2 = ref([
  {
    type: 'category',
    data: []
  }
])
const barLegend = reactive({})
const barSeries = ref([
    {
      type: 'bar',
      data: [],
      label: {
        show: true
      },
    },
])
const lineSeries = ref([
    {
      type: 'line',
      data: [],
      label: {
        show: true
      },
    },
])
// åˆåŒé‡‘额
const getContractAmountNum = () => {
  getContractAmount().then((res) => {
    contractAmount.value = res.data
  })
}
// å¼€ç¥¨é‡‘额
const getInvoiceAmountNum = () => {
  getInvoiceAmount().then((res) => {
    invoiceAmount.value = res.data
  })
}
// å›žæ¬¾é‡‘额
const getReceiptAmountNum = () => {
  getReceiptAmount().then((res) => {
    receiptAmount.value = res.data
  })
}
// æœˆå›žæ¬¾é‡‘额饼图
const getAmountMouthNum = () => {
  getAmountMouth().then((res) => {
    receiveAmount.value = res.data.receiveAmount
    contractAmountMonth.value = res.data.contractAmount
    const percentage = (receiveAmount.value / contractAmountMonth.value) * 100;
    receiveAmountPercentage.value = percentage.toFixed(2)
    materialPieSeries.value[0].data[0].value = receiveAmount.value
    materialPieSeries.value[0].data[1].value = contractAmountMonth.value
  })
}
// æœˆä»˜æ¬¾é‡‘额饼图
const paymentMonthListNum = () => {
  paymentMonthList().then((res) => {
    paymentAmount.value = res.data.paymentAmount
    payableAmount.value = res.data.payableAmount
    const percentage = (paymentAmount.value / payableAmount.value) * 100;
    payableAmountPercentage.value = percentage.toFixed(2)
    materialPieSeries1.value[0].data[0].value = paymentAmount.value
    materialPieSeries1.value[0].data[1].value = payableAmount.value
  })
}
// å®¢æˆ·top5
const getTopFiveListNum = async () => {
  const res = await getTopFiveList()
  const customerName = []
  const totalAmount = []
  res.data.forEach(item => {
    customerName.push(item.customerName)
    totalAmount.push(item.totalAmount)
  })
// æ­£ç¡®å“åº”式赋值:创建新的 xAxis å’Œ series å¯¹è±¡
  xAxis1.value = [
    {
      type: 'category',
      data: customerName
    }
  ]
  barSeries.value = [
    {
      type: 'bar',
      data: totalAmount,
      itemStyle: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: '#F7D2FF' },
          { offset: 1, color: '#826AF9' }
        ])
      },
      emphasis: {
        itemStyle: {
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 1, color: '#826AF9' }
          ])
        }
      },
    }
  ]
}
// çº¿å½¢å›¾
const getAmountHalfYearNum = async () => {
  const res = await getAmountHalfYear()
  console.log(res)
  const monthName = []
  const receiptAmount = []
  const invoiceAmount = []
  res.data.forEach(item => {
    monthName.push(item.month)
    receiptAmount.push(item.receiptAmount)
    invoiceAmount.push(item.invoiceAmount)
  })
// æ­£ç¡®å“åº”式赋值:创建新的 xAxis å’Œ series å¯¹è±¡
  xAxis2.value = [
    {
      type: 'category',
      data: monthName
    }
  ]
  lineSeries.value = [
    {
      name: '开票',
      type: 'line',
      data: receiptAmount,
      smooth: true,
      stack: 'Total',
      areaStyle: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
          {
            offset: 0,
            color: 'rgba(131, 207, 255, 1)'
          },
          {
            offset: 1,
            color: 'rgba(186, 228, 255, 1)'
          }
        ])
      },
      // è®¾ç½®å°åœ†ç‚¹çš„颜色
      itemStyle: {
        color: '#2D99FF', // å°åœ†ç‚¹é¢œè‰²è®¾ç½®ä¸º#2D99FF
        borderColor: '#2D99FF' // å¦‚果需要的话,可以设置边框颜色
      },
      emphasis: {
        focus: 'series'
      },
      lineStyle: {
        width: 0
      },
      showSymbol: false,
    },
    {
      name: '回款',
      type: 'line',
      data: invoiceAmount,
      smooth: true,
      stack: 'Total',
      lineStyle: {
        width: 0
      },
      // è®¾ç½®å°åœ†ç‚¹çš„颜色
      itemStyle: {
        color: '#83CFFF', // å°åœ†ç‚¹é¢œè‰²è®¾ç½®ä¸º#83CFFF
        borderColor: '#83CFFF' // å¦‚果需要的话,可以设置边框颜色
      },
      showSymbol: false,
      areaStyle: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
          {
            offset: 0,
            color: 'rgba(54, 153, 255, 1)'
          },
          {
            offset: 1,
            color: 'rgba(89, 169, 254, 1)'
          }
        ])
      },
      emphasis: {
        focus: 'series'
      },
    }
  ]
}
getContractAmountNum()
getInvoiceAmountNum()
getReceiptAmountNum()
getTopFiveListNum()
getAmountMouthNum()
paymentMonthListNum()
getAmountHalfYearNum()
</script>
<style scoped>
@@ -154,6 +452,21 @@
  background: #fff;
  height: 24vh;
  width: 56vw;
  margin-bottom: 20px;
}
.card-top-right {
  padding: 16px;
  background: #fff;
  height: 50.6vh;
  width: 28vw;
  margin-bottom: 20px;
  margin-left: 20px;
}
.card-bottom {
  padding: 16px;
  background: #fff;
  height: 34vh;
  width: 85.2vw;
  margin-bottom: 20px;
}
.title {
@@ -261,6 +574,23 @@
  left: 0; /* å®šä½åˆ°å·¦è¾¹ */
  top: 9px; /* åž‚直居中对齐,根据行高调整 */
}
.pie-title1 {
  font-size: 14px;
  line-height: 24px;
  color: #1EBFAC;
  padding-left: 16px;
  position: relative;
}
.pie-title1::before {
  content: '';
  width: 6px; /* è“ç‚¹çš„宽度 */
  height: 6px; /* è“ç‚¹çš„高度 */
  background-color: #1EBFAC; /* è“ç‚¹çš„颜色 */
  border-radius: 50%; /* å°†æ­£æ–¹å½¢å˜ä¸ºåœ†å½¢ */
  position: absolute;
  left: 0; /* å®šä½åˆ°å·¦è¾¹ */
  top: 9px; /* åž‚直居中对齐,根据行高调整 */
}
.pie-info {
  padding-left: 16px;
  font-size: 14px;
@@ -269,11 +599,8 @@
.pie-number {
  color: #2853FD;
}
.info-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
.pie-number1 {
  color: #1EBFAC;
}
</style>
src/views/procurementManagement/paymentEntry/index.vue
@@ -22,7 +22,7 @@
      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="采购合同号11111:" prop="purchaseLedgerId">
            <el-form-item label="采购合同号:" prop="purchaseLedgerId">
              <el-select v-model="form.purchaseLedgerId" placeholder="请选择" clearable @change="setInfo"
                :disabled="operationType === 'edit'">
                <el-option v-for="item in purchaseLedgerList" :key="item.id" :label="item.purchaseContractNumber"
src/views/procurementManagement/paymentLedger/index.vue
@@ -15,25 +15,49 @@
          >搜索</el-button
        >
      </div>
      <div>
      </div>
      <div></div>
    </div>
    <el-row>
      <el-col :span="14">
        <div class="table_list">
          <PIMTable
            :column="tableColumn"
            :tableData="tableData"
            :page="page"
            :isSelection="false"
            :handleSelectionChange="handleSelectionChange"
            :tableLoading="tableLoading"
            @pagination="pagination"
            :total="total"
            :rowClick="rowClick"
            :isShowSummary="isShowSummary"
          <el-table
            ref="multipleTable"
            v-loading="tableLoading"
            :data="tableData"
            :header-cell-style="{ background: '#F0F1F5', color: '#333333' }"
            height="calc(100vh - 18.5em)"
            :highlight-current-row="true"
          ></PIMTable>
            style="width: 100%"
            tooltip-effect="dark"
            @row-click="rowClick"
            :show-summary="isShowSummary"
            class="lims-table"
          >
            <el-table-column
              align="center"
              label="序号"
              type="index"
              width="60"
            />
            <el-table-column
              v-for="(item, index) in tableColumn"
              :key="index"
              :column-key="item.columnKey"
              :filter-method="item.filterHandler"
              :filter-multiple="item.filterMultiple"
              :filtered-value="item.filteredValue"
              :filters="item.filters"
              :fixed="item.fixed"
              :label="item.label"
              :prop="item.prop"
              show-overflow-tooltip
              :align="item.align"
              :sortable="!!item.sortable"
              :type="item.type"
              :width="item.width"
            >
            </el-table-column>
          </el-table>
        </div>
      </el-col>
      <el-col :span="10">
@@ -41,15 +65,22 @@
          <PIMTable
            :column="tableColumnSon"
            :tableData="tableDataSon"
            :page="pageSon"
            :isSelection="false"
            :tableLoading="tableLoadingSon"
            @pagination="paginationSon"
            :total="totalSon"
            :isShowSummary="isShowSummarySon"
          ></PIMTable>
        </div>
      </el-col>
      <div class="el-pagination">
        <pagination
          v-show="total > 0"
          @pagination="paginationSearch"
          :total="total"
          :layout="page.layout"
          :page="page.current"
          :limit="page.size"
        />
      </div>
    </el-row>
  </div>
</template>
@@ -77,6 +108,7 @@
    prop: "payableAmount",
  },
]);
const tableData = ref([]);
const tableLoading = ref(false);
const data = reactive({
  searchForm: {
@@ -89,16 +121,10 @@
});
const total = ref(0);
const isShowSummary = ref(true);
const tableData = ref([]);
const { searchForm } = toRefs(data);
import {getInfo} from "@/api/login.js";
const rowClick = (row) => {
  tableDataSon.value = Array.isArray(row.details) ? row.details : [];
};
// å­æ¨¡å—
const tableColumnSon = ref([
  {
@@ -120,11 +146,6 @@
]);
const tableDataSon = ref([]);
const tableLoadingSon = ref(false);
const pageSon = reactive({
  current: 1,
  size: 10,
});
const totalSon = ref(0);
const isShowSummarySon = ref(true);
const detailPageNum = ref(1);
const detailPageSize = ref(10);
@@ -134,14 +155,10 @@
  page.current = 1;
  getList();
};
const pagination = ({ current, limit }) => {
const paginationSearch = ({ current, limit }) => {
  page.current = current;
  page.size = limit;
  getList();
};
const paginationSon = ({ current, limit }) => {
  pageSon.current = current;
  pageSon.size = limit;
  tableDataSon.value = [];
  getList();
};
const getList = () => {
@@ -150,7 +167,7 @@
    ...searchForm.value,
    ...page,
    detailPageNum: detailPageNum.value, // æ–°å¢ž
    detailPageSize: detailPageSize.value // æ–°å¢ž
    detailPageSize: detailPageSize.value, // æ–°å¢ž
  }).then((res) => {
    let result = res.data;
    tableLoading.value = false;
@@ -158,20 +175,11 @@
    total.value = result.total || 0;
  });
};
// è¡¨æ ¼é€‰æ‹©æ•°æ®
const handleSelectionChange = (selection) => {
  selectedRows.value = selection;
};
getList();
</script>
<style scoped lang="scss">
/* é€‰ä¸­æŸè¡Œæ—¶çš„背景色*/
/* .el-table__body tr.current-row > td {
  color: #c0c0c0;
  background: #F6F7FB !important;
} */
.el-row {
  .el-col-14 {
    .table_list {
@@ -184,4 +192,23 @@
    }
  }
}
.el-pagination {
  width: 100%;
  height: 55px;
  display: flex;
  justify-content: flex-end;
  float: right;
  flex-direction: row;
  align-items: center;
  background: #fff;
  margin: -20px 0 0 0;
  padding: 0 20px;
}
.pagination-container {
  margin-top: 0;
}
.table_list {
  height: calc(100vh - 13.5em);
  overflow: auto;
}
</style>
src/views/procurementManagement/procurementLedger/index.vue
@@ -378,6 +378,13 @@
  page.current = 1
  getList()
}
// å­è¡¨åˆè®¡æ–¹æ³•
const summarizeChildrenTable = (param) => {
  return proxy.summarizeTable(param, ['taxInclusiveUnitPrice', 'taxInclusiveTotalPrice', 'taxExclusiveTotalPrice', 'ticketsNum', 'ticketsAmount', 'futureTickets', 'futureTicketsAmount'], {
    ticketsNum: { noDecimal: true }, // ä¸ä¿ç•™å°æ•°
    futureTickets: { noDecimal: true }, // ä¸ä¿ç•™å°æ•°
  });
};
const paginationChange = ({ current, limit }) => {
  page.current = current;
  page.size = limit;
src/views/procurementManagement/thePaymentLedger/index.vue
@@ -15,97 +15,9 @@
      </div>
    </div>
    <div class="table_list">
      <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :handleSelectionChange="handleSelectionChange"
      <PIMTable :column="tableColumn" :tableData="tableData" :page="page"
                :tableLoading="tableLoading" @pagination="pagination" :total="total"></PIMTable>
    </div>
    <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增付款登记' : '编辑付款登记'" width="60%" @close="closeDia">
      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="采购合同号:" prop="purchaseLedgerId">
              <el-select v-model="form.purchaseLedgerId" placeholder="请选择" clearable @change="setInfo" :disabled="operationType === 'edit'">
                <el-option v-for="item in purchaseLedgerList" :key="item.id" :label="item.purchaseContractNumber" :value="item.id"/>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="销售合同号:" prop="salesContractNo">
              <el-input v-model="form.salesContractNo" placeholder="自动填充" clearable disabled/>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="供应商名称:" prop="supplierName">
              <el-input v-model="form.supplierName" placeholder="自动填充" clearable disabled/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="发票号:" prop="invoiceNumber">
              <el-select v-model="form.invoiceNumber" placeholder="请选择" clearable :disabled="operationType === 'edit'" @change="setInvoiceAmount">
                <el-option v-for="item in invoiceNumberList" :key="item.id" :label="item.invoiceNumber" :value="item.invoiceNumber"/>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="发票金额(元):" prop="invoiceAmount">
              <el-input type="number" :step="0.01" v-model="form.invoiceAmount" placeholder="自动填充" clearable disabled/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="税率(%):" prop="taxRate">
               <el-select v-model="form.taxRate"  placeholder="请选择" clearable :disabled="operationType === 'edit'">
                <el-option v-for="item in taxRateSelection" :key="item.value" :label="item.label" :value="item.value"/>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="本次付款金额:" prop="currentPaymentAmount">
              <el-input type="number" :step="0.01" v-model="form.currentPaymentAmount" placeholder="请输入" clearable/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="付款形式:" prop="paymentMethod">
              <el-select v-model="form.paymentMethod" placeholder="请选择" clearable>
                <el-option label="电汇" value="电汇"/>
                <el-option label="承兑" value="承兑"/>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="登记人:" prop="registrant">
              <el-input v-model="form.registrant" placeholder="请输入" clearable disabled/>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="付款日期:" prop="paymentDate">
              <el-date-picker
                  disabled
                  style="width: 100%"
                  v-model="form.paymentDate"
                  value-format="YYYY-MM-DD"
                  format="YYYY-MM-DD"
                  type="date"
                  placeholder="请选择"
                  clearable
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确认</el-button>
          <el-button @click="closeDia">取消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
src/views/salesManagement/invoiceRegistration/index.vue
@@ -334,7 +334,7 @@
  // è®¡ç®—本次开票金额
  row.currentInvoiceAmount = row.currentInvoiceNum * row.taxInclusiveUnitPrice
  // è®¡ç®—未开票数
  row.noInvoiceNum = row.noInvoiceNum - row.currentInvoiceNum
  row.noInvoiceNum = row.originalNoInvoiceNum - row.currentInvoiceNum
  // è®¡ç®—未开票金额
  row.noInvoiceAmount = row.noInvoiceNum * row.taxInclusiveUnitPrice
}
src/views/salesManagement/receiptPayment/index.vue
@@ -15,7 +15,6 @@
      </div>
      <div>
        <el-button type="primary" @click="openForm('add')">新增回款</el-button>
        <el-button type="danger" plain @click="handleDelete">删除</el-button>
      </div>
    </div>
    <div class="table_list">
@@ -30,33 +29,22 @@
        <el-table-column label="销售合同号" prop="salesContractNo" show-overflow-tooltip/>
        <el-table-column label="客户合同号" prop="customerContractNo" show-overflow-tooltip/>
        <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip/>
        <el-table-column label="产品大类" prop="productCategory" show-overflow-tooltip/>
        <el-table-column label="发票号" prop="invoiceNo" show-overflow-tooltip/>
        <el-table-column label="发票金额(元)" prop="invoiceAmount" show-overflow-tooltip/>
        <el-table-column label="发票金额(元)" prop="invoiceTotal" show-overflow-tooltip/>
        <el-table-column label="税率" prop="taxRate" show-overflow-tooltip/>
        <el-table-column label="本次回款金额(元)" prop="receiptPaymentAmount" show-overflow-tooltip/>
        <el-table-column label="回款形式" prop="receiptPaymentType" show-overflow-tooltip>
          <template #default="scope">
            {{transferValue(scope.row.receiptPaymentType)}}
          </template>
        </el-table-column>
        <el-table-column label="待回款金额(元)" prop="entryDate" show-overflow-tooltip/>
        <el-table-column fixed="right" label="操作" min-width="60" align="center">
          <template #default="scope">
            <el-button link type="primary" size="small" @click="openForm('edit', scope.row);">编辑</el-button>
          </template>
        </el-table-column>
        <el-table-column label="回款金额(元)" prop="receiptPaymentAmountTotal" show-overflow-tooltip/>
        <el-table-column label="待回款金额(元)" prop="noReceiptAmount" show-overflow-tooltip/>
      </el-table>
      <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper" :page="page.current"
                  :limit="page.size" @pagination="paginationChange" />
    </div>
    <el-dialog v-model="dialogFormVisible" :title="operationType === 'add' ? '新增发票号页面' : '修改发票号页面'" width="70%" @close="closeDia">
    <el-dialog v-model="dialogFormVisible" title="新增发票号页面" width="70%" @close="closeDia">
      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="销售合同号:" prop="invoiceLedgerId">
              <el-select v-model="form.invoiceLedgerId" placeholder="请选择" clearable @change="ledgerChange">
                <el-option v-for="item in invoiceLedgerList" :key="item.id" :label="item.salesContractNo + '(' + item.invoiceDate + ')' " :value="item.id"/>
              </el-select>
            <el-form-item label="销售合同号:" prop="salesContractNo">
              <el-input v-model="form.salesContractNo" placeholder="自动填充" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
@@ -72,8 +60,8 @@
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="发票金额(元):" prop="invoiceAmount">
              <el-input type="number" v-model="form.invoiceAmount" placeholder="自动填充" :step="0.01" disabled/>
            <el-form-item label="发票金额(元):" prop="invoiceTotal">
              <el-input type="number" v-model="form.invoiceTotal" placeholder="自动填充" :step="0.01" disabled/>
            </el-form-item>
          </el-col>
        </el-row>
@@ -132,20 +120,13 @@
<script setup>
import pagination from '@/components/PIMTable/Pagination.vue'
import { ref } from 'vue'
import {ElMessageBox } from "element-plus";
import {
  invoiceLedgerListNoPage,
  invoiceLedgerDetail
} from "../../../api/salesManagement/invoiceLedger.js";
import {
  receiptPaymentSaveOrUpdate,
  receiptPaymentListPage,
  receiptPaymentInfo,
  receiptPaymentDel
  bindInvoiceNoRegPage,
  invoiceInfo
} from "../../../api/salesManagement/receiptPayment.js";
const { proxy } = getCurrentInstance()
const tableData = ref([])
const productData = ref([])
const selectedRows = ref([])
const tableLoading = ref(false)
const page = reactive({
@@ -155,17 +136,16 @@
const total = ref(0)
// ç”¨æˆ·ä¿¡æ¯è¡¨å•弹框数据
const operationType = ref('')
const dialogFormVisible = ref(false)
const data = reactive({
  searchForm: {
    searchText: '',
  },
  form: {
    invoiceLedgerId: '',
    salesContractNo: '',
    customerName: '',
    invoiceNo: '',
    invoiceAmount: '',
    invoiceTotal: '',
    taxRate: '',
    receiptPaymentAmount: '',
    receiptPaymentType: '',
@@ -173,10 +153,10 @@
    receiptPaymentDate: ''
  },
  rules: {
    invoiceLedgerId: [{ required: true, message: "请选择", trigger: "change" }],
    salesContractNo: [{ required: true, message: "请选择", trigger: "change" }],
    customerName: [{ required: true, message: "请输入", trigger: "blur" }],
    invoiceNo: [{ required: true, message: "请选择", trigger: "change" }],
    invoiceAmount: [{ required: true, message: "请输入", trigger: "blur" }],
    invoiceTotal: [{ required: true, message: "请输入", trigger: "blur" }],
    taxRate: [{ required: true, message: "请选择", trigger: "change" }],
    receiptPaymentAmount: [{ required: true, message: "请选择", trigger: "change" }],
    receiptPaymentType: [{ required: true, message: "请选择", trigger: "change" }],
@@ -185,9 +165,6 @@
  }
})
const { searchForm, form, rules } = toRefs(data)
const currentId = ref('')
// å¼€ç¥¨å°è´¦æ•°ç»„
const invoiceLedgerList = ref([])
const { receipt_payment_type } = proxy.useDict("receipt_payment_type")
// æŸ¥è¯¢åˆ—表
@@ -203,7 +180,7 @@
}
const getList = () => {
  tableLoading.value = true
  receiptPaymentListPage({...searchForm.value, ...page}).then(res => {
  bindInvoiceNoRegPage({...searchForm.value, ...page}).then(res => {
    tableLoading.value = false
    tableData.value = res.data.records
    total.value = res.data.total
@@ -239,19 +216,17 @@
  return sums;
};
// æ‰“开弹框
const openForm = (type, row) => {
  operationType.value = type
const openForm = () => {
  form.value = {}
  productData.value = []
  invoiceLedgerListNoPage({}).then(res => {
    invoiceLedgerList.value = res.data
  })
  if (type === 'edit') {
    currentId.value = row.id;
    receiptPaymentInfo({id: row.id}).then(res => {
      form.value = {...res.data}
    })
  if(selectedRows.value.length !== 1) {
    proxy.$modal.msgError("请选择一条数据")
    return
  }
  invoiceInfo({id: selectedRows.value[0].id}).then(res => {
    form.value = {...res.data}
    form.value.invoiceLedgerId = form.value.id
    form.value.id = ''
  })
  dialogFormVisible.value = true
}
// æäº¤è¡¨å•
@@ -270,61 +245,6 @@
const closeDia = () => {
  proxy.resetForm("formRef")
  dialogFormVisible.value = false
}
// åˆ é™¤
const handleDelete = () => {
  let ids = []
  if (selectedRows.value.length > 0) {
    ids = selectedRows.value.map(item => item.id);
  } else {
    proxy.$modal.msgWarning('请选择数据')
    return
  }
  ElMessageBox.confirm(
      '选中的内容将被删除,是否确认删除?',
      '导出', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning',
      }
  ).then(() => {
    receiptPaymentDel(ids).then(res => {
      proxy.$modal.msgSuccess("删除成功")
      getList()
    })
  }).catch(() => {
    proxy.$modal.msg("已取消")
  })
}
// é”€å”®å°è´¦ç­›é€‰
const ledgerChange = (val) => {
  console.log('val', val)
  if(val){
    invoiceLedgerDetail({id: val}).then(res => {
      form.value.customerName = res.data.customerName,
      form.value.invoiceNo= res.data.invoiceNo,
      form.value.invoiceAmount= res.data.invoiceAmount,
      form.value.taxRate= res.data.taxRate,
      form.value.salesLedgerId= res.data.salesLedgerId,
      form.value.customerId= res.data.customerId,
      form.value.salesContractNo = res.data.salesContractNo
    })
  }else {
    form.value.customerName = '',
    form.value.invoiceNo= '',
    form.value.invoiceAmount= '',
    form.value.taxRate= '',
    form.value.salesLedgerId= '',
    form.value.customerId= '',
    form.value.salesContractNo= ''
  }
}
// æ”¶æ¬¾ç±»åˆ«è½¬æ¢
const transferValue = (val) => {
  const findIndex = receipt_payment_type.value.findIndex(item => item.value === val);
  if (findIndex > -1) {
    return  receipt_payment_type.value[findIndex].label
  }
}
getList()
</script>
src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -24,7 +24,7 @@
                  height="calc(100vh - 18.5em)">
          <el-table-column align="center" label="序号" type="index" width="60" />
          <el-table-column label="客户名称" prop="customerName" show-overflow-tooltip/>
          <el-table-column label="开票金额" prop="invoiceAmount" show-overflow-tooltip/>
          <el-table-column label="开票金额" prop="invoiceTotal" show-overflow-tooltip/>
          <el-table-column label="回款金额" prop="receiptPaymentAmount" show-overflow-tooltip/>
          <el-table-column label="未回款金额" prop="unReceiptPaymentAmount" show-overflow-tooltip/>
        </el-table>
@@ -40,7 +40,8 @@
          <el-table-column align="center" label="序号" type="index" width="60" />
          <el-table-column label="发生日期" prop="receiptPaymentDate" show-overflow-tooltip/>
          <el-table-column label="回款金额" prop="receiptPaymentAmount" show-overflow-tooltip/>
          <el-table-column label="应收金额" prop="invoiceAmount" show-overflow-tooltip/>
          <el-table-column label="待收金额" prop="noReceiptAmount" show-overflow-tooltip/>
          <el-table-column label="应收金额" prop="invoiceTotal" show-overflow-tooltip/>
        </el-table>
        <pagination v-show="recordTotal > 0" :total="recordTotal" layout="total, sizes, prev, pager, next, jumper" :page="recordPage.current"
                    :limit="recordPage.size" @pagination="recordPaginationChange" />
@@ -86,9 +87,10 @@
  page.current = 1
  getList()
}
const paginationChange = ({ current, limit }) => {
  page.current = current;
  page.size = limit;
const paginationChange = (obj) => {
  console.log('paginationChange', current,limit)
  page.current = obj.page;
  page.size = obj.limit;
  getList()
}
const getList = () => {
@@ -99,7 +101,7 @@
    total.value = res.data.total;
    if(tableData.value.length > 0) {
      recordPage.current = 1
      customerId.value = tableData.value[0].customerId
      customerId.value = tableData.value[0].id
      receiptPaymentList(customerId.value);
    }
  })
@@ -131,24 +133,28 @@
const receiptPaymentList = (id) => {
  const param = {
    customerId:id,
    current: page.current,
    size: page.size,
    current: recordPage.current,
    size: recordPage.size,
  }
  console.log('param', param)
  receiptPaymentListPage(param).then(res => {
    receiptRecord.value = res.data.records;
    recordTotal.value = res.data.total;
  })
}
// æ±‡æ¬¾è®°å½•列表分页
const recordPaginationChange = (currentPage, pageSize) => {
  recordPage.current = currentPage;
  recordPage.size = pageSize;
const recordPaginationChange = (obj) => {
  console.log('recordPaginationChange', obj );
  recordPage.current = obj.page;
  recordPage.size = obj.limit;
  console.log('recordPage',recordPage)
  receiptPaymentList(customerId.value);
}
const rowClickMethod = (row) => {
  customerId.value = row.customerId;
  customerId.value = row.id;
  receiptPaymentList(customerId.value);
}
src/views/salesManagement/salesLedger/index.vue
@@ -104,7 +104,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="录入人:" prop="entryPerson">
              <el-select v-model="form.entryPerson" placeholder="请选择" clearable>
              <el-select v-model="form.entryPerson" placeholder="请选择" clearable @change="changs">
                <el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId"/>
              </el-select>
            </el-form-item>
@@ -121,6 +121,7 @@
                  type="date"
                  placeholder="请选择"
                  clearable
                  disabled
              />
            </el-form-item>
          </el-col>
@@ -193,17 +194,27 @@
        <el-row :gutter="30">
          <el-col :span="24">
            <el-form-item label="产品大类:" prop="productCategory">
              <el-select v-model="productForm.productCategory" placeholder="请选择" clearable>
              <!-- <el-select v-model="productForm.productCategory" placeholder="请选择" clearable>
                <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/>
              </el-select>
              </el-select> -->
              <el-tree-select
                  v-model="productForm.productCategory"
                  placeholder="请选择" clearable
                  check-strictly
                  @change="getModels"
                  :data="productOptions"
                  :render-after-expand="false"
                  style="width: 100%"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="24">
            <el-form-item label="规格型号:" prop="specificationModel">
              <el-select v-model="productForm.specificationModel" placeholder="请选择" clearable>
                <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/>
            <el-form-item label="规格型号:" prop="productModelId">
              <el-select v-model="productForm.productModelId" placeholder="请选择" clearable @change="getProductModel">
                <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id"/>
              </el-select>
            </el-form-item>
          </el-col>
@@ -275,6 +286,7 @@
import { ref } from 'vue'
import {Search} from "@element-plus/icons-vue";
import {ElMessageBox } from "element-plus";
import useUserStore from '@/store/modules/user'
import {userListNoPage} from "@/api/system/user.js";
import {
  ledgerList,
@@ -283,6 +295,8 @@
  addOrUpdateSalesLedger,
  getSalesLedgerWithProducts, delLedger, addOrUpdateSalesLedgerProduct, delProduct, delLedgerFile
} from "@/api/salesManagement/salesLedger.js";
import {modelList, productTreeList} from "@/api/basicData/product.js";
const userStore = useUserStore()
const { proxy } = getCurrentInstance()
const tableData = ref([])
const productData = ref([])
@@ -290,6 +304,8 @@
const productSelectedRows = ref([])
const userList = ref([])
const customerOption = ref([])
const productOptions = ref([])
const modelOptions = ref([])
const tableLoading = ref(false)
const page = reactive({
  current: 1,
@@ -386,6 +402,55 @@
    tableLoading.value = false
  })
}
// èŽ·å–äº§å“å¤§ç±»tree数据
const getProductOptions = () => {
  productTreeList().then(res => {
    productOptions.value = convertIdToValue(res)
  })
}
// èŽ·å–tree子数据
const getModels =(value) => {
  productForm.value.productCategory = findNodeById(productOptions.value, value)
  modelList({id: value}).then(res => {
    modelOptions.value = res
  })
}
const getProductModel =(value) => {
  const index = modelOptions.value.findIndex(item => item.id === value);
  if (index !== -1) {
    productForm.value.specificationModel = modelOptions.value[index].model;
  } else {
    productForm.value.specificationModel = null;
  }
}
const findNodeById = (nodes, productId) => {
  for (let i = 0; i < nodes.length; i++) {
    if (nodes[i].value === productId) {
      return nodes[i].label; // æ‰¾åˆ°èŠ‚ç‚¹ï¼Œè¿”å›žè¯¥èŠ‚ç‚¹
    }
    if (nodes[i].children && nodes[i].children.length > 0) {
      const foundNode = findNodeById(nodes[i].children, productId);
      if (foundNode) {
        return foundNode.label; // åœ¨å­èŠ‚ç‚¹ä¸­æ‰¾åˆ°ï¼Œè¿”å›žè¯¥èŠ‚ç‚¹
      }
    }
  }
  return null; // æ²¡æœ‰æ‰¾åˆ°èŠ‚ç‚¹ï¼Œè¿”å›žnull
};
function convertIdToValue(data) {
  return data.map(item => {
    const { id, children, ...rest } = item;
    const newItem = {
      ...rest,
      value: id // å°† id æ”¹ä¸º value
    };
    if (children && children.length > 0) {
      newItem.children = convertIdToValue(children);
    }
    return newItem;
  });
}
// è¡¨æ ¼é€‰æ‹©æ•°æ®
const handleSelectionChange = (selection) => {
  selectedRows.value = selection
@@ -402,7 +467,7 @@
      productList({salesLedgerId: row.id, type: 1}).then(res => {
      const index = tableData.value.findIndex(item => item.id === row.id);
      if (index > -1) {
        tableData.value[index].children = res.rows;
        tableData.value[index].children = res;
      }
      expandedRowKeys.value.push(row.id)
    })
@@ -460,13 +525,12 @@
  return sums;
}
// æ‰“开弹框
const openForm = (type, row) => {
const openForm = async (type, row) => {
  operationType.value = type
  form.value = {}
  productData.value = []
  userListNoPage().then(res => {
    userList.value = res.data
  })
  let userLists = await userListNoPage()
  userList.value = userLists.data
  customerList().then(res => {
    customerOption.value = res
  })
@@ -478,7 +542,17 @@
      fileList.value = form.value.salesLedgerFiles
    })
  }
  let userAll = await userStore.getInfo()
  userList.value.forEach(element => {
    if(userAll.user.nickName === element.nickName && userAll.user.userName === element.userName) {
      form.value.entryPerson = userAll.user.userId // è®¾ç½®é»˜è®¤ä¸šåŠ¡å‘˜ä¸ºå½“å‰ç”¨æˆ·
    }
  });
  form.value.entryDate = getCurrentDate() // è®¾ç½®é»˜è®¤å½•入日期为当前日期
  dialogFormVisible.value = true
}
function changs(val){
  console.log(val);
}
// ä¸Šä¼ å‰æ ¡æ£€
function handleBeforeUpload(file) {
@@ -554,6 +628,7 @@
    productForm.value = {...row}
  }
  productFormVisible.value = true
  getProductOptions()
}
// æäº¤äº§å“è¡¨å•
const submitProduct = () => {
@@ -614,7 +689,7 @@
    }).catch(() => {
      proxy.$modal.msg("已取消")
    })
  }
}
// å…³é—­äº§å“å¼¹æ¡†
@@ -662,9 +737,20 @@
    proxy.$modal.msg("已取消")
  })
}
// èŽ·å–å½“å‰æ—¥æœŸå¹¶æ ¼å¼åŒ–ä¸º YYYY-MM-DD
function getCurrentDate() {
  const today = new Date();
  const year = today.getFullYear();
  const month = String(today.getMonth() + 1).padStart(2, '0'); // æœˆä»½ä»Ž0开始
  const day = String(today.getDate()).padStart(2, '0');
  return `${year}-${month}-${day}`;
}
const mathNum = (val) => {
  productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(val, productForm.value.taxRate)
}
getList()
</script>
<style scoped lang="scss">
</style>
</style>
src/views/system/user/index.vue
@@ -17,8 +17,8 @@
        <pane size="84">
          <el-col style="padding: 10px">
            <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
              <el-form-item label="用户名称" prop="userName">
                <el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable style="width: 240px" @keyup.enter="handleQuery" />
              <el-form-item label="登录账号" prop="userName">
                <el-input v-model="queryParams.userName" placeholder="请输入登录账号" clearable style="width: 240px" @keyup.enter="handleQuery" />
              </el-form-item>
              <el-form-item label="手机号码" prop="phonenumber">
                <el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable style="width: 240px" @keyup.enter="handleQuery" />
@@ -59,7 +59,7 @@
            <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="50" align="center" />
              <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
              <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
              <el-table-column label="登录账号" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
              <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
              <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
              <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
@@ -111,8 +111,8 @@
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="归属部门" prop="deptId">
              <el-tree-select v-model="form.deptId" :data="enabledDeptOptions" :props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="请选择归属部门" check-strictly />
            <el-form-item label="归属公司" prop="deptId">
              <el-tree-select v-model="form.deptId" :data="enabledDeptOptions" :props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="请选择归属公司" check-strictly />
            </el-form-item>
          </el-col>
        </el-row>
@@ -130,8 +130,8 @@
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
              <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
            <el-form-item v-if="form.userId == undefined" label="登录账号" prop="userName">
              <el-input v-model="form.userName" placeholder="请输入登录账号" maxlength="30" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
@@ -259,7 +259,7 @@
// åˆ—显隐信息
const columns = ref([
  { key: 0, label: `用户编号`, visible: true },
  { key: 1, label: `用户名称`, visible: true },
  { key: 1, label: `登录账号`, visible: true },
  { key: 2, label: `用户昵称`, visible: true },
  { key: 3, label: `部门`, visible: true },
  { key: 4, label: `手机号码`, visible: true },
@@ -278,8 +278,9 @@
    deptId: undefined
  },
  rules: {
    userName: [{ required: true, message: "用户名称不能为空", trigger: "blur" }, { min: 2, max: 20, message: "用户名称长度必须介于 2 å’Œ 20 ä¹‹é—´", trigger: "blur" }],
    userName: [{ required: true, message: "登录账号不能为空", trigger: "blur" }, { min: 2, max: 20, message: "登录账号长度必须介于 2 å’Œ 20 ä¹‹é—´", trigger: "blur" }],
    nickName: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
    deptId: [{ required: true, message: "公司不能为空", trigger: "change" }],
    password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 å’Œ 20 ä¹‹é—´", trigger: "blur" }, { pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }],
    email: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }],
    phonenumber: [{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
vite.config.js
@@ -2,7 +2,7 @@
import path from 'path'
import createVitePlugins from './vite/plugins'
const baseUrl = 'http://192.168.1.35:8080' // åŽç«¯æŽ¥å£
const baseUrl = 'http://114.132.189.42:7003' // åŽç«¯æŽ¥å£
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {