| | |
| | | <el-table-column label="供应商名称" prop="supplierName" 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 fixed="right" label="操作" min-width="60" align="center"> |
| | | <!-- <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> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" :limit="page.size" @pagination="paginationChange" /> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="开票日期:" prop="issueDate"> |
| | | <el-date-picker disabled style="width: 100%" v-model="form.issueDate" value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" type="date" placeholder="请选择" clearable /> |
| | | <el-date-picker disabled style="width: 100%" v-model="form.issueDate" type="date" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | purchaseContractNumber: '', |
| | | }, |
| | | form: { |
| | | issueDate:"",// 开票日期 |
| | | purchaseLedgerId: '', |
| | | purchaseLedgerNo: '', |
| | | issUerId: '', // 开票人id |
| | |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection |
| | | selectedRows.value = selection.filter(item => item.purchaseContractNumber !== undefined); |
| | | } |
| | | const productSelected = (selectedRows) => { |
| | | productSelectedRows.value = selectedRows |
| | |
| | | fileList.value = [] |
| | | form.value.issUerId = userStore.id |
| | | form.value.issUer = userStore.name |
| | | form.value.issueDate = getNowFormatDate() |
| | | userListNoPage().then(res => { |
| | | userList.value = res.data |
| | | }) |
| | |
| | | if (type === 'add' && row && row.id) { |
| | | form.value.purchaseLedgerId = row.id |
| | | getPurchaseNoById({ id: row.id }).then(res => { |
| | | purchaseLedgerList.value = res, |
| | | form.value.purchaseLedgerNo = res.purchaseContractNumber; |
| | | form.value.invoiceAmount = res.invoiceAmount; |
| | | form.value.invoiceNumber = res.invoiceNumber; |
| | | setInfo(res.id) |
| | | let result = res.data |
| | | purchaseLedgerList.value = result, |
| | | form.value.purchaseLedgerNo = result.purchaseContractNumber; |
| | | form.value.invoiceAmount = result.invoiceAmount; |
| | | form.value.invoiceNumber = result.invoiceNumber; |
| | | setInfo(result.id) |
| | | }) |
| | | } else { |
| | | getProduct().then(res => { |
| | |
| | | // 选择采购合同号赋值 |
| | | const setInfo = (value) => { |
| | | getInfo({ id: value }).then(res => { |
| | | form.value.salesContractNo = res.salesContractNo |
| | | form.value.projectName = res.projectName |
| | | productData.value = res.productData |
| | | form.value.supplierName = res.supplierName |
| | | let result = res.data |
| | | form.value.salesContractNo = result.salesContractNo |
| | | form.value.projectName = result.projectName |
| | | productData.value = result.productData |
| | | form.value.supplierName = result.supplierName |
| | | }) |
| | | } |
| | | // 提交表单 |
| | |
| | | // 计算未开票金额 |
| | | row.futureTicketsAmount = row.futureTickets * row.taxInclusiveUnitPrice |
| | | } |
| | | |
| | | // 获取当前日期函数 |
| | | function getNowFormatDate() { |
| | | let date = new Date(), |
| | | year = date.getFullYear(), //获取完整的年份(4位) |
| | | month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月) |
| | | strDate = date.getDate() // 获取当前日(1-31) |
| | | if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0 |
| | | if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0 |
| | | return `${year}-${month}-${strDate}` |
| | | } |
| | | getList() |
| | | </script> |
| | | |