| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" |
| | | ><el-form-item label="扣税金额" prop="donateno"> |
| | | ><el-form-item label="增值税" prop="donateno"> |
| | | <el-input |
| | | v-model="form.vatAmount" |
| | | :disabled="true" |
| | | placeholder="请输入增值税" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" |
| | | ><el-form-item label="城建税" prop="donateno"> |
| | | <el-input |
| | | v-model="form.cityTaxAmount" |
| | | :disabled="true" |
| | | placeholder="请输入城建税" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" |
| | | ><el-form-item label="劳务税前" prop="donateno"> |
| | | <el-input |
| | | v-model="form.laborPretaxAmount" |
| | | :disabled="true" |
| | | placeholder="请输入劳务税前" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6" |
| | | ><el-form-item label="劳务个税" prop="donateno"> |
| | | <el-input |
| | | v-model="form.taxMoney" |
| | | :disabled="true" |
| | | placeholder="请输入扣税金额" |
| | | placeholder="请输入劳务个税" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="税后金额" prop="donationcategory"> |
| | | <el-form-item label="劳务税后" prop="donationcategory"> |
| | | <el-input |
| | | v-model="form.taxedamount" |
| | | :disabled="true" |
| | | placeholder="请输入收款行号" |
| | | placeholder="请输入劳务税后" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | align="center" |
| | | fixed |
| | | label="序号" |
| | | width="120" |
| | | width="60" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="donorname" |
| | | align="center" |
| | | fixed |
| | | label="案例捐献者" |
| | | label="捐献案例" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.donorname" |
| | | placeholder="案例捐献者" |
| | | placeholder="捐献者" |
| | | :disabled="true" |
| | | /> |
| | | </template> |
| | |
| | | prop="deptmentname" |
| | | align="center" |
| | | label="所属组别" |
| | | width="280" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | |
| | | </el-date-picker> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="pretaxcost" align="center" label="税前金额"> |
| | | <el-table-column prop="pretaxcost" align="right" label="税前金额" width="120" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.pretaxcost" |
| | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="扣税金额" align="center" prop="taXmoney"> |
| | | <el-table-column prop="vatCost" align="right" label="增值税" width="120" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.taXmoney" |
| | | v-model="scope.row.vatCost" |
| | | :disabled="true" |
| | | placeholder="扣税金额" |
| | | placeholder="增值税" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="cityTaxCost" align="right" label="城建税" width="120" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.cityTaxCost" |
| | | :disabled="true" |
| | | placeholder="城建税" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="laborPretaxCost" align="right" label="劳务税前" width="120" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.laborPretaxCost" |
| | | :disabled="true" |
| | | placeholder="劳务税前" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="劳务个税" prop="taxcost" width="120" align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.taxcost" |
| | | :disabled="true" |
| | | placeholder="劳务个税" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="taxedcost" align="center" label="税后金额"> |
| | | <el-table-column prop="taxedcost" label="劳务税后" width="120" align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | @blur="chargeSum" |
| | | :disabled="true" |
| | | v-model="scope.row.taxedcost" |
| | | placeholder="税后金额" |
| | | placeholder="劳务税后" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="remark" |
| | | width="280" |
| | | align="center" |
| | | label="备注" |
| | | > |
| | |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | prop="pretaxcost" |
| | | label="税前金额" |
| | | show-overflow-tooltip |
| | | > |
| | | align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taXmoney" |
| | | label="扣税金额" |
| | | prop="vatCost" |
| | | label="增值税" |
| | | show-overflow-tooltip |
| | | > |
| | | align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cityTaxCost" |
| | | label="城建税" |
| | | show-overflow-tooltip |
| | | align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="laborPretaxCost" |
| | | label="劳务税前" |
| | | show-overflow-tooltip |
| | | align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taxcost" |
| | | label="劳务个税" |
| | | show-overflow-tooltip |
| | | align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taxedcost" |
| | | label="税后金额" |
| | | label="劳务税后" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | align="right" header-align="right" class-name="money-column" :formatter="formatMoney"> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | prop="remark" |
| | | label="备注" |
| | |
| | | </el-upload> |
| | | <el-table |
| | | :data="fileListto" |
| | | @row-click="downFile" |
| | | @row-click="previewInline" @row-dblclick="downFile" |
| | | style="width: 100%" |
| | | height="400" |
| | | > |
| | |
| | | pdfVisible: false, |
| | | maxTaxId: "", |
| | | pdfimgsrcList: [], |
| | | // 2026-11-30:票据弹窗预览令牌(防止切换行时旧请求回写) |
| | | previewToken: 0, |
| | | Savereminder: false, //提醒保存弹框 |
| | | Reminderquantity: 0, //提醒数量 |
| | | totalquantity: 0, //总数量 |
| | |
| | | }); |
| | | } |
| | | this.donorchargeorgans.forEach(item => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | this.accumulation(); |
| | | }); |
| | | if (this.form.id) { |
| | |
| | | |
| | | this.dialogVisiblepatient = false; |
| | | }, |
| | | // 计算个税 |
| | | // 计算个税(先保存当前单据,保存成功后再算税;算税成功后从后端重新加载,不再用页面旧金额回写) |
| | | calculateFn() { |
| | | if (this.form.id >= this.MaxFundTaxId) { |
| | | this.$modal.loading("正在提交,请稍候!"); |
| | | this.$modal |
| | | .confirm("即将进行算税是否已保存全部数据?") |
| | | .then(res => { |
| | | listbxiaostatistics({ |
| | | fundTaxId: Number(this.form.id), |
| | | addOrupdate: 1 |
| | | }).then(res1 => { |
| | | if (res1.code == 200) { |
| | | this.$modal.msgSuccess("计算成功"); |
| | | this.$modal.closeLoading(); |
| | | this.form.istax = 1; |
| | | this.form.taxedtime = this.$moment().format( |
| | | "YYYY-MM-DD HH:mm:ss" |
| | | ); |
| | | this.submitForm(); |
| | | } else { |
| | | this.$modal.closeLoading(); |
| | | this.$modal.msgError(res1.msg); |
| | | .confirm("算税前会先保存当前单据,是否继续?") |
| | | .then(() => { |
| | | this.form.serviceFunds = this.donorchargeorgans; |
| | | this.$refs["form"].validate(valid => { |
| | | if (!valid) { |
| | | this.$modal.msgError("单据校验未通过,请检查后重试"); |
| | | return; |
| | | } |
| | | this.$modal.loading("正在提交,请稍候!"); |
| | | updateFundtax(this.form).then(res0 => { |
| | | if (res0.code != 200) { |
| | | this.$modal.closeLoading(); |
| | | this.$modal.msgError(res0.msg); |
| | | return; |
| | | } |
| | | listbxiaostatistics({ |
| | | fundTaxId: Number(this.form.id), |
| | | addOrupdate: 1 |
| | | }).then(res1 => { |
| | | if (res1.code == 200) { |
| | | // 后端已回写 service_fund / service_fundtax,这里只做重新加载 |
| | | this.refreshFundtax().then(() => { |
| | | this.$modal.closeLoading(); |
| | | this.$modal.msgSuccess("计算成功"); |
| | | }); |
| | | } else { |
| | | this.$modal.closeLoading(); |
| | | this.$modal.msgError(res1.msg); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | }) |
| | | |
| | | .catch(() => {}); |
| | | } else { |
| | | this.$modal.msgError("当前单据不为最新申请单"); |
| | | } |
| | | }, |
| | | // 金额合计 |
| | | // 从后端重新加载汇总单(含明细单据行)并重算合计 |
| | | refreshFundtax() { |
| | | return getFundtax(this.form.id).then(response => { |
| | | this.form = response.data; |
| | | if (this.form.serviceFunds && this.form.serviceFunds[0]) { |
| | | this.donorchargeorgans = this.form.serviceFunds; |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.index = index + 1; |
| | | }); |
| | | } |
| | | this.accumulation(); |
| | | return response; |
| | | }); |
| | | }, |
| | | // 金额合计(6 个金额全部取自单据上的后端金额,不再用“税前-税后”倒算) |
| | | accumulation() { |
| | | this.form.pretaxamount = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.pretaxcost), 0) |
| | | .reduce((acc, obj) => acc + Number(obj.pretaxcost || 0), 0) |
| | | .toFixed(2); |
| | | this.form.vatAmount = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.vatCost || 0), 0) |
| | | .toFixed(2); |
| | | this.form.cityTaxAmount = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.cityTaxCost || 0), 0) |
| | | .toFixed(2); |
| | | this.form.laborPretaxAmount = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.laborPretaxCost || 0), 0) |
| | | .toFixed(2); |
| | | this.form.taxMoney = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.taXmoney), 0) |
| | | .reduce((acc, obj) => acc + Number(obj.taxcost || 0), 0) |
| | | .toFixed(2); |
| | | this.form.taxedamount = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.taxedcost), 0) |
| | | .reduce((acc, obj) => acc + Number(obj.taxedcost || 0), 0) |
| | | .toFixed(2); |
| | | }, |
| | | // 多选框选中数据 |
| | |
| | | this.title = "专家费汇总单编辑"; |
| | | getFundtax(this.curId).then(response => { |
| | | this.form = response.data; |
| | | if (this.form.serviceFunds[0]) { |
| | | if (this.form.serviceFunds && this.form.serviceFunds[0]) { |
| | | this.donorchargeorgans = this.form.serviceFunds; |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | item.index = index + 1; |
| | | this.accumulation(); |
| | | }); |
| | | this.accumulation(); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.title = "查看专家费汇总单"; |
| | | getFundtax(this.curId).then(response => { |
| | | this.form = response.data; |
| | | if (this.form.serviceFunds[0]) { |
| | | if (this.form.serviceFunds && this.form.serviceFunds[0]) { |
| | | this.donorchargeorgans = this.form.serviceFunds; |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | item.index = index + 1; |
| | | this.accumulation(); |
| | | }); |
| | | this.accumulation(); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | if (this.form.id != null) { |
| | | updateFundtax(this.form).then(res1 => { |
| | | if (res1.code == 200) { |
| | | console.log(3); |
| | | this.$modal.msgSuccess("保存成功!"); |
| | | getFundtax(this.form.id).then(response => { |
| | | this.form = response.data; |
| | | if (this.form.serviceFunds[0]) { |
| | | this.donorchargeorgans = this.form.serviceFunds; |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | item.index = index + 1; |
| | | this.accumulation(); |
| | | }); |
| | | } |
| | | this.refreshFundtax().then(() => { |
| | | this.$modal.closeLoading(); |
| | | }); |
| | | this.$modal.closeLoading(); |
| | | } else { |
| | | this.$modal.closeLoading(); |
| | | this.$modal.msgError(res1.msg); |
| | |
| | | addFundtax(this.form).then(response => { |
| | | if (response.code == 200) { |
| | | this.$modal.msgSuccess("新增成功!"); |
| | | getFundtax(response.data.fundTaxId).then(res => { |
| | | this.form = res.data; |
| | | if (this.form.serviceFunds[0]) { |
| | | this.donorchargeorgans = this.form.serviceFunds; |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | item.index = index + 1; |
| | | |
| | | this.accumulation(); |
| | | }); |
| | | } |
| | | this.form.id = response.data.fundTaxId; |
| | | this.refreshFundtax().then(() => { |
| | | this.$modal.closeLoading(); |
| | | }); |
| | | this.$modal.closeLoading(); |
| | | } else { |
| | | this.$modal.msgError(response.msg); |
| | | this.$modal.closeLoading(); |
| | |
| | | return sums; |
| | | }, |
| | | // 文件------------------------ |
| | | /** 2026-11-23:按文件名从列表中精确删除一项,避免用预览列表(blob)整表覆盖附件字段 */ |
| | | spliceByName(list, name) { |
| | | if (!list || !name) { |
| | | return; |
| | | } |
| | | const idx = list.findIndex(item => item && item.name === name); |
| | | if (idx > -1) { |
| | | list.splice(idx, 1); |
| | | } |
| | | }, |
| | | remove(file, fileList) { |
| | | const donorchargeorgans = [...this.donorchargeorgans]; |
| | | |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | | donorchargeorgans[this.atpresent].annexFilesList = this.fileListto; |
| | | this.spliceByName(this.fileListto, file && file.name); |
| | | this.spliceByName( |
| | | donorchargeorgans[this.atpresent].annexFilesList, |
| | | file && file.name |
| | | ); |
| | | }, |
| | | |
| | | uploadSccess(response, file, fileList) { |
| | |
| | | }, |
| | | |
| | | // 点击票据 |
| | | /** |
| | | * 2026-11-30:清空票据弹窗预览状态(含 embeddedFile / invoiceEmbeddedFile), |
| | | * 避免再次打开弹窗时仍显示上一次选择的票据图片。 |
| | | */ |
| | | resetPreviewState() { |
| | | this.fileListto = []; |
| | | this.invoicefileListto = []; |
| | | this.pdfimg = ""; |
| | | this.invoicepdfimg = ""; |
| | | this.pdfimgsrcList = []; |
| | | this.invoicepdfimgsrcList = []; |
| | | this.embeddedFile = null; |
| | | this.invoiceEmbeddedFile = null; |
| | | this.pdftitle = ""; |
| | | this.previewToken = (this.previewToken || 0) + 1; |
| | | }, |
| | | |
| | | Filepopup(index, row) { |
| | | const config = { |
| | | headers: { Authorization: "Bearer " + this.ICDtoken } |
| | | }; |
| | | |
| | | this.tableDatatop = []; |
| | | this.fileListto = []; |
| | | this.invoicefileListto = []; |
| | | this.pdfimg = ""; |
| | | this.invoicepdfimg = []; |
| | | this.pdfimgsrcList = []; |
| | | this.invoicepdfimgsrcList = []; |
| | | this.resetPreviewState(); |
| | | const previewToken = ++this.previewToken; |
| | | this.tableDatatop.push(row); |
| | | this.atpresent = index; |
| | | this.pdfVisible = true; |
| | |
| | | ); |
| | | |
| | | Promise.all(fetchPromises).then(fileListto => { |
| | | // 2026-11-30:切换行后丢弃过期结果 |
| | | if (previewToken !== this.previewToken) { |
| | | return; |
| | | } |
| | | this.fileListto = fileListto.filter(item => item !== null); |
| | | this.pdfimg = this.fileListto[0].url; |
| | | console.log(this.pdfimg, "pdfimg"); |
| | |
| | | }, |
| | | |
| | | // 点击已上传文件:在附件弹窗右侧内嵌预览 |
| | | /** |
| | | * 2026-11-30:单击列表项 → 在本页预览(右侧 preview-pane)。 |
| | | * 双击才打开独立的预览页面(downFile → $previewFile)。 |
| | | */ |
| | | previewInline(row) { |
| | | if (!row) { |
| | | return; |
| | | } |
| | | const url = row.previewUrl || row.url; |
| | | if (!url) { |
| | | return; |
| | | } |
| | | const file = { |
| | | name: row.name || "", |
| | | url, |
| | | type: /\.pdf$/i.test(row.name || "") ? "pdf" : "image" |
| | | }; |
| | | this.embeddedFile = file; |
| | | }, |
| | | |
| | | downFile(item) { |
| | | if (this.operationType == "detail") { |
| | | const list = (this.fileListto || []).map(f => ({ |