| | |
| | | <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" |
| | |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <br/> |
| | | <el-form-item label="合同录入日期"> |
| | | <el-date-picker style="width: 240px" v-model="searchForm.commonDate" value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间" clearable |
| | | @change="changeDateRange" @clear="clearRange" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> 搜索 </el-button> |
| | | <el-button @click="resetForm"> 重置 </el-button> |
| | |
| | | :summary-method="summarizeMainTable" |
| | | @expand-change="expandChange" |
| | | @selection-change="handleSelectionChange" |
| | | stripe |
| | | > |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column type="expand"> |
| | |
| | | border |
| | | show-summary |
| | | :summary-method="summarizeChildrenTable" |
| | | stripe |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | |
| | | /> |
| | | <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" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="合同录入日期" prop="entryDate" width="120" /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | label="客户合同号" |
| | | prop="customerContractNo" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="客户名称" |
| | | prop="customerName" |
| | | 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" |
| | | show-overflow-tooltip |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | label="合同金额(元)" |
| | | prop="contractAmount" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" |
| | | width="220" |
| | | |
| | | /> |
| | | <el-table-column |
| | | label="已开票金额(元)" |
| | | prop="invoiceTotal" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="未开票金额(元)" |
| | | prop="noInvoiceAmountTotal" |
| | | show-overflow-tooltip |
| | | width="120" |
| | | > |
| | | <template #default="{ row, column }"> |
| | | <el-text type="danger"> |
| | |
| | | /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | <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" |
| | | :formatter="formattedNumber" |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | label="含税总价(元)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | width="200" |
| | | /> |
| | | <el-table-column |
| | | label="不含税总价(元)" |
| | |
| | | :formatter="formattedNumber" |
| | | width="150" |
| | | /> |
| | | <el-table-column label="本次开票数" prop="currentInvoiceNum" width="150"> |
| | | <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> |
| | | <el-table-column |
| | | label="本次开票金额(元)" |
| | | prop="currentInvoiceAmount" |
| | | width="150" |
| | | width="180" |
| | | > |
| | | <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> |
| | | <el-table-column label="未开票数" prop="noInvoiceNum" width="100"> |
| | | <el-table-column label="未开票数" prop="noInvoiceNum" width="120"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | type="number" |
| | |
| | | <el-table-column |
| | | label="未开票金额(元)" |
| | | prop="noInvoiceAmount" |
| | | width="150" |
| | | width="200" |
| | | > |
| | | <template #default="scope"> |
| | | <el-input |
| | |
| | | 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" }], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | const { form: searchForm, resetForm } = useFormData(data.searchForm); |
| | | |
| | | |
| | | const changeDateRange = (date) => { |
| | | if (date) { |
| | | searchForm.entryDateStart = date[0]; |
| | | searchForm.entryDateEnd = date[1]; |
| | | getList(); |
| | | } |
| | | }; |
| | | |
| | | const clearRange = () => { |
| | | searchForm.commonDate = []; |
| | | searchForm.entryDateStart = undefined; |
| | | searchForm.entryDateEnd = undefined; |
| | | getList(); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue == 0) { |
| | | return parseFloat(cellValue).toFixed(2); |
| | |
| | | "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; |