| | |
| | | <el-form-item label="申请日期" prop="createTime"> |
| | | <el-date-picker |
| | | v-model="form.createTime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd " |
| | | type="date" |
| | | :disabled="true" |
| | | placeholder="选择出生年月" |
| | | > |
| | |
| | | <el-date-picker |
| | | v-model="form.taxedtime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | type="datetime" format="yyyy-MM-dd HH:mm" |
| | | :disabled="true" |
| | | placeholder="选择时间" |
| | | > |
| | |
| | | </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> |
| | |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | > |
| | | <el-table-column |
| | | prop="index" |
| | | align="center" |
| | | fixed |
| | | label="序号" |
| | | width="120" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="donorname" |
| | | align="center" |
| | |
| | | v-model="scope.row.applyTime" |
| | | :disabled="true" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="申请日期" |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | </template> |
| | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="扣税金额" align="center" prop="taXmoney"> |
| | | <el-table-column prop="vatCost" align="center" label="增值税"> |
| | | <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="center" label="城建税"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.cityTaxCost" |
| | | :disabled="true" |
| | | placeholder="城建税" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="laborPretaxCost" align="center" label="劳务税前"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.laborPretaxCost" |
| | | :disabled="true" |
| | | placeholder="劳务税前" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="劳务个税" align="center" prop="taxcost"> |
| | | <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" align="center" label="劳务税后"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | @blur="chargeSum" |
| | | :disabled="true" |
| | | v-model="scope.row.taxedcost" |
| | | placeholder="税后金额" |
| | | placeholder="劳务税后" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | :before-close="handleClosehz" |
| | | > |
| | | <div class="examine-jic"> |
| | | <div style="margin: 0 10px 20px 10px;"> |
| | | <el-card class="box-card"> |
| | | <el-tag |
| | | v-for="item in overallCase" |
| | | :key="item.id" |
| | | closable |
| | | @close="handleClose(item)" |
| | | > |
| | | {{ item.donorname }} |
| | | </el-tag> |
| | | <div style="margin-top: 20px; text-align: right;"> |
| | | 共选择<span |
| | | style="font-size: 18px; color: #409EFF;margin: 0 10px;" |
| | | >{{ overallCase.length }}</span |
| | | >条数据 |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div class="jic-value"> |
| | | <el-row :gutter="20"> |
| | | <!--用户数据--> |
| | | <el-form |
| | | class="opo-query-form" |
| | | :model="patientqueryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | |
| | | > |
| | | <el-form-item label="捐献案例" prop="status"> |
| | | <el-select |
| | | v-model="patientqueryParams.donorno" |
| | | v-model="patientqueryParams.donorname" |
| | | filterable |
| | | allow-create |
| | | default-first-option |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in donorchargeanlList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="申请人" prop="name"> |
| | | <el-input |
| | | v-model="patientqueryParams.pausername" |
| | | placeholder="请输入申请人姓名" |
| | | @keyup.enter.native="handleAddpatient" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="算税状态" prop="status"> |
| | | <el-select |
| | | v-model="patientqueryParams.istax" |
| | | filterable |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in istaxlist" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taXmoney" |
| | | label="扣税金额(缺)" |
| | | prop="vatCost" |
| | | label="增值税" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cityTaxCost" |
| | | label="城建税" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="laborPretaxCost" |
| | | label="劳务税前" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taxcost" |
| | | label="劳务个税" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taxedcost" |
| | | label="税后金额" |
| | | label="劳务税后" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | |
| | | :close-on-click-modal="false" |
| | | :title="pdftitle" |
| | | :visible.sync="pdfVisible" |
| | | :fullscreen="pdfFullscreen" |
| | | width="60%" |
| | | custom-class="pdf-resize-dialog" |
| | | @closed="pdfFullscreen = false" |
| | | > |
| | | <template slot="title"> |
| | | <span>{{ pdftitle }}</span> |
| | | <el-button class="pdf-fullscreen-btn" size="mini" |
| | | :icon="pdfFullscreen ? 'el-icon-close' : 'el-icon-full-screen'" |
| | | @click="pdfFullscreen = !pdfFullscreen">{{ pdfFullscreen ? "还原" : "全屏" }}</el-button> |
| | | </template> |
| | | <div class="pdfimg"> |
| | | <div class="box-pdf"> |
| | | <div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin"> |
| | | <!-- <img :src="pdfimg" /> --> |
| | | <el-image |
| | | style="width: 95%; height: 90%" |
| | | :src="pdfimg" |
| | | :preview-src-list="pdfimgsrcList" |
| | | > |
| | | <!-- <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> --> |
| | | </el-image> |
| | | </div> |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | | <attachment-preview-pane :file="embeddedFile" style="flex: 1; min-width: 0;" /> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | import Li_area_select from "@/components/Address"; |
| | | import { getUserProfile } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { moneySum, moneyRound } from "@/utils/money"; |
| | | import { |
| | | ExpertfeeListnb, |
| | | getFundtax, |
| | |
| | | Li_area_select, |
| | | pdf |
| | | }, |
| | | dicts: ["sys_gathering", "sys_0_1"], |
| | | dicts: ["Collection_status", "sys_0_1"], |
| | | name: "Donorchargemanager", |
| | | data() { |
| | | return { |
| | | swgatheringlist: [ |
| | | { label: "未算税", value: 0 }, |
| | | { label: "已算税", value: 1 } |
| | | { label: "已算税", value: 1 }, |
| | | { label: "未算税", value: 0 } |
| | | ], |
| | | gatheringlist: [ |
| | | { label: "未付款", value: "0" }, |
| | | { label: "已付款", value: "1" } |
| | | ], |
| | | // 当前页选中数据 |
| | | multipleSelection: [], |
| | | // 总选中数据 |
| | | overallCase: [], |
| | | patientqueryParams: { |
| | | paApplyType: 1, |
| | | pacheckno: "047", |
| | | checkstatus: 0, |
| | | // pacheckno: "047", |
| | | // checkstatus: 0, |
| | | pfundtaxid: 0, |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | }, |
| | |
| | | organParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | paymentid: null |
| | | paymentid: null, |
| | | istax: 0 |
| | | }, |
| | | |
| | | // 当前用户信息 |
| | | userprofile: {}, |
| | | decision: false, |
| | | // 表单参数 |
| | | form: { |
| | | istax: 0, |
| | |
| | | |
| | | baselist: [], |
| | | donorList: [], |
| | | istaxlist: [ |
| | | { value: 0, label: "未算税" }, |
| | | { value: 2, label: "待算税" } |
| | | ], |
| | | organchargelist: [], |
| | | standardlevel: 0, |
| | | defaultperson: {}, |
| | |
| | | |
| | | created() { |
| | | console.log(234); |
| | | this.Networkheader = window.location.origin; |
| | | this.GetMaxTaxid(); |
| | | |
| | | //获取参数 |
| | |
| | | }, |
| | | handleQuery() {}, |
| | | resetQuery() { |
| | | this.patientqueryParams.donorno = null; |
| | | this.patientqueryParams.donorchargeid = null; |
| | | this.patientqueryParams.pausername = null; |
| | | this.patientqueryParams.donorname = null; |
| | | this.handleAddpatient(); |
| | | }, |
| | | handleUploadError() {}, |
| | | // 弹框添加 |
| | | AddDispatchpatients() { |
| | | this.donorchargeorgans = this.donorchargeorgans.concat( |
| | | this.multipleSelection |
| | | ); |
| | | console.log(this.donorchargeorgans, "donorchargeorgans"); |
| | | this.donorchargeorgans.forEach(item => { |
| | | CalculationDetail({ id: item.id, fundTaxId: this.form.id }); |
| | | let newArr = this.donorchargeorgans.concat(this.overallCase); |
| | | this.donorchargeorgans = newArr.filter((item, index, self) => { |
| | | return !self.slice(index + 1).some(other => other.id === item.id); |
| | | }); |
| | | |
| | | console.log(this.donorchargeorgans, "donorchargeorgans"); |
| | | if (this.form.id) { |
| | | this.donorchargeorgans.forEach(item => { |
| | | CalculationDetail({ id: item.id, fundTaxId: this.form.id }); |
| | | }); |
| | | } |
| | | 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 |
| | | ); |
| | | this.form.taxMoney = this.donorchargeorgans.reduce( |
| | | (acc, obj) => acc + Number(obj.taXmoney), |
| | | 0 |
| | | ); |
| | | this.form.taxedamount = this.donorchargeorgans.reduce( |
| | | (acc, obj) => acc + Number(obj.taxedcost), |
| | | 0 |
| | | ); |
| | | this.form.pretaxamount = this.donorchargeorgans |
| | | .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.taxcost || 0), 0) |
| | | .toFixed(2); |
| | | this.form.taxedamount = this.donorchargeorgans |
| | | .reduce((acc, obj) => acc + Number(obj.taxedcost || 0), 0) |
| | | .toFixed(2); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | handleSelectionChange(selection) { |
| | | if (this.decision) return; |
| | | // 判断是否有删除 |
| | | if (this.multipleSelection.length <= selection.length) { |
| | | this.multipleSelection = selection; |
| | | } else { |
| | | this.multipleSelection.forEach(item => { |
| | | if (selection.includes(item)) { |
| | | } else { |
| | | if (this.multipleSelection.length == 1) { |
| | | this.multipleSelection = []; |
| | | } else { |
| | | this.multipleSelection.splice( |
| | | this.multipleSelection.indexOf(item), |
| | | 1 |
| | | ); |
| | | } |
| | | if (this.overallCase.length == 1) { |
| | | this.overallCase = []; |
| | | } else { |
| | | this.overallCase.splice(this.overallCase.indexOf(item), 1); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | // 赋值给整体选中数组 |
| | | this.multipleSelection.forEach(item => { |
| | | if (!this.overallCase.includes(item)) { |
| | | this.overallCase.push(item); |
| | | } |
| | | }); |
| | | console.log(this.multipleSelection, "触发选择后multipleSelection"); |
| | | }, |
| | | // 切换页后恢复选中 |
| | | Restorecheck() { |
| | | console.log(this.overallCase, "this.overallCase"); |
| | | const allid = this.overallCase.map(item => item.id); |
| | | const overlap = this.donorchargeList.filter(value => { |
| | | return allid.includes(value.id); |
| | | }); |
| | | // 保持ids和当前页面的同步性 |
| | | this.multipleSelection = overlap; |
| | | console.log(this.multipleSelection, "进入分页multipleSelection"); |
| | | |
| | | this.toggleSelection(overlap); |
| | | }, |
| | | // 挂载选择状态 |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | this.decision = true; |
| | | this.$nextTick(() => { |
| | | rows.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row, true); |
| | | }); |
| | | this.decision = false; |
| | | }); |
| | | console.log(123); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | // 选择人员标签删除事件 |
| | | handleClose(item) { |
| | | this.overallCase.splice(this.overallCase.indexOf(item), 1); |
| | | if (this.multipleSelection.indexOf(item) == -1) { |
| | | } else { |
| | | this.multipleSelection.splice(this.multipleSelection.indexOf(item), 1); |
| | | this.$refs.multipleTable.toggleRowSelection(item, false); |
| | | // this.toggleSelection(this.multipleSelection); |
| | | } |
| | | }, |
| | | // 点击新增 |
| | | handleAddpatient(row) { |
| | |
| | | ExpertfeeListnb(this.patientqueryParams).then(res => { |
| | | this.donorchargeList = res.rows; |
| | | this.patienttotal = res.total; |
| | | console.log(this.donorchargeList); |
| | | this.Restorecheck(); |
| | | }); |
| | | }, |
| | | // 获取最大taxid |
| | |
| | | }); |
| | | }, |
| | | |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // /** 重置按钮操作 */ |
| | | // resetQuery() { |
| | | // this.resetForm("queryForm"); |
| | | // this.handleQuery(); |
| | | // }, |
| | | |
| | | // 取消按钮 |
| | | cancel() { |
| | |
| | | this.title = "新增专家费汇总单"; |
| | | //获取登录者信息 |
| | | getUserProfile().then(res => { |
| | | this.form.username = res.createBy; |
| | | this.form.username = res.data.createBy; |
| | | }); |
| | | }, |
| | | |
| | |
| | | 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 => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | this.accumulation(); |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.index = index + 1; |
| | | }); |
| | | 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 => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | this.accumulation(); |
| | | this.donorchargeorgans.forEach((item, index) => { |
| | | item.index = index + 1; |
| | | }); |
| | | 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 => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | 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 => { |
| | | item.taXmoney = item.pretaxcost - item.taxedcost; |
| | | item.taXmoney = item.taXmoney.toFixed(2); |
| | | 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(); |
| | |
| | | this.$modal.msgError("注意实收金额不等于应收金额,请核对数据!"); |
| | | } |
| | | }, |
| | | //修改实收或应收后触发 |
| | | //修改实收或应收后触发(金额一律走精确运算) |
| | | chargeSum() { |
| | | let ChargeSum = 0; |
| | | let ChargeamountSum = 0; |
| | | |
| | | //费用合计 |
| | | try { |
| | | for (let i = 0; i < this.donorchargeorgans.length; i++) { |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].organcharge))) { |
| | | ChargeSum += parseFloat(this.donorchargeorgans[i].organcharge); |
| | | } |
| | | if (!isNaN(parseFloat(this.donorchargeorgans[i].amount))) { |
| | | ChargeamountSum += parseFloat(this.donorchargeorgans[i].amount); |
| | | } |
| | | } |
| | | this.form.receivableamount = ChargeSum.toFixed(2); |
| | | this.form.receivedamount = ChargeamountSum.toFixed(2); |
| | | this.form.receivableamount = moneyRound( |
| | | moneySum(this.donorchargeorgans, "organcharge") |
| | | ).toFixed(2); |
| | | this.form.receivedamount = moneyRound( |
| | | moneySum(this.donorchargeorgans, "amount") |
| | | ).toFixed(2); |
| | | } catch {} |
| | | }, |
| | | |
| | |
| | | const config = { |
| | | headers: { Authorization: "Bearer " + this.ICDtoken } |
| | | }; |
| | | const pdfimg = this.Networkheader + "/prod-api" + response.fileName; |
| | | const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + response.fileName; |
| | | //获取票据信息位置 |
| | | if (response.code == 200) { |
| | | this.previewpdf = true; |
| | | fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | | // 将获取的数据流转换为URL |
| | | this.pdfimg = URL.createObjectURL(blob); |
| | | this.pdfimgsrcList.push(URL.createObjectURL(blob)); |
| | | this.fileListto.push({ |
| | | name: file.name, |
| | | url: URL.createObjectURL(blob) |
| | | }); |
| | | }) |
| | | .catch(error => { |
| | | console.error("Error loading image", error); |
| | | return; |
| | | }); |
| | | const localBlob = file.raw; |
| | | const localUrl = URL.createObjectURL(localBlob); |
| | | this.pdfimg = localUrl; |
| | | this.embeddedFile = { |
| | | name: file.name, |
| | | url: localUrl, |
| | | type: /\.pdf$/i.test(file.name) ? "pdf" : "image" |
| | | }; |
| | | this.pdfimgsrcList.push(localUrl); |
| | | this.fileListto.push({ |
| | | name: file.name, |
| | | url: localUrl |
| | | }); |
| | | |
| | | this.$modal.msgSuccess(response.msg); |
| | | |
| | |
| | | if (this.donorchargeorgans[index].annexFilesList) { |
| | | const fetchPromises = this.donorchargeorgans[index].annexFilesList.map( |
| | | (value, indexson) => { |
| | | const pdfimg = this.Networkheader + "/prod-api" + value.url; |
| | | const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.url; |
| | | return fetch(pdfimg, config) |
| | | .then(response => response.blob()) |
| | | .then(blob => { |
| | |
| | | ); |
| | | }, |
| | | |
| | | // 点击已上传文件 |
| | | // 点击已上传文件:在附件弹窗右侧内嵌预览 |
| | | downFile(item) { |
| | | if (this.operationType == "detail") { |
| | | const list = (this.fileListto || []).map(f => ({ |
| | | name: f.name, |
| | | url: f.url |
| | | })); |
| | | const index = list.findIndex(f => f.url === item.url); |
| | | this.$previewFile(list, index > -1 ? index : 0); |
| | | return; |
| | | } |
| | | const ext = String(item.name || "").toLowerCase().split(".").pop(); |
| | | const isImage = ["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext); |
| | | if (ext !== "pdf" && !isImage) { |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | return; |
| | | } |
| | | this.embeddedFile = { |
| | | name: item.name, |
| | | url: item.url, |
| | | type: ext === "pdf" ? "pdf" : "image" |
| | | }; |
| | | this.pdftitle = |
| | | "共" + this.pdfimgsrcList.length + "项,当前选中" + item.name; |
| | | let name = item.name.split("."); |
| | | if (name[1] == "pdf") { |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | } else if (name[1] == "jpg" || "png") { |
| | | console.log(item, "展示"); |
| | | this.previewpdf = true; |
| | | if (item.url) { |
| | | this.pdfimg = item.url; |
| | | } else { |
| | | this.pdfimg = ""; |
| | | } |
| | | } else { |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | | this.$modal.msgWarning("当前文件暂不支持预览"); |
| | | this.previewpdf = false; |
| | | } |
| | | this.pdfVisible = true; |
| | | }, |
| | | getIndexInArray(arr, obj) { |
| | | return arr.indexOf(obj); |
| | |
| | | color: #000000; |
| | | cursor: not-allowed; |
| | | } |
| | | ::v-deep .el-tag--medium { |
| | | height: 28px; |
| | | line-height: 26px; |
| | | margin-right: 15px; |
| | | margin-bottom: 15px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | ::v-deep .el-input--medium .el-input__inner { |
| | | height: 36px; |