liyong
9 小时以前 188eb07cbc0717ccee654290ec641a79d96713e4
src/views/salesManagement/salesLedger/index.vue
@@ -25,6 +25,7 @@
                :expand-row-keys="expandedRowKeys"
                :row-key="row => row.id"
                show-summary
                style="width: 100%"
                :summary-method="summarizeMainTable"
                @expand-change="expandChange"
                height="calc(100vh - 18.5em)">
@@ -35,27 +36,27 @@
                      show-summary
                      :summary-method="summarizeChildrenTable">
              <el-table-column align="center" label="序号" type="index" width="60" />
              <el-table-column label="产品大类" prop="productCategory" />
              <el-table-column label="规格型号" prop="specificationModel" />
              <el-table-column label="产品大类"   prop="productCategory" />
              <el-table-column label="规格型号"  prop="specificationModel" />
              <el-table-column label="单位" prop="unit" />
              <el-table-column label="数量" prop="quantity" />
              <el-table-column label="税率(%)" prop="taxRate" />
              <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber"/>
              <el-table-column label="数量"  prop="quantity" />
              <el-table-column label="税率(%)"  prop="taxRate" />
              <el-table-column label="含税单价(元)"  prop="taxInclusiveUnitPrice" :formatter="formattedNumber"/>
              <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber"/>
              <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber"/>
            </el-table>
          </template>
        </el-table-column>
        <el-table-column align="center" label="序号" type="index" width="60" />
        <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="salesman" show-overflow-tooltip/>
        <el-table-column label="项目名称" prop="projectName" show-overflow-tooltip/>
        <el-table-column label="合同金额(元)" prop="contractAmount" show-overflow-tooltip :formatter="formattedNumber"/>
        <el-table-column label="录入人" prop="entryPersonName" show-overflow-tooltip/>
        <el-table-column label="录入日期" prop="entryDate" show-overflow-tooltip/>
        <el-table-column label="录入日期" prop="executionDate" show-overflow-tooltip/>
        <el-table-column label="销售合同号" prop="salesContractNo" width="180" show-overflow-tooltip/>
        <el-table-column label="客户合同号" prop="customerContractNo" width="180" show-overflow-tooltip/>
        <el-table-column label="客户名称" prop="customerName" width="300" show-overflow-tooltip/>
        <el-table-column label="业务员" prop="salesman" width="100" show-overflow-tooltip/>
        <el-table-column label="项目名称" prop="projectName" width="180" show-overflow-tooltip/>
        <el-table-column label="合同金额(元)" prop="contractAmount" width="180" show-overflow-tooltip :formatter="formattedNumber"/>
        <el-table-column label="录入人" prop="entryPersonName" width="100" show-overflow-tooltip/>
        <el-table-column label="录入日期" prop="entryDate" width="120" show-overflow-tooltip/>
        <el-table-column label="签订日期" prop="executionDate" width="120" 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>
@@ -245,7 +246,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="数量:" prop="quantity">
              <el-input v-model="productForm.quantity" placeholder="请输入" clearable @change="mathNum" />
              <el-input type="number" :step="0.1" :min="0" v-model="productForm.quantity" placeholder="请输入" clearable @change="mathNum" />
            </el-form-item>
          </el-col>
        </el-row>
@@ -306,7 +307,7 @@
import useUserStore from '@/store/modules/user'
import {userListNoPage} from "@/api/system/user.js";
import {
  ledgerList,
  ledgerListPage,
  productList,
  customerList,
  addOrUpdateSalesLedger,
@@ -326,7 +327,7 @@
const tableLoading = ref(false)
const page = reactive({
  current: 1,
  size: 10,
  size: 100,
})
const total = ref(0)
const fileList = ref([])
@@ -403,16 +404,16 @@
  page.current = 1
  getList()
}
const paginationChange = ({ current, limit }) => {
  page.current = current;
  page.size = limit;
const paginationChange = (obj) => {
  page.current = obj.page;
  page.size = obj.limit;
  getList()
}
const getList = () => {
  tableLoading.value = true
  ledgerList({...searchForm.value, ...page}).then(res => {
  ledgerListPage({...searchForm.value, ...page}).then(res => {
    tableLoading.value = false
    tableData.value = res.rows
    tableData.value = res.records
    tableData.value.map(item => {
      item.children = []
    })
@@ -438,11 +439,14 @@
  })
}
const getProductModel =(value) => {
  console.log('value', value)
  const index = modelOptions.value.findIndex(item => item.id === value);
  if (index !== -1) {
    productForm.value.specificationModel = modelOptions.value[index].model;
    productForm.value.unit = modelOptions.value[index].unit;
  } else {
    productForm.value.specificationModel = null;
    productForm.value.unit = null;
  }
}
const findNodeById = (nodes, productId) => {