Browse Source

完善优惠包申请

master
yunuo970428 2 years ago
parent
commit
5697fd5a28
  1. 129
      anrui-buscenter/anrui-buscenter-ui/src/api/discountpackage/discountpackage.js
  2. 56
      anrui-buscenter/anrui-buscenter-ui/src/router/index.js
  3. 40
      anrui-buscenter/anrui-buscenter-ui/src/views/discountpackage/discountpackage.vue
  4. 203
      anrui-buscenter/anrui-buscenter-ui/src/views/discountpackage/discountpackageAdd.vue
  5. 58
      anrui-buscenter/anrui-buscenter-ui/src/views/discountpackage/discountpackageInfo.vue
  6. 331
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/youhuibaoFlow/youhuibaoDaiBanInfo.vue
  7. 268
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/youhuibaoFlow/youhuibaoEdit.vue
  8. 203
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/youhuibaoFlow/youhuibaoYiBanInfo.vue

129
anrui-buscenter/anrui-buscenter-ui/src/api/discountpackage/discountpackage.js

@ -0,0 +1,129 @@
import request from '@/utils/request'
// Pc根据条件分页查询数据的列表
export function pagerList(data) {
return request({
url: '/base/v1/basediscountpackageapply/listPage',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 欠款提车申请--新增保存
export function saveOrUpdate(data) {
return request({
url: '/base/v1/basediscountpackageapply/saveDiscountPackageApplyInfo',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 回显
export function fetchSid(data) {
return request({
url: '/base/v1/basediscountpackageapply/fetchDetailsBySid/' + data,
method: 'get'
})
}
// 获取合同信息
export function selectBycreateBySid(data) {
return request({
url: '/base/v1/commoncontract/selectBycreateBySid',
method: 'get',
params: data
})
}
// 获取优惠包(销售政策)
export function getAppPackageByUseOrg(data) {
return request({
url: '/base/v1/basediscountpackage/getAppPackageByUseOrg',
method: 'get',
params: data
})
}
// 删除
export function delBySids(data) {
return request({
url: '/base/v1/basediscountpackageapply/delBySids',
method: 'DELETE',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 提交
export function submit(data) {
return request({
url: '/base/v1/basediscountpackageapply/submitRecordApplication',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 流程审批(同意)
export function complete(params) {
return request({
url: '/base/v1/basediscountpackageapply/complete',
method: 'post',
data: params
})
}
// 流程审批(驳回)
export function reject(params) {
return request({
url: '/base/v1/basediscountpackageapply/reject',
method: 'post',
data: params
})
}
// 流程审批(终止)
export function breakProcess(params) {
return request({
url: '/base/v1/basediscountpackageapply/breakProcess',
method: 'post',
data: params
})
}
// 流程审批(撤回)
export function revokeProcess(params) {
return request({
url: '/base/v1/basediscountpackageapply/revokeProcess',
method: 'post',
data: params
})
}
// 审批流程(同意)获取下一环节
export function getNextNodesForSubmit(data) {
return request({
url: '/base/v1/basediscountpackageapply/getNextNodesForSubmit',
method: 'get',
params: data
})
}
// 审批流程(驳回)获取上一环节
export function getPreviousNodesForReject(data) {
return request({
url: '/base/v1/basediscountpackageapply/getPreviousNodesForReject',
method: 'get',
params: data
})
}

56
anrui-buscenter/anrui-buscenter-ui/src/router/index.js

@ -207,14 +207,19 @@ export const constantRoutes = [
} }
}, },
{ {
path: '/xiaoshouguanli/guachepeizhixinxi', path: '/xiaoshouguanli/suicheziliaojiaojie',
component: () => component: () =>
import('@/views/xiaoshouguanli/guachepeizhi/guachepeizhixinxi.vue'), import('@/views/xiaoshouguanli/suicheziliaojiaojie/cardatatobehandedover.vue'),
name: 'guachepeizhixinxi', name: 'DaiJiaoJieSuiCheZiLiao',
meta: { meta: { title: '随车资料交接管理', noCache: true }
title: '挂车配置'
}
}, },
// {
// path: '/xiaoshouguanli/suicheziliaoguanli',
// component: () =>
// import('@/views/xiaoshouguanli/suicheziliaoguanli/datapreparation.vue'),
// name: 'JiaoCheCheZiLiao',
// meta: { title: '交车资料管理', noCache: true }
// },
// 车辆交付 // 车辆交付
{ {
path: '/xiaoshouguanli/cheliangjiaofu', path: '/xiaoshouguanli/cheliangjiaofu',
@ -342,6 +347,23 @@ export const constantRoutes = [
] ]
}, },
// 优惠包 // 优惠包
{
path: '/discountpackage',
component: Layout,
redirect: '/discountpackage',
meta: {
title: '优惠包交接'
},
children: [
{
path: '/discountpackage',
component: () =>
import('@/views/discountpackage/discountpackage.vue'),
name: 'YouHuiBaoShenQing',
meta: { title: '优惠包申请', noCache: true }
}
]
},
{ {
path: '/discountpackagehandover', path: '/discountpackagehandover',
component: Layout, component: Layout,
@ -602,6 +624,28 @@ export const constantRoutes = [
component: () => component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarEdit.vue'), import('@/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarEdit.vue'),
name: 'XiaoShouDingDanTuiCheEdit' name: 'XiaoShouDingDanTuiCheEdit'
},
// 优惠包申请管理待办详情
{
path: '/youhuibaoFlow/youhuibaoDaiBanInfo',
component: () =>
import('@/views/workflow/youhuibaoFlow/youhuibaoDaiBanInfo.vue'),
name: 'YouHuiBaoDaiBanInfo'
},
// 优惠包申请管理已办详情
{
path: '/youhuibaoFlow/youhuibaoYiBanInfo',
component: () =>
import('@/views/workflow/youhuibaoFlow/youhuibaoYiBanInfo.vue'),
name: 'YouHuiBaoYiBanInfo'
},
// 优惠包申请管理驳回到发起人办理
{
path: '/youhuibaoFlow/youhuibaoEdit',
component: () =>
import('@/views/workflow/youhuibaoFlow/youhuibaoEdit.vue'),
name: 'YouHuiBaoEdit'
} }
// 404 page must be placed at the end !!! // 404 page must be placed at the end !!!

40
anrui-buscenter/anrui-buscenter-ui/src/views/discountpackage/discountpackage.vue

@ -14,7 +14,7 @@
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> <el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item> </el-form-item>
<el-form-item label="合同编号"> <el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" clearable placeholder=""/> <el-input v-model="listQuery.params.contractId" clearable placeholder=""/>
</el-form-item> </el-form-item>
<el-form-item label="客户名称"> <el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" clearable placeholder=""/> <el-input v-model="listQuery.params.customerName" clearable placeholder=""/>
@ -27,13 +27,13 @@
</div> </div>
</div> </div>
<div class="listtop"> <div class="listtop">
<div class="tit">调价申请列表</div> <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"/> <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div> </div>
<div class=""> <div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> <el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed width="60px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed width="50px" type="selection" align="center"/> <el-table-column fixed width="50px" type="selection" align="center"/>
<el-table-column fixed width="60px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" width="150px" align="center"> <el-table-column fixed label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='调价申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button> <el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='调价申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
@ -48,22 +48,17 @@
</el-table-column> </el-table-column>
<el-table-column label="发起日期" align="center"> <el-table-column label="发起日期" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime }}</span> <span>{{ scope.row.applyDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发起人" align="center"> <el-table-column label="发起人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.applyPeoName }}</span> <span>{{ scope.row.applyName }}</span>
</template>
</el-table-column>
<el-table-column label="合同编号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.contractNo }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号" align="center"> <el-table-column label="合同编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.contractNo }}</span> <span>{{ scope.row.contractId }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户名称" align="center"> <el-table-column label="客户名称" align="center">
@ -73,12 +68,12 @@
</el-table-column> </el-table-column>
<el-table-column label="车型" align="center"> <el-table-column label="车型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.modelName }}</span> <span>{{ scope.row.model }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="台数" align="center"> <el-table-column label="台数" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.num }}</span> <span>{{ scope.row.number }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -103,12 +98,12 @@ import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import discountpackageAdd from './discountpackageAdd.vue' import discountpackageAdd from './discountpackageAdd.vue'
import discountpackageInfo from './discountpackageInfo.vue' import discountpackageInfo from './discountpackageInfo.vue'
import req from '@/api/kucunguanli/price' import { pagerList, delBySids } from '@/api/discountpackage/discountpackage'
import { getOrgSidByPath, selectHaveMessage } from '@/api/dictcommons/dictcommons' import { getOrgSidByPath, selectHaveMessage } from '@/api/dictcommons/dictcommons'
import { getStorage } from '@/utils/auth' import { getStorage } from '@/utils/auth'
export default { export default {
name: 'priceguanli', name: 'YouHuiBaoShenQing',
components: { components: {
Pagination, Pagination,
pageye, pageye,
@ -158,7 +153,10 @@ export default {
params: { params: {
createStartTime: '', createStartTime: '',
createEndTime: '', createEndTime: '',
createOrgSid: '' createOrgSid: '',
userSid: '',
contractId: '',
customerName: ''
}, },
current: 1, current: 1,
size: 10, size: 10,
@ -257,7 +255,8 @@ export default {
// //
getList() { getList() {
this.listLoading = true this.listLoading = true
req.listPage(this.listQuery).then((response) => { this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
pagerList(this.listQuery).then((response) => {
console.log('列表查询结果:', response) console.log('列表查询结果:', response)
this.listLoading = false this.listLoading = false
if (response.success) { if (response.success) {
@ -279,7 +278,10 @@ export default {
params: { params: {
createStartTime: '', createStartTime: '',
createEndTime: '', createEndTime: '',
createOrgSid: '' createOrgSid: '',
userSid: '',
contractId: '',
customerName: ''
}, },
current: 1, current: 1,
size: 10, size: 10,
@ -320,7 +322,7 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.delBySids(this.sids).then(resp => { delBySids(this.sids).then(resp => {
loading.close() loading.close()
if (resp.success) { if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true }) this.$message({ type: 'success', message: resp.msg, showClose: true })

203
anrui-buscenter/anrui-buscenter-ui/src/views/discountpackage/discountpackageAdd.vue

@ -14,9 +14,15 @@
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> <el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB"> <el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>合同编号</span> <span><span class="icon">*</span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item prop="contractId">
<el-select v-model="formobj.contractId" placeholder="请选择" @change="changeContractId" filterable>
<el-option v-for="item in discounts_list" :key="item.contractId" :label="item.contractId" :value="item.contractId"></el-option>
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"></el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>客户名称</span> <span>客户名称</span>
</el-col> </el-col>
@ -32,7 +38,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<span>{{ formobj.modelName }}</span> <span>{{ formobj.model }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
@ -40,7 +46,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<span>{{ formobj.num }}</span> <span>{{ formobj.number }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -56,7 +62,7 @@
<div>优惠包列表</div> <div>优惠包列表</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAdd">添加</el-button> <el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAdd">添加</el-button>
</div> </div>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%;"> <el-table :key="tableKey" :data="formobj.discountPackageList" :index="index" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column> <el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column>
<el-table-column fixed label="操作" align="center" width="80"> <el-table-column fixed label="操作" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -64,29 +70,31 @@
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优惠包名称" align="center" width="130"> <el-table-column label="优惠包名称" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <el-select v-model="scope.row.discountName" placeholder="请选择" @change="changeDiscountName($event, scope.row)" filterable clearable>
<el-option v-for="item in discountsName_list" :key="item.discountName" :label="item.discountName" :value="item.discountName"></el-option>
</el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="价值" align="center" width="100"> <el-table-column label="价值" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.price }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优惠包说明" align="center" min-idth="200"> <el-table-column label="优惠包说明" header-align="center" align="left" min-idth="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.packageExplain }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" width="80"> <el-table-column label="数量" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <el-input v-model="scope.row.number" clearable placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总价值" align="center" width="100"> <el-table-column label="总价值" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ totalPrice(scope.row) }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -96,6 +104,9 @@
</template> </template>
<script> <script>
import { selectBycreateBySid, getAppPackageByUseOrg, saveOrUpdate, submit, fetchSid } from '@/api/discountpackage/discountpackage'
import { getOrgSidByPath, fetchBySid } from '@/api/dictcommons/dictcommons'
export default { export default {
name: 'YouHuiBaoAdd', name: 'YouHuiBaoAdd',
data() { data() {
@ -104,25 +115,169 @@ export default {
submitdisabled: false, submitdisabled: false,
tableKey: 0, tableKey: 0,
index: 0, index: 0,
discounts_list: [],
discountsName_list: [],
formobj: { formobj: {
sid: '',
userSid: '',
applyName: '',
contractId: '',
customerName: '',
model: '',
number: '',
createOrgSid: '',
createOrgName: '',
useOrgSid: '',
useOrgName: '',
orgSidPath: '',
discountPackageList: []
}, },
rules: {} rules: {
contractId: [{ required: true, message: '合同编号不能为空', trigger: 'change' }]
}
} }
}, },
methods: { methods: {
showAdd() {}, init() {
showEdit(row) {}, selectBycreateBySid({ createBySid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.discounts_list = resp.data
}
})
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) {
this.formobj.useOrgSid = res.data
this.formobj.createOrgSid = res.data
fetchBySid(res.data).then((response) => {
if (response.success) {
this.formobj.createOrgName = response.data.name
this.formobj.useOrgName = response.data.name
getAppPackageByUseOrg({ userOrg: res.data }).then((resp) => {
if (resp.success) {
this.discountsName_list = resp.data
}
})
}
})
}
})
},
showAdd() {
this.init()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【新增】优惠包申请'
this.formobj.userSid = window.sessionStorage.getItem('userSid')
this.formobj.orgSidPath = window.sessionStorage.getItem('defaultOrgPath')
this.formobj.applyName = window.sessionStorage.getItem('name')
},
showEdit(row) {
this.init()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【编辑】优惠包申请'
fetchSid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
}
})
},
changeContractId(value) {
const choose = this.discounts_list.filter((item) => item.contractId === value)
this.formobj.customerName = choose[0].customerName
this.formobj.model = choose[0].model
this.formobj.number = choose[0].number
},
handleAdd() { handleAdd() {
this.formobj.discountPackageList.push({
discountName: '',
price: '',
packageExplain: '',
number: '',
totalPrice: ''
})
},
dataDelete(index) {
this.formobj.discountPackageList.splice(index, 1)
},
changeDiscountName(value, row) {
const choose = this.discountsName_list.filter((item) => item.discountName === value)
row.price = choose[0].price
row.packageExplain = choose[0].packageExplain
},
totalPrice(row) {
if (row.price !== '' && row.number !== '') {
row.totalPrice = parseFloat(row.price) * parseFloat(row.number)
}
return row.totalPrice
}, },
dataDelete(index) {}, saveOrUpdate() {
saveOrUpdate() {}, this.$refs['form_obj'].validate((valid) => {
submitVehicleApply() {}, if (valid) {
handleReturn() {} this.submitdisabled = true
saveOrUpdate(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submitVehicleApply() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
userSid: '',
applyName: '',
contractId: '',
customerName: '',
model: '',
number: '',
createOrgSid: '',
createOrgName: '',
useOrgSid: '',
useOrgName: '',
discountPackageList: []
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
} }
} }
</script> </script>
<style scoped> <style scoped>
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style> </style>

58
anrui-buscenter/anrui-buscenter-ui/src/views/discountpackage/discountpackageInfo.vue

@ -12,7 +12,9 @@
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>合同编号</span> <span>合同编号</span>
</el-col> </el-col>
<el-col :span="8"></el-col> <el-col :span="8">
<el-form-item><span>{{ formobj.contractId }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>客户名称</span> <span>客户名称</span>
</el-col> </el-col>
@ -28,7 +30,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<span>{{ formobj.modelName }}</span> <span>{{ formobj.model }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
@ -36,7 +38,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<span>{{ formobj.num }}</span> <span>{{ formobj.number }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -45,37 +47,37 @@
<span>备注</span> <span>备注</span>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder=""/></el-form-item> <el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div class="title"> <div class="title">
<div>优惠包列表</div> <div>优惠包列表</div>
</div> </div>
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%;"> <el-table :key="tableKey" :data="formobj.discountPackageList" :index="index" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column> <el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column>
<el-table-column label="优惠包名称" align="center" width="130"> <el-table-column label="优惠包名称" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.discountName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="价值" align="center" width="100"> <el-table-column label="价值" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.price }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="优惠包说明" align="center" min-idth="200"> <el-table-column label="优惠包说明" align="center" min-idth="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.packageExplain }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" width="80"> <el-table-column label="数量" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.number }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总价值" align="center" width="100"> <el-table-column label="总价值" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.vehicleTypeCode }}</span> <span>{{ scope.row.totalPrice }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -85,6 +87,8 @@
</template> </template>
<script> <script>
import { fetchSid } from '@/api/discountpackage/discountpackage'
export default { export default {
name: 'YouHuiBaoInfo', name: 'YouHuiBaoInfo',
data() { data() {
@ -94,14 +98,34 @@ export default {
tableKey: 0, tableKey: 0,
index: 0, index: 0,
formobj: { formobj: {
sid: '',
userSid: '',
applyName: '',
contractId: '',
customerName: '',
model: '',
number: '',
createOrgSid: '',
createOrgName: '',
useOrgSid: '',
useOrgName: '',
discountPackageList: []
}, },
rules: {} rules: {}
} }
}, },
methods: { methods: {
showInfo(row) {}, showInfo(row) {
handleReturn() {} this.viewTitle = '优惠包申请详情'
fetchSid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
handleReturn() {
this.$emit('doback')
}
} }
} }
</script> </script>

331
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/youhuibaoFlow/youhuibaoDaiBanInfo.vue

@ -0,0 +1,331 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<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>
<div class="">
<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="8">
<el-form-item><span>{{ formobj.contractId }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.customerName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.model }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>订单台数</span>
</el-col>
<el-col :span="8">
<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="20">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>优惠包列表</div>
</div>
<el-table :key="tableKey" :data="formobj.discountPackageList" :index="index" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column>
<el-table-column label="优惠包名称" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.discountName }}</span>
</template>
</el-table-column>
<el-table-column label="价值" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column label="优惠包说明" align="center" min-idth="200">
<template slot-scope="scope">
<span>{{ scope.row.packageExplain }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.number }}</span>
</template>
</el-table-column>
<el-table-column label="总价值" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.totalPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" 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 { fetchSid, complete, reject, breakProcess, getNextNodesForSubmit, getPreviousNodesForReject } from '@/api/discountpackage/discountpackage'
export default {
name: 'YouHuiBaoDaiBanInfo',
data() {
return {
viewTitle: '',
submitdisabled: false,
tableKey: 0,
index: 0,
formobj: {
sid: '',
userSid: '',
applyName: '',
contractId: '',
customerName: '',
model: '',
number: '',
createOrgSid: '',
createOrgName: '',
useOrgSid: '',
useOrgName: '',
discountPackageList: []
},
rules: {},
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
//
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.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: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '优惠包申请详情'
fetchSid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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 = ''
getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).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
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
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
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>
.rowClass{
border-top: 1px solid #E0E3EB;
}
</style>

268
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/youhuibaoFlow/youhuibaoEdit.vue

@ -0,0 +1,268 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存
</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submitVehicleApply()">提交
</el-button>
</div>
</div>
<div class="">
<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 class="icon">*</span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item prop="contractId">
<el-select v-model="formobj.contractId" placeholder="请选择" @change="changeContractId" filterable>
<el-option v-for="item in discounts_list" :key="item.contractId" :label="item.contractId" :value="item.contractId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.customerName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.model }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>订单台数</span>
</el-col>
<el-col :span="8">
<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="20">
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder=""/></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>优惠包列表</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAdd">添加</el-button>
</div>
<el-table :key="tableKey" :data="formobj.discountPackageList" :index="index" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column>
<el-table-column fixed label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="优惠包名称" align="center" width="180">
<template slot-scope="scope">
<el-select v-model="scope.row.discountName" placeholder="请选择" @change="changeDiscountName($event, scope.row)" filterable clearable>
<el-option v-for="item in discountsName_list" :key="item.discountName" :label="item.discountName" :value="item.discountName"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="价值" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column label="优惠包说明" header-align="center" align="left" min-idth="200">
<template slot-scope="scope">
<span>{{ scope.row.packageExplain }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.number" clearable placeholder="" />
</template>
</el-table-column>
<el-table-column label="总价值" align="center" width="130">
<template slot-scope="scope">
<span>{{ totalPrice(scope.row) }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import { selectBycreateBySid, getAppPackageByUseOrg, saveOrUpdate, submit, fetchSid } from '@/api/discountpackage/discountpackage'
export default {
name: 'YouHuiBaoEdit',
data() {
return {
viewTitle: '',
submitdisabled: false,
tableKey: 0,
index: 0,
discounts_list: [],
discountsName_list: [],
formobj: {
sid: '',
userSid: '',
applyName: '',
contractId: '',
customerName: '',
model: '',
number: '',
createOrgSid: '',
createOrgName: '',
useOrgSid: '',
useOrgName: '',
orgSidPath: '',
discountPackageList: []
},
rules: {
contractId: [{ required: true, message: '合同编号不能为空', trigger: 'change' }]
}
}
},
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: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【编辑】优惠包申请'
fetchSid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
selectBycreateBySid({ createBySid: this.formobj.userSid }).then((resp) => {
if (resp.success) {
this.discounts_list = resp.data
}
})
getAppPackageByUseOrg({ userOrg: this.formobj.createOrgSid }).then((resp) => {
if (resp.success) {
this.discountsName_list = resp.data
}
})
}
})
},
changeContractId(value) {
const choose = this.discounts_list.filter((item) => item.contractId === value)
this.formobj.customerName = choose[0].customerName
this.formobj.model = choose[0].model
this.formobj.number = choose[0].number
},
handleAdd() {
this.formobj.discountPackageList.push({
discountName: '',
price: '',
packageExplain: '',
number: '',
totalPrice: ''
})
},
dataDelete(index) {
this.formobj.discountPackageList.splice(index, 1)
},
changeDiscountName(value, row) {
const choose = this.discountsName_list.filter((item) => item.discountName === value)
row.price = choose[0].price
row.packageExplain = choose[0].packageExplain
},
totalPrice(row) {
if (row.price !== '' && row.number !== '') {
row.totalPrice = parseFloat(row.price) * parseFloat(row.number)
}
return row.totalPrice
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
saveOrUpdate(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.submitdisabled = false
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submitVehicleApply() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
submit(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.submitdisabled = false
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
}
}
}
</script>
<style scoped>
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

203
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/youhuibaoFlow/youhuibaoYiBanInfo.vue

@ -0,0 +1,203 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<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="8">
<el-form-item><span>{{ formobj.contractId }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.customerName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ formobj.model }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>订单台数</span>
</el-col>
<el-col :span="8">
<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="20">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>优惠包列表</div>
</div>
<el-table :key="tableKey" :data="formobj.discountPackageList" :index="index" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column>
<el-table-column label="优惠包名称" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.discountName }}</span>
</template>
</el-table-column>
<el-table-column label="价值" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column label="优惠包说明" align="center" min-idth="200">
<template slot-scope="scope">
<span>{{ scope.row.packageExplain }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.number }}</span>
</template>
</el-table-column>
<el-table-column label="总价值" align="center" width="130">
<template slot-scope="scope">
<span>{{ scope.row.totalPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import { fetchSid, revokeProcess } from '@/api/discountpackage/discountpackage'
export default {
name: 'YouHuiBaoYiBanInfo',
data() {
return {
viewTitle: '',
submitdisabled: false,
tableKey: 0,
index: 0,
formobj: {
sid: '',
userSid: '',
applyName: '',
contractId: '',
customerName: '',
model: '',
number: '',
createOrgSid: '',
createOrgName: '',
useOrgSid: '',
useOrgName: '',
discountPackageList: []
},
rules: {},
//
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.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '优惠包申请详情'
fetchSid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
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>
</style>
Loading…
Cancel
Save