Browse Source

完善单车返利分配

zhanglei
yunuo970428 3 years ago
parent
commit
3858da926b
  1. 138
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatedistribution.js
  2. 25
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  3. 300
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/relation/daifeipeizhuanxiang.vue
  4. 323
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/relation/selectvehicle.vue
  5. 325
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistribution.vue
  6. 383
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionAdd.vue
  7. 178
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionInfo.vue
  8. 339
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocated.vue
  9. 234
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocatedAdd.vue
  10. 121
      anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocatedByDisNum.vue
  11. 300
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/relation/daifeipeizhuanxiang.vue
  12. 374
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiDaiBanInfo.vue
  13. 361
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiEdit.vue
  14. 250
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiYiBanInfo.vue

138
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatedistribution.js

@ -0,0 +1,138 @@
import request from '@/utils/request'
export default {
// 专项返利分配(待分配)查询分页列表
stayDisRebate: function(data) {
return request({
url: '/scm/v1/scmspecialrebate/stayDisRebate',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 返利分配选择车辆--批量选择
specialRebateDisGetVeh: function(data) {
return request({
url: '/base/v1/basevehicle/specialRebateDisGetVeh',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 返利分配申请分页列表
listPage: function(data) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/listPage',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 删除
delete: function(params) {
return request({
url: '/scm/v1/scmspecialrebatecheckapply/delBySids',
method: 'DELETE',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 返利分配申请--通过sid查询一条记录
fetchDetailsBySid: function(data) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/fetchDetailsBySid/' + data,
method: 'get'
})
},
// 专项返利分配(待分配)分页列表--点击分配数量查看车辆信息
getVehBySpecialRebateSid: function(data) {
return request({
url: '/base/v1/basevehicle/getVehBySpecialRebateSid',
method: 'post',
params: data
})
},
// 专项返利分配(待分配)分页列表--点击分配数量查看车辆信息--删除
delBySids: function(params) {
return request({
url: '/scm/v1/scmspecialrebatevehs/delBySids',
method: 'DELETE',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 返利分配选择车辆--保存
save: function(data) {
return request({
url: '/scm/v1/scmspecialrebatevehs/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 返利分配申请--新增/编辑保存
saveOrUpdate: function(data) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/save',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 提交流程
submitVehicleApply: function(params) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/submitSpecialRebatedistribute',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 代办任务同意办理
complete: function(params) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/complete',
method: 'post',
data: params
})
},
// 代办任务驳回任务
reject: function(params) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/reject',
method: 'post',
data: params
})
},
// 代办任务终止任务
breakProcess: function(params) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/breakProcess',
method: 'post',
data: params
})
},
// 代办任务撤回任务
revokeProcess: function(params) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/revokeProcess',
method: 'post',
data: params
})
},
getNextNodesForSubmit: function(data) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/getNextNodesForSubmit',
method: 'get',
params: data
})
},
getPreviousNodesForReject(data) {
return request({
url: '/scm/v1/scmspecialrebatedistribute/getPreviousNodesForReject',
method: 'get',
params: data
})
}
}

25
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -493,7 +493,7 @@ const codemenu = [
path: '/specialrebate/specialrebatedistribution',
component: () => import('@/views/specialrebate/specialrebatedistribution/specialrebatetobeallocated.vue'),
name: 'specialrebatetobeallocated',
meta: { title: '专项返利核对', noCache: true }
meta: { title: '专项返利分配', noCache: true }
}
]
},
@ -1020,7 +1020,6 @@ const codemenu = [
import('@/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiEdit.vue'),
name: 'zhuanxiangfanliyutiEdit'
},
// 专项返利核对申请详情页面
{
path: '/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiDaiBanInfo',
@ -1041,6 +1040,28 @@ const codemenu = [
component: () =>
import('@/views/workFlow/zhuanxiangfanliheduiFlow/zhuanxiangfanliheduiEdit.vue'),
name: 'zhuanxiangfanliheduiEdit'
},
// 专项返利分配申请详情页面
{
path: '/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiDaiBanInfo',
component: () =>
import('@/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiDaiBanInfo.vue'),
name: 'zhuanxiangfanlifenpeiDaiBanInfo'
},
// 专项返利分配详情
{
path: '/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiYiBanInfo',
component: () =>
import('@/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiYiBanInfo.vue'),
name: 'zhuanxiangfanlifenpeiYiBanInfo'
},
// 专项返利分配办理
{
path: '/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiEdit',
component: () =>
import('@/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiEdit.vue'),
name: 'zhuanxiangfanlifenpeiEdit'
}
]
export default codemenu

300
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/relation/daifeipeizhuanxiang.vue

@ -0,0 +1,300 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="专项返利分配列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="返利类型">
<el-select v-model="listQuery.params.rebateTypeKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in rebateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="返利名称">
<el-input v-model="listQuery.params.rebateName" placeholder="" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">待分配返利列表</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column label="上传状态" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.state === '3' ? '已上传' : ''}}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import { typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'daifenpeizhuanxiang',
components: {
Pagination,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'doConfirm',
btnLabel: '确定'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
rebateType_list: [],
state_list: [
{
dictKey: 0,
dictValue: '未上传'
},
{
dictKey: 1,
dictValue: '已上传'
},
{
dictKey: 2,
dictValue: '未调整'
},
{
dictKey: 3,
dictValue: '已调整'
}
],
listLoading: false,
listQuery: {
params: {
brandSid: '',
createOrgSid: '',
vinNo: '',
rebateTypeKey: '',
rebateName: '',
state: '',
createEndTime: '',
createStartTime: '',
sidList: []
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
typeValues({ type: 'rebateType' }).then((res) => {
if (res.success) {
this.rebateType_list = res.data
}
})
this.getList()
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doConfirm':
this.doConfirm()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push({
specialRebateSid: element.sid,
brandName: element.brandName,
brandSid: element.brandSid,
createTime: element.createTime,
rebateName: element.rebateName,
rebateTypeValue: element.rebateTypeValue,
estimateRebate: element.estimateRebate,
uploadMoney: element.uploadMoney,
disNum: element.disNum
})
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.stayDisRebate(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
showData(value, createOrgSid, brandSid) {
this.listQuery.params.createOrgSid = createOrgSid
this.listQuery.params.brandSid = brandSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].specialRebateSid)
}
this.listQuery.params.sidList = aa
} else {
this.listQuery.params.sidList = []
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.init()
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery.params.vinNo = ''
this.listQuery.params.rebateTypeKey = ''
this.listQuery.params.rebateName = ''
this.listQuery.params.createEndTime = ''
this.listQuery.params.createStartTime = ''
this.listQuery.params.state = ''
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.init()
},
doConfirm() {
if (this.sids.length > 0 || this.sids_list.length > 0) {
this.$emit('backData', this.sids, this.sids_list)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条记录!',
type: 'error',
duration: 2000
})
}
},
doClose() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
</style>

323
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/relation/selectvehicle.vue

@ -0,0 +1,323 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择车辆页面</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="功能:" class="searchlist">
<el-select v-model="listQuery.params.vehicleType" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="系列:" class="searchlist">
<el-select v-model="listQuery.params.productLine" placeholder="请选择" filterable clearable>
<el-option v-for="item in productLine_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="变速箱:" class="searchlist">
<el-select v-model="listQuery.params.gearboxType" placeholder="请选择" filterable clearable>
<el-option v-for="item in gearboxType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="驱动:" class="searchlist">
<el-select v-model="listQuery.params.driveForm" placeholder="请选择" filterable clearable>
<el-option v-for="item in driveForm_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="排放标准:" class="searchlist">
<el-select v-model="listQuery.params.emissionStandard" placeholder="请选择" filterable clearable>
<el-option v-for="item in emissionStandard_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="马力:" class="searchlist">
<el-select v-model="listQuery.params.power" placeholder="请选择" filterable clearable>
<el-option v-for="item in power_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="燃料:" class="searchlist">
<el-select v-model="listQuery.params.fuelType" placeholder="请选择" filterable clearable>
<el-option v-for="item in fuelType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="版本:" class="searchlist">
<el-select v-model="listQuery.params.vehicleVersion" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleVersion_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="车型:" class="searchlist">
<el-input v-model="listQuery.params.vehicleAlias" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="采购订单编号:" class="searchlist">
<el-input v-model="listQuery.params.orderingNo" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="快捷检索:" class="searchlist">
<el-input v-model="listQuery.params.modelName" placeholder="" clearable style="width: 150px"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">现车库存列表</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="颜色" align="center">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="销售指导价(元)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/specialrebate/specialrebatedistribution'
import { typeValues } from '@/api/cheliang/dictcommons.js'
export default {
name: 'selectvehicle',
components: {
Pagination
},
data() {
return {
vehicleType_list: [],
productLine_list: [],
gearboxType_list: [],
driveForm_list: [],
emissionStandard_list: [],
power_list: [],
fuelType_list: [],
vehicleVersion_list: [],
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 5,
params: {
brandSid: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
modelName: '',
power: '',
productLine: '',
vehicleAlias: '',
vehicleType: '',
vehicleVersion: '',
createOrgSid: '',
orderingNo: '',
vehSids: []
},
total: 0
}
}
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
init() {
this.shujuzidian()
this.getList()
},
shujuzidian() {
typeValues({ type: 'vehicleFunction' }).then((res) => {
if (res.success) {
this.vehicleType_list = res.data
}
})
typeValues({ type: 'productLine' }).then((res) => {
if (res.code === '200') {
this.productLine_list = res.data
}
})
typeValues({ type: 'driver' }).then((res) => {
if (res.code === '200') {
this.driveForm_list = res.data
}
})
typeValues({ type: 'horsepower' }).then((res) => {
if (res.code === '200') {
this.power_list = res.data
}
})
typeValues({ type: 'vehicleVersion' }).then((res) => {
if (res.code === '200') {
this.vehicleVersion_list = res.data
}
})
typeValues({ type: 'fuelType' }).then((res) => {
if (res.code === '200') {
this.fuelType_list = res.data
}
})
typeValues({ type: 'gearbox' }).then((res) => {
if (res.code === '200') {
this.gearboxType_list = res.data
}
})
typeValues({ type: 'emissionStandard' }).then((res) => {
if (res.code === '200') {
this.emissionStandard_list = res.data
}
})
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
handleReturn() {
this.$emit('doback')
},
//
getList() {
this.listLoading = true
req.specialRebateDisGetVeh(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.driveForm = ''
this.listQuery.params.emissionStandard = ''
this.listQuery.params.fuelType = ''
this.listQuery.params.gearboxType = ''
this.listQuery.params.modelName = ''
this.listQuery.params.power = ''
this.listQuery.params.productLine = ''
this.listQuery.params.vehicleAlias = ''
this.listQuery.params.vehicleType = ''
this.listQuery.params.vehicleVersion = ''
this.listQuery.params.createOrgSid = ''
this.listQuery.params.orderingNo = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push({
modelName: element.modelName,
modelSid: element.modelSid,
vinNo: element.vinNo,
costPrice: element.costPrice,
priceDate: element.priceDate,
salesDate: element.salesDate,
solidDate: element.solidDate,
vehSid: element.vehSid
})
})
this.sids = aa
},
showData(value, brandSid, createOrgSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vinNo)
}
this.listQuery.params.vehSids = aa
} else {
this.listQuery.params.vehSids = []
}
this.listQuery.params.brandSid = brandSid
this.listQuery.params.createOrgSid = createOrgSid
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.init()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条记录!',
type: 'error',
duration: 2000
})
}
}
}
}
</script>
<style scoped>
</style>

325
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistribution.vue

@ -0,0 +1,325 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="专项返利分配申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="switch_btn">
<el-button class="" @click="handleClick">待分配返利列表</el-button>
<el-button :class="{btn_style:viewState === 1}">返利分配申请</el-button>
</div>
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="品牌">
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable>
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="申请标题">
<el-input v-model="listQuery.params.checkApply" placeholder="" clearable/>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">回款返利预提申请列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column fixed label="操作" align="center" width="180px" >
<template slot-scope="scope">
<el-button type="primary" size="mini" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="180px" header-align="center">
<template slot-scope="scope">
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span>
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span>
</template>
</el-table-column>
<el-table-column label="分公司" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.createOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="名称" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column label="预提返利" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.withRebate }}</span>
</template>
</el-table-column>
<el-table-column label="分配总金额" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.distributionMoneyTotal }}</span>
</template>
</el-table-column>
<el-table-column label="申请日期" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="审批完成日期" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.approvalCompleteDate }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<specialrebatedistributionAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<specialrebatedistributionInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { brandDown, getPathSidByUserSid } from '@/api/cheliang/dictcommons'
import specialrebatedistributionAdd from './specialrebatedistributionAdd'
import specialrebatedistributionInfo from './specialrebatedistributionInfo'
import { getStorage } from '@/utils/auth'
export default {
name: 'specialrebatedistribution',
components: {
Pagination,
pageye,
ButtonBar,
specialrebatedistributionAdd,
specialrebatedistributionInfo
},
data() {
return {
url: '',
dialogHeight: '80%',
centerDialogVisible: false,
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
brand_list: '',
listQuery: {
params: {
brandSid: '',
checkApply: '',
createOrgSid: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
async handleMessage(event) {
var code = ''
if (event.data.params !== null && event.data.params !== undefined) {
code = event.data.params.code
}
if (code === 1) {
this.init()
this.centerDialogVisible = false
} else if (code === 2) {
this.dialogHeight = event.data.params.data
this.setIframeHeight(document.getElementById('iframe'))
}
},
closeIt() {
this.url = ''
this.centerDialogVisible = false
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight
},
flowRecord(row) {
this.centerDialogVisible = true
var params = {
deployId: row.procDefId,
procInsId: row.procInstId,
token: getStorage()
}
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
brandDown({ useOrg: this.listQuery.params.createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
this.getList()
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
brandSid: '',
checkApply: '',
createOrgSid: '',
createEndTime: '',
createStartTime: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
handleClick() {
this.$parent.resetState()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid)
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
</style>

383
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionAdd.vue

@ -0,0 +1,383 @@
<template>
<div class="app-container">
<div v-show="viewState== 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存
</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>{{ formobj.title }}专项返利分配申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="4" class="colOneStyle">
<el-form-item>
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand">
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="18" class="tleftb colOneStyle">
<el-button size="small" type="primary" @click="handleAdd()">添加</el-button>
<el-button size="small" type="danger" @click="handleDelete()">删除</el-button>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.scmSpecialrebatedistributedetails" :index="index" border style="width: 100%" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries">
<el-table-column fixed type="selection" align="center" width="60px"/>
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column prop="estimateRebate" label="预提返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column prop="uploadMoney" label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="单车分配金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.unitSetAllocationMoney }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<daifeipeizhuanxiang v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import daifeipeizhuanxiang from './relation/daifeipeizhuanxiang'
import { fetchBySid, brandDown } from '@/api/cheliang/dictcommons'
export default {
name: 'specialrebatedistributionAdd',
components: {
daifeipeizhuanxiang
},
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
brand_list: [],
sids: [],
//
formobj: {
sid: '', // sid
approvalCompleteDate: '',
brandName: '',
brandSid: '',
createOrgName: '',
createOrgSid: '',
distributionMoneyTotal: '',
title: '',
useOrgName: '',
useOrgSid: '',
createByName: '',
createBySid: '',
withRebate: '',
taskId: '',
instanceId: '',
scmSpecialrebatedistributedetails: []
},
rules: {},
dialogStatus: '',
submitdisabled: false
}
},
methods: {
init() {
fetchBySid(this.formobj.createOrgSid).then((res) => {
if (res.success) {
this.formobj.createOrgName = res.data.name
this.formobj.useOrgName = res.data.name
}
})
brandDown({ useOrg: this.formobj.createOrgSid }).then((resp) => {
if (resp.success) {
this.brand_list = resp.data
}
})
},
//
newDate() {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() + 1 //
this.formobj.title = year + '年' + month + '月'
},
showAdd(createOrgSid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
this.init()
this.newDate()
})
this.dialogStatus = 'add'
this.formobj.createOrgSid = createOrgSid
this.formobj.useOrgSid = createOrgSid
this.formobj.createByName = window.sessionStorage.getItem('name')
this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.viewTitle = '【新增】专项返利分配申请'
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】专项返利分配申请'
console.log('编辑回显', row.sid)
req.fetchDetailsBySid(row.sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}).catch((e) => {
this.formobj = row
})
},
//
handleAdd() {
if (this.formobj.brandName === '' || this.formobj.brandName === null || this.formobj.brandName === undefined) {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.viewState = 2
this.$refs['divSelect'].showData(this.formobj.scmSpecialrebatedistributedetails, this.formobj.createOrgSid, this.formobj.brandSid)
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.specialRebateSid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
handleDelete() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (var i = 0; i < this.sids.length; i++) {
this.formobj.scmSpecialrebatedistributedetails.forEach((e, index) => {
if (e.specialRebateSid === this.sids[i]) {
this.formobj.scmSpecialrebatedistributedetails.splice(index, 1)
}
})
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.scmSpecialrebatedistributedetails.push({
mainSid: '',
sid: '',
specialRebateSid: e.specialRebateSid,
brandName: e.brandName,
brandSid: e.brandSid,
createTime: e.createTime,
rebateName: e.rebateName,
rebateTypeValue: e.rebateTypeValue,
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
disNum: e.disNum,
unitSetAllocationMoney: (parseInt(e.uploadMoney)) / (parseInt(e.disNum))
})
})
}
},
changeBrand(value) {
let bb = null
this.brand_list.forEach((e) => {
if (e.brandName === value) {
bb = {
name: e.brandName,
sid: e.sid
}
}
})
this.formobj.brandSid = bb.sid
},
saveOrUpdate() {
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submitVehicleApply() {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
}
})
},
//
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 === 'estimateRebate') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.withRebate = sums[index] += ''
} else if (column.property === 'uploadMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.distributionMoneyTotal = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '', // sid
approvalCompleteDate: '',
brandName: '',
brandSid: '',
createOrgName: '',
createOrgSid: '',
distributionMoneyTotal: '',
title: '',
useOrgName: '',
useOrgSid: '',
createByName: '',
createBySid: '',
withRebate: '',
taskId: '',
instanceId: '',
scmSpecialrebatedistributedetails: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
closePage() {
this.viewState = 1
}
}
}
</script>
<style scoped>
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

178
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatedistributionInfo.vue

@ -0,0 +1,178 @@
<template>
<div class="app-container">
<div v-show="viewState== 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>{{ formobj.title }}专项返利分配申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="22" class="colOneStyle">
<el-form-item>
<span>{{ formobj.brandName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.scmSpecialrebatedistributedetails" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column prop="estimateRebate" label="预提返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column prop="uploadMoney" label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="单车分配金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.unitSetAllocationMoney }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
export default {
name: 'specialrebatedistributionInfo',
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
//
formobj: {},
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利分配申请详情'
console.log('编辑回显', row.sid)
req.fetchDetailsBySid(row.sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = row
})
},
//
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 === 'estimateRebate') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.withRebate = sums[index] += ''
} else if (column.property === 'uploadMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.distributionMoneyTotal = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
// ===
handleReturn() {
this.formobj = {}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

339
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocated.vue

@ -0,0 +1,339 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="专项返利分配列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="switch_btn">
<el-button :class="{btn_style:viewState === 1}">待分配返利列表</el-button>
<el-button class="" @click="handleClick">返利分配申请</el-button>
</div>
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="品牌">
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable>
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="返利类型">
<el-select v-model="listQuery.params.rebateTypeKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in rebateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="返利名称">
<el-input v-model="listQuery.params.rebateName" placeholder="" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">待分配返利列表</div>
<div>
<el-button size="mini" type="primary" @click="toAdd">选择车辆</el-button>
<el-button size="mini" type="primary" @click="handleAdd">发起申请</el-button>
</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column label="上传状态" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.state === '3' ? '已上传' : ''}}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span class="bluezi" @click="handleLook(scope.row)">{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<specialrebatedistribution v-show="viewState == 2" ref="divCheck" @doback="resetState"/>
<specialrebatetobeallocatedAdd v-show="viewState == 3" ref="divCheckAdd" @doback="resetState" @reloadlist="getList"/>
<specialrebatedistributionAdd v-show="viewState == 4" ref="divAdd" @doback="resetState"/>
<specialrebatetobeallocatedByDisNum v-show="viewState == 5" ref="divInfo" @doback="backState"/>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import specialrebatedistribution from './specialrebatedistribution'
import specialrebatetobeallocatedAdd from './specialrebatetobeallocatedAdd'
import specialrebatedistributionAdd from './specialrebatedistributionAdd'
import specialrebatetobeallocatedByDisNum from './specialrebatetobeallocatedByDisNum'
import { brandDown, getPathSidByUserSid, typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'specialrebatetobeallocated',
components: {
Pagination,
ButtonBar,
specialrebatedistribution,
specialrebatetobeallocatedAdd,
specialrebatedistributionAdd,
specialrebatetobeallocatedByDisNum
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
brand_list: [],
rebateType_list: [],
state_list: [
{
dictKey: 0,
dictValue: '未上传'
},
{
dictKey: 1,
dictValue: '已上传'
},
{
dictKey: 2,
dictValue: '未调整'
},
{
dictKey: 3,
dictValue: '已调整'
}
],
listLoading: false,
listQuery: {
params: {
brandSid: '',
createOrgSid: '',
vinNo: '',
rebateTypeKey: '',
rebateName: '',
state: '',
createEndTime: '',
createStartTime: '',
sidList: []
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
//
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
typeValues({ type: 'rebateType' }).then((res) => {
if (res.success) {
this.rebateType_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
brandDown({ useOrg: this.listQuery.params.createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
this.getList()
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push({
sid: element.sid,
brandName: element.brandName,
brandSid: element.brandSid,
estimateRebate: element.estimateRebate
})
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.stayDisRebate(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
brandSid: '',
createOrgSid: '',
vinNo: '',
rebateTypeKey: '',
rebateName: '',
state: '',
createEndTime: '',
createStartTime: '',
sidList: []
},
current: 1,
size: 5,
total: 0
}
this.init()
},
handleClick() {
this.viewState = 2
this.$refs['divCheck'].init()
},
toAdd() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录' })
return
} else {
for (var i = 0; i < this.sids.length; i++) {
if (this.sids[i].brandName !== this.sids[this.sids.length - 1].brandName) {
this.$message({ showClose: true, type: 'error', message: '请选择相同品牌的记录' })
return
} else {
this.viewState = 3
this.$refs['divCheckAdd'].showEdit(this.listQuery.params.createOrgSid, this.sids)
}
}
}
},
handleAdd() {
this.viewState = 4
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid)
},
handleLook(row) {
this.viewState = 5
this.$refs['divInfo'].showData(row)
},
backState() {
this.viewState = 1
this.getList()
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
</style>

234
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocatedAdd.vue

@ -0,0 +1,234 @@
<template>
<div class="app-container">
<div v-show="viewState== 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>返利分配选择车辆</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>品牌</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.brandName }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>分配总金额</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.allocationMoney }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>选择条数</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.number }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>车辆台数</span>
</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.setNumber }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>单台预计分配金额</span>
</el-col>
<el-col :span="12">
<el-form-item><span>{{ formobj.unitSetAllocationMoney }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>车辆列表</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addCommodity()">批量选择</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.scmSpecialrebateVehsVehSidAndVinNos" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="销售日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.salesDate }}</span>
</template>
</el-table-column>
<el-table-column label="买断日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.solidDate }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<!--选择车型和常用配置-->
<selectvehicle v-show="viewState == 2" ref="divVehicle" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import selectvehicle from './relation/selectvehicle.vue'
export default {
name: 'specialrebatetobeallocatedAdd',
components: {
selectvehicle
},
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
//
formobj: {
brandSid: '',
brandName: '',
allocationMoney: '',
number: '',
setNumber: '',
unitSetAllocationMoney: '',
createOrgSid: '',
specialRebateSids: [],
scmSpecialrebateVehsVehSidAndVinNos: []
},
rules: {},
submitdisabled: false
}
},
methods: {
//
addCommodity() {
this.viewState = 2
this.$refs['divVehicle'].showData(this.formobj.scmSpecialrebateVehsVehSidAndVinNos, this.formobj.brandSid, this.formobj.createOrgSid)
},
showEdit(createOrgSid, sids) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '返利分配选择车辆列表'
this.formobj.createOrgSid = createOrgSid
if (sids.length > 0) {
this.formobj.brandSid = sids[0].brandSid
this.formobj.brandName = sids[0].brandName
this.formobj.number = sids.length
var aa = 0
const bb = []
for (var i = 0; i < sids.length; i++) {
aa = parseInt(aa) + parseInt(sids[i].estimateRebate)
bb.push(sids[i].sid)
}
this.formobj.allocationMoney = aa
this.formobj.specialRebateSids = bb
}
},
// --
backData(value) {
this.viewState = 1
if (value.length > 0) {
this.formobj.setNumber = value.length
this.formobj.unitSetAllocationMoney = (parseInt(this.formobj.allocationMoney)) / (parseInt(this.formobj.setNumber))
value.forEach((e) => {
this.formobj.scmSpecialrebateVehsVehSidAndVinNos.push({
modelName: e.modelName,
modelSid: e.modelSid,
vinNo: e.vinNo,
costPrice: e.costPrice,
priceDate: e.priceDate,
salesDate: e.salesDate,
solidDate: e.solidDate,
vehSid: e.vehSid
})
})
}
},
save() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
//
this.formobj = {
brandSid: '',
brandName: '',
allocationMoney: '',
number: '',
setNumber: '',
unitSetAllocationMoney: '',
createOrgSid: '',
specialRebateSids: [],
scmSpecialrebateVehsVehSidAndVinNos: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
closePage() {
this.viewState = 1
}
}
}
</script>
<style scoped>
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

121
anrui-scm/anrui-scm-ui/src/views/specialrebate/specialrebatedistribution/specialrebatetobeallocatedByDisNum.vue

@ -0,0 +1,121 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>车辆列表</div>
<div>
<el-button type="danger" size="small" @click="handleDelete">删除</el-button>
<el-button type="info" size="small" @click="handleReturn">关闭</el-button>
</div>
</div>
<div class="listconadd">
<div class="titwu">
<div>车辆列表</div>
</div>
<el-form class="formadd">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="颜色" align="center">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="销售指导价(元)" align="center">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
export default {
name: 'specialrebatetobeallocatedByDisNum',
data() {
return {
index: 0,
tableKey: 0,
sids: [],
list: [],
listLoading: false,
specialRebateSid: ''
}
},
methods: {
handleDelete() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(this.sids).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '删除成功' })
this.getList()
}
})
})
},
//
handleReturn() {
this.$emit('doback')
},
//
getList() {
this.listLoading = true
req.getVehBySpecialRebateSid({ specialRebateSid: this.specialRebateSid }).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data
}
})
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push(element.specialRebateVehSid)
})
this.sids = aa
},
showData(row) {
this.specialRebateSid = row.sid
this.getList()
}
}
}
</script>
<style scoped>
</style>

300
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/relation/daifeipeizhuanxiang.vue

@ -0,0 +1,300 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="专项返利分配列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="返利类型">
<el-select v-model="listQuery.params.rebateTypeKey" placeholder="请选择" filterable clearable>
<el-option v-for="item in rebateType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="返利名称">
<el-input v-model="listQuery.params.rebateName" placeholder="" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">待分配返利列表</div>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50px"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column label="上传状态" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.state === '3' ? '已上传' : ''}}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="预计返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import Pagination from '@/components/pagination'
import ButtonBar from '@/components/ButtonBar'
import { typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'daifenpeizhuanxiang',
components: {
Pagination,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'doConfirm',
btnLabel: '确定'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
rebateType_list: [],
state_list: [
{
dictKey: 0,
dictValue: '未上传'
},
{
dictKey: 1,
dictValue: '已上传'
},
{
dictKey: 2,
dictValue: '未调整'
},
{
dictKey: 3,
dictValue: '已调整'
}
],
listLoading: false,
listQuery: {
params: {
brandSid: '',
createOrgSid: '',
vinNo: '',
rebateTypeKey: '',
rebateName: '',
state: '',
createEndTime: '',
createStartTime: '',
sidList: []
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
typeValues({ type: 'rebateType' }).then((res) => {
if (res.success) {
this.rebateType_list = res.data
}
})
this.getList()
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doConfirm':
this.doConfirm()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push({
specialRebateSid: element.sid,
brandName: element.brandName,
brandSid: element.brandSid,
createTime: element.createTime,
rebateName: element.rebateName,
rebateTypeValue: element.rebateTypeValue,
estimateRebate: element.estimateRebate,
uploadMoney: element.uploadMoney,
disNum: element.disNum
})
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.stayDisRebate(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
showData(value, createOrgSid, brandSid) {
this.listQuery.params.createOrgSid = createOrgSid
this.listQuery.params.brandSid = brandSid
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].specialRebateSid)
}
this.listQuery.params.sidList = aa
} else {
this.listQuery.params.sidList = []
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.init()
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery.params.vinNo = ''
this.listQuery.params.rebateTypeKey = ''
this.listQuery.params.rebateName = ''
this.listQuery.params.createEndTime = ''
this.listQuery.params.createStartTime = ''
this.listQuery.params.state = ''
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.init()
},
doConfirm() {
if (this.sids.length > 0 || this.sids_list.length > 0) {
this.$emit('backData', this.sids, this.sids_list)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条记录!',
type: 'error',
duration: 2000
})
}
},
doClose() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
</style>

374
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiDaiBanInfo.vue

@ -0,0 +1,374 @@
<template>
<div class="app-container">
<div v-show="viewState== 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<div class="titwu"><span>{{ formobj.title }}专项返利分配申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="22" class="colOneStyle">
<el-form-item>
<span>{{ formobj.brandName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.scmSpecialrebatedistributedetails" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column prop="estimateRebate" label="预提返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column prop="uploadMoney" label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="单车分配金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.unitSetAllocationMoney }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formaddcopy02" >
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty spanTwoWidth"><span>当前环节:</span></div>
<el-form-item><span class="addinputInfo addinputOne">{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{ rowClass:!currentLink }">
<el-col :span="24">
<div class="span-sty spanTwoWidth"><span>意见:</span></div>
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw addinputOne" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
export default {
name: 'zhuanxiangfanlifenpeiDaiBanInfo',
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
//
formobj: {},
rules: {},
submitdisabled: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 300 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利分配申请详情'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = {}
})
},
//
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 === 'estimateRebate') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.withRebate = sums[index] += ''
} else if (column.property === 'uploadMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.distributionMoneyTotal = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
}
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

361
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiEdit.vue

@ -0,0 +1,361 @@
<template>
<div class="app-container">
<div v-show="viewState== 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存
</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交
</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<div class="titwu"><span>{{ formobj.title }}专项返利分配申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="4" class="colOneStyle">
<el-form-item>
<el-select :disabled="dialogStatus === 'edit'" v-model="formobj.brandName" placeholder="请选择" filterable clearable @change="changeBrand">
<el-option v-for="item in brand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="18" class="tleftb colOneStyle">
<el-button size="small" type="primary" @click="handleAdd()">添加</el-button>
<el-button size="small" type="danger" @click="handleDelete()">删除</el-button>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.scmSpecialrebatedistributedetails" :index="index" border style="width: 100%" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries">
<el-table-column fixed type="selection" align="center" width="60px"/>
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column prop="estimateRebate" label="预提返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column prop="uploadMoney" label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="单车分配金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.unitSetAllocationMoney }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<daifeipeizhuanxiang v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
import daifeipeizhuanxiang from './relation/daifeipeizhuanxiang'
import { fetchBySid, brandDown } from '@/api/cheliang/dictcommons'
export default {
name: 'zhuanxiangfanlifenpeiEdit',
components: {
daifeipeizhuanxiang
},
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
brand_list: [],
sids: [],
//
formobj: {
sid: '', // sid
approvalCompleteDate: '',
brandName: '',
brandSid: '',
createOrgName: '',
createOrgSid: '',
distributionMoneyTotal: '',
title: '',
useOrgName: '',
useOrgSid: '',
createByName: '',
createBySid: '',
withRebate: '',
taskId: '',
instanceId: '',
scmSpecialrebatedistributedetails: []
},
rules: {},
dialogStatus: '',
submitdisabled: false
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 300 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】专项返利分配申请'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}).catch((e) => {
this.formobj = {}
})
},
//
handleAdd() {
if (this.formobj.brandName === '' || this.formobj.brandName === null || this.formobj.brandName === undefined) {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.viewState = 2
this.$refs['divSelect'].showData(this.formobj.scmSpecialrebatedistributedetails, this.formobj.createOrgSid, this.formobj.brandSid)
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.specialRebateSid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
handleDelete() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (var i = 0; i < this.sids.length; i++) {
this.formobj.scmSpecialrebatedistributedetails.forEach((e, index) => {
if (e.specialRebateSid === this.sids[i]) {
this.formobj.scmSpecialrebatedistributedetails.splice(index, 1)
}
})
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.scmSpecialrebatedistributedetails.push({
mainSid: '',
sid: '',
specialRebateSid: e.specialRebateSid,
brandName: e.brandName,
brandSid: e.brandSid,
createTime: e.createTime,
rebateName: e.rebateName,
rebateTypeValue: e.rebateTypeValue,
estimateRebate: e.estimateRebate,
uploadMoney: e.uploadMoney,
disNum: e.disNum,
unitSetAllocationMoney: (parseInt(e.uploadMoney)) / (parseInt(e.disNum))
})
})
}
},
changeBrand(value) {
let bb = null
this.brand_list.forEach((e) => {
if (e.brandName === value) {
bb = {
name: e.brandName,
sid: e.sid
}
}
})
this.formobj.brandSid = bb.sid
},
saveOrUpdate() {
console.log(this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submitVehicleApply() {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
}
})
},
//
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 === 'estimateRebate') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.withRebate = sums[index] += ''
} else if (column.property === 'uploadMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.distributionMoneyTotal = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
closePage() {
this.viewState = 1
}
}
}
</script>
<style scoped>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>

250
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanlifenpeiFlow/zhuanxiangfanlifenpeiYiBanInfo.vue

@ -0,0 +1,250 @@
<template>
<div class="app-container">
<div v-show="viewState== 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<div class="titwu"><span>{{ formobj.title }}专项返利分配申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="rowStyle">
<el-col :span="2" class="tleftb colOneStyle">
<span>品牌:</span>
</el-col>
<el-col :span="22" class="colOneStyle">
<el-form-item>
<span>{{ formobj.brandName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.scmSpecialrebatedistributedetails" :index="index" border style="width: 100%" show-summary :summary-method="getSummaries">
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="返利名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateName }}</span>
</template>
</el-table-column>
<el-table-column label="返利类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.rebateTypeValue }}</span>
</template>
</el-table-column>
<el-table-column prop="estimateRebate" label="预提返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column prop="uploadMoney" label="上传总金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.uploadMoney }}</span>
</template>
</el-table-column>
<el-table-column label="分配数量" align="center">
<template slot-scope="scope">
<span>{{ scope.row.disNum }}</span>
</template>
</el-table-column>
<el-table-column label="单车分配金额" align="center">
<template slot-scope="scope">
<span>{{ scope.row.unitSetAllocationMoney }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/specialrebate/specialrebatedistribution'
export default {
name: 'zhuanxiangfanlifenpeiYiBanInfo',
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
//
formobj: {},
rules: {},
submitdisabled: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 300 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '专项返利分配申请详情'
console.log('编辑回显', sid)
req.fetchDetailsBySid(sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = {}
})
},
//
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 === 'estimateRebate') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.withRebate = sums[index] += ''
} else if (column.property === 'uploadMoney') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.formobj.distributionMoneyTotal = sums[index] += ''
} else {
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
this.amount = sums[index] += ''
} else {
sums[index] = ''
}
}
})
return sums
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.rowStyle {
border-left: 0px;
}
.colOneStyle {
border-right: 0px !important;
border-bottom: 0px !important;
}
</style>
Loading…
Cancel
Save