| | |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="采购合同号:" prop="purchaseLedgerId"> |
| | | <el-select v-model="form.purchaseLedgerId" placeholder="请选择" clearable @change="setInfo" |
| | | :disabled="operationType === 'edit'"> |
| | | <el-option v-for="item in purchaseLedgerList" :key="item.id" :label="item.purchaseContractNumber" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | <el-form-item label="采购合同号:" prop="purchaseContractNumber"> |
| | | <el-input v-model="form.purchaseContractNumber" placeholder="自动填充" clearable disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="发票号:" prop="invoiceNumber"> |
| | | <el-select v-model="form.invoiceNumber" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | @change="setInvoiceAmount"> |
| | | <el-option v-for="item in invoiceNumberList" :key="item.id" :label="item.invoiceNumber" |
| | | :value="item.invoiceNumber" /> |
| | | </el-select> |
| | | <el-input v-model="form.invoiceNumber" placeholder="自动填充" clearable disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="税率(%):" prop="taxRate"> |
| | | <!-- <el-input type="number" :step="0.01" v-model="form.taxRate" placeholder="自动填充" clearable/> --> |
| | | <el-select v-model="form.taxRate" placeholder="请选择" clearable :disabled="operationType === 'edit'"> |
| | | <el-option v-for="item in taxRateSelection" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="本次付款金额:" prop="currentPaymentAmount"> |
| | | <el-input type="number" :step="0.01" v-model="form.currentPaymentAmount" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式:" prop="paymentMethod"> |
| | | <el-select v-model="form.paymentMethod" placeholder="请选择" clearable> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="登记人:" prop="registrant"> |
| | | <el-input v-model="form.registrant" placeholder="请输入" clearable disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款日期:" prop="paymentDate"> |
| | | <el-date-picker disabled style="width: 100%" v-model="form.paymentDate" value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" type="date" placeholder="请选择" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="登记日期:" prop="registrationtDate"> |
| | | <el-input v-model="form.registrationtDate" placeholder="请输入" clearable disabled /> |
| | |
| | | registrationList, |
| | | getTicketNo |
| | | } from "@/api/procurementManagement/paymentEntry.js"; |
| | | import { invoiceList } from "@/api/procurementManagement/procurementInvoiceLedger.js" |
| | | const { proxy } = getCurrentInstance() |
| | | const taxRateSelection = [ |
| | | { value: '0', label: '0%' }, |
| | |
| | | prop: 'invoiceAmount' |
| | | }, |
| | | { |
| | | label: '本次付款金额(元)', |
| | | prop: 'currentPaymentAmount' |
| | | label: '已付款金额(元)', |
| | | prop: 'paymentAmountTotal' |
| | | }, |
| | | { |
| | | label: '待付款金额(元)', |
| | | prop: 'unPaymentAmount' |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | | align: 'center', |
| | | operation: [ |
| | | { |
| | | name: "编辑", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm('edit', row); |
| | | }, |
| | | }, |
| | | ], |
| | | prop: 'unPaymentAmountTotal' |
| | | }, |
| | | ]) |
| | | const tableData = ref([]) |
| | |
| | | supplierNameOrContractNo: '', |
| | | }, |
| | | form: { |
| | | purchaseContractNumber:'', |
| | | purchaseLedgerId: '', |
| | | salesContractNo: '', |
| | | supplierName: '', |
| | |
| | | } |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | registrationList({ ...searchForm.value, ...page }).then(res => { |
| | | invoiceList({ ...searchForm.value, ...page }).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.rows |
| | | total.value = res.total |
| | |
| | | } |
| | | // 打开弹框 |
| | | const openForm = (type, row) => { |
| | | if(selectedRows.value.length !== 1 ) { |
| | | proxy.$message.error("请选择一条发票数据") |
| | | return |
| | | } |
| | | operationType.value = type |
| | | form.value = {} |
| | | invoiceNumberList.value = [] |
| | | form.value = {...selectedRows.value[0]} |
| | | form.value.ticketRegistrationId = selectedRows.value[0].id |
| | | form.value.id = null |
| | | // 查询采购合同号 |
| | | getPurchaseNo().then(res => { |
| | | purchaseLedgerList.value = res |
| | | }) |
| | | form.value.registrationtDate = getCurrentDate(); |
| | | form.value.paymentDate = getCurrentDate(); |
| | | form.value.registrant = userStore.name |
| | | if (type === 'edit') { |
| | | registrationInfo(row.id).then(res => { |
| | | form.value = { ...res.data } |
| | | if (form.value.registrantId == userStore.id) { |
| | | form.value.registrant = userStore.name |
| | | } |
| | | }) |
| | | } |
| | | dialogFormVisible.value = true |
| | | } |
| | | // 选择发票号以后给发票金额赋值 |