11 changed files with 4230 additions and 0 deletions
@ -0,0 +1,197 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 待出库分页列表 已改
|
|||
export function listPage(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdelivered/unListPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 出库分页列表 已改
|
|||
export function pagerList(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/unListPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 保存和修改接口 已改
|
|||
export function saveOrUpdate(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/unSave', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 表单中的提交 已改
|
|||
export function submitInfo(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/submitUnDeliveredApply', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 出库列表批量删除 已改
|
|||
export function delBySids(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/delBySids', |
|||
method: 'DELETE', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 代办任务同意办理
|
|||
export function complete(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkComplete', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
// 代办任务驳回任务
|
|||
export function reject(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkReject', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
// 代办任务终止任务
|
|||
export function breakProcess(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkBreakProcess', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
// 代办任务撤回任务
|
|||
export function revokeProcess(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkRevokeProcess', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
// 代办任务加签任务
|
|||
export function delegate(data) { |
|||
return request({ |
|||
url: '/flowable/v2/flow/delegate', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
// 审批流程(驳回)获取下一环节
|
|||
export function getNextNodesForSubmit(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkGetNextNodesForSubmit', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
// 审批流程(驳回)获取上一环节
|
|||
export function getPreviousNodesForReject(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkGetPreviousNodesForReject', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 待出库车辆选择后--返回出库申请页面调用初始化
|
|||
export function getRetrievalApplyInfo(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdelivered/qkGetRetrievalApplyInfo', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 待出库车辆选择后--返回出库申请页面调用初始化
|
|||
export function getRetrievalApplyInfoBySid(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/qkGetRetrievalApplyDetails', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 补充待出库车辆选择后--返回出库申请页面调用--仅返回车辆列表信息
|
|||
export function selectInfo(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdelivered/qkSelectInfo', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 出库申请--车辆列表--查看挂车信息
|
|||
export function trailerList(data) { |
|||
return request({ |
|||
url: '/base/v1/basetrailer/trailerList', |
|||
method: 'get', |
|||
params: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 查看金融报价单
|
|||
export function selectQuotation(data) { |
|||
return request({ |
|||
url: '/base/v1/basevehicleout/selectQuotation', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
} |
|||
|
|||
// 下载金融报价单
|
|||
export function createjrbjdPdf(data) { |
|||
return request({ |
|||
url: '/base/v1/basevehicleout/createjrbjdPdf', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
} |
|||
|
@ -0,0 +1,424 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="欠款出库申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<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.paymentMethodKey" class="addinputw" clearable filterable placeholder="请选择"> |
|||
<el-option v-for="item in payType" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="合同编号"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="listQuery.params.name" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="发起日期"> |
|||
<el-date-picker v-model="listQuery.params.applyDateStart" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" clearable></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.applyDateEnd" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" clearable></el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">欠款出库申请列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class="listcon"> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" fit highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" align="center" width="50"/> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column fixed width="180" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button size="small" type="primary" :disabled="scope.row.nodeState === '待提交' ? false : scope.row.nodeState === '发起申请' ? false : true" @click="toEdit(scope.row)">办理 |
|||
</el-button> |
|||
<el-button size="small" type="primary" @click="toInfo(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" width="180px" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span> |
|||
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="单据编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.billNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售类型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span class="bluezi" v-if="scope.row.paymentMethodKey == '2'" @click="lookQuotation(scope.row)">{{ scope.row.paymentMethod }}</span> |
|||
<span v-else>{{ scope.row.paymentMethod }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合同编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.contractNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="客户名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.modelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="台数" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.num }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="发起日期" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.applyDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="申请人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.applyName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<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> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
<!-- 新增或编辑 --> |
|||
<debtreleaseAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getList"/> |
|||
<!-- 详情 --> |
|||
<debtreleaseInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" @reloadlist="getList"/> |
|||
<!-- --> |
|||
<financialquotationsheet v-show="viewState == 5" ref="divJRBJD" @doback="resetState"/> |
|||
<!-- 审批记录 --> |
|||
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center> |
|||
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { delBySids, pagerList } from '@/api/tesheshenpi/debtrelease' |
|||
import { typeValues, selectHaveMessage, getButtonPermissions } from '@/api/dictcommons/dictcommons' |
|||
import { getStorage } from '@/utils/auth' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import debtreleaseAdd from './debtreleaseAdd' |
|||
import debtreleaseInfo from './debtreleaseInfo' |
|||
import financialquotationsheet from '../../chukuguanli/chukubanli/relation/financialquotationsheet' |
|||
|
|||
export default { |
|||
name: 'QianKuanChuKu', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
debtreleaseAdd, |
|||
debtreleaseInfo, |
|||
financialquotationsheet |
|||
}, |
|||
data() { |
|||
return { |
|||
url: '', |
|||
dialogHeight: '80%', |
|||
centerDialogVisible: false, |
|||
btndisabled: false, |
|||
// 主页面:隐藏查询条件按钮 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
// 查询 ----------- |
|||
tableKey: 0, |
|||
payType: [], |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
multipleSelection: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
applyDateEnd: '', // 申请日期结束时间 |
|||
applyDateStart: '', // 申请日期开始时间 |
|||
applyName: '', // 申请人 |
|||
applySid: '', // 申请人sid |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
paymentMethodKey: '', |
|||
menuUrl: '', |
|||
orgPath: '' |
|||
} |
|||
}, |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
|
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
|||
window.addEventListener('message', this.handleMessage) |
|||
getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => { |
|||
if (res.success) { |
|||
for (var i = 0; i < res.data.length; i++) { |
|||
for (var k = 0; k < this.btnList.length; k++) { |
|||
if (res.data[i].buttonId === this.btnList[k].btnKey) { |
|||
this.btnList.splice(k, 1) |
|||
} |
|||
} |
|||
} |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
} |
|||
}) |
|||
}, |
|||
methods: { |
|||
async handleMessage(event) { |
|||
var code = '' |
|||
if (event.data.params !== null && event.data.params !== undefined) { |
|||
code = event.data.params.code |
|||
} |
|||
if (code === 1) { |
|||
this.init() |
|||
this.centerDialogVisible = false |
|||
} else if (code === 2) { |
|||
this.dialogHeight = event.data.params.data |
|||
this.setIframeHeight(document.getElementById('iframe')) |
|||
} |
|||
}, |
|||
closeIt() { |
|||
this.url = '' |
|||
this.centerDialogVisible = false |
|||
}, |
|||
setIframeHeight(iframe) { |
|||
iframe.height = this.dialogHeight |
|||
}, |
|||
flowRecord(row) { |
|||
this.centerDialogVisible = true |
|||
var params = { |
|||
deployId: row.procDefId, |
|||
procInsId: row.procInstId, |
|||
token: getStorage() |
|||
} |
|||
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params))) |
|||
}, |
|||
// ========== 初始化加载 ========== |
|||
init() { |
|||
typeValues({ type: 'purchaseType' }).then((res) => { |
|||
if (res.success) { |
|||
this.payType = res.data |
|||
} |
|||
}) |
|||
this.getList() |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// ========== 页面按钮功能 ========== |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
this.multipleSelection = row |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
console.log('sids数组', this.sids) |
|||
}, |
|||
// ========== 业务功能 ========== |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.applySid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
pagerList(this.listQuery).then(response => { // 拦截器 |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
applyDateEnd: '', // 申请日期结束时间 |
|||
applyDateStart: '', // 申请日期开始时间 |
|||
applyName: '', // 申请人 |
|||
applySid: '', // 申请人sid |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
paymentMethodKey: '', |
|||
menuUrl: '', |
|||
orgPath: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
toAdd() { |
|||
selectHaveMessage({ menuUrl: this.$route.path, orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|||
if (resp.success) { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
} |
|||
}) |
|||
}, |
|||
// 办理 |
|||
toEdit(row) { |
|||
if (row.allowModify) { |
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(row) |
|||
} else { |
|||
this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' }) |
|||
} |
|||
}, |
|||
// 打开查看 |
|||
toInfo(row) { |
|||
this.viewState = 4 |
|||
this.$refs['divInfo'].showInfo(row.sid) |
|||
}, |
|||
lookQuotation(row) { |
|||
this.viewState = 5 |
|||
this.$refs['divJRBJD'].showInfo(row) |
|||
}, |
|||
// 删除 |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
for (var i = 0; i < this.multipleSelection.length; i++) { |
|||
if (!this.multipleSelection[i].allowModify) { |
|||
this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' }) |
|||
return |
|||
} |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
delBySids(this.sids).then((resp) => { |
|||
loading.close() |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
this.getList() |
|||
} |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
// 编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// 关闭 |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,850 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleChoose()">选择车辆</el-button> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleSave()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleSubmit()">提交</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu">欠款出库申请</div> |
|||
<el-form ref="dataForm" :model="formobj" class="formaddcopy02" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyDept }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售专员</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.paymentMethod }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contractId }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.name }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.paymentMethodKey == '2'"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="icon">*</span>贷款人</div> |
|||
<el-form-item prop="loanName"> |
|||
<el-select v-model="formobj.loanName" class="addinputInfo" filterable placeholder="" @change="changeCustomer"> |
|||
<el-option v-for="item in customer_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanMobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费1合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorNameTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费2合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwoAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">车型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.price }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>实际购车人</div> |
|||
<el-form-item prop="typeKey"> |
|||
<el-radio-group class="addinputw" style="font-size: 1px" v-model="formobj.typeKey" @input="typeRadio"> |
|||
<el-radio label="0">订单客户</el-radio> |
|||
<el-radio label="1" v-show="formobj.paymentMethodKey == '2'">贷款人</el-radio> |
|||
<el-radio label="2">其他人</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="title" v-if="formobj.typeKey == '2'"> |
|||
<div>车辆信息</div> |
|||
<div> |
|||
<el-button size="mini" type="primary" @click="openUserInfo">批量录入实际购车人 |
|||
</el-button> |
|||
<el-button size="mini" type="danger" @click="clearUserInfo">批量置空实际购车人 |
|||
</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="titleOne" v-else> |
|||
<div>车辆信息</div> |
|||
</div> |
|||
<el-table :key="tableKey" v-loading="listLoading" ref="multipleTable" :data="formobj.carList" border style="width: 100%" :index="index" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50" :index="index + 1"/> |
|||
<el-table-column fixed align="center" label="序号" type="index" width="60"/> |
|||
<el-table-column fixed align="center" label="操作" type="index" width="280"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="danger" size="small" @click="handleDel(scope.$index)">删除</el-button> |
|||
<el-button type="primary" size="small" v-if="formobj.discountLeave.length > 0" @click="handleSelect(scope.row)">选择套餐</el-button> |
|||
<el-button type="primary" size="small" v-if="formobj.typeKey == '2'" @click="handleUpdateUser(scope.row)">修改购车人</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车架号" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.vin }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="挂车/上装" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span v-show="scope.row.showHandCarBtn" class="bluezi" @click="handleLook(scope.row)">查看</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="formobj.typeKey == '2'" class="bluezi" @click="lookUser(scope.row.realBuyer)">{{ scope.row.realBuyer.name }}</span> |
|||
<span v-else>{{ scope.row.realBuyer.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人联系电话" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="赠送套餐" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ price(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售折让" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-model="scope.row.discount" placeholder="" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" min-width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ remarks(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.zlStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.bankStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item> |
|||
<el-input class="addinputInfo" style="width: 90%" v-model="formobj.remarks" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>责任人担保承诺书</span></div> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" class="addinputInfo" v-model="image_list1" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>担保承诺书</span></div> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" class="addinputInfo" v-model="image_list2" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>车辆登记合同</span></div> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" class="addinputInfo" v-model="image_list3" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!-- 选择待出库车辆 --> |
|||
<selectVehicle v-show="viewState == 2" ref="divSelect" @doback="resetState" @backData="backData"/> |
|||
<!-- 录入实际购车人 --> |
|||
<userInfoAdd v-show="viewState == 3 || viewState == 4" ref="divAddByUser" @doback="resetState" @backUser="backUser"/> |
|||
<!-- 查看实际购车人 --> |
|||
<userInfoLook v-show="viewState == 5" ref="divInfoByUser" @doback="resetState"/> |
|||
<!-- 查看挂车信息 --> |
|||
<guacheInfo v-show="viewState == 6" ref="divCheInfo" @doback="resetState"/> |
|||
<!-- 选择优惠套餐 --> |
|||
<selectpackage v-show="viewState == 7" ref="divSelectPackAge" @backData="backPackAge" @doback="resetState"/> |
|||
<!-- 查看上装信息 --> |
|||
<shangzhuangInfo v-show="viewState == 8" ref="divZhuangInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { saveOrUpdate, submitInfo, getRetrievalApplyInfo, selectInfo, trailerList } from '@/api/tesheshenpi/debtrelease' |
|||
import { selectCustomerList } from '@/api/dictcommons/dictcommons' |
|||
import upload from '@/components/uploadFile/upload' |
|||
import selectVehicle from './relation/selectVehicle' |
|||
import userInfoAdd from '../../chukuguanli/chukubanli/relation/userInfoAdd' |
|||
import userInfoLook from '../../chukuguanli/chukubanli/relation/userInfoLook' |
|||
import guacheInfo from '../../chukuguanli/chukubanli/relation/guacheInfo' |
|||
import selectpackage from '../../chukuguanli/chukubanli/relation/selectpackage' |
|||
import shangzhuangInfo from '../../chukuguanli/chukubanli/relation/shangzhuangInfo' |
|||
|
|||
export default { |
|||
name: 'QianKuanChuKuAdd', |
|||
components: { |
|||
upload, |
|||
selectVehicle, |
|||
userInfoAdd, |
|||
userInfoLook, |
|||
guacheInfo, |
|||
selectpackage, |
|||
shangzhuangInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
tableKey: 0, |
|||
index: 0, |
|||
createBtn: false, // 保存、提交按钮状态 |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
// === |
|||
listLoading: false, |
|||
customer_list: [], |
|||
list: [], |
|||
accept: '.jpg,.jpeg,.png,.JPG,.JPEG', |
|||
image_list1: [], |
|||
image_list2: [], |
|||
image_list3: [], |
|||
formobj: { |
|||
carFileList: [], |
|||
carList: [], |
|||
configSid: '', |
|||
contractId: '', |
|||
createTime: '', |
|||
customerSid: '', |
|||
danFileList: [], |
|||
loanMobile: '', |
|||
loanName: '', |
|||
loanSid: '', |
|||
mobile: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
name: '', |
|||
orgPath: '', |
|||
paymentMethod: '', |
|||
paymentMethodKey: '', |
|||
pcApplyDept: '', |
|||
pcApplyDeptSid: '', |
|||
pcApplyName: '', |
|||
pcApplySid: '', |
|||
pcDistributorName: '', |
|||
pcDistributorNameTwo: '', |
|||
pcDistributorPrice: '', |
|||
pcDistributorPriceAll: '', |
|||
pcDistributorPriceTwo: '', |
|||
pcDistributorPriceTwoAll: '', |
|||
price: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
sid: '', |
|||
staffDeptName: '', |
|||
staffDeptSid: '', |
|||
staffName: '', |
|||
pcStaffSid: '', |
|||
promiseList: [], |
|||
taskId: '', |
|||
type: '', |
|||
typeKey: '', |
|||
userSid: '', |
|||
discountLeave: [] |
|||
}, |
|||
arguments: { |
|||
list: [], |
|||
userSid: '', |
|||
orgPath: '', |
|||
contractId: '', |
|||
outboundSid: '', |
|||
pcView: true |
|||
}, |
|||
arguments_params: { |
|||
contractNo: '', |
|||
vinSids: [] |
|||
}, |
|||
vinNo_list: [], // 车辆列表--批量勾选的车架号 |
|||
index_list: [], // 车辆列表--批量勾选的序号 |
|||
rules: { |
|||
typeKey: [{ required: true, message: '请选择实际购车人', trigger: 'change' }], |
|||
loanName: [{ required: true, message: '贷款人不能为空', trigger: 'change' }] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
showAdd() { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【新增】欠款出库申请' |
|||
}, |
|||
showEdit(row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【编辑】欠款出库申请' |
|||
this.arguments.outboundSid = row.sid |
|||
getRetrievalApplyInfo(this.arguments).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.code === '20005') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: resp.msg, |
|||
duration: 5000 |
|||
}) |
|||
} |
|||
this.formobj = resp.data |
|||
this.formobj.instanceId = resp.data.procInstId |
|||
if (this.formobj.promiseList.length > 0) { |
|||
this.formobj.promiseList.forEach((e) => { |
|||
this.image_list1.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
if (this.formobj.danFileList.length > 0) { |
|||
this.formobj.danFileList.forEach((e) => { |
|||
this.image_list2.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
if (this.formobj.carFileList.length > 0) { |
|||
this.formobj.carFileList.forEach((e) => { |
|||
this.image_list3.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
selectCustomerList({ staffSid: this.formobj.pcStaffSid, userSid: '', orgPath: '' }).then((resp) => { |
|||
if (resp.success) { |
|||
this.customer_list = resp.data |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// ------------ 页面跳转以及数据获取 ------------ |
|||
// 选择待出库车辆 |
|||
handleChoose() { |
|||
this.viewState = 2 |
|||
this.$refs['divSelect'].showData(this.formobj.carList, this.formobj.contractId) |
|||
}, |
|||
// 删除车辆信息 |
|||
handleDel(index) { |
|||
for (var i = 0; i < this.formobj.discountLeave.length; i++) { |
|||
for (var k = 0; k < this.formobj.carList[index].discountUse.length; k++) { |
|||
if (this.formobj.discountLeave[i].discountSid === this.formobj.carList[index].discountUse[k].discountSid) { |
|||
this.formobj.discountLeave[i].discountLeaveNum = parseInt(this.formobj.discountLeave[i].discountLeaveNum) + parseInt(this.formobj.carList[index].discountUse[k].discountNum) |
|||
} |
|||
} |
|||
} |
|||
this.formobj.carList.splice(index, 1) |
|||
}, |
|||
// 选择待出库车辆 -- 返回数据 |
|||
backData(value) { |
|||
this.viewState = 1 |
|||
this.arguments.userSid = window.sessionStorage.getItem('userSid') |
|||
this.arguments.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.arguments.contractId = value[0].contractNo |
|||
this.arguments_params.contractNo = value[0].contractNo |
|||
const aa = [] |
|||
value.forEach((e) => { |
|||
aa.push(e.vinSid) |
|||
}) |
|||
this.arguments.list = aa |
|||
this.arguments_params.vinSids = aa |
|||
// 根据合同编号是否存在--判断是否为首次选择车辆,如果为否,则只需要返回车辆信息,并将信息补充到申请中的车辆列表 |
|||
if (this.formobj.contractId === '' || this.formobj.contractId === null) { |
|||
getRetrievalApplyInfo(this.arguments).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
selectCustomerList({ staffSid: this.formobj.pcStaffSid, userSid: '', orgPath: '' }).then((resp) => { |
|||
if (resp.success) { |
|||
this.customer_list = resp.data |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
} else { |
|||
selectInfo(this.arguments_params).then((resp) => { |
|||
if (resp.success) { |
|||
for (var k = 0; k < resp.data.length; k++) { |
|||
this.formobj.carList.push(resp.data[k]) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
changeCustomer(value) { |
|||
const choose = this.customer_list.filter((item) => item.name === value) |
|||
this.formobj.loanSid = choose[0].sid |
|||
this.formobj.loanMobile = choose[0].mobile |
|||
}, |
|||
// 选择套餐 |
|||
handleSelect(row) { |
|||
this.viewState = 7 |
|||
this.$refs['divSelectPackAge'].showData(row.discountUse, this.formobj.discountLeave, row.vinSid) |
|||
}, |
|||
backPackAge(value, vinSid) { |
|||
this.viewState = 1 |
|||
// var value = JSON.parse(JSON.stringify(val)) |
|||
for (var i = 0; i < value.length; i++) { |
|||
// 循环计算最外层的套餐数量 |
|||
for (var k = 0; k < this.formobj.discountLeave.length; k++) { |
|||
if (value[i].discountSid === this.formobj.discountLeave[k].discountSid && this.formobj.discountLeave[k].discountLeaveNum !== '0' && this.formobj.discountLeave[k].discountLeaveNum !== 0) { |
|||
if (value[i].discountNum == '0') { |
|||
this.formobj.discountLeave[k].discountLeaveNum = value[i].discountLeaveNum |
|||
} else { |
|||
this.formobj.discountLeave[k].discountLeaveNum = parseInt(this.formobj.discountLeave[k].discountLeaveNum) - parseInt(value[i].discountNum) |
|||
} |
|||
} |
|||
} |
|||
// 循环计算每辆车的套餐数量 |
|||
for (var n = 0; n < this.formobj.carList.length; n++) { |
|||
if (this.formobj.carList[n].vinSid === vinSid) { |
|||
for (var b = 0; b < this.formobj.carList[n].discountUse.length; b++) { |
|||
if (value[i].discountSid === this.formobj.carList[n].discountUse[b].discountSid) { |
|||
this.formobj.carList[n].discountUse[b].discountNum = value[i].discountNum |
|||
this.formobj.carList[n].discountUse[b].totalNum = parseInt(this.formobj.carList[n].discountUse[b].totalNum) - parseInt(value[i].discountNum) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
// 车辆信息表--赠送套餐 |
|||
price(row) { |
|||
var aa = 0 |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
aa = parseInt(aa) + (parseInt(row.discountUse[i].discountPrice) * parseInt(row.discountUse[i].discountNum)) |
|||
} |
|||
return aa |
|||
}, |
|||
// 车辆信息表--备注内容拼接(优惠套餐说明 + 赠送数量) |
|||
remarks(row) { |
|||
var aa = '' |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
if (row.discountUse[i].discountNum !== 0 && row.discountUse[i].discountNum !== '0') { |
|||
aa = aa + row.discountUse[i].discountName + row.discountUse[i].discountInfo + 'X' + row.discountUse[i].discountNum + ',' |
|||
} |
|||
} |
|||
if (aa !== '') { |
|||
aa = aa.substring(0, aa.lastIndexOf(',')) |
|||
} |
|||
return aa |
|||
}, |
|||
// 查看挂车详情 |
|||
handleLook(row) { |
|||
trailerList({ contractNo: this.formobj.contractId, vinSid: row.vinSid }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.list.length > 0) { |
|||
this.viewState = 6 |
|||
this.$refs['divCheInfo'].showInfo(resp.data) |
|||
} else { |
|||
this.viewState = 8 |
|||
this.$refs['divZhuangInfo'].showInfo(resp.data) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 批量勾选 |
|||
handleSelectionChange(row) { |
|||
console.log(row, 999) |
|||
const aa = [] |
|||
const bb = [] |
|||
row.forEach((e, i) => { |
|||
aa.push(e.realBuyer.vin) |
|||
}) |
|||
this.formobj.carList.forEach((e, i) => { |
|||
aa.forEach((element) => { |
|||
if (e.realBuyer.vin === element) { |
|||
bb.push(i) |
|||
} |
|||
}) |
|||
}) |
|||
this.vinNo_list = aa |
|||
this.index_list = bb |
|||
}, |
|||
// 实际购车人 |
|||
typeRadio(val) { |
|||
if (val === '0') { |
|||
this.formobj.type = '订单客户' |
|||
for (var i = 0; i < this.formobj.carList.length; i++) { |
|||
this.formobj.carList[i].realBuyer.address = '' |
|||
this.formobj.carList[i].realBuyer.contacts = '' |
|||
this.formobj.carList[i].realBuyer.customerType = '' |
|||
this.formobj.carList[i].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[i].realBuyer.idNumber = '' |
|||
this.formobj.carList[i].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[i].realBuyer.mobile = this.formobj.mobile |
|||
this.formobj.carList[i].realBuyer.name = this.formobj.name |
|||
this.formobj.carList[i].realBuyer.remarks = '' |
|||
} |
|||
} else if (val === '1') { |
|||
this.formobj.type = '贷款人' |
|||
for (var k = 0; k < this.formobj.carList.length; k++) { |
|||
this.formobj.carList[k].realBuyer.address = '' |
|||
this.formobj.carList[k].realBuyer.contacts = '' |
|||
this.formobj.carList[k].realBuyer.customerType = '' |
|||
this.formobj.carList[k].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[k].realBuyer.idNumber = '' |
|||
this.formobj.carList[k].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[k].realBuyer.mobile = this.formobj.loanMobile |
|||
this.formobj.carList[k].realBuyer.name = this.formobj.loanName |
|||
this.formobj.carList[k].realBuyer.remarks = '' |
|||
} |
|||
} else { |
|||
this.formobj.type = '其他人' |
|||
for (var m = 0; m < this.formobj.carList.length; m++) { |
|||
this.formobj.carList[m].realBuyer.address = '' |
|||
this.formobj.carList[m].realBuyer.contacts = '' |
|||
this.formobj.carList[m].realBuyer.customerType = '' |
|||
this.formobj.carList[m].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[m].realBuyer.idNumber = '' |
|||
this.formobj.carList[m].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[m].realBuyer.mobile = '' |
|||
this.formobj.carList[m].realBuyer.name = '' |
|||
this.formobj.carList[m].realBuyer.remarks = '' |
|||
} |
|||
} |
|||
}, |
|||
// 批量录入实际购车人 |
|||
openUserInfo() { |
|||
if (this.vinNo_list.length > 0) { |
|||
this.viewState = 3 |
|||
this.$refs['divAddByUser'].showAdd(this.formobj.contractId, this.vinNo_list.join(',')) |
|||
} else { |
|||
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行批量录入实际购车人的操作' }) |
|||
return |
|||
} |
|||
}, |
|||
// 修改实际购车人信息 |
|||
handleUpdateUser(row) { |
|||
this.viewState = 4 |
|||
const cc = [] |
|||
this.formobj.carList.forEach((e, i) => { |
|||
if (e.realBuyer.vin === row.realBuyer.vin) { |
|||
cc.push(i) |
|||
} |
|||
}) |
|||
this.index_list = cc |
|||
this.$refs['divAddByUser'].showEdit(row.realBuyer, this.formobj.contractId) |
|||
}, |
|||
// 批量置空实际购车人 |
|||
clearUserInfo() { |
|||
if (this.index_list.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行批量置空实际购车人的操作' }) |
|||
return |
|||
} |
|||
for (var k = 0; k < this.index_list.length; k++) { |
|||
this.formobj.carList[this.index_list[k]].realBuyer.address = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.contacts = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerType = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.idNumber = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.mobile = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.name = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.remarks = '' |
|||
} |
|||
this.index_list = [] |
|||
this.vinNo_list = [] |
|||
this.$refs.multipleTable.clearSelection() |
|||
}, |
|||
// 录入实际购车人--返回数据 |
|||
backUser(value) { |
|||
for (var k = 0; k < this.index_list.length; k++) { |
|||
this.formobj.carList[this.index_list[k]].realBuyer.address = value.address |
|||
this.formobj.carList[this.index_list[k]].realBuyer.contacts = value.contacts |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerType = value.customerType |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerTypeKey = value.customerTypeKey |
|||
this.formobj.carList[this.index_list[k]].realBuyer.idNumber = value.idNumber |
|||
this.formobj.carList[this.index_list[k]].realBuyer.isConfirmRealBuyer = value.isConfirmRealBuyer |
|||
this.formobj.carList[this.index_list[k]].realBuyer.mobile = value.mobile |
|||
this.formobj.carList[this.index_list[k]].realBuyer.name = value.name |
|||
this.formobj.carList[this.index_list[k]].realBuyer.remarks = value.remarks |
|||
} |
|||
this.index_list = [] |
|||
this.vinNo_list = [] |
|||
this.$refs.multipleTable.clearSelection() |
|||
}, |
|||
// 查看实际购车人信息 |
|||
lookUser(row) { |
|||
this.viewState = 5 |
|||
this.$refs['divInfoByUser'].showInfo(this.formobj.contractId, row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 添加数据 |
|||
handleSave() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
this.getUrl() |
|||
saveOrUpdate(this.formobj).then((response) => { |
|||
if (response.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch((e) => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 提交 |
|||
handleSubmit() { |
|||
if (this.formobj.carList.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '车辆信息表不能为空' }) |
|||
return |
|||
} |
|||
var sub = false |
|||
if (this.formobj.discountLeave.length > 0 && this.formobj.carList.length > 0) { |
|||
for (var i = 0; i < this.formobj.discountLeave.length; i++) { |
|||
if (this.formobj.discountLeave[i].discountLeaveNum != 0) { |
|||
sub = true |
|||
break |
|||
} |
|||
} |
|||
} |
|||
if (sub) { |
|||
this.$confirm('存在未赠送的套餐,是否需要赠送', '提示', { |
|||
confirmButtonText: '否', |
|||
cancelButtonText: '是', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.submit() |
|||
}) |
|||
} else { |
|||
this.submit() |
|||
} |
|||
}, |
|||
submit() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
this.getUrl() |
|||
this.formobj.procInsId = this.formobj.procInstId |
|||
submitInfo(this.formobj).then((response) => { |
|||
if (response.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.createBtn = false |
|||
} |
|||
}).catch(e => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getUrl() { |
|||
if (this.image_list1.length > 0) { |
|||
const aa = [] |
|||
for (var i = 0; i < this.image_list1.length; i++) { |
|||
aa.push(this.image_list1[i].url) |
|||
} |
|||
this.formobj.promiseList = aa |
|||
} else { |
|||
this.formobj.promiseList = [] |
|||
} |
|||
if (this.image_list2.length > 0) { |
|||
const bb = [] |
|||
for (var k = 0; k < this.image_list2.length; k++) { |
|||
bb.push(this.image_list2[k].url) |
|||
} |
|||
this.formobj.danFileList = bb |
|||
} else { |
|||
this.formobj.danFileList = [] |
|||
} |
|||
if (this.image_list3.length > 0) { |
|||
const cc = [] |
|||
for (var m = 0; m < this.image_list3.length; m++) { |
|||
cc.push(this.image_list3[m].url) |
|||
} |
|||
this.formobj.carFileList = cc |
|||
} else { |
|||
this.formobj.carFileList = [] |
|||
} |
|||
}, |
|||
// 返回 |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.$refs['dataForm'].resetFields() |
|||
this.formobj = { |
|||
carFileList: [], |
|||
carList: [], |
|||
configSid: '', |
|||
contractId: '', |
|||
createTime: '', |
|||
customerSid: '', |
|||
danFileList: [], |
|||
loanMobile: '', |
|||
loanName: '', |
|||
loanSid: '', |
|||
mobile: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
name: '', |
|||
orgPath: '', |
|||
paymentMethod: '', |
|||
paymentMethodKey: '', |
|||
pcApplyDept: '', |
|||
pcApplyDeptSid: '', |
|||
pcApplyName: '', |
|||
pcApplySid: '', |
|||
pcDistributorName: '', |
|||
pcDistributorNameTwo: '', |
|||
pcDistributorPrice: '', |
|||
pcDistributorPriceAll: '', |
|||
pcDistributorPriceTwo: '', |
|||
pcDistributorPriceTwoAll: '', |
|||
price: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
sid: '', |
|||
staffDeptName: '', |
|||
staffDeptSid: '', |
|||
staffName: '', |
|||
pcStaffSid: '', |
|||
promiseList: [], |
|||
taskId: '', |
|||
type: '', |
|||
typeKey: '', |
|||
userSid: '', |
|||
discountLeave: [] |
|||
} |
|||
this.image_list1 = [] |
|||
this.image_list2 = [] |
|||
this.image_list3 = [] |
|||
this.arguments = { |
|||
list: [], |
|||
userSid: '', |
|||
orgPath: '', |
|||
contractId: '', |
|||
outboundSid: '', |
|||
pcView: true |
|||
} |
|||
this.arguments_params = { |
|||
contractNo: '', |
|||
vinSids: [] |
|||
} |
|||
this.index_list = [] |
|||
this.vinNo_list = [] |
|||
this.createBtn = false |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.title { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.titleOne { |
|||
padding: 12px; |
|||
font-weight: bold; |
|||
font-size: 16px; |
|||
background-color: #0294D7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
} |
|||
.span-sty { |
|||
width: 120px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 110px !important; |
|||
} |
|||
.addinputw { |
|||
margin-left: 110px !important; |
|||
} |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 110px !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
</style> |
@ -0,0 +1,356 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>欠款出库申请详情</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu">欠款出库申请</div> |
|||
<el-form ref="dataForm" :model="formobj" class="formaddcopy02" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyDept }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售专员</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.paymentMethod }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contractId }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.name }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.paymentMethodKey == '2'"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">贷款人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanMobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费1合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorNameTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费2合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwoAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">车型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.price }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">实际购车人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.type }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="title"> |
|||
<div>车辆信息</div> |
|||
</div> |
|||
<el-table :key="tableKey" v-loading="listLoading" ref="multipleTable" :data="formobj.carList" border style="width: 100%" :index="index"> |
|||
<el-table-column fixed align="center" label="序号" type="index" :index="index + 1" width="60"/> |
|||
<el-table-column label="车架号" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.vin }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="挂车/上装" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span v-show="scope.row.showHandCarBtn" class="bluezi" @click="handleLook(scope.row)">查看</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="formobj.typeKey == '2'" class="bluezi" @click="lookUser(scope.row.realBuyer)">{{ scope.row.realBuyer.name }}</span> |
|||
<span v-else>{{ scope.row.realBuyer.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人联系电话" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="赠送套餐" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ price(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售折让" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.discount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" min-width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ remarks(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.zlStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.bankStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>责任人担保承诺书</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.promiseList" :key="index" :src="item" :preview-src-list="formobj.promiseList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>担保承诺书</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.danFileList" :key="index" :src="item" :preview-src-list="formobj.danFileList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>车辆登记合同</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.carFileList" :key="index" :src="item" :preview-src-list="formobj.carFileList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<user-info-look v-show="viewState == 2" ref="divUserInfo" @doback="resetState"/> |
|||
<guacheInfo v-show="viewState == 3" ref="divCheInfo" @doback="resetState"/> |
|||
<shangzhuangInfo v-show="viewState == 4" ref="divZhuangInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getRetrievalApplyInfoBySid, trailerList } from '@/api/tesheshenpi/debtrelease' |
|||
import userInfoLook from '../../chukuguanli/chukubanli/relation/userInfoLook' |
|||
import guacheInfo from '../../chukuguanli/chukubanli/relation/guacheInfo' |
|||
import shangzhuangInfo from '../../chukuguanli/chukubanli/relation/shangzhuangInfo' |
|||
|
|||
export default { |
|||
name: 'QianKuanChuKuInfo', |
|||
components: { |
|||
userInfoLook, |
|||
guacheInfo, |
|||
shangzhuangInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
tableKey: 0, |
|||
index: 0, |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
listLoading: false, |
|||
formobj: { |
|||
carFileList: [], |
|||
carList: [], |
|||
configSid: '', |
|||
contractId: '', |
|||
createTime: '', |
|||
customerSid: '', |
|||
danFileList: [], |
|||
loanMobile: '', |
|||
loanName: '', |
|||
loanSid: '', |
|||
mobile: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
name: '', |
|||
orgPath: '', |
|||
paymentMethod: '', |
|||
paymentMethodKey: '', |
|||
pcApplyDept: '', |
|||
pcApplyDeptSid: '', |
|||
pcApplyName: '', |
|||
pcApplySid: '', |
|||
pcDistributorName: '', |
|||
pcDistributorNameTwo: '', |
|||
pcDistributorPrice: '', |
|||
pcDistributorPriceAll: '', |
|||
pcDistributorPriceTwo: '', |
|||
pcDistributorPriceTwoAll: '', |
|||
price: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
sid: '', |
|||
staffDeptName: '', |
|||
staffDeptSid: '', |
|||
staffName: '', |
|||
pcStaffSid: '', |
|||
promiseList: [], |
|||
taskId: '', |
|||
type: '', |
|||
typeKey: '', |
|||
userSid: '', |
|||
discountLeave: [] |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
getRetrievalApplyInfoBySid({ sid: sid }).then((response) => { |
|||
if (response.success) { |
|||
this.formobj = response.data |
|||
} |
|||
}) |
|||
}, |
|||
// 车辆信息表--赠送套餐 |
|||
price(row) { |
|||
var aa = 0 |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
aa = parseInt(aa) + (parseInt(row.discountUse[i].discountPrice) * parseInt(row.discountUse[i].discountNum)) |
|||
} |
|||
return aa |
|||
}, |
|||
// 车辆信息表--备注内容拼接(优惠套餐说明 + 赠送数量) |
|||
remarks(row) { |
|||
var aa = '' |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
if (row.discountUse[i].discountNum !== 0) { |
|||
aa = aa + row.discountUse[i].discountName + row.discountUse[i].discountInfo + 'X' + row.discountUse[i].discountNum + ',' |
|||
} |
|||
} |
|||
if (aa !== '') { |
|||
aa = aa.substring(0, aa.lastIndexOf(',')) |
|||
} |
|||
return aa |
|||
}, |
|||
handleLook(row) { |
|||
trailerList({ contractNo: this.formobj.contractId, vinSid: row.vinSid }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.list.length > 0) { |
|||
this.viewState = 3 |
|||
this.$refs['divCheInfo'].showInfo(resp.data) |
|||
} else { |
|||
this.viewState = 4 |
|||
this.$refs['divZhuangInfo'].showInfo(resp.data) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 查看用户人信息 |
|||
lookUser(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divUserInfo'].showInfo(this.formobj.contractId, row) |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$refs['dataForm'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 120px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 110px !important; |
|||
} |
|||
.tlineheightb { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/deep/ .tlineheightb .el-form-item .el-form-item__content { |
|||
line-height: 15px !important; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
</style> |
@ -0,0 +1,241 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<button-bar view-title="待出库车辆列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="合同编号"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="listQuery.params.name" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="车架号"> |
|||
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">待出库车辆列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table ref="multipleTable" :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50"/> |
|||
<el-table-column fixed label="序号" type="index" width="60" :index="indexMethod" align="center"/> |
|||
<el-table-column label="销售类型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.paymentMethod }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合同编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.contractNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="客户名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</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> |
|||
</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> |
|||
</template> |
|||
|
|||
<script> |
|||
import { listPage } from '@/api/tesheshenpi/debtrelease' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
|
|||
export default { |
|||
name: 'daichukucheliang', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
isSearchShow: false, // 主页面:隐藏查询条件按钮 |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询 ----------- |
|||
tableKey: 0, |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
typeList: [], // 选择器 |
|||
list: [], |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doCreate', |
|||
btnLabel: '确定' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
vinNo: '', // 车架号 |
|||
userSid: '', |
|||
vinSid: [] |
|||
} |
|||
}, |
|||
multipleSelection: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doCreate': |
|||
this.doCreate() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
showData(value, contractNo) { |
|||
const aa = [] |
|||
if (value.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
aa.push(value[i].vinSid) |
|||
} |
|||
this.listQuery.params.contractNo = contractNo |
|||
this.listQuery.params.vinSid = aa |
|||
} else { |
|||
this.listQuery.params.vinSid = [] |
|||
} |
|||
this.getList() |
|||
}, |
|||
// ========== 页面按钮功能 ========== |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
console.log('待出库', row) |
|||
this.multipleSelection = row |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push({ |
|||
contractNo: element.contractNo, |
|||
vinSid: element.vinSid |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 10 |
|||
this.listQuery.total = 0 |
|||
this.listQuery.params.name = '' |
|||
this.listQuery.params.vinNo = '' |
|||
this.listQuery.params.userSid = '' |
|||
this.getList() |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
listPage(this.listQuery).then(response => { // 拦截器 |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 打开新增 |
|||
doCreate() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行出库申请' }) |
|||
return |
|||
} |
|||
if (this.sids.length > 0) { |
|||
this.FormLoading = true |
|||
for (var i = 0; i < this.multipleSelection.length; i++) { |
|||
for (var j = i + 1; j < this.multipleSelection.length; j++) { |
|||
if (this.multipleSelection[i].contractNo !== this.multipleSelection[j].contractNo) { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择同一合同编号的车辆!', |
|||
type: 'error' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
} |
|||
console.log(this.sids, 9999) |
|||
this.$emit('backData', this.sids) |
|||
} |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,642 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>欠款出库申请详情</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|||
<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="formobj" class="formaddcopy02" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyDept }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售专员</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.paymentMethod }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contractId }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.name }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.paymentMethodKey == '2'"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">贷款人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanMobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费1合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorNameTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费2合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwoAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">车型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.price }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">实际购车人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.type }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="title"> |
|||
<div>车辆信息</div> |
|||
</div> |
|||
<el-table :key="tableKey" v-loading="listLoading" ref="multipleTable" :data="formobj.carList" border style="width: 100%" :index="index"> |
|||
<el-table-column fixed align="center" label="序号" type="index" :index="index + 1" width="60"/> |
|||
<el-table-column label="车架号" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.vin }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="挂车/上装" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span v-show="scope.row.showHandCarBtn" class="bluezi" @click="handleLook(scope.row)">查看</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="formobj.typeKey == '2'" class="bluezi" @click="lookUser(scope.row.realBuyer)">{{ scope.row.realBuyer.name }}</span> |
|||
<span v-else>{{ scope.row.realBuyer.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人联系电话" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="赠送套餐" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ price(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售折让" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.discount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" min-width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ remarks(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.zlStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.bankStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>责任人担保承诺书</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.promiseList" :key="index" :src="item" :preview-src-list="formobj.promiseList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>担保承诺书</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.danFileList" :key="index" :src="item" :preview-src-list="formobj.danFileList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>车辆登记合同</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.carFileList" :key="index" :src="item" :preview-src-list="formobj.carFileList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<user-info-look v-show="viewState == 2" ref="divUserInfo" @doback="resetState"/> |
|||
<guacheInfo v-show="viewState == 3" ref="divCheInfo" @doback="resetState"/> |
|||
<shangzhuangInfo v-show="viewState == 4" ref="divZhuangInfo" @doback="resetState"/> |
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form class="formadd" > |
|||
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span><span class="icon">*</span>加签人员:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|||
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>当前环节:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :class="{rowClass:!currentLink}"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见:</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div style="text-align:center;margin-top: 20px;"> |
|||
<el-button type="primary" size="mini" @click="reject">确 定</el-button> |
|||
<el-button type="info " size="mini" @click="nodeDialogVisible = false">取 消</el-button> |
|||
</div> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getRetrievalApplyInfoBySid, trailerList, complete, breakProcess, reject, delegate, getPreviousNodesForReject, getNextNodesForSubmit } from '@/api/tesheshenpi/debtrelease' |
|||
import userInfoLook from '../chukuguanliFlow/chukuguanli/relation/userInfo' |
|||
import guacheInfo from '../chukuguanliFlow/chukuguanli/relation/guacheInfo' |
|||
import shangzhuangInfo from '../chukuguanliFlow/chukuguanli/relation/shangzhuangInfo' |
|||
import { selectStaffListss } from '@/api/dictcommons/dictcommons' |
|||
|
|||
export default { |
|||
name: 'DebtReleaseDaiBan', |
|||
components: { |
|||
userInfoLook, |
|||
guacheInfo, |
|||
shangzhuangInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
tableKey: 0, |
|||
index: 0, |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
listLoading: false, |
|||
formobj: { |
|||
carFileList: [], |
|||
carList: [], |
|||
configSid: '', |
|||
contractId: '', |
|||
createTime: '', |
|||
customerSid: '', |
|||
danFileList: [], |
|||
loanMobile: '', |
|||
loanName: '', |
|||
loanSid: '', |
|||
mobile: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
name: '', |
|||
orgPath: '', |
|||
paymentMethod: '', |
|||
paymentMethodKey: '', |
|||
pcApplyDept: '', |
|||
pcApplyDeptSid: '', |
|||
pcApplyName: '', |
|||
pcApplySid: '', |
|||
pcDistributorName: '', |
|||
pcDistributorNameTwo: '', |
|||
pcDistributorPrice: '', |
|||
pcDistributorPriceAll: '', |
|||
pcDistributorPriceTwo: '', |
|||
pcDistributorPriceTwoAll: '', |
|||
price: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
sid: '', |
|||
staffDeptName: '', |
|||
staffDeptSid: '', |
|||
staffName: '', |
|||
pcStaffSid: '', |
|||
promiseList: [], |
|||
taskId: '', |
|||
type: '', |
|||
typeKey: '', |
|||
userSid: '', |
|||
discountLeave: [] |
|||
}, |
|||
rules: {}, |
|||
options: [], |
|||
operation: '', // 点击操作按钮 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
startTask: true, |
|||
current: { |
|||
taskDefKey: '', |
|||
taskName: '' // 当前环节名称 |
|||
}, |
|||
nextNode: {}, // 下一环节 |
|||
nodeDialogVisible: false, |
|||
currentLink: true, |
|||
countersignLink: false, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
}, |
|||
// 加签按钮所需参数 |
|||
countersign: { |
|||
taskId: '', |
|||
assignee: '', |
|||
userSid: '', |
|||
instanceId: '', |
|||
views: '' |
|||
} |
|||
} |
|||
}, |
|||
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.countersign.taskId = obj.taskId |
|||
this.countersign.userSid = window.sessionStorage.getItem('userSid') |
|||
this.countersign.instanceId = obj.instanceId |
|||
// 加载表单数据 |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
getRetrievalApplyInfoBySid({ sid: sid }).then((response) => { |
|||
if (response.success) { |
|||
this.formobj = response.data |
|||
} |
|||
}) |
|||
selectStaffListss().then((res) => { |
|||
if (res.success) { |
|||
this.options = res.data |
|||
} |
|||
}) |
|||
}, |
|||
// 车辆信息表--赠送套餐 |
|||
price(row) { |
|||
var aa = 0 |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
aa = parseInt(aa) + (parseInt(row.discountUse[i].discountPrice) * parseInt(row.discountUse[i].discountNum)) |
|||
} |
|||
return aa |
|||
}, |
|||
// 车辆信息表--备注内容拼接(优惠套餐说明 + 赠送数量) |
|||
remarks(row) { |
|||
var aa = '' |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
if (row.discountUse[i].discountNum !== 0) { |
|||
aa = aa + row.discountUse[i].discountName + row.discountUse[i].discountInfo + 'X' + row.discountUse[i].discountNum + ',' |
|||
} |
|||
} |
|||
if (aa !== '') { |
|||
aa = aa.substring(0, aa.lastIndexOf(',')) |
|||
} |
|||
return aa |
|||
}, |
|||
handleLook(row) { |
|||
trailerList({ contractNo: this.formobj.contractId, vinSid: row.vinSid }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.list.length > 0) { |
|||
this.viewState = 3 |
|||
this.$refs['divCheInfo'].showInfo(resp.data) |
|||
} else { |
|||
this.viewState = 4 |
|||
this.$refs['divZhuangInfo'].showInfo(resp.data) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 查看用户人信息 |
|||
lookUser(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divUserInfo'].showInfo(this.formobj.contractId, row) |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 加签 |
|||
openCountersign(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = true |
|||
this.dialogList.comment = '' |
|||
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '同意' |
|||
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.countersignLink = false |
|||
this.dialogList.comment = '' |
|||
getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|||
if (resp.success) { |
|||
var arr = resp.data |
|||
this.nextNode = arr[0] |
|||
this.nodeDialogVisible = true |
|||
} |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop(val) { |
|||
this.operation = val |
|||
this.currentLink = false |
|||
this.countersignLink = 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() |
|||
} |
|||
} else if (this.operation === '加签') { |
|||
this.handleCountersign() |
|||
} |
|||
}, |
|||
/** 加签 */ |
|||
handleCountersign() { |
|||
if (this.countersign.assignee === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择加签人员' }) |
|||
return |
|||
} |
|||
if (this.dialogList.comment === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|||
return |
|||
} |
|||
this.countersign.views = this.dialogList.comment |
|||
delegate(this.countersign).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.nodeDialogVisible = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
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> |
|||
.span-sty { |
|||
width: 120px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 110px !important; |
|||
} |
|||
.tlineheightb { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/deep/ .tlineheightb .el-form-item .el-form-item__content { |
|||
line-height: 15px !important; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
.rowClass{ |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
</style> |
@ -0,0 +1,812 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleChoose()">选择车辆</el-button> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleSave()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleSubmit()">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<div class="titwu">欠款出库申请</div> |
|||
<el-form ref="dataForm" :model="formobj" class="formaddcopy02" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyDept }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售专员</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.paymentMethod }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contractId }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.name }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.paymentMethodKey == '2'"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="icon">*</span>贷款人</div> |
|||
<el-form-item prop="loanName"> |
|||
<el-select v-model="formobj.loanName" class="addinputInfo" filterable placeholder="" @change="changeCustomer"> |
|||
<el-option v-for="item in customer_list" :key="item.sid" :label="item.name" :value="item.name"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanMobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费1合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorNameTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费2合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwoAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">车型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.price }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty"><span class="icon">*</span>实际购车人</div> |
|||
<el-form-item prop="typeKey"> |
|||
<el-radio-group class="addinputw" style="font-size: 1px" v-model="formobj.typeKey" @input="typeRadio"> |
|||
<el-radio label="0">订单客户</el-radio> |
|||
<el-radio label="1" v-show="formobj.paymentMethodKey == '2'">贷款人</el-radio> |
|||
<el-radio label="2">其他人</el-radio> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="title" v-if="formobj.typeKey == '2'"> |
|||
<div>车辆信息</div> |
|||
<div> |
|||
<el-button size="mini" type="primary" @click="openUserInfo">批量录入实际购车人 |
|||
</el-button> |
|||
<el-button size="mini" type="danger" @click="clearUserInfo">批量置空实际购车人 |
|||
</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="titleOne" v-else> |
|||
<div>车辆信息</div> |
|||
</div> |
|||
<el-table :key="tableKey" v-loading="listLoading" ref="multipleTable" :data="formobj.carList" border style="width: 100%" :index="index" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50" :index="index + 1"/> |
|||
<el-table-column fixed align="center" label="序号" type="index" width="60"/> |
|||
<el-table-column fixed align="center" label="操作" type="index" width="280"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="danger" size="small" @click="handleDel(scope.$index)">删除</el-button> |
|||
<el-button type="primary" size="small" v-if="formobj.discountLeave.length > 0" @click="handleSelect(scope.row)">选择套餐</el-button> |
|||
<el-button type="primary" size="small" v-if="formobj.typeKey == '2'" @click="handleUpdateUser(scope.row)">修改购车人</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车架号" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.vin }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="挂车/上装" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span v-show="scope.row.showHandCarBtn" class="bluezi" @click="handleLook(scope.row)">查看</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="formobj.typeKey == '2'" class="bluezi" @click="lookUser(scope.row.realBuyer)">{{ scope.row.realBuyer.name }}</span> |
|||
<span v-else>{{ scope.row.realBuyer.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人联系电话" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="赠送套餐" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ price(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售折让" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-model="scope.row.discount" placeholder="" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" min-width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ remarks(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.zlStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.bankStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item> |
|||
<el-input class="addinputInfo" style="width: 90%" v-model="formobj.remarks" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>责任人担保承诺书</span></div> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" class="addinputInfo" v-model="image_list1" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>担保承诺书</span></div> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" class="addinputInfo" v-model="image_list2" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>车辆登记合同</span></div> |
|||
<el-form-item> |
|||
<upload ref="uploadImg" class="addinputInfo" v-model="image_list3" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!-- 选择待出库车辆 --> |
|||
<selectVehicle v-show="viewState == 2" ref="divSelect" @doback="resetState" @backData="backData"/> |
|||
<!-- 录入实际购车人 --> |
|||
<userInfoAdd v-show="viewState == 3 || viewState == 4" ref="divAddByUser" @doback="resetState" @backUser="backUser"/> |
|||
<!-- 查看实际购车人 --> |
|||
<userInfoLook v-show="viewState == 5" ref="divInfoByUser" @doback="resetState"/> |
|||
<!-- 查看挂车信息 --> |
|||
<guacheInfo v-show="viewState == 6" ref="divCheInfo" @doback="resetState"/> |
|||
<!-- 选择优惠套餐 --> |
|||
<selectpackage v-show="viewState == 7" ref="divSelectPackAge" @backData="backPackAge" @doback="resetState"/> |
|||
<!-- 查看上装信息 --> |
|||
<shangzhuangInfo v-show="viewState == 8" ref="divZhuangInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { saveOrUpdate, submitInfo, getRetrievalApplyInfo, selectInfo, trailerList } from '@/api/tesheshenpi/debtrelease' |
|||
import { selectCustomerList } from '@/api/dictcommons/dictcommons' |
|||
import upload from '@/components/uploadFile/upload' |
|||
import selectVehicle from './relation/selectVehicle' |
|||
import userInfoAdd from '../chukuguanliFlow/chukuguanli/relation/userEdit' |
|||
import userInfoLook from '../chukuguanliFlow/chukuguanli/relation/userInfo' |
|||
import guacheInfo from '../chukuguanliFlow/chukuguanli/relation/guacheInfo' |
|||
import selectpackage from '../chukuguanliFlow/chukuguanli/relation/selectpackage' |
|||
import shangzhuangInfo from '../chukuguanliFlow/chukuguanli/relation/shangzhuangInfo' |
|||
|
|||
export default { |
|||
name: 'DebtReleaseEdit', |
|||
components: { |
|||
upload, |
|||
selectVehicle, |
|||
userInfoAdd, |
|||
userInfoLook, |
|||
guacheInfo, |
|||
selectpackage, |
|||
shangzhuangInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
tableKey: 0, |
|||
index: 0, |
|||
createBtn: false, // 保存、提交按钮状态 |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
// === |
|||
listLoading: false, |
|||
customer_list: [], |
|||
list: [], |
|||
accept: '.jpg,.jpeg,.png,.JPG,.JPEG', |
|||
image_list1: [], |
|||
image_list2: [], |
|||
image_list3: [], |
|||
formobj: { |
|||
carFileList: [], |
|||
carList: [], |
|||
configSid: '', |
|||
contractId: '', |
|||
createTime: '', |
|||
customerSid: '', |
|||
danFileList: [], |
|||
loanMobile: '', |
|||
loanName: '', |
|||
loanSid: '', |
|||
mobile: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
name: '', |
|||
orgPath: '', |
|||
paymentMethod: '', |
|||
paymentMethodKey: '', |
|||
pcApplyDept: '', |
|||
pcApplyDeptSid: '', |
|||
pcApplyName: '', |
|||
pcApplySid: '', |
|||
pcDistributorName: '', |
|||
pcDistributorNameTwo: '', |
|||
pcDistributorPrice: '', |
|||
pcDistributorPriceAll: '', |
|||
pcDistributorPriceTwo: '', |
|||
pcDistributorPriceTwoAll: '', |
|||
price: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
sid: '', |
|||
staffDeptName: '', |
|||
staffDeptSid: '', |
|||
staffName: '', |
|||
pcStaffSid: '', |
|||
promiseList: [], |
|||
taskId: '', |
|||
type: '', |
|||
typeKey: '', |
|||
userSid: '', |
|||
discountLeave: [] |
|||
}, |
|||
arguments: { |
|||
list: [], |
|||
userSid: '', |
|||
orgPath: '', |
|||
contractId: '', |
|||
outboundSid: '', |
|||
pcView: true |
|||
}, |
|||
arguments_params: { |
|||
contractNo: '', |
|||
vinSids: [] |
|||
}, |
|||
vinNo_list: [], // 车辆列表--批量勾选的车架号 |
|||
index_list: [], // 车辆列表--批量勾选的序号 |
|||
rules: { |
|||
typeKey: [{ required: true, message: '请选择实际购车人', trigger: 'change' }], |
|||
loanName: [{ required: true, message: '贷款人不能为空', trigger: 'change' }] |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【编辑】欠款出库申请' |
|||
this.arguments.outboundSid = sid |
|||
getRetrievalApplyInfo(this.arguments).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.code === '20005') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: resp.msg, |
|||
duration: 5000 |
|||
}) |
|||
} |
|||
this.formobj = resp.data |
|||
this.formobj.instanceId = resp.data.procInstId |
|||
if (this.formobj.promiseList.length > 0) { |
|||
this.formobj.promiseList.forEach((e) => { |
|||
this.image_list1.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
if (this.formobj.danFileList.length > 0) { |
|||
this.formobj.danFileList.forEach((e) => { |
|||
this.image_list2.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
if (this.formobj.carFileList.length > 0) { |
|||
this.formobj.carFileList.forEach((e) => { |
|||
this.image_list3.push({ |
|||
name: '', |
|||
url: e |
|||
}) |
|||
}) |
|||
} |
|||
selectCustomerList({ staffSid: this.formobj.pcStaffSid, userSid: '', orgPath: '' }).then((resp) => { |
|||
if (resp.success) { |
|||
this.customer_list = resp.data |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// ------------ 页面跳转以及数据获取 ------------ |
|||
// 选择待出库车辆 |
|||
handleChoose() { |
|||
this.viewState = 2 |
|||
this.$refs['divSelect'].showData(this.formobj.carList, this.formobj.contractId) |
|||
}, |
|||
// 删除车辆信息 |
|||
handleDel(index) { |
|||
for (var i = 0; i < this.formobj.discountLeave.length; i++) { |
|||
for (var k = 0; k < this.formobj.carList[index].discountUse.length; k++) { |
|||
if (this.formobj.discountLeave[i].discountSid === this.formobj.carList[index].discountUse[k].discountSid) { |
|||
this.formobj.discountLeave[i].discountLeaveNum = parseInt(this.formobj.discountLeave[i].discountLeaveNum) + parseInt(this.formobj.carList[index].discountUse[k].discountNum) |
|||
} |
|||
} |
|||
} |
|||
this.formobj.carList.splice(index, 1) |
|||
}, |
|||
// 选择待出库车辆 -- 返回数据 |
|||
backData(value) { |
|||
this.viewState = 1 |
|||
this.arguments.userSid = window.sessionStorage.getItem('userSid') |
|||
this.arguments.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.arguments.contractId = value[0].contractNo |
|||
this.arguments_params.contractNo = value[0].contractNo |
|||
const aa = [] |
|||
value.forEach((e) => { |
|||
aa.push(e.vinSid) |
|||
}) |
|||
this.arguments.list = aa |
|||
this.arguments_params.vinSids = aa |
|||
// 根据合同编号是否存在--判断是否为首次选择车辆,如果为否,则只需要返回车辆信息,并将信息补充到申请中的车辆列表 |
|||
if (this.formobj.contractId === '' || this.formobj.contractId === null) { |
|||
getRetrievalApplyInfo(this.arguments).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|||
selectCustomerList({ staffSid: this.formobj.pcStaffSid, userSid: '', orgPath: '' }).then((resp) => { |
|||
if (resp.success) { |
|||
this.customer_list = resp.data |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
} else { |
|||
selectInfo(this.arguments_params).then((resp) => { |
|||
if (resp.success) { |
|||
for (var k = 0; k < resp.data.length; k++) { |
|||
this.formobj.carList.push(resp.data[k]) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
changeCustomer(value) { |
|||
const choose = this.customer_list.filter((item) => item.name === value) |
|||
this.formobj.loanSid = choose[0].sid |
|||
this.formobj.loanMobile = choose[0].mobile |
|||
}, |
|||
// 选择套餐 |
|||
handleSelect(row) { |
|||
this.viewState = 7 |
|||
this.$refs['divSelectPackAge'].showData(row.discountUse, this.formobj.discountLeave, row.vinSid) |
|||
}, |
|||
backPackAge(value, vinSid) { |
|||
this.viewState = 1 |
|||
// var value = JSON.parse(JSON.stringify(val)) |
|||
for (var i = 0; i < value.length; i++) { |
|||
// 循环计算最外层的套餐数量 |
|||
for (var k = 0; k < this.formobj.discountLeave.length; k++) { |
|||
if (value[i].discountSid === this.formobj.discountLeave[k].discountSid && this.formobj.discountLeave[k].discountLeaveNum !== '0' && this.formobj.discountLeave[k].discountLeaveNum !== 0) { |
|||
if (value[i].discountNum == '0') { |
|||
this.formobj.discountLeave[k].discountLeaveNum = value[i].discountLeaveNum |
|||
} else { |
|||
this.formobj.discountLeave[k].discountLeaveNum = parseInt(this.formobj.discountLeave[k].discountLeaveNum) - parseInt(value[i].discountNum) |
|||
} |
|||
} |
|||
} |
|||
// 循环计算每辆车的套餐数量 |
|||
for (var n = 0; n < this.formobj.carList.length; n++) { |
|||
if (this.formobj.carList[n].vinSid === vinSid) { |
|||
for (var b = 0; b < this.formobj.carList[n].discountUse.length; b++) { |
|||
if (value[i].discountSid === this.formobj.carList[n].discountUse[b].discountSid) { |
|||
this.formobj.carList[n].discountUse[b].discountNum = value[i].discountNum |
|||
this.formobj.carList[n].discountUse[b].totalNum = parseInt(this.formobj.carList[n].discountUse[b].totalNum) - parseInt(value[i].discountNum) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
// 车辆信息表--赠送套餐 |
|||
price(row) { |
|||
var aa = 0 |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
aa = parseInt(aa) + (parseInt(row.discountUse[i].discountPrice) * parseInt(row.discountUse[i].discountNum)) |
|||
} |
|||
return aa |
|||
}, |
|||
// 车辆信息表--备注内容拼接(优惠套餐说明 + 赠送数量) |
|||
remarks(row) { |
|||
var aa = '' |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
if (row.discountUse[i].discountNum !== 0 && row.discountUse[i].discountNum !== '0') { |
|||
aa = aa + row.discountUse[i].discountName + row.discountUse[i].discountInfo + 'X' + row.discountUse[i].discountNum + ',' |
|||
} |
|||
} |
|||
if (aa !== '') { |
|||
aa = aa.substring(0, aa.lastIndexOf(',')) |
|||
} |
|||
return aa |
|||
}, |
|||
// 查看挂车详情 |
|||
handleLook(row) { |
|||
trailerList({ contractNo: this.formobj.contractId, vinSid: row.vinSid }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.list.length > 0) { |
|||
this.viewState = 6 |
|||
this.$refs['divCheInfo'].showInfo(resp.data) |
|||
} else { |
|||
this.viewState = 8 |
|||
this.$refs['divZhuangInfo'].showInfo(resp.data) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 批量勾选 |
|||
handleSelectionChange(row) { |
|||
console.log(row, 999) |
|||
const aa = [] |
|||
const bb = [] |
|||
row.forEach((e, i) => { |
|||
aa.push(e.realBuyer.vin) |
|||
}) |
|||
this.formobj.carList.forEach((e, i) => { |
|||
aa.forEach((element) => { |
|||
if (e.realBuyer.vin === element) { |
|||
bb.push(i) |
|||
} |
|||
}) |
|||
}) |
|||
this.vinNo_list = aa |
|||
this.index_list = bb |
|||
}, |
|||
// 实际购车人 |
|||
typeRadio(val) { |
|||
if (val === '0') { |
|||
this.formobj.type = '订单客户' |
|||
for (var i = 0; i < this.formobj.carList.length; i++) { |
|||
this.formobj.carList[i].realBuyer.address = '' |
|||
this.formobj.carList[i].realBuyer.contacts = '' |
|||
this.formobj.carList[i].realBuyer.customerType = '' |
|||
this.formobj.carList[i].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[i].realBuyer.idNumber = '' |
|||
this.formobj.carList[i].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[i].realBuyer.mobile = this.formobj.mobile |
|||
this.formobj.carList[i].realBuyer.name = this.formobj.name |
|||
this.formobj.carList[i].realBuyer.remarks = '' |
|||
} |
|||
} else if (val === '1') { |
|||
this.formobj.type = '贷款人' |
|||
for (var k = 0; k < this.formobj.carList.length; k++) { |
|||
this.formobj.carList[k].realBuyer.address = '' |
|||
this.formobj.carList[k].realBuyer.contacts = '' |
|||
this.formobj.carList[k].realBuyer.customerType = '' |
|||
this.formobj.carList[k].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[k].realBuyer.idNumber = '' |
|||
this.formobj.carList[k].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[k].realBuyer.mobile = this.formobj.loanMobile |
|||
this.formobj.carList[k].realBuyer.name = this.formobj.loanName |
|||
this.formobj.carList[k].realBuyer.remarks = '' |
|||
} |
|||
} else { |
|||
this.formobj.type = '其他人' |
|||
for (var m = 0; m < this.formobj.carList.length; m++) { |
|||
this.formobj.carList[m].realBuyer.address = '' |
|||
this.formobj.carList[m].realBuyer.contacts = '' |
|||
this.formobj.carList[m].realBuyer.customerType = '' |
|||
this.formobj.carList[m].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[m].realBuyer.idNumber = '' |
|||
this.formobj.carList[m].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[m].realBuyer.mobile = '' |
|||
this.formobj.carList[m].realBuyer.name = '' |
|||
this.formobj.carList[m].realBuyer.remarks = '' |
|||
} |
|||
} |
|||
}, |
|||
// 批量录入实际购车人 |
|||
openUserInfo() { |
|||
if (this.vinNo_list.length > 0) { |
|||
this.viewState = 3 |
|||
this.$refs['divAddByUser'].showAdd(this.formobj.contractId, this.vinNo_list.join(',')) |
|||
} else { |
|||
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行批量录入实际购车人的操作' }) |
|||
return |
|||
} |
|||
}, |
|||
// 修改实际购车人信息 |
|||
handleUpdateUser(row) { |
|||
this.viewState = 4 |
|||
const cc = [] |
|||
this.formobj.carList.forEach((e, i) => { |
|||
if (e.realBuyer.vin === row.realBuyer.vin) { |
|||
cc.push(i) |
|||
} |
|||
}) |
|||
this.index_list = cc |
|||
this.$refs['divAddByUser'].showEdit(row.realBuyer, this.formobj.contractId) |
|||
}, |
|||
// 批量置空实际购车人 |
|||
clearUserInfo() { |
|||
if (this.index_list.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行批量置空实际购车人的操作' }) |
|||
return |
|||
} |
|||
for (var k = 0; k < this.index_list.length; k++) { |
|||
this.formobj.carList[this.index_list[k]].realBuyer.address = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.contacts = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerType = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerTypeKey = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.idNumber = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.isConfirmRealBuyer = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.mobile = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.name = '' |
|||
this.formobj.carList[this.index_list[k]].realBuyer.remarks = '' |
|||
} |
|||
this.index_list = [] |
|||
this.vinNo_list = [] |
|||
this.$refs.multipleTable.clearSelection() |
|||
}, |
|||
// 录入实际购车人--返回数据 |
|||
backUser(value) { |
|||
for (var k = 0; k < this.index_list.length; k++) { |
|||
this.formobj.carList[this.index_list[k]].realBuyer.address = value.address |
|||
this.formobj.carList[this.index_list[k]].realBuyer.contacts = value.contacts |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerType = value.customerType |
|||
this.formobj.carList[this.index_list[k]].realBuyer.customerTypeKey = value.customerTypeKey |
|||
this.formobj.carList[this.index_list[k]].realBuyer.idNumber = value.idNumber |
|||
this.formobj.carList[this.index_list[k]].realBuyer.isConfirmRealBuyer = value.isConfirmRealBuyer |
|||
this.formobj.carList[this.index_list[k]].realBuyer.mobile = value.mobile |
|||
this.formobj.carList[this.index_list[k]].realBuyer.name = value.name |
|||
this.formobj.carList[this.index_list[k]].realBuyer.remarks = value.remarks |
|||
} |
|||
this.index_list = [] |
|||
this.vinNo_list = [] |
|||
this.$refs.multipleTable.clearSelection() |
|||
}, |
|||
// 查看实际购车人信息 |
|||
lookUser(row) { |
|||
this.viewState = 5 |
|||
this.$refs['divInfoByUser'].showInfo(this.formobj.contractId, row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 添加数据 |
|||
handleSave() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
this.getUrl() |
|||
saveOrUpdate(this.formobj).then((response) => { |
|||
if (response.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}).catch((e) => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 提交 |
|||
handleSubmit() { |
|||
if (this.formobj.carList.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '车辆信息表不能为空' }) |
|||
return |
|||
} |
|||
var sub = false |
|||
if (this.formobj.discountLeave.length > 0 && this.formobj.carList.length > 0) { |
|||
for (var i = 0; i < this.formobj.discountLeave.length; i++) { |
|||
if (this.formobj.discountLeave[i].discountLeaveNum != 0) { |
|||
sub = true |
|||
break |
|||
} |
|||
} |
|||
} |
|||
if (sub) { |
|||
this.$confirm('存在未赠送的套餐,是否需要赠送', '提示', { |
|||
confirmButtonText: '否', |
|||
cancelButtonText: '是', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.submit() |
|||
}) |
|||
} else { |
|||
this.submit() |
|||
} |
|||
}, |
|||
submit() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
this.getUrl() |
|||
this.formobj.procInsId = this.formobj.procInstId |
|||
submitInfo(this.formobj).then((response) => { |
|||
if (response.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|||
// 子页面向父级页面传递值(关闭弹框) |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.createBtn = false |
|||
} |
|||
}).catch(e => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getUrl() { |
|||
if (this.image_list1.length > 0) { |
|||
const aa = [] |
|||
for (var i = 0; i < this.image_list1.length; i++) { |
|||
aa.push(this.image_list1[i].url) |
|||
} |
|||
this.formobj.promiseList = aa |
|||
} else { |
|||
this.formobj.promiseList = [] |
|||
} |
|||
if (this.image_list2.length > 0) { |
|||
const bb = [] |
|||
for (var k = 0; k < this.image_list2.length; k++) { |
|||
bb.push(this.image_list2[k].url) |
|||
} |
|||
this.formobj.danFileList = bb |
|||
} else { |
|||
this.formobj.danFileList = [] |
|||
} |
|||
if (this.image_list3.length > 0) { |
|||
const cc = [] |
|||
for (var m = 0; m < this.image_list3.length; m++) { |
|||
cc.push(this.image_list3[m].url) |
|||
} |
|||
this.formobj.carFileList = cc |
|||
} else { |
|||
this.formobj.carFileList = [] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.title { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.titleOne { |
|||
padding: 12px; |
|||
font-weight: bold; |
|||
font-size: 16px; |
|||
background-color: #0294D7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
} |
|||
.span-sty { |
|||
width: 120px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 110px !important; |
|||
} |
|||
.addinputw { |
|||
margin-left: 110px !important; |
|||
} |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 110px !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
</style> |
@ -0,0 +1,429 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<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="formobj" class="formaddcopy02" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyDept }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcApplyName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">销售部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffDeptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售专员</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.staffName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">销售类型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.paymentMethod }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">合同编号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.contractId }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">客户名称</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.name }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.mobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="formobj.paymentMethodKey == '2'"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">贷款人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.loanMobile }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费1</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费1合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介人2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorNameTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">单车中介费2</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwo }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">中介服务费2合计</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.pcDistributorPriceTwoAll }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="8" class="tlineheightb"> |
|||
<div class="span-sty">车型</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.modelName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">成交价</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.price }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">实际购车人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.type }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="title"> |
|||
<div>车辆信息</div> |
|||
</div> |
|||
<el-table :key="tableKey" v-loading="listLoading" ref="multipleTable" :data="formobj.carList" border style="width: 100%" :index="index"> |
|||
<el-table-column fixed align="center" label="序号" type="index" :index="index + 1" width="60"/> |
|||
<el-table-column label="车架号" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.vin }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="挂车/上装" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span v-show="scope.row.showHandCarBtn" class="bluezi" @click="handleLook(scope.row)">查看</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="formobj.typeKey == '2'" class="bluezi" @click="lookUser(scope.row.realBuyer)">{{ scope.row.realBuyer.name }}</span> |
|||
<span v-else>{{ scope.row.realBuyer.name }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="实际购车人联系电话" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.mobile }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="赠送套餐" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ price(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售折让" align="center" width="120"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.discount }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" min-width="200"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ remarks(scope.row) }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="放款资料是否齐全" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.zlStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="formobj.paymentMethodKey == '2'" label="资方放款审核结果" align="center" width="170"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.realBuyer.bankStateValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>责任人担保承诺书</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.promiseList" :key="index" :src="item" :preview-src-list="formobj.promiseList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>担保承诺书</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.danFileList" :key="index" :src="item" :preview-src-list="formobj.danFileList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span>车辆登记合同</span></div> |
|||
<el-form-item> |
|||
<el-image style="width: 178px;height: 178px;padding-left: 5px" class="addinputInfo" v-for="(item,index) in formobj.carFileList" :key="index" :src="item" :preview-src-list="formobj.carFileList"></el-image> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<user-info-look v-show="viewState == 2" ref="divUserInfo" @doback="resetState"/> |
|||
<guacheInfo v-show="viewState == 3" ref="divCheInfo" @doback="resetState"/> |
|||
<shangzhuangInfo v-show="viewState == 4" ref="divZhuangInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getRetrievalApplyInfoBySid, trailerList, revokeProcess } from '@/api/tesheshenpi/debtrelease' |
|||
import userInfoLook from '../chukuguanliFlow/chukuguanli/relation/userInfo' |
|||
import guacheInfo from '../chukuguanliFlow/chukuguanli/relation/guacheInfo' |
|||
import shangzhuangInfo from '../chukuguanliFlow/chukuguanli/relation/shangzhuangInfo' |
|||
|
|||
export default { |
|||
name: 'DebtReleaseYiBan', |
|||
components: { |
|||
userInfoLook, |
|||
guacheInfo, |
|||
shangzhuangInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
tableKey: 0, |
|||
index: 0, |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
listLoading: false, |
|||
formobj: { |
|||
carFileList: [], |
|||
carList: [], |
|||
configSid: '', |
|||
contractId: '', |
|||
createTime: '', |
|||
customerSid: '', |
|||
danFileList: [], |
|||
loanMobile: '', |
|||
loanName: '', |
|||
loanSid: '', |
|||
mobile: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
name: '', |
|||
orgPath: '', |
|||
paymentMethod: '', |
|||
paymentMethodKey: '', |
|||
pcApplyDept: '', |
|||
pcApplyDeptSid: '', |
|||
pcApplyName: '', |
|||
pcApplySid: '', |
|||
pcDistributorName: '', |
|||
pcDistributorNameTwo: '', |
|||
pcDistributorPrice: '', |
|||
pcDistributorPriceAll: '', |
|||
pcDistributorPriceTwo: '', |
|||
pcDistributorPriceTwoAll: '', |
|||
price: '', |
|||
procInstId: '', |
|||
remarks: '', |
|||
sid: '', |
|||
staffDeptName: '', |
|||
staffDeptSid: '', |
|||
staffName: '', |
|||
pcStaffSid: '', |
|||
promiseList: [], |
|||
taskId: '', |
|||
type: '', |
|||
typeKey: '', |
|||
userSid: '', |
|||
discountLeave: [] |
|||
}, |
|||
// 环节所需参数 |
|||
linkByParameter: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
orgSidPath: '', |
|||
taskDefKey: '', |
|||
userSid: '' |
|||
}, |
|||
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)) |
|||
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: 500 + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
getRetrievalApplyInfoBySid({ sid: sid }).then((response) => { |
|||
if (response.success) { |
|||
this.formobj = response.data |
|||
} |
|||
}) |
|||
}, |
|||
// 车辆信息表--赠送套餐 |
|||
price(row) { |
|||
var aa = 0 |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
aa = parseInt(aa) + (parseInt(row.discountUse[i].discountPrice) * parseInt(row.discountUse[i].discountNum)) |
|||
} |
|||
return aa |
|||
}, |
|||
// 车辆信息表--备注内容拼接(优惠套餐说明 + 赠送数量) |
|||
remarks(row) { |
|||
var aa = '' |
|||
for (var i = 0; i < row.discountUse.length; i++) { |
|||
if (row.discountUse[i].discountNum !== 0) { |
|||
aa = aa + row.discountUse[i].discountName + row.discountUse[i].discountInfo + 'X' + row.discountUse[i].discountNum + ',' |
|||
} |
|||
} |
|||
if (aa !== '') { |
|||
aa = aa.substring(0, aa.lastIndexOf(',')) |
|||
} |
|||
return aa |
|||
}, |
|||
handleLook(row) { |
|||
trailerList({ contractNo: this.formobj.contractId, vinSid: row.vinSid }).then((resp) => { |
|||
if (resp.success) { |
|||
if (resp.data.list.length > 0) { |
|||
this.viewState = 3 |
|||
this.$refs['divCheInfo'].showInfo(resp.data) |
|||
} else { |
|||
this.viewState = 4 |
|||
this.$refs['divZhuangInfo'].showInfo(resp.data) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 查看用户人信息 |
|||
lookUser(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divUserInfo'].showInfo(this.formobj.contractId, row) |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
/** 确认撤回任务 */ |
|||
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> |
|||
.span-sty { |
|||
width: 120px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 110px !important; |
|||
} |
|||
.tlineheightb { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/deep/ .tlineheightb .el-form-item .el-form-item__content { |
|||
line-height: 15px !important; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed { |
|||
height: 100% !important; |
|||
} |
|||
/*表格列设置fixed后固定列出现下边框的设置*/ |
|||
/deep/ .el-table__fixed-right { |
|||
height: 100% !important; |
|||
} |
|||
.titwu { |
|||
font-size: 28px; |
|||
text-align: center; |
|||
padding: 30px 0 20px 0; |
|||
} |
|||
</style> |
@ -0,0 +1,241 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<button-bar view-title="待出库车辆列表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<div class=""> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="合同编号"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="listQuery.params.name" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="车架号"> |
|||
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">待出库车辆列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table ref="multipleTable" :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50"/> |
|||
<el-table-column fixed label="序号" type="index" width="60" :index="indexMethod" align="center"/> |
|||
<el-table-column label="销售类型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.paymentMethod }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合同编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.contractNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="客户名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</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> |
|||
</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> |
|||
</template> |
|||
|
|||
<script> |
|||
import { listPage } from '@/api/tesheshenpi/debtrelease' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
|
|||
export default { |
|||
name: 'daichukucheliang', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
isSearchShow: false, // 主页面:隐藏查询条件按钮 |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询 ----------- |
|||
tableKey: 0, |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
typeList: [], // 选择器 |
|||
list: [], |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doCreate', |
|||
btnLabel: '确定' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: '', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
vinNo: '', // 车架号 |
|||
userSid: '', |
|||
vinSid: [] |
|||
} |
|||
}, |
|||
multipleSelection: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doCreate': |
|||
this.doCreate() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
showData(value, contractNo) { |
|||
const aa = [] |
|||
if (value.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
aa.push(value[i].vinSid) |
|||
} |
|||
this.listQuery.params.contractNo = contractNo |
|||
this.listQuery.params.vinSid = aa |
|||
} else { |
|||
this.listQuery.params.vinSid = [] |
|||
} |
|||
this.getList() |
|||
}, |
|||
// ========== 页面按钮功能 ========== |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
console.log('待出库', row) |
|||
this.multipleSelection = row |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push({ |
|||
contractNo: element.contractNo, |
|||
vinSid: element.vinSid |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery.current = 1 |
|||
this.listQuery.size = 10 |
|||
this.listQuery.total = 0 |
|||
this.listQuery.params.name = '' |
|||
this.listQuery.params.vinNo = '' |
|||
this.listQuery.params.userSid = '' |
|||
this.getList() |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
listPage(this.listQuery).then(response => { // 拦截器 |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 打开新增 |
|||
doCreate() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行出库申请' }) |
|||
return |
|||
} |
|||
if (this.sids.length > 0) { |
|||
this.FormLoading = true |
|||
for (var i = 0; i < this.multipleSelection.length; i++) { |
|||
for (var j = i + 1; j < this.multipleSelection.length; j++) { |
|||
if (this.multipleSelection[i].contractNo !== this.multipleSelection[j].contractNo) { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择同一合同编号的车辆!', |
|||
type: 'error' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
} |
|||
console.log(this.sids, 9999) |
|||
this.$emit('backData', this.sids) |
|||
} |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue