Browse Source

完善专项返利核对

master
yunuo970428 4 months ago
parent
commit
988391d295
  1. 7
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js
  2. 19
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/specialrebatetobecheckedAdd.vue
  3. 1
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/yiheduizhuanxiangfanli.vue
  4. 31
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckAdd.vue
  5. 33
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckInfo.vue
  6. 20
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/specialrebatetobecheckedAdd.vue
  7. 1
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/yiheduizhuanxiangfanli.vue
  8. 4
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo.vue
  9. 31
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit.vue
  10. 33
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue

7
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatecheck.js

@ -98,6 +98,13 @@ export default {
method: 'get' method: 'get'
}) })
}, },
createPdf: function(data) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/createPdf ',
method: 'post',
params: data
})
},
// 提交流程 // 提交流程
submitVehicleApply: function(params) { submitVehicleApply: function(params) {
return request({ return request({

19
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/specialrebatetobecheckedAdd.vue

@ -52,6 +52,7 @@
</template> </template>
<script> <script>
import req from '@/api/specialrebate/specialrebatewithholding'
import specialrebatemanagementInfo from '../../specialrebatemanagement/specialrebatemanagementInfo' import specialrebatemanagementInfo from '../../specialrebatemanagement/specialrebatemanagementInfo'
export default { export default {
@ -82,33 +83,31 @@ export default {
this.sids = aa this.sids = aa
console.log('sids', this.sids) console.log('sids', this.sids)
}, },
showInfo(sid, value) { showInfo(specialRebateSids) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
}) })
this.scmSpecialrebateCheckapplydetailDetails = JSON.parse(JSON.stringify(value))
this.viewTitle = '专项返利核对审核申请明细' this.viewTitle = '专项返利核对审核申请明细'
this.list = this.scmSpecialrebateCheckapplydetailDetails specialRebateSids = JSON.parse(JSON.stringify(specialRebateSids))
req.vehRebateWithDetails(specialRebateSids).then((resp) => {
this.list = resp.data
})
}, },
handleDelete() { handleDelete() {
if (this.sids.length === 0) { if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return return
} }
const aa = []
for (var i = 0; i < this.list.length; i++) { for (var i = 0; i < this.list.length; i++) {
for (var j = 0; j < this.sids.length; j++) { for (var j = 0; j < this.sids.length; j++) {
if (this.list[i].sid === this.sids[j]) { if (this.list[i].sid === this.sids[j]) {
aa.push(this.list[i].sid)
this.list.splice(i, 1) this.list.splice(i, 1)
} }
} }
} }
for (var l = 0; l < this.scmSpecialrebateCheckapplydetailDetails.length; l++) { this.scmSpecialrebateCheckapplydetailDetails = aa
for (var p = 0; p < this.sids.length; p++) {
if (this.scmSpecialrebateCheckapplydetailDetails[l].sid === this.sids[p]) {
this.scmSpecialrebateCheckapplydetailDetails.splice(l, 1)
}
}
}
}, },
handleLook(row) { handleLook(row) {
this.viewState = 2 this.viewState = 2

1
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/relation/yiheduizhuanxiangfanli.vue

@ -155,6 +155,7 @@ export default {
} }
} }
} }
this.listQuery.current = 1
this.listQuery.params.sidList = aa this.listQuery.params.sidList = aa
this.getList() this.getList()
}, },

31
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckAdd.vue

@ -59,8 +59,8 @@
<el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" /> <el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" />
<el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" /> <el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" />
<el-table-column label="明细" align="center" min-width="100"> <el-table-column label="明细" align="center" min-width="100">
<template> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button> <el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -79,8 +79,8 @@
<el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" /> <el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" />
<el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" /> <el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" />
<el-table-column label="明细" align="center" min-width="100"> <el-table-column label="明细" align="center" min-width="100">
<template> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button> <el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -298,24 +298,27 @@ export default {
dataDelete(index) { dataDelete(index) {
this.formobj.baseVehinstallModpricedetails.splice(index, 1) this.formobj.baseVehinstallModpricedetails.splice(index, 1)
}, },
handleLook() { handleLook(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divAdd'].showInfo(this.formobj.sid, this.formobj.scmSpecialrebateCheckapplydetailDetails) this.$refs['divAdd'].showInfo(row.specialRebateSids)
}, },
backAdd(val) { backAdd(val) {
this.viewState = 1 this.viewState = 1
// //
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = [] this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = []
this.formobj.scmLastSpecialrebateCheckapplydetailDetails = [] this.formobj.scmLastSpecialrebateCheckapplydetailDetails = []
this.formobj.scmSpecialrebateCheckapplydetailDetails = []
var list = JSON.parse(JSON.stringify(val)) var list = JSON.parse(JSON.stringify(val))
// //
list.forEach((e) => { for (var n = 0; n < list.length; n++) {
this.formobj.scmSpecialrebateCheckapplydetailDetails.push(e) for (var m = 0; m < this.formobj.scmSpecialrebateCheckapplydetailDetails.length; m++) {
}) if (list[n] === this.formobj.scmSpecialrebateCheckapplydetailDetails[m].sid) {
this.formobj.scmSpecialrebateCheckapplydetailDetails.splice(this.formobj.scmSpecialrebateCheckapplydetailDetails[m], 1)
}
}
}
// (1. 2.) // (1. 2.)
// //
list.forEach((e) => { this.formobj.scmSpecialrebateCheckapplydetailDetails.forEach((e) => {
let v = 0 let v = 0
for (var i in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) { for (var i in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].brandName === e.brandName) { if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].brandName === e.brandName) {
@ -357,7 +360,7 @@ export default {
}) })
let k = 0 let k = 0
// //
list.forEach((s) => { this.formobj.scmSpecialrebateCheckapplydetailDetails.forEach((s) => {
for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) { for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].brandName === s.brandName) { if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].brandName === s.brandName) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num) + parseFloat(1) this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num) + parseFloat(1)
@ -445,7 +448,7 @@ export default {
return return
} }
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
@ -455,8 +458,6 @@ export default {
} }
}, 0) }, 0)
sums[index] += '' sums[index] += ''
} else {
sums[index] = ''
} }
}) })
return sums return sums

33
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatecheck/specialrebatecheckInfo.vue

@ -8,7 +8,7 @@
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button> <el-button type="primary" size="small">导出</el-button>
<el-button type="primary" size="small">下载</el-button> <el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div> </div>
</div> </div>
@ -98,6 +98,7 @@
<script> <script>
import req from '@/api/specialrebate/specialrebatecheck' import req from '@/api/specialrebate/specialrebatecheck'
import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo' import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo'
import { getStorage } from '@/utils/auth'
export default { export default {
name: 'SpecialRebateCheckInfo', name: 'SpecialRebateCheckInfo',
@ -168,7 +169,7 @@ export default {
return return
} }
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
@ -178,12 +179,36 @@ export default {
} }
}, 0) }, 0)
sums[index] += '' sums[index] += ''
} else {
sums[index] = ''
} }
}) })
return sums return sums
}, },
download() {
req.createPdf({ specialCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data + '&outFileName=' + '专项返利核对明细', true)
xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob'
xhr.onload = function(e) {
//
var blob = this.response
var filename = '专项返利核对明细.pdf'
var a = document.createElement('a')
// blob.type="application/octet-stream";
// url
var url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.click()
// URL
window.URL.revokeObjectURL(url)
}
//
xhr.send()
}
})
},
// === // ===
handleReturn() { handleReturn() {
// //

20
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/specialrebatetobecheckedAdd.vue

@ -52,7 +52,7 @@
</template> </template>
<script> <script>
import req from '@/api/specialrebate/specialrebatecheck' import req from '@/api/specialrebate/specialrebatewithholding'
import specialrebatemanagementInfo from './specialInfo' import specialrebatemanagementInfo from './specialInfo'
export default { export default {
@ -83,33 +83,31 @@ export default {
this.sids = aa this.sids = aa
console.log('sids', this.sids) console.log('sids', this.sids)
}, },
showInfo(sid, value) { showInfo(specialRebateSids) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
}) })
this.scmSpecialrebateCheckapplydetailDetails = JSON.parse(JSON.stringify(value))
this.viewTitle = '专项返利核对审核申请明细' this.viewTitle = '专项返利核对审核申请明细'
this.list = this.scmSpecialrebateCheckapplydetailDetails specialRebateSids = JSON.parse(JSON.stringify(specialRebateSids))
req.vehRebateWithDetails(specialRebateSids).then((resp) => {
this.list = resp.data
})
}, },
handleDelete() { handleDelete() {
if (this.sids.length === 0) { if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return return
} }
const aa = []
for (var i = 0; i < this.list.length; i++) { for (var i = 0; i < this.list.length; i++) {
for (var j = 0; j < this.sids.length; j++) { for (var j = 0; j < this.sids.length; j++) {
if (this.list[i].sid === this.sids[j]) { if (this.list[i].sid === this.sids[j]) {
aa.push(this.list[i].sid)
this.list.splice(i, 1) this.list.splice(i, 1)
} }
} }
} }
for (var l = 0; l < this.scmSpecialrebateCheckapplydetailDetails.length; l++) { this.scmSpecialrebateCheckapplydetailDetails = aa
for (var p = 0; p < this.sids.length; p++) {
if (this.scmSpecialrebateCheckapplydetailDetails[l].sid === this.sids[p]) {
this.scmSpecialrebateCheckapplydetailDetails.splice(l, 1)
}
}
}
}, },
handleLook(row) { handleLook(row) {
this.viewState = 2 this.viewState = 2

1
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/relation/yiheduizhuanxiangfanli.vue

@ -155,6 +155,7 @@ export default {
} }
} }
} }
this.listQuery.current = 1
this.listQuery.params.sidList = aa this.listQuery.params.sidList = aa
this.getList() this.getList()
}, },

4
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo.vue

@ -239,7 +239,7 @@ export default {
return return
} }
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
@ -249,8 +249,6 @@ export default {
} }
}, 0) }, 0)
sums[index] += '' sums[index] += ''
} else {
sums[index] = ''
} }
}) })
return sums return sums

31
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit.vue

@ -58,8 +58,8 @@
<el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" /> <el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" />
<el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" /> <el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" />
<el-table-column label="明细" align="center" min-width="100"> <el-table-column label="明细" align="center" min-width="100">
<template> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button> <el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -78,8 +78,8 @@
<el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" /> <el-table-column prop="adjustmentMoney" label="返利调整金额" align="center" min-width="140" />
<el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" /> <el-table-column prop="fyAdjustmentMoney" label="其中费用调整金额" align="center" min-width="160" />
<el-table-column label="明细" align="center" min-width="100"> <el-table-column label="明细" align="center" min-width="100">
<template> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button> <el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -272,24 +272,27 @@ export default {
dataDelete(index) { dataDelete(index) {
this.formobj.baseVehinstallModpricedetails.splice(index, 1) this.formobj.baseVehinstallModpricedetails.splice(index, 1)
}, },
handleLook() { handleLook(row) {
this.viewState = 3 this.viewState = 3
this.$refs['divAdd'].showInfo(this.formobj.sid, this.formobj.scmSpecialrebateCheckapplydetailDetails) this.$refs['divAdd'].showInfo(row.specialRebateSids)
}, },
backAdd(val) { backAdd(val) {
this.viewState = 1 this.viewState = 1
// //
this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = [] this.formobj.scmWhenSpecialrebateCheckapplydetailDetails = []
this.formobj.scmLastSpecialrebateCheckapplydetailDetails = [] this.formobj.scmLastSpecialrebateCheckapplydetailDetails = []
this.formobj.scmSpecialrebateCheckapplydetailDetails = []
var list = JSON.parse(JSON.stringify(val)) var list = JSON.parse(JSON.stringify(val))
// //
list.forEach((e) => { for (var n = 0; n < list.length; n++) {
this.formobj.scmSpecialrebateCheckapplydetailDetails.push(e) for (var m = 0; m < this.formobj.scmSpecialrebateCheckapplydetailDetails.length; m++) {
}) if (list[n] === this.formobj.scmSpecialrebateCheckapplydetailDetails[m].sid) {
this.formobj.scmSpecialrebateCheckapplydetailDetails.splice(this.formobj.scmSpecialrebateCheckapplydetailDetails[m], 1)
}
}
}
// (1. 2.) // (1. 2.)
// //
list.forEach((e) => { this.formobj.scmSpecialrebateCheckapplydetailDetails.forEach((e) => {
let v = 0 let v = 0
for (var i in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) { for (var i in this.formobj.scmWhenSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].brandName === e.brandName) { if (this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenSpecialrebateCheckapplydetailDetails[i].brandName === e.brandName) {
@ -331,7 +334,7 @@ export default {
}) })
let k = 0 let k = 0
// //
list.forEach((s) => { this.formobj.scmSpecialrebateCheckapplydetailDetails.forEach((s) => {
for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) { for (var l in this.formobj.scmLastSpecialrebateCheckapplydetailDetails) {
if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].brandName === s.brandName) { if (this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].brandName === s.brandName) {
this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num) + parseFloat(1) this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastSpecialrebateCheckapplydetailDetails[l].num) + parseFloat(1)
@ -433,7 +436,7 @@ export default {
return return
} }
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
@ -443,8 +446,6 @@ export default {
} }
}, 0) }, 0)
sums[index] += '' sums[index] += ''
} else {
sums[index] = ''
} }
}) })
return sums return sums

33
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiYiBanInfo.vue

@ -7,6 +7,8 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small">导出</el-button>
<el-button type="primary" size="small" @click="download">下载</el-button>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button> <el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div> </div>
</div> </div>
@ -96,6 +98,7 @@
<script> <script>
import req from '@/api/specialrebate/specialrebatecheck' import req from '@/api/specialrebate/specialrebatecheck'
import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo' import specialrebatetobecheckedInfo from './relation/specialrebatetobecheckedInfo'
import { getStorage } from '@/utils/auth'
export default { export default {
name: 'ZhuanXiangFanLiHeDuiYiBanInfo', name: 'ZhuanXiangFanLiHeDuiYiBanInfo',
@ -202,7 +205,7 @@ export default {
return return
} }
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
@ -212,12 +215,36 @@ export default {
} }
}, 0) }, 0)
sums[index] += '' sums[index] += ''
} else {
sums[index] = ''
} }
}) })
return sums return sums
}, },
download() {
req.createPdf({ specialCheckSid: this.formobj.sid, userName: window.sessionStorage.getItem('name') }).then((resp) => {
if (resp.success && resp.data !== '') {
var xhr = new XMLHttpRequest()
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + resp.data + '&outFileName=' + '专项返利核对明细', true)
xhr.setRequestHeader('token', getStorage())
xhr.responseType = 'blob'
xhr.onload = function(e) {
//
var blob = this.response
var filename = '专项返利核对明细.pdf'
var a = document.createElement('a')
// blob.type="application/octet-stream";
// url
var url = URL.createObjectURL(blob)
a.href = url
a.download = filename
a.click()
// URL
window.URL.revokeObjectURL(url)
}
//
xhr.send()
}
})
},
/** 确认撤回任务 */ /** 确认撤回任务 */
openRevoke() { openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', { this.$confirm('是否确认执行撤回操作', '提示', {

Loading…
Cancel
Save