src/api/procurementManagement/procurementInvoiceLedger.js
@@ -98,3 +98,28 @@ data: data, }); } // 查询付款登记子列表 export function registrationListPageGetById(query) { return request({ url: "/purchase/registration/getById", method: "get", params: query, }); } // 修改付款流水 export function updatePaymentRegistration(query) { return request({ url: "/purchase/registration/updatePaymentRegistration", method: "put", data: query, }); } // 删除付款流水 export function delPaymentRegistration(query) { return request({ url: "/purchase/registration/delPaymentRegistration", method: "delete", data: query, }); } src/views/procurementManagement/invoiceEntry/components/Modal.vue
@@ -123,6 +123,7 @@ placeholder="请输入" :min="0" :step="0.1" :precision="2" clearable style="width: 100%" @change="invoiceNumBlur(row)" @@ -133,6 +134,7 @@ v-model="row.ticketsAmount" placeholder="请输入" :min="0" :precision="2" :step="0.1" clearable style="width: 100%" src/views/procurementManagement/invoiceEntry/indexOld.vue
@@ -318,6 +318,7 @@ v-model="scope.row.ticketsNum" placeholder="请选择" :min="0" :precision="2" :step="0.1" clearable style="width: 100%" @@ -338,6 +339,7 @@ v-model="scope.row.ticketsAmount" placeholder="请选择" :min="0" :precision="2" :step="0.1" clearable style="width: 100%" src/views/procurementManagement/paymentEntry/index.vue
@@ -37,28 +37,6 @@ </el-col> </el-row> </el-form> <!-- <div> <span class="search_title">供应商名称/合同号:</span> <el-input v-model="searchForm.supplierNameOrContractNo" style="width: 240px" placeholder="输入供应商名称/合同号搜索" @change="handleQuery" clearable :prefix-icon="Search" /> <el-button type="primary" @click="handleQuery" style="margin-left: 10px" > 搜索 </el-button> </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"> <PIMTable @@ -66,14 +44,90 @@ :column="tableColumn" :tableData="tableData" :page="page" :expandRowKeys="expandedRowKeys" :isSelection="true" :isShowSummary="isShowSummarySon" :summaryMethod="summarizeMainTable1" @selection-change="handleSelectionChange" @expand-change="expandChange" :tableLoading="tableLoading" @pagination="pagination" :total="page.total" ></PIMTable> > <template #expand="{ row }"> <el-table :data="expandData" border show-summary v-loading="childrenLoading" :summary-method="summarizeMainTable2" > <el-table-column align="center" label="序号" type="index" width="60" /> <el-table-column label="付款日期" prop="paymentDate" /> <el-table-column label="付款金额" prop="currentPaymentAmount"> <template #default="scope"> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.currentPaymentAmount" :disabled="!scope.row.editType" :precision="2" placeholder="请输入" clearable /> </template> </el-table-column> <el-table-column label="付款方式" prop="paymentMethod"> <template #default="scope"> <el-select :disabled="!scope.row.editType" v-model="scope.row.paymentMethod" placeholder="请选择" clearable > <el-option label="电汇" value="电汇" /> <el-option label="承兑" value="承兑" /> </el-select> </template> </el-table-column> <el-table-column label="登记人" prop="registrant" /> <el-table-column label="登记日期" prop="registrationtDate" /> <el-table-column label="操作" width="150"> <template #default="scope"> <el-button link type="primary" size="small" @click="changeEditType(scope.row)" v-if="!scope.row.editType" :disabled="scope.row.registrant !== userStore.nickName" >编辑</el-button > <el-button link type="primary" size="small" @click="saveReceiptPayment(scope.row)" v-if="scope.row.editType" :disabled="scope.row.registrant !== userStore.nickName" >保存</el-button > <el-button link type="primary" size="small" @click="handleDelete(scope.row)" :disabled="scope.row.registrant !== userStore.nickName" >删除</el-button > </template> </el-table-column> </el-table> </template> </PIMTable> </div> <el-dialog v-model="dialogFormVisible" @@ -146,6 +200,7 @@ <el-col :span="12"> <el-form-item label="本次付款金额:" prop="currentPaymentAmount"> <el-input-number :step="0.01" :min="0" style="width: 100%" :precision="2" v-model="form.currentPaymentAmount" placeholder="请输入" clearable @@ -225,11 +280,21 @@ paymentRegistrationEdit, getTicketNo, } from "@/api/procurementManagement/paymentEntry.js"; import { invoiceListPage } from "@/api/procurementManagement/procurementInvoiceLedger.js"; import { delPaymentRegistration, invoiceListPage, registrationListPageGetById, updatePaymentRegistration } from "@/api/procurementManagement/procurementInvoiceLedger.js"; import useFormData from "@/hooks/useFormData"; const { proxy } = getCurrentInstance(); const tableColumn = ref([ { type: "expand", dataType: "slot", slot: "expand", }, { label: "采购合同号", prop: "purchaseContractNumber", @@ -275,9 +340,10 @@ }, ]); const tableData = ref([]); const expandData = ref([]); const selectedRows = ref([]); const tableLoading = ref(false); const invoiceNumberList = ref([]); const childrenLoading = ref(false); const userStore = useUserStore(); const page = reactive({ current: 1, @@ -324,6 +390,8 @@ const { form, rules } = toRefs(data); const { form: searchForm, resetForm } = useFormData(data.searchForm); const isShowSummarySon = ref(true); const expandedRowKeys = ref([]); // 子表合计方法 const summarizeMainTable1 = (param) => { @@ -335,6 +403,13 @@ futureTickets: { noDecimal: true }, // 不保留小数 } ); }; // 子表合计方法 const summarizeMainTable2 = (param) => { return proxy.summarizeTable(param, ["currentPaymentAmount"], { ticketsNum: { noDecimal: true }, // 不保留小数 futureTickets: { noDecimal: true }, // 不保留小数 }); }; // 查询列表 /** 搜索按钮操作 */ @@ -353,7 +428,56 @@ tableLoading.value = false; tableData.value = res.records; page.total = res.total; if (expandedRowKeys.value.length > 0) { const arr = [] const index = tableData.value.findIndex(item => item.id === expandedRowKeys.value[0]); if (index > -1) { arr.push(tableData.value[index]); expandChange(tableData.value[index], arr) } } }); }; // 展开行 const expandChange = (row, expandedRows) => { if (expandedRows.length > 0) { nextTick(() => { expandedRowKeys.value = []; try { childrenLoading.value = true; registrationListPageGetById({ id: row.id }).then((res) => { childrenLoading.value = false; const index = tableData.value.findIndex((item) => item.id === row.id); if (index > -1) { expandData.value = res; } expandedRowKeys.value.push(row.id); }); } catch (error) { childrenLoading.value = false; console.log(error); } }) } else { expandedRowKeys.value = []; } }; // 编辑修改状态 const changeEditType = (row) => { row.editType = !row.editType; }; // 保存回款记录 const saveReceiptPayment = (row) => { let updateData = { id: row.id, currentPaymentAmount: row.currentPaymentAmount, paymentMethod: row.paymentMethod, }; updatePaymentRegistration(updateData).then((res) => { row.editType = !row.editType; getList(); proxy.$modal.msgSuccess("提交成功"); }); }; // 表格选择数据 const handleSelectionChange = (selection) => { @@ -365,6 +489,10 @@ proxy.$message.error("请选择一条发票数据"); return; } if (selectedRows.value[0].unPaymentAmountTotal == 0) { proxy.$message.warning("无需再付款"); return; } operationType.value = type; form.value = {}; form.value = { ...selectedRows.value[0] }; @@ -375,38 +503,6 @@ form.value.paymentDate = getCurrentDate(); form.value.registrant = userStore.name; dialogFormVisible.value = true; }; // 选择发票号以后给发票金额赋值 const setInvoiceAmount = (value) => { if (value) { invoiceNumberList.value.forEach((item) => { if (item.invoiceNumber === value) { form.value.invoiceAmount = item.invoiceAmount; form.value.ticketRegistrationId = item.id; } }); } else { form.value.invoiceAmount = ""; } }; // 选择采购合同号赋值 const setInfo = (value) => { getTicketNo({ id: value }).then((res) => { invoiceNumberList.value = res.data; }); if (value) { byPurchaseId(value).then((res) => { form.value.salesContractNo = res.data.salesContractNo; form.value.supplierName = res.data.supplierName; form.value.taxRate = res.data.taxRate; form.value.supplierId = res.data.supplierId; }); } else { form.value.salesContractNo = ""; form.value.supplierName = ""; form.value.taxRate = ""; form.value.supplierId = ""; } }; // 提交表单 const submitForm = () => { @@ -442,20 +538,7 @@ dialogFormVisible.value = false; }; // 删除 const handleDelete = () => { let ids = []; if (selectedRows.value.length > 0) { // 检查是否有他人维护的数据 const unauthorizedData = selectedRows.value.filter(item => item.issUer !== userStore.nickName); if (unauthorizedData.length > 0) { proxy.$modal.msgWarning("不可删除他人维护的数据"); return; } ids = selectedRows.value.map((item) => item.id); } else { proxy.$modal.msgWarning("请选择数据"); return; } const handleDelete = (row) => { ElMessageBox.confirm("选中的内容将被删除,是否确认删除?", "删除提示", { confirmButtonText: "确认", cancelButtonText: "取消", @@ -463,7 +546,7 @@ }) .then(() => { tableLoading.value = true; paymentRegistrationDel(ids) delPaymentRegistration(row.id) .then((res) => { proxy.$modal.msgSuccess("删除成功"); getList(); src/views/procurementManagement/procurementInvoiceLedger/Form/EditForm.vue
@@ -28,12 +28,12 @@ </el-col> <el-col :span="12"> <el-form-item label="来票数:"> <el-input-number :step="0.1" :min="0" style="width: 100%" v-model="form.ticketsNum" @change="inputTicketsNum" /> <el-input-number :step="0.1" :min="0" style="width: 100%" v-model="form.ticketsNum" @change="inputTicketsNum" :precision="2"/> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="本次来票金额(元):"> <el-input-number :step="0.1" :min="0" style="width: 100%" v-model="form.ticketsAmount" @change="inputTicketsAmount" /> <el-input-number :step="0.1" :min="0" style="width: 100%" v-model="form.ticketsAmount" @change="inputTicketsAmount" :precision="2"/> </el-form-item> </el-col> <el-col :span="12"> src/views/procurementManagement/procurementLedger/index.vue
@@ -463,6 +463,7 @@ <el-input-number :step="0.1" clearable :precision="2" style="width: 100%" v-model="productForm.quantity" placeholder="请输入" src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -36,7 +36,7 @@ </el-col> <el-col :span="12"> <el-form-item label="数量:" prop="quantity"> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable/> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2"/> </el-form-item> </el-col> </el-row> src/views/qualityManagement/nonconformingManagement/components/formDia.vue
@@ -55,7 +55,7 @@ </el-col> <el-col :span="12"> <el-form-item label="数量:" prop="quantity"> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable/> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2"/> </el-form-item> </el-col> </el-row> src/views/qualityManagement/processInspection/components/formDia.vue
@@ -43,7 +43,7 @@ </el-col> <el-col :span="12"> <el-form-item label="数量:" prop="quantity"> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable/> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2"/> </el-form-item> </el-col> </el-row> src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -54,7 +54,7 @@ </el-col> <el-col :span="12"> <el-form-item label="数量:" prop="quantity"> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable/> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2"/> </el-form-item> </el-col> </el-row> src/views/salesManagement/invoiceLedger/index.vue
@@ -86,7 +86,7 @@ </el-col> <el-col :span="12"> <el-form-item label="发票金额(元):" prop="invoiceTotal"> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.invoiceTotal" placeholder="请输入" clearable /> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.invoiceTotal" placeholder="请输入" clearable :precision="2"/> </el-form-item> </el-col> </el-row> src/views/salesManagement/invoiceRegistration/index.vue
@@ -319,6 +319,7 @@ <el-table-column label="本次开票数" prop="currentInvoiceNum" width="180"> <template #default="scope"> <el-input-number :step="0.1" :min="0" style="width: 100%" :precision="2" v-model="scope.row.currentInvoiceNum" @change="invoiceNumBlur(scope.row)" ></el-input-number> @@ -331,6 +332,7 @@ > <template #default="scope"> <el-input-number :step="0.01" :min="0" style="width: 100%" :precision="2" v-model="scope.row.currentInvoiceAmount" @change="invoiceAmountBlur(scope.row)" ></el-input-number> src/views/salesManagement/receiptPayment/index.vue
@@ -86,10 +86,13 @@ <el-table-column label="回款日期" prop="receiptPaymentDate" /> <el-table-column label="回款金额" prop="receiptPaymentAmount"> <template #default="scope"> <el-input v-model="scope.row.receiptPaymentAmount" :disabled="!scope.row.editType" ></el-input> <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.receiptPaymentAmount" :disabled="!scope.row.editType" :precision="2" placeholder="请输入" clearable /> </template> </el-table-column> <el-table-column label="回款方式" prop="receiptPaymentType"> @@ -288,7 +291,8 @@ </el-col> <el-col :span="12"> <el-form-item label="本次回款金额:" prop="receiptPaymentAmount"> <el-input-number :step="0.01" :min="0" style="width: 100%" <el-input-number :step="0.01" :min="0" style="width: 100%" :precision="2" v-model="form.receiptPaymentAmount" placeholder="请输入" clearable src/views/salesManagement/salesLedger/index.vue
@@ -250,12 +250,14 @@ <el-col :span="12"> <el-form-item label="含税单价(元):" prop="taxInclusiveUnitPrice"> <el-input-number :step="0.01" :min="0" v-model="productForm.taxInclusiveUnitPrice" style="width: 100%" :precision="2" placeholder="请输入" clearable @change="calculateFromUnitPrice" /> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="数量:" prop="quantity"> <el-input-number :step="0.1" :min="0" v-model="productForm.quantity" placeholder="请输入" clearable :precision="2" @change="calculateFromQuantity" style="width: 100%" /> </el-form-item> </el-col> src/views/system/dept/index.vue
@@ -99,7 +99,7 @@ </el-col> <el-col :span="12"> <el-form-item label="显示排序" prop="orderNum"> <el-input-number v-model="form.orderNum" controls-position="right" :min="0" /> <el-input-number v-model="form.orderNum" controls-position="right" :min="0"/> </el-form-item> </el-col> <el-col :span="12">