|
|
@ -4,7 +4,9 @@ |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="download()">导入</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="exportByKp()">索赔单开票明细导入</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="exportByTZ()">调增当月收入项目导入</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="exportByTJ()">调减当月收入项目导入</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
@ -26,6 +28,16 @@ |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty">开票单位</div> |
|
|
|
<el-form-item> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.purchaseSystemName" placeholder="请选择" @change="changePurchase" filterable clearable> |
|
|
|
<el-option v-for="item in purchase_list" :key="item.deptSid" :label="item.purchaseSystemName" :value="item.purchaseSystemName"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">开票名称</div> |
|
|
@ -59,7 +71,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div class="title">开票索赔单列表</div> |
|
|
|
<el-table :key="tableKey" :data="formobj.detailList" :index="index" border style="width: 100%" :cell-style="cellStyle"> |
|
|
|
<el-table :key="tableKey" :data="formobj.detailList" :index="index" border style="width: 100%" :cell-style="cellStyle" show-summary :summary-method="getSummaries"> |
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column prop="claimBillNo" label="索赔单号" align="center" width="170" /> |
|
|
|
<el-table-column prop="repairBillNo" label="维修单号" align="center" width="170" /> |
|
|
@ -71,19 +83,53 @@ |
|
|
|
<el-table-column prop="claimOutAmount" label="外出费" align="center" width="120" /> |
|
|
|
<el-table-column prop="claimSubsidyAmount" label="厂家补助" align="center" width="120" /> |
|
|
|
<el-table-column prop="claimRescueAmount" label="施救费" align="center" width="120" /> |
|
|
|
<el-table-column prop="claimOtherAmount" label="其他费用" align="center" width="120" /> |
|
|
|
<el-table-column prop="claimOtherAmount" label="其它费用" align="center" width="120" /> |
|
|
|
<el-table-column prop="totalAmount" label="合计" align="center" width="120" /> |
|
|
|
<el-table-column label="备注" align="center" min-width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" clearable placeholder="" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<div class="titleOne">调增当月收入项目列表(厂家开票明细中索赔单以外补款项目)</div> |
|
|
|
<el-table :key="bkxmKey" :data="formobj.supplementaryItems" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries"> |
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column prop="projectName" label="项目名称" align="center" width="170" /> |
|
|
|
<el-table-column prop="amount" label="金额" align="center" width="100" /> |
|
|
|
<el-table-column prop="remarks" label="补款原因" align="center" min-width="130" /> |
|
|
|
<el-table-column label="附件" align="center" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="handleUpload(scope.row, scope.$index, 'tzdysr')">上传</el-button> |
|
|
|
<el-button type="primary" size="mini" style="padding-left: 5px" v-show="scope.row.supplementaryFiles.length > 0" @click="handleLook(scope.row.supplementaryFiles)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<div class="titleOne">调减当月收入项目列表(厂家开票明细中索赔单以外扣款项目)</div> |
|
|
|
<el-table :key="kkxmKey" :data="formobj.deductionItems" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries"> |
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column prop="projectName" label="项目名称" align="center" width="170" /> |
|
|
|
<el-table-column prop="amount" label="金额" align="center" width="100" /> |
|
|
|
<el-table-column prop="remarks" label="扣款原因" align="center" min-width="130" /> |
|
|
|
<el-table-column label="附件" align="center" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="handleUpload(scope.row, scope.$index, 'tjdysr')">上传</el-button> |
|
|
|
<el-button type="primary" size="mini" style="padding-left: 5px" v-show="scope.row.deductionFiles.length > 0" @click="handleLook(scope.row.deductionFiles)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog :visible.sync="dialogVisible" width="70%" :show-close="false"> |
|
|
|
<!-- 索赔单开票明细导入 --> |
|
|
|
<el-dialog :visible.sync="dialogVisibleByKP" width="70%" :show-close="false"> |
|
|
|
<div> |
|
|
|
<el-button style="font-weight: bold" size="small" type="text" @click="downLoad">下载厂家索赔单开票明细模板</el-button> |
|
|
|
<el-button style="font-weight: bold" size="small" type="text" @click="downLoadByKP">下载厂家索赔单开票明细模板</el-button> |
|
|
|
</div> |
|
|
|
<el-card class="box-card"> |
|
|
|
<div> |
|
|
@ -114,17 +160,113 @@ |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center"> |
|
|
|
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button> |
|
|
|
<el-button size="small" @click="dialogVisible = false">取消</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleConfirmByKP">确定</el-button> |
|
|
|
<el-button size="small" @click="dialogVisibleByKP = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!-- 调增当月收入项目导入 --> |
|
|
|
<el-dialog :visible.sync="dialogVisibleByTZ" width="70%" :show-close="false"> |
|
|
|
<div> |
|
|
|
<el-button style="font-weight: bold" size="small" type="text" @click="downLoadByTZ">下载调增当月收入项目模板</el-button> |
|
|
|
</div> |
|
|
|
<el-card class="box-card"> |
|
|
|
<div> |
|
|
|
<el-upload |
|
|
|
ref="upload" |
|
|
|
class="upload-demo" |
|
|
|
accept=".xls" |
|
|
|
name="file" |
|
|
|
:action="updateAction" |
|
|
|
:on-success="handleSuccess" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:file-list="fileList" |
|
|
|
:auto-upload="false" |
|
|
|
:multiple="false" |
|
|
|
:limit="1" |
|
|
|
:data="uploadData" |
|
|
|
:headers="headers" |
|
|
|
> |
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
|
|
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> |
|
|
|
</el-upload> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<h3>文件上传结果</h3> |
|
|
|
<el-card class="box-card"> |
|
|
|
<div>{{ uploadResultMesssage }}</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center"> |
|
|
|
<el-button type="primary" size="small" @click="handleConfirmByTZ">确定</el-button> |
|
|
|
<el-button size="small" @click="dialogVisibleByTZ = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!-- 调减当月收入项目导入 --> |
|
|
|
<el-dialog :visible.sync="dialogVisibleByTJ" width="70%" :show-close="false"> |
|
|
|
<div> |
|
|
|
<el-button style="font-weight: bold" size="small" type="text" @click="downLoadByTJ">下载调减当月收入项目模板</el-button> |
|
|
|
</div> |
|
|
|
<el-card class="box-card"> |
|
|
|
<div> |
|
|
|
<el-upload |
|
|
|
ref="upload" |
|
|
|
class="upload-demo" |
|
|
|
accept=".xls" |
|
|
|
name="file" |
|
|
|
:action="updateAction" |
|
|
|
:on-success="handleSuccess" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:file-list="fileList" |
|
|
|
:auto-upload="false" |
|
|
|
:multiple="false" |
|
|
|
:limit="1" |
|
|
|
:data="uploadData" |
|
|
|
:headers="headers" |
|
|
|
> |
|
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
|
|
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> |
|
|
|
</el-upload> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<h3>文件上传结果</h3> |
|
|
|
<el-card class="box-card"> |
|
|
|
<div>{{ uploadResultMesssage }}</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center"> |
|
|
|
<el-button type="primary" size="small" @click="handleConfirmByTJ">确定</el-button> |
|
|
|
<el-button size="small" @click="dialogVisibleByTJ = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!-- 附件上传 --> |
|
|
|
<el-dialog center :visible.sync="accessoryVisible" :show-close="false"> |
|
|
|
<el-form class="formadd" :model="accessory"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item> |
|
|
|
<uploadImg ref="uploadImg" v-model="accessory.images" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" size="small" @click="handleFileConfirm">确定</el-button> |
|
|
|
<el-button size="small" @click="handleColse">取消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 查看 --> |
|
|
|
<el-dialog :visible.sync="dialogFileVisible"> |
|
|
|
<el-image style="width: 150px; height: 150px" v-for="(item, index) in list" :key="index" :src="item" :preview-src-list="list"/> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/operation/claimbilling' |
|
|
|
import uploadImg from '@/components/uploadFile/uploadImg' |
|
|
|
import { choiceSupplierInfo, getOrgSidByPath } from '@/api/Common/dictcommons' |
|
|
|
import { choiceSupplierInfo, fetchDetailsByUseOrgSid, getOrgSidByPath } from '@/api/Common/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'ClaimBillingAdd', |
|
|
@ -137,8 +279,19 @@ export default { |
|
|
|
viewState: 1, |
|
|
|
submitdisabled: false, |
|
|
|
tableKey: 1, |
|
|
|
bkxmKey: 2, |
|
|
|
kkxmKey: 3, |
|
|
|
index: 0, |
|
|
|
supplier_list: [], |
|
|
|
purchase_list: [], |
|
|
|
accessoryVisible: false, |
|
|
|
accessory: { |
|
|
|
index: '', |
|
|
|
images: [], |
|
|
|
type: '' |
|
|
|
}, |
|
|
|
dialogFileVisible: false, |
|
|
|
list: [], |
|
|
|
formobj: { |
|
|
|
billNo: '', |
|
|
|
createByName: '', |
|
|
@ -147,6 +300,8 @@ export default { |
|
|
|
deptSid: '', |
|
|
|
createOrgSid: '', |
|
|
|
createTime: '', |
|
|
|
purchaseSystemName: '', |
|
|
|
purchaseSystemSid: '', |
|
|
|
detailList: [], |
|
|
|
fileList: [], |
|
|
|
invoiceKey: '', |
|
|
@ -162,11 +317,15 @@ export default { |
|
|
|
taskDefKey: '', |
|
|
|
taskId: '', |
|
|
|
useOrgName: '', |
|
|
|
useOrgSid: '' |
|
|
|
useOrgSid: '', |
|
|
|
supplementaryItems: [], |
|
|
|
deductionItems: [] |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
dialogVisible: false, |
|
|
|
updateAction: process.env.VUE_APP_BASE_API + '/as/v1/AsBusclaimInvoiceBill/getExcelInfo', |
|
|
|
dialogVisibleByKP: false, // 索赔单开票明细导入弹框 |
|
|
|
dialogVisibleByTZ: false, // 调增当月收入项目导入弹框 |
|
|
|
dialogVisibleByTJ: false, // 调减当月收入项目导入弹框 |
|
|
|
updateAction: '', |
|
|
|
fileList: [], |
|
|
|
upload_list: [], |
|
|
|
uploadResultMesssage: '', |
|
|
@ -183,7 +342,7 @@ export default { |
|
|
|
let kpje = '0' |
|
|
|
if (this.formobj.detailList.length > 0) { |
|
|
|
this.formobj.detailList.forEach((e) => { |
|
|
|
kpje = Math.round((parseFloat(kpje) + parseFloat(e.claimHourAmount) + parseFloat(e.claimGoodsAmount) + parseFloat(e.claimOutAmount) + parseFloat(e.claimSubsidyAmount) + parseFloat(e.claimOtherAmount)) * 100) / 100 |
|
|
|
kpje = Math.round((parseFloat(kpje) + parseFloat(e.claimHourAmount) + parseFloat(e.claimGoodsAmount) + parseFloat(e.claimOutAmount) + parseFloat(e.claimSubsidyAmount) + parseFloat(e.claimRescueAmount) + parseFloat(e.claimOtherAmount)) * 100) / 100 |
|
|
|
}) |
|
|
|
} |
|
|
|
return kpje |
|
|
@ -195,6 +354,11 @@ export default { |
|
|
|
if (res.success) { |
|
|
|
this.formobj.createOrgSid = res.data |
|
|
|
this.formobj.useOrgSid = res.data |
|
|
|
fetchDetailsByUseOrgSid(this.formobj.useOrgSid).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.purchase_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
choiceSupplierInfo({ deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then((resp) => { |
|
|
@ -242,6 +406,14 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changePurchase(value) { |
|
|
|
const choose = this.purchase_list.filter((item) => item.purchaseSystemName === value) |
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
|
this.formobj.purchaseSystemSid = choose[0].deptSid |
|
|
|
} else { |
|
|
|
this.formobj.purchaseSystemSid = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
supplierChange(value) { |
|
|
|
const choose = this.supplier_list.filter((item) => item.sid === value) |
|
|
|
if (choose !== null && choose.length > 0) { |
|
|
@ -254,13 +426,14 @@ export default { |
|
|
|
this.formobj.invoiceKey = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
download() { |
|
|
|
this.dialogVisible = true |
|
|
|
exportByKp() { |
|
|
|
this.dialogVisibleByKP = true |
|
|
|
this.updateAction = process.env.VUE_APP_BASE_API + '/as/v1/AsBusclaimInvoiceBill/getExcelInfo' |
|
|
|
this.fileList = [] |
|
|
|
this.upload_list = [] |
|
|
|
this.uploadResultMesssage = '' |
|
|
|
}, |
|
|
|
downLoad() { |
|
|
|
downLoadByKP() { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
@ -275,7 +448,71 @@ export default { |
|
|
|
const fileName = '厂家索赔单开票明细模板' + '.xls' |
|
|
|
const elink = document.createElement('a') |
|
|
|
elink.download = fileName |
|
|
|
elink.style.display = 'nonde' |
|
|
|
elink.style.display = 'none' |
|
|
|
elink.href = URL.createObjectURL(blob) |
|
|
|
document.body.appendChild(elink) |
|
|
|
elink.click() |
|
|
|
URL.revokeObjectURL(elink.href) |
|
|
|
document.body.removeChild(elink) |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}, |
|
|
|
exportByTZ() { |
|
|
|
this.dialogVisibleByTZ = true |
|
|
|
this.updateAction = process.env.VUE_APP_BASE_API + '/as/v1/AsBusclaimInvoiceBill/getExcelInfoBK' |
|
|
|
this.fileList = [] |
|
|
|
this.upload_list = [] |
|
|
|
this.uploadResultMesssage = '' |
|
|
|
}, |
|
|
|
downLoadByTZ() { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req.downloadExcelBK().then((resp) => { |
|
|
|
loading.close() |
|
|
|
const blob = new Blob([resp], { |
|
|
|
type: 'application/vnd.ms-excel' |
|
|
|
}) |
|
|
|
const fileName = '调增当月收入项目模板' + '.xls' |
|
|
|
const elink = document.createElement('a') |
|
|
|
elink.download = fileName |
|
|
|
elink.style.display = 'none' |
|
|
|
elink.href = URL.createObjectURL(blob) |
|
|
|
document.body.appendChild(elink) |
|
|
|
elink.click() |
|
|
|
URL.revokeObjectURL(elink.href) |
|
|
|
document.body.removeChild(elink) |
|
|
|
}).catch(() => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}, |
|
|
|
exportByTJ() { |
|
|
|
this.dialogVisibleByTJ = true |
|
|
|
this.updateAction = process.env.VUE_APP_BASE_API + '/as/v1/AsBusclaimInvoiceBill/getExcelInfoKK' |
|
|
|
this.fileList = [] |
|
|
|
this.upload_list = [] |
|
|
|
this.uploadResultMesssage = '' |
|
|
|
}, |
|
|
|
downLoadByTJ() { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req.downloadExcelKK().then((resp) => { |
|
|
|
loading.close() |
|
|
|
const blob = new Blob([resp], { |
|
|
|
type: 'application/vnd.ms-excel' |
|
|
|
}) |
|
|
|
const fileName = '调减当月收入项目模板' + '.xls' |
|
|
|
const elink = document.createElement('a') |
|
|
|
elink.download = fileName |
|
|
|
elink.style.display = 'none' |
|
|
|
elink.href = URL.createObjectURL(blob) |
|
|
|
document.body.appendChild(elink) |
|
|
|
elink.click() |
|
|
@ -303,7 +540,7 @@ export default { |
|
|
|
_this.uploadResultMesssage = resp.msg |
|
|
|
} |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
handleConfirmByKP() { |
|
|
|
if (this.upload_list.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请先上传厂家索赔单开票明细' }) |
|
|
|
return |
|
|
@ -322,11 +559,52 @@ export default { |
|
|
|
claimSubsidyAmount: e.claimSubsidyAmount, |
|
|
|
claimRescueAmount: e.claimRescueAmount, |
|
|
|
claimOtherAmount: e.claimOtherAmount, |
|
|
|
totalAmount: e.totalAmount, |
|
|
|
remarks: '', |
|
|
|
isUnanimous: e.isUnanimous |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.dialogVisible = false |
|
|
|
this.dialogVisibleByKP = false |
|
|
|
} |
|
|
|
}, |
|
|
|
handleConfirmByTZ() { |
|
|
|
if (this.upload_list.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请先上传调增当月收入项目' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.formobj.supplementaryItems = [] |
|
|
|
this.upload_list.forEach((e) => { |
|
|
|
this.formobj.supplementaryItems.push({ |
|
|
|
sid: '', |
|
|
|
billSid: '', |
|
|
|
projectName: e.projectName, |
|
|
|
amount: e.amount, |
|
|
|
remarks: e.remarks, |
|
|
|
type: '1', |
|
|
|
supplementaryFiles: [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.dialogVisibleByTZ = false |
|
|
|
} |
|
|
|
}, |
|
|
|
handleConfirmByTJ() { |
|
|
|
if (this.upload_list.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请先上传调减当月收入项目' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.formobj.deductionItems = [] |
|
|
|
this.upload_list.forEach((e) => { |
|
|
|
this.formobj.deductionItems.push({ |
|
|
|
sid: '', |
|
|
|
billSid: '', |
|
|
|
projectName: e.projectName, |
|
|
|
amount: e.amount, |
|
|
|
remarks: e.remarks, |
|
|
|
type: '2', |
|
|
|
deductionFiles: [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.dialogVisibleByTJ = false |
|
|
|
} |
|
|
|
}, |
|
|
|
cellStyle({ row, column, rowIndex, columnIndex }) { |
|
|
@ -337,6 +615,50 @@ export default { |
|
|
|
return cell |
|
|
|
} |
|
|
|
}, |
|
|
|
// 附件上传 |
|
|
|
handleUpload(row, index, type) { |
|
|
|
this.accessoryVisible = true |
|
|
|
this.accessory.index = index |
|
|
|
this.accessory.type = type |
|
|
|
if (type === 'tzdysr') { |
|
|
|
// 调增当月收入项目列表--点击上传 |
|
|
|
this.accessory.images = row.supplementaryFiles |
|
|
|
} else { |
|
|
|
// 调减当月收入项目列表--点击上传 |
|
|
|
this.accessory.images = row.deductionFiles |
|
|
|
} |
|
|
|
}, |
|
|
|
// 附件查看 |
|
|
|
handleLook(row) { |
|
|
|
this.dialogFileVisible = true |
|
|
|
const aa = [] |
|
|
|
if (row.length > 0) { |
|
|
|
row.forEach((e) => { |
|
|
|
aa.push(e.url) |
|
|
|
}) |
|
|
|
this.list = aa |
|
|
|
} |
|
|
|
}, |
|
|
|
// 附件上传--确定 |
|
|
|
handleFileConfirm() { |
|
|
|
if (this.accessory.type === 'tzdysr') { |
|
|
|
// 调增当月收入项目列表 -- 附件信息 |
|
|
|
this.formobj.supplementaryItems[this.accessory.index].supplementaryFiles = this.accessory.images |
|
|
|
} else { |
|
|
|
// 调减当月收入项目列表 -- 附件信息 |
|
|
|
this.formobj.deductionItems[this.accessory.index].deductionFiles = this.accessory.images |
|
|
|
} |
|
|
|
this.handleColse() |
|
|
|
}, |
|
|
|
// 附件上传--取消 |
|
|
|
handleColse() { |
|
|
|
this.accessoryVisible = false |
|
|
|
this.accessory = { |
|
|
|
index: '', |
|
|
|
images: [], |
|
|
|
type: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
@ -373,6 +695,30 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 合计 |
|
|
|
getSummaries(param) { |
|
|
|
const { columns, data } = param |
|
|
|
const sums = [] |
|
|
|
columns.forEach((column, index) => { |
|
|
|
if (index === 0) { |
|
|
|
sums[index] = '' |
|
|
|
return |
|
|
|
} |
|
|
|
const values = data.map(item => Number(item[column.property])) |
|
|
|
if (column.property === 'totalAmount' || column.property === 'amount') { |
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
const value = Number(curr) |
|
|
|
if (!isNaN(value)) { |
|
|
|
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100 |
|
|
|
} else { |
|
|
|
return Math.round((parseFloat(prev)) * 100) / 100 |
|
|
|
} |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
} |
|
|
|
}) |
|
|
|
return sums |
|
|
|
}, |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.formobj = { |
|
|
@ -383,6 +729,8 @@ export default { |
|
|
|
deptSid: '', |
|
|
|
createOrgSid: '', |
|
|
|
createTime: '', |
|
|
|
purchaseSystemName: '', |
|
|
|
purchaseSystemSid: '', |
|
|
|
detailList: [], |
|
|
|
fileList: [], |
|
|
|
invoiceKey: '', |
|
|
@ -398,9 +746,12 @@ export default { |
|
|
|
taskDefKey: '', |
|
|
|
taskId: '', |
|
|
|
useOrgName: '', |
|
|
|
useOrgSid: '' |
|
|
|
useOrgSid: '', |
|
|
|
supplementaryItems: [], |
|
|
|
deductionItems: [] |
|
|
|
} |
|
|
|
this.submitdisabled = false |
|
|
|
this.$refs['form_obj'].resetFields() |
|
|
|
this.$emit('doback') |
|
|
|
} |
|
|
|
} |
|
|
@ -417,4 +768,11 @@ export default { |
|
|
|
/deep/ .el-form-item__error { |
|
|
|
margin-left: 120px !important; |
|
|
|
} |
|
|
|
.titleOne { |
|
|
|
font-weight: bold; |
|
|
|
font-size: 16px; |
|
|
|
background-color: #0294d7; |
|
|
|
color: #ffffff; |
|
|
|
text-align: left; |
|
|
|
} |
|
|
|
</style> |
|
|
|