Browse Source

完善销售政策

master
yunuo970428 3 years ago
parent
commit
b1a5905a2b
  1. 28
      anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js
  2. 86
      anrui-buscenter/anrui-buscenter-ui/src/api/jichuxinxi/salepolicy.js
  3. 49
      anrui-buscenter/anrui-buscenter-ui/src/router/index.js
  4. 331
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/relation/vehicleSelect.vue
  5. 13
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengce.vue
  6. 357
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceDaiBanInfo.vue
  7. 699
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit.vue
  8. 13
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEnd.vue
  9. 13
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceInfo.vue
  10. 232
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceYiBanInfo.vue
  11. 331
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/relation/vehicleselect.vue
  12. 218
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengce.vue
  13. 442
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceAdd.vue
  14. 141
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceInfo.vue

28
anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js

@ -27,3 +27,31 @@ export function typeValues(data) {
params: data
})
}
// 品牌下拉
export function brandDown(data) {
return request({
url: '/base/v1/basevehiclebrand/namesDown',
method: 'get',
params: data
})
}
// 根据当前用户orgSidPath的管理层级获取相应的信息(集团获取所有分公司信息、事业部获取旗下的分公司信息、分公司获取该分公司的信息)
export function selectOrgByLevel(data) {
return request({
url: '/base/v1/basevehicleout/selectOrgByLevel',
method: 'post',
params: data
})
}
// 查询角色列表
export function roleList(data){
return request({
url: '/portal/v1/sysrole/listAll',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}

86
anrui-buscenter/anrui-buscenter-ui/src/api/jichuxinxi/salepolicy.js

@ -1,8 +1,8 @@
import request from '@/utils/request'
// 销售政策分页列表 已改
export function selectSalesOrderList(data) {
export function listPage(data) {
return request({
url: '/base/v1/basediscountpackage/selectSalesOrderList',
url: '/base/v1/basediscountpackage/listPage',
method: 'post',
data: data,
headers: {
@ -59,12 +59,88 @@ export function update(data) {
})
}
// 获取下拉框
export function typeValues(data) {
// 选择车辆列表
export function baseDisCountPackageGetVeh(data) {
return request({
url: '/portal/v1/dictcommons/typeValues',
url: '/base/v1/basevehicle/baseDisCountPackageGetVeh',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
// 提交流程
export function submitVehicleApply(params) {
return request({
url: '/base/v1/basediscountpackage/submitBaseDiscountpackage',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
}
// 流程审批(同意)
export function complete(params) {
return request({
url: '/base/v1/basediscountpackage/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
// 流程审批(驳回)
export function reject(params) {
return request({
url: '/base/v1/basediscountpackage/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
// 流程审批(终止)
export function breakProcess(params) {
return request({
url: '/base/v1/basediscountpackage/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
// 流程审批(撤回)
export function revokeProcess(params) {
return request({
url: '/base/v1/basediscountpackage/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
// 审批流程(同意)获取下一环节
export function getNextNodesForSubmit(data) {
return request({
url: '/base/v1/basediscountpackage/getNextNodesForSubmit',
method: 'get',
params: data
})
}
// 审批流程(驳回)获取上一环节
export function getPreviousNodesForReject(data) {
return request({
url: '/base/v1/basediscountpackage/getPreviousNodesForReject',
method: 'get',
params: data
})
}

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

@ -291,24 +291,6 @@ export const constantRoutes = [
title: '销售订单管理'
}
},
// {
// path: '/xiaoshouguanli/dingdanxinxiAdd',
// component: () =>
// import('@/views/xiaoshouguanli/dingdanguanli/dingdanxinxi/dingdanxinxiAdd.vue'),
// name: 'dingdanxinxiAdd',
// meta: {
// title: '销售订单添加'
// }
// },
// {
// path: '/xiaoshouguanli/dingdanxinxiInfo',
// component: () =>
// import('@/views/xiaoshouguanli/dingdanguanli/dingdanxinxi/dingdanxinxiInfo.vue'),
// name: 'dingdanxinxiInfo',
// meta: {
// title: '订销售订单详情'
// }
// },
{
path: '/xiaoshouguanli/xiaoshouzhengce',
component: () =>
@ -318,6 +300,15 @@ export const constantRoutes = [
title: '销售政策管理'
}
},
{
path: '/xiaoshouguanli/xiaoshourangjia',
component: () =>
import('@/views/xiaoshouguanli/xiaoshourangjia/xiaoshourangjiaguanli.vue'),
name: 'xiaoshourangjiaguanli',
meta: {
title: '销售让价权限管理'
}
},
{
path: '/xiaoshouguanli/guachepeizhixinxi',
component: () =>
@ -695,6 +686,28 @@ export const constantRoutes = [
component: () =>
import('@/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue'),
name: 'chukuEdit'
},
// 销售政策申请管理待办详情
{
path: '/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceDaiBanInfo',
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceDaiBanInfo.vue'),
name: 'xiaoshouzhengceDaiBanInfo'
},
// 销售政策申请管理已办详情
{
path: '/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceYiBanInfo',
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceYiBanInfo.vue'),
name: 'xiaoshouzhengceYiBanInfo'
},
// 销售政策申请管理驳回到发起人办理
{
path: '/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit',
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit.vue'),
name: 'xiaoshouzhengceEdit'
}
// 404 page must be placed at the end !!!

331
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/relation/vehicleSelect.vue

@ -0,0 +1,331 @@
<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="">
<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="品牌:">
<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-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="系列:">
<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="变速箱:">
<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="驱动:">
<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="排放标准:">
<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="马力:">
<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="燃料:">
<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="版本:">
<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="车型:">
<el-input v-model="listQuery.params.vehicleAlias" placeholder="" clearable/>
</el-form-item>
<!-- <el-form-item label="采购订单编号:">-->
<!-- <el-input v-model="listQuery.params.orderingNo" placeholder="" clearable/>-->
<!-- </el-form-item>-->
<el-form-item label="快捷检索:">
<el-input v-model="listQuery.params.modelName" 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" 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.vehModelName }}</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.locationName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</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 { baseDisCountPackageGetVeh } from '@/api/jichuxinxi/salepolicy'
import { typeValues, brandDown } from '@/api/dictcommons/dictcommons'
export default {
name: 'vehicleSelect',
components: {
Pagination
},
data() {
return {
brand_list: [],
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: '',
userSid: '',
orderingNo: '',
orgSid: '',
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
baseDisCountPackageGetVeh(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.userSid = ''
this.listQuery.params.orderingNo = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push({
vehModelSid: element.vehModelSid,
vehModelName: element.vehModelName,
vehSid: element.vehSid,
vinNo: element.vinNo,
manufactorSettlementPrice: element.manufactorSettlementPrice,
priceDate: element.priceDate,
libraryAge: element.libraryAge,
settlementStatus: element.settlementStatus,
settlementStatusValue: element.settlementStatusValue,
guidedDKPrice: element.guidedDKPrice,
guidedQKPrice: element.guidedQKPrice
})
})
this.sids = aa
},
showData(value, createOrgSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.vehSids = aa
} else {
this.listQuery.params.vehSids = []
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.orgSid = createOrgSid
brandDown({ useOrg: createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
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>

13
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengce.vue

@ -1,13 +0,0 @@
<template>
</template>
<script>
export default {
name: "xiaoshouzhengce"
}
</script>
<style scoped>
</style>

357
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceDaiBanInfo.vue

@ -0,0 +1,357 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>销售政策申请详情</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="">
<div class="titwu">销售政策申请</div>
<el-form ref="dataForm" :model="temp" class="formadd">
<el-row class="bordertopline">
<el-col :span="4" class="tleftb">
<span>政策类别</span>
</el-col>
<el-col :span="4">
<el-form-item>{{ temp.salesPolicy }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包类别</span>
</el-col>
<el-col :span="4">
<el-form-item>{{ temp.discountType }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包名称</span>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ temp.projectName }}</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>{{ temp.projectCost }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包价值()</span>
</el-col>
<el-col :span="4">
<el-form-item>{{ temp.discountMoney }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠项目说明</span>
</el-col>
<el-col :span="4">
<el-form-item>
{{ temp.discountExplain }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>有效期</span>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
{{ temp.effectiveDate }}
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否生效</span>
</el-col>
<el-col :span="12">
<el-form-item>{{ temp.isEmploy === '1' ? '是' : '否' }}</el-form-item>
</el-col>
</el-row>
<div class="title" v-show="temp.salesPolicyKey === '0001'">
<div>享受促销政策的车辆列表</div>
</div>
<el-table :key="tableKey" v-show="temp.salesPolicyKey === '0001'" :data="temp.baseDiscountpackageVehs" :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" width="200">
<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.vehModelName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.libraryAge }}</span>
</template>
</el-table-column>
<el-table-column label="买断状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}<span>({{ scope.row.vehicleNum }})</span></span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</span>
</template>
</el-table-column>
<el-table-column label="全款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedQKPrice }}</span>
</template>
</el-table-column>
<el-table-column label="贷款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedDKPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</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>
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input v-model="dialogList.comment" placeholder="审批意见" class="addinputw" 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, getPreviousNodesForReject, getNextNodesForSubmit } from '@/api/jichuxinxi/salepolicy'
export default {
name: 'xiaoshouzhengceDaiBanInfo',
data() {
return {
disabled: true,
index: 0,
tableKey: 0,
list: [],
temp: {}, //
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.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: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
fetchSid(sid).then((response) => {
if (response.code) {
this.temp = response.data
}
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, discountTypeKey: this.temp.discountTypeKey }).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 }).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>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
</style>

699
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit.vue

@ -1,423 +1,434 @@
<template>
<div class="app-container">
<div>
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{viewTitle}}</div>
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="FormLoading" @click="handleCreate()">保存</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleCreate()">保存</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd">
<div class="tit">
销售政策申请
</div>
<div class="">
<div class="titwu">销售政策申请</div>
<el-form ref="dataForm" :model="temp" class="formadd">
<el-row class="bordertopline">
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">政策类别</span></el-form-item>
<span>政策类别</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-select v-model="temp.billType" placeholder="请选择" @change="depositTypeChange">
<el-option
v-for="item in depositType"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
<el-select v-model="temp.salesPolicy" placeholder="请选择" @change="salesPolicyChange">
<el-option v-for="item in salesPolicy_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包类别</span></el-form-item>
<span>优惠包类别</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-select v-model="temp.billType" placeholder="请选择" @change="depositTypeChange">
<el-option
v-for="item in depositType"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
<el-select v-model="temp.discountType" placeholder="请选择" @change="discountTypeChange">
<el-option v-for="item in discountType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包名称</span>
</el-col>
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.projectName" class="addinputw" placeholder="" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包名称</span></el-form-item>
<span>优惠包成本()</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.depositBillType" class="addinputw" placeholder=""
clearable/>
<el-input v-model="temp.projectCost" class="addinputw" placeholder="" clearable @keyup.native="oninput"/>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包价值</span></el-form-item>
<span>优惠包价值()</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.customerName" class="addinputw" placeholder=""
clearable/>
<el-input v-model="temp.discountMoney" class="addinputw" placeholder="" clearable @keyup.native="oninput"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠项目说明</span></el-form-item>
<span>优惠项目说明</span>
</el-col>
<el-col :span="20" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.customerName" class="addinputw" placeholder=""
clearable/>
<el-input v-model="temp.discountExplain" class="addinputw" placeholder="" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">有效期</span></el-form-item>
<span>有效期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-date-picker
v-model="temp.data"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker v-model="temp.effectiveDate" type="date" class="addinputw" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">是否生效</span></el-form-item>
<span>是否生效</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="12">
<el-form-item>
<el-radio v-model="temp.radio" label="0"></el-radio>
<el-radio v-model="temp.radio" label="1"></el-radio>
<el-radio v-model="temp.isEmploy" label="1"></el-radio>
<el-radio v-model="temp.isEmploy" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<div class="title" v-show="temp.salesPolicyKey === '0001'">
<div>享受促销政策的车辆列表</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleSelect()">选择</el-button>
</div>
</div>
<el-table :key="tableKey" v-show="temp.salesPolicyKey === '0001'" :data="temp.baseDiscountpackageVehs" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<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="200">
<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.vehModelName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.libraryAge }}</span>
</template>
</el-table-column>
<el-table-column label="买断状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</span>
</template>
</el-table-column>
<el-table-column label="全款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedQKPrice }}</span>
</template>
</el-table-column>
<el-table-column label="贷款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedDKPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<vehicle v-show="viewState == 2" ref="divVehicle" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import {mapGetters} from 'vuex'
import {saveChe, updateVehicle, selectSid, typeValues, submitVehicleApprove} from '@/api/jichuxinxi/busdeposit'
import {loginDetails} from '@/api/dictcommons/basemanufacturer'
import {getStorage} from '@/utils/auth'
import { save, update, fetchSid, submitVehicleApply } from '@/api/jichuxinxi/salepolicy'
import { typeValues, getPathSidByUserSid, fetchBySid } from '@/api/dictcommons/dictcommons'
import vehicle from './relation/vehicleSelect'
export default {
name: "xiaoshouzhengceEdit",
data() {
return {
viewTitle: '',
index: 0,
disabled: false, //
// ---------
YongHuid: [],
stateId: '0',
FormLoading: false,
listLoading: false,
list: [],
temp: {
sid: '',
billNo: '',
createDate: '',
nodeState: '',
userSid: window.sessionStorage.getItem('userSid')
}, //
textMap: {
update: '修改',
create: '创建',
},
submitDto: {
businessSid: '',
userSid: window.sessionStorage.getItem('userSid')
},
xuniSid: '',
mobile: '',
orgName: '',
staffName: '',
_userSid: '',
deposit_list: [],
customerName: [],
tificateT: [],
dnumbDate: [],
dialogStatus: '', //
rules: {},
// ------------------------------------
export default {
name: 'xiaoshouzhengceEdit',
components: {
vehicle
},
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 0,
index: 0,
disabled: false, //
salesPolicy_list: [], //
discountType_list: [], //
temp: {
sid: '',
discountTypeKey: '',
discountType: '',
discountMoney: '',
discountExplain: '',
projectName: '',
projectCost: '',
salesPolicy: '',
salesPolicyKey: '',
effectiveDate: '',
isEmploy: '',
useOrg: '',
useOrgName: '',
createBySid: '',
staffSid: '',
instanceId: '', // ID
taskId: '', // ID
baseDiscountpackageVehs: []
},
dialogStatus: '', //
rules: {}
}
},
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: {
init() {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.temp.useOrg = resp.data
fetchBySid(resp.data).then((res) => {
if (res.success) {
this.temp.useOrgName = res.data.name
}
})
}
})
},
computed: {
...mapGetters([
'id',
'roles',
'rolesIds',
'departmentId',
'departmentCode',
]),
//
oninput(e) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
},
created() {
//
showAdd() {
this.init()
this.getType()
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'add'
this.temp.createBySid = window.sessionStorage.getItem('userSid')
this.temp.staffSid = window.sessionStorage.getItem('staffSid')
this.viewTitle = '【新增】销售政策申请'
},
methods: {
// ------------ ------------
//
resetTemp() {
this.temp = {};
this.list = []
},
init() {
var token = getStorage();
loginDetails(token).then((response) => {
if (response.code === '200') {
this.YongHuid = response.data;
this.orgName = this.YongHuid.departmentName;
this.staffName = this.YongHuid.name;
this._userSid = this.YongHuid.sid;
console.log('8888', this._userSid)
}
});
},
showAdd() {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
});
this.dialogStatus = 'add';
this.viewTitle = '【新增】销售政策管理';
},
showEdit(sid, flowState) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
});
this.temp.sid = sid
this.dialogStatus = 'edit';
this.viewTitle = '【编辑】销售政策管理';
if (flowState === 0) {
this.disabled = false
} else {
this.disabled = true
showInfo(sid) {
this.getType()
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】销售政策申请'
console.log('编辑页面', sid)
fetchSid(sid).then((response) => {
if (response.code) {
this.temp = response.data
this.temp.instanceId = response.data.procInstId
this.temp.staffSid = window.sessionStorage.getItem('staffSid')
}
console.log('112233', sid)
selectSid(sid).then((response) => {
if (response.code) {
this.temp = response.data
this.list = response.data.depositVehicleList
}
});
},
// -
getType() {
typeValues({
type: 'depositBillType'
}).then((res) => {
if (res.code === '200') {
this.depositType = res.data
console.log('下拉框请求订单类型', res.data)
}
})
},
depositTypeChange(value) {
console.log('触发下拉框按钮')
let bb = {}
this.depositType.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
key: e.dictKey,
sid: e.sid
}
})
},
//
getType() {
typeValues({ type: 'discountPolicyType' }).then((res) => {
if (res.success) {
this.salesPolicy_list = res.data
console.log('下拉框请求政策类别', this.salesPolicy_list)
}
})
typeValues({ type: 'discountPackageType' }).then((res) => {
if (res.success) {
this.discountType_list = res.data
console.log('下拉框请求优惠包类别', this.discountType_list)
}
})
},
//
salesPolicyChange(value) {
console.log('触发下拉框按钮')
let bb = {}
this.salesPolicy_list.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
key: e.dictKey,
sid: e.sid
}
})
this.temp.billType = bb.name
console.log('name', this.temp.billType)
},
// ------------ ------------
//
handleCreate() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true;
this.dialogStatus = 'create';
if (this.dialogStatus === 'add') {
this.temp.depositVehicleList = this.list;
this.temp.staffSid = this.YongHuid.staffSid;
this.temp.orgName = this.orgName;
this.temp.staffName = this.staffName;
this.temp.orgSid = this.YongHuid.organizationSid;
this.temp.userSid = window.sessionStorage.getItem('userSid')
saveChe(this.temp).then((response) => {
this.FormLoading = false;
if (response.code === '200') {
this.xuniSid = response.data;
this.$notify({
title: '提示',
message: '添加成功',
type: 'success',
duration: 2000,
})
// this.disabled = false
this.handleReturn('true')
// this.$emit('doback')
} else {
this.$notify({
title: '提示',
message: '添加失败',
type: 'error',
duration: 2000,
})
}
})
} else {
this.temp.depositVehicleList = this.list;
this.temp.staffSid = this.YongHuid.staffSid;
this.temp.orgSid = this.YongHuid.organizationSid;
this.temp.orgName = this.orgName;
this.temp.staffName = this.staffName;
this.temp.userSid = window.sessionStorage.getItem('userSid')
updateVehicle(this.temp).then((response) => {
this.dialogStatus = 'update';
console.log('response', response);
this.FormLoading = false;
if (response.code === '200') {
this.$notify({
title: '提示',
message: '修改成功',
type: 'success',
duration: 2000,
})
this.handleReturn('true')
} else {
this.$notify({
title: '失败',
message: '修改失败',
type: 'error',
})
}
})
}
}
})
this.temp.salesPolicy = bb.name
this.temp.salesPolicyKey = bb.key
console.log('name', this.temp.salesPolicy)
},
//
discountTypeChange(value) {
console.log('触发下拉框按钮')
let bb = {}
this.discountType_list.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: e.dictType,
name: e.dictValue,
key: e.dictKey,
sid: e.sid
}
}
})
this.temp.discountType = bb.name
this.temp.discountTypeKey = bb.key
console.log('name', this.temp.discountType)
},
handleSelect() {
this.viewState = 2
this.$refs['divVehicle'].showData(this.temp.baseDiscountpackageVehs, this.temp.useOrg)
},
//
dataDelete(index) {
this.temp.baseDiscountpackageVehs.splice(index, 1)
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.temp.baseDiscountpackageVehs.push({
sid: '',
vehModelSid: e.vehModelSid,
vehModelName: e.vehModelName,
vehSid: e.vehSid,
vinNo: e.vinNo,
manufactorSettlementPrice: e.manufactorSettlementPrice,
priceDate: e.priceDate,
libraryAge: e.libraryAge,
settlementStatus: e.settlementStatus,
settlementStatusValue: e.settlementStatusValue,
guidedDKPrice: e.guidedDKPrice,
guidedQKPrice: e.guidedQKPrice,
mainSid: ''
})
})
},
//
handleSubmit() {
this.$confirm('是否确定提交该业务', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true;
this.dialogStatus = 'create';
if (this.stateId === '0') {
this.temp.depositVehicleList = this.list;
this.temp.staffSid = this.YongHuid.staffSid;
this.temp.orgName = this.orgName;
this.temp.staffName = this.staffName;
this.temp.orgSid = this.YongHuid.organizationSid;
this.temp.userSid = window.sessionStorage.getItem('userSid')
console.log('提交时sid', this.temp.sid)
//
submitVehicleApprove(this.temp).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '提交成功',
type: 'success',
duration: 2000,
})
this.handleReturn('true')
} else {
this.$notify({
title: '提交失败',
message: response.msg,
type: 'error',
})
}
},
closePage() {
this.viewState = 1
},
// ------------ ------------
//
handleCreate() {
if (this.temp.salesPolicy === '优惠' && this.temp.discountType !== '赠送优惠') {
this.$message({ showClose: true, type: 'error', message: '因政策类别为优惠,则优惠包类别只能选择赠送优惠' })
return
}
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.disabled = true
if (this.dialogStatus === 'add') {
save(this.temp).then((response) => {
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
})
} else {
this.temp.depositVehicleList = this.list;
this.temp.staffSid = this.YongHuid.staffSid;
this.temp.orgSid = this.YongHuid.organizationSid;
this.temp.orgName = this.orgName;
this.temp.staffName = this.staffName;
this.temp.userSid = window.sessionStorage.getItem('userSid')
//
submitVehicleApprove(this.temp).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '提交成功',
type: 'success',
duration: 2000,
})
this.handleReturn('true')
} else {
this.$notify({
title: '提交失败',
message: response.msg,
type: 'error',
})
}, '*')
}
})
} else {
update(this.temp).then((response) => {
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
})
}, '*')
}
})
}
}
})
},
//
handleSubmit() {
if (this.temp.salesPolicy === '优惠' && this.temp.discountType !== '赠送优惠') {
this.$message({ showClose: true, type: 'error', message: '因政策类别为优惠,则优惠包类别只能选择赠送优惠' })
return
}
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.disabled = true
submitVehicleApply(this.temp).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
})
},
//
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist');
this.temp.sid = ''; // SID
this.temp = {
sid: '',
billNo: '',
createDate: '',
nodeState: '',
}
this.list = []
this.$refs['dataForm'].resetFields()
this.$emit('doback')
},
},
})
}
}
}
</script>
<style scoped>
.tit {
margin: 20px 0 35px 0;
padding: 10px 0 0 0;
border-bottom: 0 !important;
}
.times {
display: flex;
flex-direction: row;
justify-content: space-around;
padding: 30px 0 10px 0;
margin: 0 auto 0px auto;
width: 70%;
font-size: 14px;
}
/deep/ .el-select {
width: 80%;
}
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
/deep/ .el-select {
width: 80%;
}
</style>

13
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEnd.vue

@ -1,13 +0,0 @@
<template>
</template>
<script>
export default {
name: "xiaoshouzhengceEnd"
}
</script>
<style scoped>
</style>

13
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceInfo.vue

@ -1,13 +0,0 @@
<template>
</template>
<script>
export default {
name: "xiaoshouzhengceInfo"
}
</script>
<style scoped>
</style>

232
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceYiBanInfo.vue

@ -0,0 +1,232 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>销售政策申请详情</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<div class="titwu">销售政策申请</div>
<el-form ref="dataForm" :model="temp" class="formadd">
<el-row class="bordertopline">
<el-col :span="4" class="tleftb">
<span>政策类别</span>
</el-col>
<el-col :span="4">
<el-form-item>{{ temp.salesPolicy }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包类别</span>
</el-col>
<el-col :span="4">
<el-form-item>{{ temp.discountType }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包名称</span>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ temp.projectName }}</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>{{ temp.projectCost }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠包价值()</span>
</el-col>
<el-col :span="4">
<el-form-item>{{ temp.discountMoney }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>优惠项目说明</span>
</el-col>
<el-col :span="4">
<el-form-item>
{{ temp.discountExplain }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>有效期</span>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
{{ temp.effectiveDate }}
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>是否生效</span>
</el-col>
<el-col :span="12">
<el-form-item>{{ temp.isEmploy === '1' ? '是' : '否' }}</el-form-item>
</el-col>
</el-row>
<div class="title" v-show="temp.salesPolicyKey === '0001'">
<div>享受促销政策的车辆列表</div>
</div>
<el-table :key="tableKey" v-show="temp.salesPolicyKey === '0001'" :data="temp.baseDiscountpackageVehs" :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" width="200">
<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.vehModelName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.libraryAge }}</span>
</template>
</el-table-column>
<el-table-column label="买断状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}<span>({{ scope.row.vehicleNum }})</span></span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</span>
</template>
</el-table-column>
<el-table-column label="全款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedQKPrice }}</span>
</template>
</el-table-column>
<el-table-column label="贷款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedDKPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import { fetchSid, revokeProcess } from '@/api/jichuxinxi/salepolicy'
export default {
name: 'xiaoshouzhengceYiBanInfo',
data() {
return {
disabled: true,
index: 0,
tableKey: 0,
list: [],
temp: {}, // ,
//
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: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
fetchSid(sid).then((response) => {
if (response.code) {
this.temp = response.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>
.titwu {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
</style>

331
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/relation/vehicleselect.vue

@ -0,0 +1,331 @@
<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="品牌:">
<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-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="系列:">
<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="变速箱:">
<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="驱动:">
<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="排放标准:">
<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="马力:">
<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="燃料:">
<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="版本:">
<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="车型:">
<el-input v-model="listQuery.params.vehicleAlias" placeholder="" clearable/>
</el-form-item>
<!-- <el-form-item label="采购订单编号:">-->
<!-- <el-input v-model="listQuery.params.orderingNo" placeholder="" clearable/>-->
<!-- </el-form-item>-->
<el-form-item label="快捷检索:">
<el-input v-model="listQuery.params.modelName" 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" 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.vehModelName }}</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.locationName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</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 { baseDisCountPackageGetVeh } from '@/api/jichuxinxi/salepolicy'
import { typeValues, brandDown } from '@/api/dictcommons/dictcommons'
export default {
name: 'vehicleSelect',
components: {
Pagination
},
data() {
return {
brand_list: [],
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: '',
userSid: '',
orderingNo: '',
orgSid: '',
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
baseDisCountPackageGetVeh(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.userSid = ''
this.listQuery.params.orderingNo = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push({
vehModelSid: element.vehModelSid,
vehModelName: element.vehModelName,
vehSid: element.vehSid,
vinNo: element.vinNo,
manufactorSettlementPrice: element.manufactorSettlementPrice,
priceDate: element.priceDate,
libraryAge: element.libraryAge,
settlementStatus: element.settlementStatus,
settlementStatusValue: element.settlementStatusValue,
guidedDKPrice: element.guidedDKPrice,
guidedQKPrice: element.guidedQKPrice
})
})
this.sids = aa
},
showData(value, createOrgSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].vehSid)
}
this.listQuery.params.vehSids = aa
} else {
this.listQuery.params.vehSids = []
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.orgSid = createOrgSid
brandDown({ useOrg: createOrgSid }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
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>

218
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengce.vue

@ -2,19 +2,19 @@
<div class="app-container">
<div v-show="viewState == 1">
<button-bar view-title="销售政策管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="webcon">
<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-select v-model="listQuery.params.salesPolicyKey" placeholder="请选择">
<el-select v-model="listQuery.params.salesPolicyKey" placeholder="请选择" filterable>
<el-option v-for="item in salesPolicy_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="优惠包类别">
<el-select v-model="listQuery.params.discountTypeKey" placeholder="请选择">
<el-select v-model="listQuery.params.discountTypeKey" placeholder="请选择" filterable>
<el-option v-for="item in discountType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
@ -24,20 +24,14 @@
</el-select>
</el-form-item>
<el-form-item label="有效期">
<div class="block">
<el-date-picker v-model="listQuery.params.getEffectiveStartDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</div>
<label></label>
<div class="block">
<el-date-picker v-model="listQuery.params.getEffectiveEndDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</div>
<el-date-picker v-model="listQuery.params.getEffectiveStartDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.getEffectiveEndDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter">查询</el-button>
<el-button type="primary" @click="handleReset">重置</el-button>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleFilter">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="handleReset">重置</el-button>
</div>
</div>
</div>
@ -51,16 +45,14 @@
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="150px" label="操作" align="center">
<template slot-scope="scope">
<div class="searchbtns"> <!--:disabled=""-->
<el-button size="small" type="primary" @click="changeNodeState(scope.row)">办理
</el-button>
<el-button size="small" type="primary" @click="handleCheck(scope.row)">查看</el-button>
</div>
<el-button size="small" type="primary" @click="changeNodeState(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
<el-button size="small" type="primary" @click="handleCheck(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.nodeState }}</span>
<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">
@ -100,7 +92,7 @@
</el-table-column>
<el-table-column label="是否生效" align="center">
<template slot-scope="scope">
<span>{{ scope.row.isEmploy }}</span>
<span>{{ scope.row.isEmploy == '1' ? '是' : '否' }}</span>
</template>
</el-table-column>
</el-table>
@ -114,29 +106,36 @@
</div>
<xiaoshouzhengce-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getList"></xiaoshouzhengce-add>
<xiaoshouzhengce-info v-show="viewState == 4" ref="divinfo" @doback="resetState"></xiaoshouzhengce-info>
<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 {deleteBySids, selectSalesOrderList, typeValues} from '@/api/jichuxinxi/salepolicy'
import { deleteBySids, listPage } from '@/api/jichuxinxi/salepolicy'
import { typeValues } from '@/api/dictcommons/dictcommons'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import xiaoshouzhengceAdd from './xiaoshouzhengceAdd'
import xiaoshouzhengceInfo from './xiaoshouzhengceInfo'
import { getStorage } from '@/utils/auth'
export default {
name: "xiaoshouzhengce",
name: 'xiaoshouzhengce',
components: {
Pagination,
pageye,
ButtonBar,
xiaoshouzhengceAdd,
xiaoshouzhengceInfo,
xiaoshouzhengceInfo
},
data() {
return {
url: '',
dialogHeight: '80%',
centerDialogVisible: false,
btndisabled: false,
btnList: [
{
@ -146,13 +145,6 @@ export default {
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'submit',
btnKey: 'doSubmit',
btnLabel: '提交'
},
{
type: 'danger',
size: 'small',
@ -190,7 +182,7 @@ export default {
listLoading: false,
listQuery: {
current: 1,
size: 20,
size: 5,
params: {
discountTypeKey: '', // key
getEffectiveStartDate: '', //
@ -198,16 +190,13 @@ export default {
salesPolicyKey: '', // key
staffSid: window.sessionStorage.getItem('staffSid')
}
},
submitDto: {
businessSid: '',
userSid: window.sessionStorage.getItem('userSid')
},
nodeState: ''
}
}
},
mounted() {
this.$refs["btnbar"].setButtonList(this.btnList)
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
@ -216,15 +205,41 @@ export default {
this.getList()
},
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)))
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doSubmit':
this.doSubmit()
break
case 'doDel':
this.doDel()
break
@ -255,7 +270,7 @@ export default {
handleReset() {
this.listQuery = {
current: 1,
size: 10,
size: 5,
params: {
discountTypeKey: '', // key
getEffectiveStartDate: '', //
@ -314,13 +329,8 @@ export default {
},
//
changeNodeState(row) {
console.log('111', row)
// if (row.flowState === 0) {
this.viewState = 3
this.$refs['divadd'].showEdit(row.sid)
// } else {
// return
// }
},
//
handleCheck(row) {
@ -337,7 +347,7 @@ export default {
//
getList() {
this.listLoading = true
selectSalesOrderList(this.listQuery).then((response) => {
listPage(this.listQuery).then((response) => {
this.listLoading = false
if (
response.code === '200' &&
@ -346,13 +356,6 @@ export default {
) {
this.list = response.data.records
this.total = response.data.total
for (var i = 0; i < this.list.length; i++){
if (this.list[i].isEmploy == '1') {
this.list[i].isEmploy = '是'
} else if (this.list[i].isEmploy == '0') {
this.list[i].isEmploy = '否'
}
}
} else {
this.list = []
this.total = 0
@ -411,112 +414,17 @@ export default {
showClose: true,
message: '请选择至少一条记录!',
type: 'error'
});
})
return
}
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route);
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
//
doSubmit(row) {
// // if (this.sids.length == 1) {
// this.$confirm('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// this.submitDto.businessSid = row.sid
// submitApprove(this.submitDto).then((response) => {
// if (response.code === '200') {
// this.updateDto.nodeState = response.data.nodeState
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000,
// })
// //
// this.updateDto.sid = row.sid
// updateState(this.updateDto).then((response) => {
// if (response.code === '200') {
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000,
// })
// this.getList()
// } else {
// this.$notify({
// title: '',
// message: response.msg,
// type: 'error',
// })
// }
// })
// } else {
// this.$notify({
// title: '',
// message: response.msg,
// type: 'error',
// })
// }
// })
// })
// // } else if (this.sids.length == 0) {
// // this.$notify({
// // title: '',
// // type: 'error',
// // })
// // } else if (this.sids.length > 1) {
// // this.$notify({
// // title: '',
// // type: 'error',
// // })
// // }
},
}
}
}
</script>
<style scoped>
/* .listcon{height: calc(100vh - 480px);overflow-y: auto;overflow-x: hidden;} */
.el-input__icon {
width: 40px;
}
.el-form-item .el-form-item__label {
width: 100% !important;
}
.block {
display: inline-block;
}
.el-form-item__content label {
padding: 0 5px;
}
.searchbtn {
border: #2cab69 1px solid;
color: #2cab69;
}
.btn {
padding: 15px 0 15px 0;
border: 1px solid #e0e3eb;
background: white;
}
.tab-header {
background-color: #edf1f7;
padding: 8px 20px;
margin-bottom: 0 !important;
}
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
</style>

442
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceAdd.vue

@ -1,24 +1,22 @@
<template>
<div class="app-container">
<div>
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="FormLoading" @click="handleCreate()">保存</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleCreate()">保存</el-button>
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd">
<div class="tit">
销售政策申请
</div>
<div class="titwu">销售政策申请</div>
<el-form ref="dataForm" :model="temp" class="formadd">
<el-row class="bordertopline">
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">政策类别</span></el-form-item>
<span>政策类别</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-select v-model="temp.salesPolicy" placeholder="请选择" @change="salesPolicyChange">
<el-option v-for="item in salesPolicy_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
@ -26,21 +24,19 @@
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包类别</span></el-form-item>
<span>优惠包类别</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-select v-model="temp.discountType" placeholder="请选择" @change="discountTypeChange">
<el-option v-for="item in discountType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包名称</span></el-form-item>
<span>优惠包名称</span>
</el-col>
<el-col :span="20" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.projectName" class="addinputw" placeholder="" clearable/>
</el-form-item>
@ -48,29 +44,25 @@
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包成本()</span></el-form-item>
<span>优惠包成本()</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.projectCost" class="addinputw" placeholder="" clearable
@keyup.native="temp.projectCost = oninput(temp.projectCost,2)"/>
<el-input v-model="temp.projectCost" class="addinputw" placeholder="" clearable @keyup.native="oninput"/>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包价值()</span></el-form-item>
<span>优惠包价值()</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.discountMoney" class="addinputw" placeholder="" clearable
@keyup.native="temp.discountMoney = oninput(temp.discountMoney,2)"/>
<el-input v-model="temp.discountMoney" class="addinputw" placeholder="" clearable @keyup.native="oninput"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠项目说明</span></el-form-item>
<span>优惠项目说明</span>
</el-col>
<el-col :span="20" class="trightb">
<el-col :span="4">
<el-form-item>
<el-input v-model="temp.discountExplain" class="addinputw" placeholder="" clearable/>
</el-form-item>
@ -78,157 +70,187 @@
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">有效期</span></el-form-item>
<span>有效期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<el-date-picker v-model="temp.effectiveDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
<el-date-picker v-model="temp.effectiveDate" type="date" class="addinputw" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">是否生效</span></el-form-item>
<span>是否生效</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="12">
<el-form-item>
<el-radio v-model="temp.isEmploy" label="1"></el-radio>
<el-radio v-model="temp.isEmploy" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<div class="title" v-show="temp.salesPolicyKey === '0001'">
<div>享受促销政策的车辆列表</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleSelect()">选择</el-button>
</div>
</div>
<el-table :key="tableKey" v-show="temp.salesPolicyKey === '0001'" :data="temp.baseDiscountpackageVehs" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<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="200">
<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.vehModelName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.libraryAge }}</span>
</template>
</el-table-column>
<el-table-column label="买断状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</span>
</template>
</el-table-column>
<el-table-column label="全款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedQKPrice }}</span>
</template>
</el-table-column>
<el-table-column label="贷款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedDKPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<vehicle v-show="viewState == 2" ref="divVehicle" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import { save, update, fetchSid, typeValues } from '@/api/jichuxinxi/salepolicy'
import { loginDetails } from '@/api/dictcommons/basemanufacturer'
import { getStorage } from '@/utils/auth'
import { save, update, fetchSid, submitVehicleApply } from '@/api/jichuxinxi/salepolicy'
import { typeValues, getPathSidByUserSid, fetchBySid } from '@/api/dictcommons/dictcommons'
import vehicle from './relation/vehicleselect'
export default {
name: 'xiaoshouzhengceAdd',
components: {
vehicle
},
data() {
return {
viewTitle: '',
viewState: 1,
tableKey: 0,
index: 0,
disabled: false, //
// ---------
YongHuid: [],
stateId: '0',
FormLoading: false,
listLoading: false,
list: [],
salesPolicy_list: [], //
discountType_list: [], //
temp: {
projectName: '',
discountMoney: '', //
discountType: '', //
discountTypeKey: '', // key
effectiveDate: '', //
isEmploy: '1', // 1 0
orderSid: '', // sid
salesPolicy: '', //
salesPolicyKey: '', // key
sid: '', // sid
sid: '',
discountTypeKey: '',
discountType: '',
discountMoney: '',
discountExplain: '',
userSid: window.sessionStorage.getItem('userSid')
}, //
textMap: {
update: '修改',
create: '创建'
},
submitDto: {
businessSid: '',
userSid: window.sessionStorage.getItem('userSid')
projectName: '',
projectCost: '',
salesPolicy: '',
salesPolicyKey: '',
effectiveDate: '',
isEmploy: '',
useOrg: '',
useOrgName: '',
createBySid: '',
staffSid: '',
instanceId: '', // ID
taskId: '', // ID
baseDiscountpackageVehs: []
},
xuniSid: '',
mobile: '',
orgName: '',
staffName: '',
_userSid: '',
deposit_list: [],
customerName: [],
tificateT: [],
dnumbDate: [],
dialogStatus: '', //
rules: {}
// ------------------------------------
}
},
created() {
//
this.init()
},
methods: {
init() {
var token = getStorage()
loginDetails(token).then((response) => {
if (response.code === '200') {
this.YongHuid = response.data
this.orgName = this.YongHuid.departmentName
this.staffName = this.YongHuid.name
this._userSid = this.YongHuid.sid
console.log('8888', this.YongHuid)
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
if (resp.success) {
this.temp.useOrg = resp.data
fetchBySid(resp.data).then((res) => {
if (res.success) {
this.temp.useOrgName = res.data.name
}
})
}
})
this.getType()
},
//
oninput(val, limit = 0) {
val = val.replace(/[^\d.]/g, ""); //
val = val.replace(/^00/, "0."); //0
val = val.replace(/^\./g, "0."); //0.
val = val.replace(/\.{2,}/g, "."); //
val = val.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); //
/^0\d+/.test(val) ? val = val.slice(1) : ''; //0
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
const reg = new RegExp(str)
if (limit === 0) {
//
val = val.replace(reg, '$1')
} else {
//
val = val.replace(reg, '$1.$2')
oninput(e) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
return val
},
showAdd() {
this.init()
this.getType()
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'add'
this.temp.createBySid = window.sessionStorage.getItem('userSid')
this.temp.staffSid = window.sessionStorage.getItem('staffSid')
this.viewTitle = '【新增】销售政策申请'
},
showEdit(sid) {
this.getType()
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.temp.sid = sid
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】销售政策申请'
console.log('编辑页面', sid)
fetchSid(sid).then((response) => {
if (response.code) {
this.temp = response.data
this.temp.staffSid = window.sessionStorage.getItem('staffSid')
}
})
},
//
getType() {
typeValues({
type: 'discountPolicyType'
}).then((res) => {
if (res.code === '200') {
typeValues({ type: 'discountPolicyType' }).then((res) => {
if (res.success) {
this.salesPolicy_list = res.data
console.log('下拉框请求政策类别', this.salesPolicy_list)
}
})
typeValues({
type: 'discountPackageType'
}).then((res) => {
if (res.code === '200') {
typeValues({ type: 'discountPackageType' }).then((res) => {
if (res.success) {
this.discountType_list = res.data
console.log('下拉框请求优惠包类别', this.discountType_list)
}
@ -271,146 +293,109 @@ export default {
this.temp.discountTypeKey = bb.key
console.log('name', this.temp.discountType)
},
handleSelect() {
this.viewState = 2
this.$refs['divVehicle'].showData(this.temp.baseDiscountpackageVehs, this.temp.useOrg)
},
//
dataDelete(index) {
this.temp.baseDiscountpackageVehs.splice(index, 1)
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.temp.baseDiscountpackageVehs.push({
sid: '',
vehModelSid: e.vehModelSid,
vehModelName: e.vehModelName,
vehSid: e.vehSid,
vinNo: e.vinNo,
manufactorSettlementPrice: e.manufactorSettlementPrice,
priceDate: e.priceDate,
libraryAge: e.libraryAge,
settlementStatus: e.settlementStatus,
settlementStatusValue: e.settlementStatusValue,
guidedDKPrice: e.guidedDKPrice,
guidedQKPrice: e.guidedQKPrice,
mainSid: ''
})
})
}
},
closePage() {
this.viewState = 1
},
// ------------ ------------
//
handleCreate() {
if (this.temp.salesPolicy === '优惠' && this.temp.discountType !== '赠送优惠') {
this.$message({ showClose: true, type: 'error', message: '因政策类别为优惠,则优惠包类别只能选择赠送优惠' })
return
}
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
this.disabled = true
if (this.dialogStatus === 'add') {
this.temp.staffSid = this.YongHuid.staffSid
this.temp.orgName = this.orgName
this.temp.staffName = this.staffName
this.temp.orgSid = this.YongHuid.organizationSid
this.temp.userSid = window.sessionStorage.getItem('userSid')
save(this.temp).then((response) => {
this.FormLoading = false
if (response.code === '200') {
this.xuniSid = response.data
// this.disabled = false
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
// this.$emit('doback')
} else {
this.$notify({
title: '提示',
message: '添加失败',
type: 'error',
duration: 2000
})
}
})
} else {
this.temp.staffSid = this.YongHuid.staffSid
this.temp.orgSid = this.YongHuid.organizationSid
this.temp.orgName = this.orgName
this.temp.staffName = this.staffName
this.temp.userSid = window.sessionStorage.getItem('userSid')
update(this.temp).then((response) => {
console.log('response', response)
this.FormLoading = false
if (response.code === '200') {
this.$notify({
title: '提示',
message: '修改成功',
type: 'success',
duration: 2000
})
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.$notify({
title: '失败',
message: '修改失败',
type: 'error'
})
}
})
}
}
})
},
//
handleSubmit() {
// this.$confirm('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// this.$refs['dataForm'].validate((valid) => {
// if (valid) {
// this.FormLoading = true
// if (this.stateId === '0') {
// this.temp.staffSid = this.YongHuid.staffSid
// this.temp.orgName = this.orgName
// this.temp.staffName = this.staffName
// this.temp.orgSid = this.YongHuid.organizationSid
// this.temp.userSid = window.sessionStorage.getItem('userSid')
// console.log('sid', this.temp.sid)
// //
// submitVehicleApprove(this.temp).then((response) => {
// if (response.code === '200') {
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000
// })
// this.handleReturn('true')
// } else {
// this.$notify({
// title: '',
// message: response.msg,
// type: 'error'
// })
// }
// })
// } else {
// this.temp.staffSid = this.YongHuid.staffSid
// this.temp.orgSid = this.YongHuid.organizationSid
// this.temp.orgName = this.orgName
// this.temp.staffName = this.staffName
// this.temp.userSid = window.sessionStorage.getItem('userSid')
// //
// submitVehicleApprove(this.temp).then((response) => {
// if (response.code === '200') {
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000
// })
// this.handleReturn('true')
// } else {
// this.$notify({
// title: '',
// message: response.msg,
// type: 'error'
// })
// }
// })
// }
// }
// })
// })
if (this.temp.salesPolicy === '优惠' && this.temp.discountType !== '赠送优惠') {
this.$message({ showClose: true, type: 'error', message: '因政策类别为优惠,则优惠包类别只能选择赠送优惠' })
return
}
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.disabled = true
submitVehicleApply(this.temp).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '提交成功' })
this.handleReturn('true')
}
})
}
})
},
//
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.temp.sid = '' // SID
this.temp = {
discountExplain: '',
sid: '',
discountTypeKey: '',
discountType: '',
discountMoney: '',
discountExplain: '',
projectName: '',
discountType: '', //
discountTypeKey: '', // key
effectiveDate: '', //
isEmploy: '1', // 1 0
orderSid: '', // sid
salesPolicy: '', //
salesPolicyKey: '', // key
sid: '', // sid
userSid: ''
projectCost: '',
salesPolicy: '',
salesPolicyKey: '',
effectiveDate: '',
isEmploy: '',
useOrg: '',
useOrgName: '',
createBySid: '',
staffSid: '',
instanceId: '', // ID
taskId: '', // ID
baseDiscountpackageVehs: []
}
this.disabled = false
this.$refs['dataForm'].resetFields()
this.$emit('doback')
}
@ -419,27 +404,16 @@ export default {
</script>
<style scoped>
.tit {
margin: 20px 0 35px 0;
padding: 10px 0 0 0;
border-bottom: 0 !important;
}
.times {
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-around;
padding: 30px 0 10px 0;
margin: 0 auto 0px auto;
width: 70%;
font-size: 14px;
justify-content: space-between;
align-items: center;
}
/deep/ .el-select {
width: 80%;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
</style>

141
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshouzhengce/xiaoshouzhengceInfo.vue

@ -8,33 +8,25 @@
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd">
<div class="tit">
销售政策申请
</div>
<div class="titwu">销售政策申请</div>
<el-form ref="dataForm" :model="temp" class="formadd">
<el-row class="bordertopline">
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">政策类别</span></el-form-item>
<span>政策类别</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
{{ temp.salesPolicy }}
</el-form-item>
<el-col :span="4">
<el-form-item>{{ temp.salesPolicy }}</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包类别</span></el-form-item>
<span>优惠包类别</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
{{ temp.discountType }}
</el-form-item>
<el-col :span="4">
<el-form-item>{{ temp.discountType }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包名称</span></el-form-item>
<span>优惠包名称</span>
</el-col>
<el-col :span="20" class="trightb">
<el-col :span="4">
<el-form-item>
<span>{{ temp.projectName }}</span>
</el-form-item>
@ -42,27 +34,23 @@
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包成本()</span></el-form-item>
<span>优惠包成本()</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4">
<el-form-item>
<span>{{ temp.projectCost }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠包价值()</span></el-form-item>
<span>优惠包价值()</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
{{ temp.discountMoney }}
</el-form-item>
<el-col :span="4">
<el-form-item>{{ temp.discountMoney }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">优惠项目说明</span></el-form-item>
<span>优惠项目说明</span>
</el-col>
<el-col :span="20" class="trightb">
<el-col :span="4">
<el-form-item>
{{ temp.discountExplain }}
</el-form-item>
@ -70,24 +58,66 @@
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">有效期</span></el-form-item>
<span>有效期</span>
</el-col>
<el-col :span="8" class="trightb">
<el-col :span="4" class="trightb">
<el-form-item>
{{ temp.effectiveDate }}
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<el-form-item><span slot="label">是否生效</span></el-form-item>
<span>是否生效</span>
</el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<el-form-item>
{{ temp.isEmploy === '1' ? '是' : '否' }}
</el-form-item>
</el-form-item>
<el-col :span="12">
<el-form-item>{{ temp.isEmploy === '1' ? '是' : '否' }}</el-form-item>
</el-col>
</el-row>
<div class="title" v-show="temp.salesPolicyKey === '0001'">
<div>享受促销政策的车辆列表</div>
</div>
<el-table :key="tableKey" v-show="temp.salesPolicyKey === '0001'" :data="temp.baseDiscountpackageVehs" :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" width="200">
<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.vehModelName }}</span>
</template>
</el-table-column>
<el-table-column label="厂家入库日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="库龄(天)" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.libraryAge }}</span>
</template>
</el-table-column>
<el-table-column label="买断状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}<span>({{ scope.row.vehicleNum }})</span></span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.manufactorSettlementPrice }}</span>
</template>
</el-table-column>
<el-table-column label="全款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedQKPrice }}</span>
</template>
</el-table-column>
<el-table-column label="贷款销售指导价" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.guidedDKPrice }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
@ -103,39 +133,18 @@ export default {
return {
disabled: true,
index: 0,
edit: true,
visible: true,
FormLoading: false,
listLoading: false,
tableKey: 0,
list: [],
temp: {} //
}
},
created() {
},
methods: {
// ------------------
handleReturn(isreload) {
this.temp = {
amount: '', //
detail: '', //
discountName: '', //
discountType: '', //
discountTypeKey: '', // key
effectiveDate: '', //
isEmploy: '', // 1 0
orderSid: '', // sid
salesPolicy: '', //
salesPolicyKey: '', // key
sid: '', // sid
useOrg: '',
userSid: ''
}
handleReturn() {
this.$refs['dataForm'].resetFields()
this.$emit('doback')
},
showInfo(sid) {
console.log("详情打开", sid)
fetchSid(sid).then((response) => {
if (response.code) {
this.temp = response.data
@ -147,14 +156,4 @@ export default {
</script>
<style scoped>
.tit {
margin: 0 0 20px 0;
padding: 10px 0 0 0;
border-bottom: 0px !important;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
</style>

Loading…
Cancel
Save