| | |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <el-form :inline="true" :model="searchForm"> |
| | | <el-form-item label="开票登记"> |
| | | <el-form-item label="客户名称"> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | | style="width: 240px" |
| | |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> 搜索 </el-button> |
| | | <el-button @click="resetForm"> 重置 </el-button> |
| | | <el-button @click="handleExport" style="margin-right: 10px">导出</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <div class="flex justify-between"> |
| | | <div></div> |
| | | <div> |
| | | <el-button type="primary" @click="openForm" style="margin-bottom: 8px"> |
| | | 新增登记 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | |
| | | /> |
| | | <el-table-column label="单位" prop="unit" width="70" /> |
| | | <el-table-column label="数量" prop="quantity" width="70" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" width="70" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" width="80" /> |
| | | <el-table-column |
| | | label="含税单价(元)" |
| | | prop="taxInclusiveUnitPrice" |
| | |
| | | show-overflow-tooltip |
| | | width="240" |
| | | /> |
| | | <el-table-column label="业务员" prop="salesman" show-overflow-tooltip /> |
| | | <el-table-column label="业务员" prop="salesman" show-overflow-tooltip width="90"/> |
| | | <el-table-column |
| | | label="项目名称" |
| | | prop="projectName" |
| | |
| | | <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" |
| | | @blur="invoiceNumBlur(scope.row)" |
| | | @change="invoiceNumBlur(scope.row)" |
| | | ></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | > |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" |
| | | :precision="2" |
| | | v-model="scope.row.currentInvoiceAmount" |
| | | @blur="invoiceAmountBlur(scope.row)" |
| | | @change="invoiceAmountBlur(scope.row)" |
| | | ></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | salesLedgerId: [{ required: true, message: "请选择", trigger: "change" }], |
| | | createUer: [{ required: true, message: "请选择", trigger: "blur" }], |
| | | issueDate: [{ required: true, message: "请选择", trigger: "change" }], |
| | | invoiceNo: [{ required: true, message: "请输入", trigger: "change" }], |
| | | createTime: [{ required: true, message: "请选择", trigger: "change" }], |
| | | }, |
| | | }); |
| | |
| | | "currentInvoiceAmount", |
| | | "noInvoiceNum", |
| | | "noInvoiceAmount", |
| | | "currentInvoiceNum", |
| | | ]); |
| | | }; |
| | | // 打开弹框 |
| | |
| | | getSalesLedgerWithProducts({ id: selectedRows.value[0].id }).then((res) => { |
| | | form.value = { ...res }; |
| | | form.value.createTime = dayjs().format("YYYY-MM-DD"); |
| | | form.value.issueDate = dayjs().format("YYYY-MM-DD"); |
| | | form.value.createUer = userStore.nickName; |
| | | productData.value = form.value.productData.map((item) => { |
| | | return item; |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 导出销售台账 |
| | | const handleExport = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/sales/ledger/exportOne", { ...searchForm, ...page }, "开票登记.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | |
| | | //本次开票失焦操作 |
| | | const invoiceNumBlur = (row) => { |
| | | if (!row.currentInvoiceNum) { |