Browse Source

完善厂家索赔单开票管理

master
yunuo970428 6 months ago
parent
commit
0923e77cda
  1. 20
      yxt-as-ui/src/api/operation/claimbilling.js
  2. 396
      yxt-as-ui/src/views/operation/claimbilling/claimbillingAdd.vue
  3. 103
      yxt-as-ui/src/views/operation/claimbilling/claimbillingInfo.vue
  4. 99
      yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingDaiBan.vue
  5. 397
      yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingEdit.vue
  6. 99
      yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingYiBan.vue

20
yxt-as-ui/src/api/operation/claimbilling.js

@ -52,6 +52,26 @@ export default {
}
})
},
downloadExcelBK: function() {
return request({
url: '/as/v1/AsBusclaimInvoiceBill/downloadExcelBK',
method: 'post',
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: {
'Content-Type': 'application/json'
}
})
},
downloadExcelKK: function() {
return request({
url: '/as/v1/AsBusclaimInvoiceBill/downloadExcelKK',
method: 'post',
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: {
'Content-Type': 'application/json'
}
})
},
// 提交流程
submit: function(params) {
return request({

396
yxt-as-ui/src/views/operation/claimbilling/claimbillingAdd.vue

@ -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>

103
yxt-as-ui/src/views/operation/claimbilling/claimbillingInfo.vue

@ -23,6 +23,12 @@
<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><span class="addinputInfo">{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">开票名称</div>
@ -50,7 +56,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" />
@ -62,12 +68,47 @@
<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 prop="remarks" label="备注" align="center" min-width="200" />
</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" 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" 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="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>
@ -81,7 +122,11 @@ export default {
viewTitle: '',
viewState: 1,
tableKey: 1,
bkxmKey: 2,
kkxmKey: 3,
index: 0,
dialogFileVisible: false,
list: [],
formobj: {
billNo: '',
createByName: '',
@ -90,6 +135,8 @@ export default {
deptSid: '',
createOrgSid: '',
createTime: '',
purchaseSystemName: '',
purchaseSystemSid: '',
detailList: [],
fileList: [],
invoiceKey: '',
@ -105,7 +152,9 @@ export default {
taskDefKey: '',
taskId: '',
useOrgName: '',
useOrgSid: ''
useOrgSid: '',
supplementaryItems: [],
deductionItems: []
},
rules: {}
}
@ -134,6 +183,41 @@ export default {
return cell
}
},
//
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
},
//
handleLook(row) {
this.dialogFileVisible = true
const aa = []
if (row.length > 0) {
row.forEach((e) => {
aa.push(e.url)
})
this.list = aa
}
},
handleReturn() {
this.formobj = {
billNo: '',
@ -143,6 +227,8 @@ export default {
deptSid: '',
createOrgSid: '',
createTime: '',
purchaseSystemName: '',
purchaseSystemSid: '',
detailList: [],
fileList: [],
invoiceKey: '',
@ -158,7 +244,9 @@ export default {
taskDefKey: '',
taskId: '',
useOrgName: '',
useOrgSid: ''
useOrgSid: '',
supplementaryItems: [],
deductionItems: []
}
this.$emit('doback')
}
@ -173,4 +261,11 @@ export default {
.addinputInfo {
margin-left: 120px !important;
}
.titleOne {
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
color: #ffffff;
text-align: left;
}
</style>

99
yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingDaiBan.vue

@ -26,6 +26,12 @@
<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><span class="addinputInfo">{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">开票名称</div>
@ -53,10 +59,10 @@
</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" />
<el-table-column prop="repairBillNo" label="维修号" align="center" width="170" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="100" />
<el-table-column prop="vinNo" label="车架号" align="center" width="100" />
<el-table-column prop="claimManufacturer" label="索赔厂家" align="center" width="120" />
@ -65,12 +71,47 @@
<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 prop="remarks" label="备注" align="center" min-width="200" />
</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" 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" 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="dialogFileVisible">
<el-image style="width: 150px; height: 150px" v-for="(item, index) in list" :key="index" :src="item" :preview-src-list="list"/>
</el-dialog>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
@ -123,7 +164,11 @@ export default {
viewTitle: '',
viewState: 1,
tableKey: 1,
bkxmKey: 2,
kkxmKey: 3,
index: 0,
dialogFileVisible: false,
list: [],
formobj: {
billNo: '',
createByName: '',
@ -132,6 +177,8 @@ export default {
deptSid: '',
createOrgSid: '',
createTime: '',
purchaseSystemName: '',
purchaseSystemSid: '',
detailList: [],
fileList: [],
invoiceKey: '',
@ -147,7 +194,9 @@ export default {
taskDefKey: '',
taskId: '',
useOrgName: '',
useOrgSid: ''
useOrgSid: '',
supplementaryItems: [],
deductionItems: []
},
rules: {},
options: [],
@ -245,6 +294,41 @@ export default {
return cell
}
},
//
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
},
//
handleLook(row) {
this.dialogFileVisible = true
const aa = []
if (row.length > 0) {
row.forEach((e) => {
aa.push(e.url)
})
this.list = aa
}
},
//
openCountersign(val) {
this.operation = val
@ -431,4 +515,11 @@ export default {
.rowClass{
border-top: 1px solid #E0E3EB;
}
.titleOne {
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
color: #ffffff;
text-align: left;
}
</style>

397
yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingEdit.vue

@ -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>
</div>
@ -25,6 +27,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>
@ -58,7 +70,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" />
@ -70,19 +82,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>
@ -113,20 +159,116 @@
</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 } from '@/api/Common/dictcommons'
export default {
name: 'ClaimBillingEdit',
name: 'ClaimbillingEdit',
components: {
uploadImg
},
@ -136,8 +278,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: '',
@ -146,6 +299,8 @@ export default {
deptSid: '',
createOrgSid: '',
createTime: '',
purchaseSystemName: '',
purchaseSystemSid: '',
detailList: [],
fileList: [],
invoiceKey: '',
@ -161,11 +316,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: '',
@ -182,7 +341,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
@ -201,20 +360,25 @@ export default {
params: {
//
code: 2,
data: 500 + 'px'
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
showInfo(row) {
this.viewTitle = '【编辑】索赔单开票申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchDetailsBySid({ sid: sid }).then((res) => {
req.fetchDetailsBySid({ sid: row.sid }).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
fetchDetailsByUseOrgSid(this.formobj.useOrgSid).then((resp) => {
if (resp.success) {
this.purchase_list = resp.data
}
})
choiceSupplierInfo({ deptSid: this.formobj.deptSid }).then((resp) => {
if (resp.success) {
this.supplier_list = resp.data
@ -223,6 +387,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) {
@ -235,13 +407,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',
@ -256,7 +429,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()
@ -284,7 +521,7 @@ export default {
_this.uploadResultMesssage = resp.msg
}
},
handleConfirm() {
handleConfirmByKP() {
if (this.upload_list.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请先上传厂家索赔单开票明细' })
return
@ -303,11 +540,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 }) {
@ -318,6 +596,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) {
@ -367,6 +689,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
}
}
}
@ -382,4 +728,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>

99
yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingYiBan.vue

@ -23,6 +23,12 @@
<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><span class="addinputInfo">{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">开票名称</div>
@ -50,10 +56,10 @@
</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" />
<el-table-column prop="repairBillNo" label="维修号" align="center" width="170" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="100" />
<el-table-column prop="vinNo" label="车架号" align="center" width="100" />
<el-table-column prop="claimManufacturer" label="索赔厂家" align="center" width="120" />
@ -62,12 +68,47 @@
<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 prop="remarks" label="备注" align="center" min-width="200" />
</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" 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" 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="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>
@ -81,7 +122,11 @@ export default {
viewTitle: '',
viewState: 1,
tableKey: 1,
bkxmKey: 2,
kkxmKey: 3,
index: 0,
dialogFileVisible: false,
list: [],
formobj: {
billNo: '',
createByName: '',
@ -90,6 +135,8 @@ export default {
deptSid: '',
createOrgSid: '',
createTime: '',
purchaseSystemName: '',
purchaseSystemSid: '',
detailList: [],
fileList: [],
invoiceKey: '',
@ -105,7 +152,9 @@ export default {
taskDefKey: '',
taskId: '',
useOrgName: '',
useOrgSid: ''
useOrgSid: '',
supplementaryItems: [],
deductionItems: []
},
rules: {},
//
@ -169,6 +218,41 @@ export default {
return cell
}
},
//
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
},
//
handleLook(row) {
this.dialogFileVisible = true
const aa = []
if (row.length > 0) {
row.forEach((e) => {
aa.push(e.url)
})
this.list = aa
}
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
@ -217,4 +301,11 @@ export default {
.addinputInfo {
margin-left: 120px !important;
}
.titleOne {
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
color: #ffffff;
text-align: left;
}
</style>

Loading…
Cancel
Save