Browse Source

完善单车返利核对

zhanglei
yunuo970428 4 months ago
parent
commit
77e13982ec
  1. 7
      anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatecheck.js
  2. 33
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatecheckAdd.vue
  3. 35
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatecheckInfo.vue
  4. 22
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/relation/bicyclerebatetobecheckedAdd.vue
  5. 1
      anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/relation/yiheduidanchefanli.vue
  6. 6
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiDaiBanInfo.vue
  7. 33
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiEdit.vue
  8. 35
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiYiBanInfo.vue
  9. 20
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/relation/bicyclerebatetobecheckedAdd.vue
  10. 1
      anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/relation/yiheduidanchefanli.vue

7
anrui-scm/anrui-scm-ui/src/api/bikerebate/bicyclerebatecheck.js

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

33
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatecheckAdd.vue

@ -59,8 +59,8 @@
<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 label="明细" align="center" min-width="100">
<template>
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button>
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
@ -79,8 +79,8 @@
<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 label="明细" align="center" min-width="100">
<template>
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button>
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
@ -299,24 +299,27 @@ export default {
dataDelete(index) {
this.formobj.baseVehinstallModpricedetails.splice(index, 1)
},
handleLook() {
handleLook(row) {
this.viewState = 3
this.$refs['divAdd'].showInfo(this.formobj.sid, this.formobj.scmVehrebateCheckapplydetailList)
this.$refs['divAdd'].showInfo(row.vehRebateSids)
},
backAdd(val) {
this.viewState = 1
//
this.formobj.scmWhenVehrebateCheckapplydetailDetails = []
this.formobj.scmLastVehrebateCheckapplydetailDetails = []
this.formobj.scmVehrebateCheckapplydetailList = []
var list = JSON.parse(JSON.stringify(val))
//
list.forEach((e) => {
this.formobj.scmVehrebateCheckapplydetailList.push(e)
})
for (var n = 0; n < list.length; n++) {
for (var m = 0; m < this.formobj.scmVehrebateCheckapplydetailList.length; m++) {
if (list[n] === this.formobj.scmVehrebateCheckapplydetailList[m].sid) {
this.formobj.scmVehrebateCheckapplydetailList.splice(this.formobj.scmVehrebateCheckapplydetailList[m], 1)
}
}
}
// (1. 2.)
//
list.forEach((e) => {
this.formobj.scmVehrebateCheckapplydetailList.forEach((e) => {
let v = 0
for (var i in this.formobj.scmWhenVehrebateCheckapplydetailDetails) {
if (this.formobj.scmWhenVehrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenVehrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenVehrebateCheckapplydetailDetails[i].brandName === e.brandName) {
@ -358,7 +361,7 @@ export default {
})
let k = 0
//
list.forEach((s) => {
this.formobj.scmVehrebateCheckapplydetailList.forEach((s) => {
for (var l in this.formobj.scmLastVehrebateCheckapplydetailDetails) {
if (this.formobj.scmLastVehrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastVehrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastVehrebateCheckapplydetailDetails[l].brandName === s.brandName) {
this.formobj.scmLastVehrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastVehrebateCheckapplydetailDetails[l].num) + parseFloat(1)
@ -446,13 +449,13 @@ export default {
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue') {
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return prev
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''

35
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/bicyclerebatecheckInfo.vue

@ -8,7 +8,7 @@
<!--start 添加修改按钮-->
<div>
<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>
</div>
</div>
@ -98,6 +98,7 @@
<script>
import req from '@/api/bikerebate/bicyclerebatecheck'
import bicyclerebatetobecheckedInfo from './relation/bicyclerebatetobecheckedInfo'
import { getStorage } from '@/utils/auth'
export default {
name: 'BicycleRebateCheckInfo',
@ -169,13 +170,13 @@ export default {
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue') {
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return prev
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
@ -183,6 +184,32 @@ export default {
})
return sums
},
download() {
req.createPdf({ vehCheckSid: 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() {
//

22
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/relation/bicyclerebatetobecheckedAdd.vue

@ -55,6 +55,7 @@
</template>
<script>
import req from '@/api/bikerebate/bicyclerebatewithholding'
import bicyclerebatemanagementInfo from '../../bikerebatemanagement/bicyclerebatemanagementInfo'
export default {
@ -72,8 +73,7 @@ export default {
//
list: [],
scmVehrebateCheckapplydetailList: [],
rules: {},
submitdisabled: false
rules: {}
}
},
methods: {
@ -85,33 +85,31 @@ export default {
this.sids = aa
console.log('sids', this.sids)
},
showInfo(sid, value) {
showInfo(vehRebateSids) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.scmVehrebateCheckapplydetailList = JSON.parse(JSON.stringify(value))
this.viewTitle = '单车返利核对审核申请明细'
this.list = this.scmVehrebateCheckapplydetailList
vehRebateSids = JSON.parse(JSON.stringify(vehRebateSids))
req.vehRebateWithDetails(vehRebateSids).then((resp) => {
this.list = resp.data
})
},
handleDelete() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const aa = []
for (var i = 0; i < this.list.length; i++) {
for (var j = 0; j < this.sids.length; j++) {
if (this.list[i].sid === this.sids[j]) {
aa.push(this.list[i].sid)
this.list.splice(i, 1)
}
}
}
for (var l = 0; l < this.scmVehrebateCheckapplydetailList.length; l++) {
for (var p = 0; p < this.sids.length; p++) {
if (this.scmVehrebateCheckapplydetailList[l].sid === this.sids[p]) {
this.scmVehrebateCheckapplydetailList.splice(l, 1)
}
}
}
this.scmVehrebateCheckapplydetailList = aa
},
handleLook(row) {
this.viewState = 2

1
anrui-scm/anrui-scm-ui/src/views/bikerebate/bicyclerebatecheck/relation/yiheduidanchefanli.vue

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

6
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiDaiBanInfo.vue

@ -240,13 +240,13 @@ export default {
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue') {
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return prev
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''

33
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiEdit.vue

@ -58,8 +58,8 @@
<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 label="明细" align="center" min-width="100">
<template>
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button>
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
@ -78,8 +78,8 @@
<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 label="明细" align="center" min-width="100">
<template>
<el-button type="primary" size="mini" @click="handleLook()">查看</el-button>
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
@ -274,24 +274,27 @@ export default {
dataDelete(index) {
this.formobj.baseVehinstallModpricedetails.splice(index, 1)
},
handleLook() {
handleLook(row) {
this.viewState = 3
this.$refs['divAdd'].showInfo(this.formobj.sid, this.formobj.scmVehrebateCheckapplydetailList)
this.$refs['divAdd'].showInfo(row.vehRebateSids)
},
backAdd(val) {
this.viewState = 1
//
this.formobj.scmWhenVehrebateCheckapplydetailDetails = []
this.formobj.scmLastVehrebateCheckapplydetailDetails = []
this.formobj.scmVehrebateCheckapplydetailList = []
var list = JSON.parse(JSON.stringify(val))
//
list.forEach((e) => {
this.formobj.scmVehrebateCheckapplydetailList.push(e)
})
for (var n = 0; n < list.length; n++) {
for (var m = 0; m < this.formobj.scmVehrebateCheckapplydetailList.length; m++) {
if (list[n] === this.formobj.scmVehrebateCheckapplydetailList[m].sid) {
this.formobj.scmVehrebateCheckapplydetailList.splice(this.formobj.scmVehrebateCheckapplydetailList[m], 1)
}
}
}
// (1. 2.)
//
list.forEach((e) => {
this.formobj.scmVehrebateCheckapplydetailList.forEach((e) => {
let v = 0
for (var i in this.formobj.scmWhenVehrebateCheckapplydetailDetails) {
if (this.formobj.scmWhenVehrebateCheckapplydetailDetails[i].rebateTypeValue === e.rebateTypeValue && this.formobj.scmWhenVehrebateCheckapplydetailDetails[i].purchaseSystemName === e.purchaseSystemName && this.formobj.scmWhenVehrebateCheckapplydetailDetails[i].brandName === e.brandName) {
@ -333,7 +336,7 @@ export default {
})
let k = 0
//
list.forEach((s) => {
this.formobj.scmVehrebateCheckapplydetailList.forEach((s) => {
for (var l in this.formobj.scmLastVehrebateCheckapplydetailDetails) {
if (this.formobj.scmLastVehrebateCheckapplydetailDetails[l].withholdingDate === s.withholdingDate && this.formobj.scmLastVehrebateCheckapplydetailDetails[l].purchaseSystemName === s.purchaseSystemName && this.formobj.scmLastVehrebateCheckapplydetailDetails[l].brandName === s.brandName) {
this.formobj.scmLastVehrebateCheckapplydetailDetails[l].num = parseFloat(this.formobj.scmLastVehrebateCheckapplydetailDetails[l].num) + parseFloat(1)
@ -384,13 +387,13 @@ export default {
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue') {
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return prev
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''

35
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/danchefanliheduiYiBanInfo.vue

@ -8,7 +8,7 @@
<!--start 添加修改按钮-->
<div>
<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="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
@ -98,6 +98,7 @@
<script>
import req from '@/api/bikerebate/bicyclerebatecheck'
import bicyclerebatetobecheckedInfo from './relation/bicyclerebatetobecheckedInfo'
import { getStorage } from '@/utils/auth'
export default {
name: 'DanCheFanLiHeDuiYiBanInfo',
@ -205,13 +206,13 @@ export default {
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue') {
if (column.property !== 'purchaseSystemName' && column.property !== 'brandName' && column.property !== 'rebateTypeValue' && column.property !== undefined) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
return Math.round((parseFloat(prev) + parseFloat(curr)) * 100) / 100
} else {
return prev
return Math.round((parseFloat(prev)) * 100) / 100
}
}, 0)
sums[index] += ''
@ -219,6 +220,32 @@ export default {
})
return sums
},
download() {
req.createPdf({ vehCheckSid: 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() {
this.$confirm('是否确认执行撤回操作', '提示', {

20
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/relation/bicyclerebatetobecheckedAdd.vue

@ -55,6 +55,7 @@
</template>
<script>
import req from '@/api/bikerebate/bicyclerebatewithholding'
import bicyclerebatemanagementInfo from './bicycleInfo'
export default {
@ -72,8 +73,7 @@ export default {
//
list: [],
scmVehrebateCheckapplydetailList: [],
rules: {},
submitdisabled: false
rules: {}
}
},
methods: {
@ -89,29 +89,27 @@ export default {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.scmVehrebateCheckapplydetailList = JSON.parse(JSON.stringify(value))
this.viewTitle = '单车返利核对审核申请明细'
this.list = this.scmVehrebateCheckapplydetailList
vehRebateSids = JSON.parse(JSON.stringify(vehRebateSids))
req.vehRebateWithDetails(vehRebateSids).then((resp) => {
this.list = resp.data
})
},
handleDelete() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const aa = []
for (var i = 0; i < this.list.length; i++) {
for (var j = 0; j < this.sids.length; j++) {
if (this.list[i].sid === this.sids[j]) {
aa.push(this.list[i].sid)
this.list.splice(i, 1)
}
}
}
for (var l = 0; l < this.scmVehrebateCheckapplydetailList.length; l++) {
for (var p = 0; p < this.sids.length; p++) {
if (this.scmVehrebateCheckapplydetailList[l].sid === this.sids[p]) {
this.scmVehrebateCheckapplydetailList.splice(l, 1)
}
}
}
this.scmVehrebateCheckapplydetailList = aa
},
handleLook(row) {
this.viewState = 2

1
anrui-scm/anrui-scm-ui/src/views/workFlow/danchefanliheduiFlow/relation/yiheduidanchefanli.vue

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

Loading…
Cancel
Save