| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="发票号:" prop="invoiceNumber"> |
| | | <el-input v-model="form.invoiceNumber" placeholder="自动填充" clearable disabled/> |
| | | <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-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </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 disabled/> |
| | | <!-- <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> |
| | |
| | | paymentRegistrationAdd, paymentRegistrationDel, |
| | | paymentRegistrationEdit, |
| | | registrationInfo, |
| | | registrationList |
| | | registrationList, |
| | | getTicketNo |
| | | } from "@/api/procurementManagement/paymentEntry.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const taxRateSelection = [ |
| | | { value: '0', label: '0%' }, |
| | | { value: '3', label: '3%' }, |
| | | { value: '6', label: '6%' }, |
| | | { value: '9', label: '9%' }, |
| | | { value: '13', label: '13%' }, |
| | | { value: '17', label: '17%' }, |
| | | ] |
| | | const tableColumn = ref([ |
| | | { |
| | | label: '采购合同号', |
| | |
| | | { |
| | | label: '发票金额(元)', |
| | | prop: 'invoiceAmount' |
| | | }, |
| | | { |
| | | label: '税率(%)', |
| | | prop: 'taxRate' |
| | | }, |
| | | { |
| | | label: '待付款金额(元)', |
| | |
| | | const selectedRows = ref([]) |
| | | const tableLoading = ref(false) |
| | | const purchaseLedgerList = ref([]) |
| | | const invoiceNumberList = ref([]) |
| | | const userStore = useUserStore() |
| | | const page = reactive({ |
| | | current: 1, |
| | |
| | | const openForm = (type, row) => { |
| | | operationType.value = type |
| | | form.value = {} |
| | | invoiceNumberList.value = [] |
| | | // 查询采购合同号 |
| | | getPurchaseNo().then(res => { |
| | | purchaseLedgerList.value = res |
| | |
| | | } |
| | | dialogFormVisible.value = true |
| | | } |
| | | // 选择发票号以后给发票金额赋值 |
| | | const setInvoiceAmount = (value) => { |
| | | if (value) { |
| | | invoiceNumberList.value.forEach(item => { |
| | | if (item.invoiceNumber === value) { |
| | | form.value.invoiceAmount = item.invoiceAmount |
| | | } |
| | | }) |
| | | } else { |
| | | form.value.invoiceAmount = '' |
| | | } |
| | | } |
| | | // 选择采购合同号赋值 |
| | | const setInfo = (value) => { |
| | | getTicketNo().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.invoiceNumber = res.data.invoiceNumber |
| | | form.value.invoiceAmount = res.data.invoiceAmount |
| | | form.value.taxRate = res.data.taxRate |
| | | form.value.supplierId = res.data.supplierId |
| | | }) |
| | | } else { |
| | | form.value.salesContractNo = '' |
| | | form.value.supplierName = '' |
| | | form.value.invoiceNumber = '' |
| | | form.value.invoiceAmount = '' |
| | | form.value.taxRate = '' |
| | | form.value.supplierId = '' |
| | | } |