14 changed files with 2087 additions and 866 deletions
@ -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> |
@ -1,13 +0,0 @@ |
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "xiaoshouzhengce" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -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) // url解码unescape()已从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> |
@ -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) // url解码unescape()已从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 !== '-') { |
|||
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 |
|||
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> |
|||
|
@ -1,13 +0,0 @@ |
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "xiaoshouzhengceEnd" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -1,13 +0,0 @@ |
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "xiaoshouzhengceInfo" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -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) // url解码unescape()已从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> |
@ -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> |
Loading…
Reference in new issue