chenrui
2 天以前 e277db8bf75fa7b62bd2a281fe8ba4956f77cd82
供应商往来功能修改
已修改2个文件
74 ■■■■ 文件已修改
src/api/procurementManagement/paymentLedger.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentLedger/index.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/procurementManagement/paymentLedger.js
@@ -8,4 +8,12 @@
        method: 'get',
        params: query
    })
}
}
// 分页查询
export function paymentRecordList(supplierId) {
    return request({
        url: '/purchase/paymentRegistration/getPaymentRecordList/'+ supplierId,
        method: 'get'
    })
}
src/views/procurementManagement/paymentLedger/index.vue
@@ -58,6 +58,14 @@
            >
            </el-table-column>
          </el-table>
          <pagination
              v-show="total > 0"
              @pagination="paginationSearch"
              :total="total"
              :layout="page.layout"
              :page="page.current"
              :limit="page.size"
          />
        </div>
      </el-col>
      <el-col :span="10">
@@ -69,18 +77,16 @@
            :tableLoading="tableLoadingSon"
            :isShowSummary="isShowSummarySon"
          ></PIMTable>
          <pagination
              v-show="sonTotal > 0"
              :total="sonTotal"
              @pagination="sonPaginationSearch"
              :layout="page.layout"
              :page="sonPage.current"
              :limit="sonPage.size"
          />
        </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>
@@ -88,7 +94,7 @@
<script setup>
import { ref, toRefs } from "vue";
import { Search } from "@element-plus/icons-vue";
import { paymentLedgerList } from "@/api/procurementManagement/paymentLedger.js";
import { paymentLedgerList,paymentRecordList } from "@/api/procurementManagement/paymentLedger.js";
const tableColumn = ref([
  {
@@ -119,25 +125,32 @@
  current: 1,
  size: 10,
});
const sonPage = reactive({
  current: 1,
  size: 10,
});
const total = ref(0);
const sonTotal = ref(0);
const isShowSummary = ref(true);
const { searchForm } = toRefs(data);
const currentSupplierId = ref('')
const rowClick = (row) => {
  tableDataSon.value = Array.isArray(row.details) ? row.details : [];
  currentSupplierId.value = row.supplierId;
  getPaymenRecordtList(row.supplierId)
};
// 子模块
const tableColumnSon = ref([
  {
    label: "付款日期",
    prop: "paymentDate",
    label: "发生日期",
    prop: "happenTime",
  },
  {
    label: "开票数",
    prop: "voteCount",
    label: "发票金额",
    prop: "invoiceAmount",
  },
  {
    label: "付款金额(元)",
    prop: "paymentAmount",
    prop: "currentPaymentAmount",
  },
  {
    label: "应付金额(元)",
@@ -173,9 +186,26 @@
    tableLoading.value = false;
    tableData.value = result.records || [];
    total.value = result.total || 0;
    if(tableData.value.length > 0) {
      getPaymenRecordtList(tableData.value[0].supplierId);
      currentSupplierId.value = tableData.value[0].supplierId
    }
  });
};
const getPaymenRecordtList = (supplierId) => {
  paymentRecordList(supplierId).then(res => {
    tableDataSon.value = res.data
    sonTotal.value = res.data.length
  })
}
const sonPaginationSearch = ({ current, limit }) => {
  sonPage.current = current;
  sonPage.size = limit;
};
getList();
</script>