Browse Source

Merge remote-tracking branch 'origin/master'

master
dimengzhe 2 years ago
parent
commit
2064290cb4
  1. 8
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributorapply/BaseDistributorApplyService.java
  2. 8
      anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js
  3. 197
      anrui-buscenter/anrui-buscenter-ui/src/api/tesheshenpi/debtrelease.js
  4. 30
      anrui-buscenter/anrui-buscenter-ui/src/router/index.js
  5. 424
      anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/debtrelease.vue
  6. 850
      anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/debtreleaseAdd.vue
  7. 356
      anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/debtreleaseInfo.vue
  8. 241
      anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/relation/selectVehicle.vue
  9. 642
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/debtreleaseDaiBan.vue
  10. 812
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/debtreleaseEdit.vue
  11. 429
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/debtreleaseYiBan.vue
  12. 241
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/relation/selectVehicle.vue
  13. 1
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillfile/FinAttachTypeEnum.java
  14. 7
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincompanyinvoicing/FinCompanyInvoicing.java
  15. 9
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincompanyinvoicing/FinCompanyInvoicingDetailsVo.java
  16. 9
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincompanyinvoicing/FinCompanyInvoicingDto.java
  17. 54
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java
  18. 2
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileMapper.java
  19. 3
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileService.java
  20. 75
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincompanyinvoicing/FinCompanyInvoicingService.java
  21. 4
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

8
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basedistributorapply/BaseDistributorApplyService.java

@ -1368,8 +1368,8 @@ public class BaseDistributorApplyService extends MybatisBaseService<BaseDistribu
if (!staffinfoVoList.isEmpty()) {
for (SysOrgStaffVo sysOrgStaffVo : staffinfoVoList) {
AppSalesman appSalesman = new AppSalesman();
if (StringUtils.isNotBlank(sysOrgStaffVo.getUserSid())) {
appSalesman.setDictKey(sysOrgStaffVo.getUserSid());
if (StringUtils.isNotBlank(sysOrgStaffVo.getStaffSid())) {
appSalesman.setDictKey(sysOrgStaffVo.getStaffSid());
}
if (StringUtils.isNotBlank(sysOrgStaffVo.getStaffName())) {
appSalesman.setDictValue(sysOrgStaffVo.getStaffName());
@ -1846,8 +1846,8 @@ public class BaseDistributorApplyService extends MybatisBaseService<BaseDistribu
if (!staff.isEmpty()) {
for (SysOrgStaffVo sysOrgStaffVo : staff) {
AppSalesman user = new AppSalesman();
if (StringUtils.isNotBlank(sysOrgStaffVo.getUserSid())) {
user.setDictKey(sysOrgStaffVo.getUserSid());
if (StringUtils.isNotBlank(sysOrgStaffVo.getStaffSid())) {
user.setDictKey(sysOrgStaffVo.getStaffSid());
}
if (StringUtils.isNotBlank(sysOrgStaffVo.getStaffName())) {
user.setDictValue(sysOrgStaffVo.getStaffName());

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

@ -180,3 +180,11 @@ export function selectListByOther(data) {
})
}
// 获取集团所有在职人员
export function selectStaffListss() {
return request({
url: '/portal/v1/sysstaffinfo/selectStaffListss',
method: 'get'
})
}

197
anrui-buscenter/anrui-buscenter-ui/src/api/tesheshenpi/debtrelease.js

@ -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
})
}

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

@ -84,6 +84,13 @@ export const constantRoutes = [
import('@/views/teshushenpi/qiankuanticheguanli/qiankuanticheguanli.vue'),
name: 'qiankuanticheguanli',
meta: { title: '欠款提车', noCache: true }
},
{
path: '/teshushenpi/debtrelease',
component: () =>
import('@/views/teshushenpi/debtrelease/debtrelease.vue'),
name: 'QianKuanChuKu',
meta: { title: '欠款出库', noCache: true }
}
]
},
@ -743,7 +750,30 @@ export const constantRoutes = [
component: () =>
import('@/views/workflow/jiazhikehubeianFlow/valuablecustomerEdit.vue'),
name: 'ValuableCustomerEdit'
},
// 欠款出库待办详情
{
path: '/qiankuanchukuFlow/debtreleaseDaiBan',
component: () =>
import('@/views/workflow/qiankuanchukuFlow/debtreleaseDaiBan.vue'),
name: 'DebtReleaseDaiBan'
},
// 欠款出库已办详情
{
path: '/qiankuanchukuFlow/debtreleaseYiBan',
component: () =>
import('@/views/workflow/qiankuanchukuFlow/debtreleaseYiBan.vue'),
name: 'DebtReleaseYiBan'
},
// 欠款出库驳回到发起人办理
{
path: '/qiankuanchukuFlow/debtreleaseEdit',
component: () =>
import('@/views/workflow/qiankuanchukuFlow/debtreleaseEdit.vue'),
name: 'DebtReleaseEdit'
}
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]

424
anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/debtrelease.vue

@ -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() {
// vuewindowpostMessagehandleMessage
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>

850
anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/debtreleaseAdd.vue

@ -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>

356
anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/debtreleaseInfo.vue

@ -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>

241
anrui-buscenter/anrui-buscenter-ui/src/views/teshushenpi/debtrelease/relation/selectVehicle.vue

@ -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>

642
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/debtreleaseDaiBan.vue

@ -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) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.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>

812
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/debtreleaseEdit.vue

@ -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) // urlunescape()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>

429
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/debtreleaseYiBan.vue

@ -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) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 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>

241
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/qiankuanchukuFlow/relation/selectVehicle.vue

@ -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>

1
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillfile/FinAttachTypeEnum.java

@ -17,6 +17,7 @@ public enum FinAttachTypeEnum {
GSGDHDWDBJY("008", "公司股东会对外担保决议"),
ZRRDBCNS("009", "责任人担保承诺书"),
ZFXSJT("010", "资方信审截图"),
YYZZ("011", "企业开票信息营业执照"),
;
/**

7
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincompanyinvoicing/FinCompanyInvoicing.java

@ -72,4 +72,11 @@ public class FinCompanyInvoicing extends BaseEntity {
private String purchaseSystemName; // 采购系统名称
@ApiModelProperty("组织全路径")
private String orgSidPath;
@ApiModelProperty("开票类型value")
private String invoiceType; //
@ApiModelProperty("开票类型key")
private String invoiceTypeKey;
@ApiModelProperty("有效期")
private String effectiveDate; //
}

9
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincompanyinvoicing/FinCompanyInvoicingDetailsVo.java

@ -32,6 +32,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: anrui-fin(公司开票信息管理) <br/>
* File: FinCompanyInvoicingVo.java <br/>
@ -77,4 +80,10 @@ public class FinCompanyInvoicingDetailsVo implements Vo {
private String staffSid;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("开票类型")
private String openTickTypeKey;
@ApiModelProperty("开票类型")
private String openTickTypeValue;
@ApiModelProperty("营业执照")
private List<String> yyzzFiles = new ArrayList<>();
}

9
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/fincompanyinvoicing/FinCompanyInvoicingDto.java

@ -32,6 +32,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Project: anrui-fin(公司开票信息管理) <br/>
* File: FinCompanyInvoicingDto.java <br/>
@ -75,4 +78,10 @@ public class FinCompanyInvoicingDto implements Dto {
private String orgSidPath;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("开票类型")
private String openTickTypeKey;
@ApiModelProperty("开票类型")
private String openTickTypeValue;
@ApiModelProperty("营业执照")
private List<String> yyzzFiles = new ArrayList<>();
}

54
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java

@ -2362,6 +2362,7 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
return rb.setMsg(resultBean.getMsg());
}
String businessSid = resultBean.getData();
finBillApplication = fetchBySid(businessSid);
//创建BusinessVariables实体对象
BusinessVariables bv = new BusinessVariables();
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
@ -2369,6 +2370,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", businessSid);
variables.put("app", appMap);
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//用户的部门全路径sid
bv.setOrgSidPath(orgSidPath);
//业务sid
@ -2378,7 +2381,6 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
//流程定义id
bv.setModelId(ProcDefEnum.QKFINBILLAPPLICATION.getProDefId());
//========================================
finBillApplication = fetchBySid(businessSid);
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
@ -2386,6 +2388,13 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//=======================================
if (finBillApplication.getCreateByName().equals(finBillApplication.getStaffName())){
List<String> orgPathList = Arrays.asList(finBillApplication.getOrgSidPath().split("/"));
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData();
String nextNodeUserSids_ = sysOrganization.getManagerSid();
bv.setNextNodeUserSids(nextNodeUserSids_);
}
//=======================================
if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv);
if (!voResultBean.getSuccess()) {
@ -2454,6 +2463,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
bv.setModelId(finBillApplication.getProcDefId());
//判断是否领取发票原件,若是,则isTrue网关参数为true=============添加
variables.put("isAdj", finBillApplication.getIsLQOrigInvoice().equals("是"));
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//查询销售订单价格信息
BusSalesOrderPrice data = busSalesOrderFeign.selectByContractNo(finBillApplication.getContractNo()).getData();
//查询销售订单信息
@ -2471,6 +2482,13 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//=======================================
if ("Activity_1w9k3pk".equals(bv.getTaskDefKey())) {//分公司销售专员节点id
List<String> orgPathList = Arrays.asList(finBillApplication.getOrgSidPath().split("/"));
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData();
String nextNodeUserSids_ = sysOrganization.getManagerSid();
bv.setNextNodeUserSids(nextNodeUserSids_);
}
//=======================================
if (bv.getTaskId().equals(finBillApplication.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
if (!resultBean.getSuccess()) {
@ -2796,6 +2814,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
bv.setModelId(finBillApplication.getProcDefId());
//判断是否领取发票原件,若是,则isTrue网关参数为true=============添加
variables.put("isAdj", finBillApplication.getIsLQOrigInvoice().equals("是"));
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//========================================
finBillApplication = fetchBySid(bv.getBusinessSid());
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
@ -2822,6 +2842,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
bv.setModelId(finBillApplication.getProcDefId());
//判断是否领取发票原件,若是,则isTrue网关参数为true=============添加
variables.put("isAdj", finBillApplication.getIsLQOrigInvoice().equals("是"));
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//========================================
finBillApplication = fetchBySid(bv.getBusinessSid());
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
@ -2861,6 +2883,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
variables.put("app", appMap);
//判断是否领取发票原件,若是,则isTrue网关参数为true=============添加
variables.put("isAdj", finBillApplication.getIsLQOrigInvoice().equals("是"));
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(finBillApplication.getProcDefId());
@ -3156,6 +3180,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
bv.setModelId(finBillApplication.getProcDefId());
//判断是否领取发票原件,若是,则isTrue网关参数为true=============添加
bv.getFormVariables().put("isAdj", finBillApplication.getIsLQOrigInvoice().equals("是"));
//判断是否为销售专员发起
bv.getFormVariables().put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//========================================
Map<String, Object> variables = bv.getFormVariables();
finBillApplication = fetchBySid(bv.getBusinessSid());
@ -3326,6 +3352,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", businessSid);
variables.put("app", appMap);
//判断是否为销售专员发起
variables.put("isZy", finBillApplication1.getCreateByName().equals(finBillApplication1.getStaffName()));
//用户的部门全路径sid
bv.setOrgSidPath(orgSidPath);
//业务sid
@ -3335,7 +3363,6 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
//流程定义id
bv.setModelId(ProcDefEnum.QKLPFINBILLAPPLICATION.getProDefId());
//========================================
finBillApplication1 = fetchBySid(bv.getBusinessSid());
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(bv.getModelId());
flowProcessMapQuery.setVariables(variables);
@ -3343,6 +3370,13 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
variables = flowableFeign.getMap(flowProcessMapQuery).getData();
bv.setFormVariables(variables);
//=======================================
if (finBillApplication1.getCreateByName().equals(finBillApplication1.getStaffName())){
List<String> orgPathList = Arrays.asList(finBillApplication1.getOrgSidPath().split("/"));
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData();
String nextNodeUserSids_ = sysOrganization.getManagerSid();
bv.setNextNodeUserSids(nextNodeUserSids_);
}
//=======================================
if (r == 1) {
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv);
if (!voResultBean.getSuccess()) {
@ -3396,6 +3430,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", businessSid);
variables.put("app", appMap);
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(finBillApplication.getProcDefId());
@ -3406,6 +3442,14 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
bv.setFormVariables(variables);
bv.setOrgSidPath(finBillApplication.getOrgSidPath());
bv.setModelId(finBillApplication.getProcDefId());
//=======================================
if ("Activity_1g5iapj".equals(bv.getTaskDefKey())) {//分公司销售专员节点id
List<String> orgPathList = Arrays.asList(finBillApplication.getOrgSidPath().split("/"));
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData();
String nextNodeUserSids_ = sysOrganization.getManagerSid();
bv.setNextNodeUserSids(nextNodeUserSids_);
}
//=======================================
if (bv.getTaskId().equals(finBillApplication.getTaskId())) {
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
if (!resultBean.getSuccess()) {
@ -3614,6 +3658,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
Map<String, Object> variables = new HashMap<>();
//查询业务信息
FinBillApplication finBillApplication = fetchBySid(query.getBusinessSid());
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
bv.setModelId(finBillApplication.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
@ -3638,6 +3684,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
bv.setFormVariables(variables);
//查询业务信息
FinBillApplication finBillApplication = fetchBySid(query.getBusinessSid());
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
bv.setModelId(finBillApplication.getProcDefId());
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
@ -3675,6 +3723,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", businessSid);
variables.put("app", appMap);
//判断是否为销售专员发起
variables.put("isZy", finBillApplication.getCreateByName().equals(finBillApplication.getStaffName()));
//========================================
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery();
flowProcessMapQuery.setProDefKey(finBillApplication.getProcDefId());

2
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileMapper.java

@ -105,4 +105,6 @@ public interface FinBillFileMapper extends BaseMapper<FinBillFile> {
@Select("select * from fin_bill_file where billAppSid = #{sid} and attachType = '010'")
List<FinBillFileVo> fetchzfxsjtBySid(String sid);
@Select("select * from fin_bill_file where billAppSid = #{sid} and attachType = '011'")
List<FinBillFileVo> fetchcyyzzBySid(String sid);
}

3
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillfile/FinBillFileService.java

@ -189,4 +189,7 @@ public class FinBillFileService extends MybatisBaseService<FinBillFileMapper, Fi
public List<FinBillFileVo> fetchzfxsjtBySid(String sid) {
return baseMapper.fetchzfxsjtBySid(sid);
}
public List<FinBillFileVo> fetchcyyzzBySid(String sid) {
return baseMapper.fetchcyyzzBySid(sid);
}
}

75
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincompanyinvoicing/FinCompanyInvoicingService.java

@ -28,18 +28,25 @@ package com.yxt.anrui.fin.biz.fincompanyinvoicing;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.buscenter.api.busbillfile.BusAttachTypeEnum;
import com.yxt.anrui.buscenter.api.busbillfile.BusBillFileDto;
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign;
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.finbillfile.FinAttachTypeEnum;
import com.yxt.anrui.fin.api.finbillfile.FinBillFileDto;
import com.yxt.anrui.fin.api.finbillfile.FinBillFileVo;
import com.yxt.anrui.fin.api.fincompanyinvoicing.*;
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceVo;
import com.yxt.anrui.fin.biz.finbillfile.FinBillFileService;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
@ -79,6 +86,10 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
private SysUserFeign sysUserFeign;
@Resource
private CrmCustomerTempFeign crmCustomerTempFeign;
@Autowired
private FinBillFileService finBillFileService;
@Autowired
private FileUploadComponent fileUploadComponent;
private QueryWrapper<FinCompanyInvoicing> createQueryWrapper(FinCompanyInvoicingQuery query) {
// todo: 这里根据具体业务调整查询条件
@ -90,7 +101,7 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
public PagerVo<FinCompanyInvoicingVo> listPageVo(PagerQuery<FinCompanyInvoicingQuery> pq) {
FinCompanyInvoicingQuery query = pq.getParams();
QueryWrapper<FinCompanyInvoicing> qw = new QueryWrapper<>();
qw.ne("fci.purchaseSystemSid","");
qw.ne("fci.purchaseSystemSid", "");
//层级筛选
//=======================
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
@ -140,9 +151,9 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
IPage<FinCompanyInvoicing> page = PagerUtil.queryToPage(pq);
IPage<FinCompanyInvoicingVo> pagging = baseMapper.selectPageVoGS(page, qw);
for (FinCompanyInvoicingVo record : pagging.getRecords()) {
if (record.getCreateBySid().equals(query.getUserSid())){
if (record.getCreateBySid().equals(query.getUserSid())) {
record.setIsCZ(true);
}else {
} else {
record.setIsCZ(false);
}
}
@ -169,6 +180,12 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
public String insertByDto(FinCompanyInvoicingDto dto) {
FinCompanyInvoicing entity = new FinCompanyInvoicing();
BeanUtil.copyProperties(dto, entity, "id", "sid");
if (StringUtils.isNotBlank(dto.getOpenTickTypeKey())) {
entity.setInvoiceTypeKey(dto.getOpenTickTypeKey());
}
if (StringUtils.isNotBlank(dto.getOpenTickTypeValue())) {
entity.setInvoiceType(dto.getOpenTickTypeValue());
}
baseMapper.insert(entity);
return entity.getSid();
}
@ -180,6 +197,12 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
}
FinCompanyInvoicing entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
if (StringUtils.isNotBlank(dto.getOpenTickTypeKey())) {
entity.setInvoiceTypeKey(dto.getOpenTickTypeKey());
}
if (StringUtils.isNotBlank(dto.getOpenTickTypeValue())) {
entity.setInvoiceType(dto.getOpenTickTypeValue());
}
baseMapper.updateById(entity);
}
@ -187,6 +210,21 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
FinCompanyInvoicing entity = fetchBySid(sid);
FinCompanyInvoicingDetailsVo vo = new FinCompanyInvoicingDetailsVo();
BeanUtil.copyProperties(entity, vo);
if (StringUtils.isNotBlank(entity.getInvoiceType())) {
vo.setOpenTickTypeValue(entity.getInvoiceType());
}
if (StringUtils.isNotBlank(entity.getInvoiceTypeKey())) {
vo.setOpenTickTypeKey(entity.getInvoiceTypeKey());
}
List<String> fileList = new ArrayList<>();
List<FinBillFileVo> clmmhtApplicationAppendxs = finBillFileService.fetchcyyzzBySid(sid);
for (FinBillFileVo clmmhtApplicationAppendx : clmmhtApplicationAppendxs) {
String fileUrl = clmmhtApplicationAppendx.getFileUrl();
String urlPrefix = fileUploadComponent.getUrlPrefix();
fileUrl = urlPrefix + fileUrl;
fileList.add(fileUrl);
}
vo.setYyzzFiles(fileList);
return vo;
}
@ -276,6 +314,7 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
ResultBean rb = ResultBean.fireFail();
String dtoSid = dto.getSid();
String useOrgSid = dto.getUseOrgSid();
List<String> yyzzFiles = dto.getYyzzFiles();
if (StringUtils.isBlank(useOrgSid)) {
useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgSidPath()).getData();
dto.setUseOrgSid(useOrgSid);
@ -321,6 +360,20 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
}
finExtra.setInfo(openTickRemarks);
finAppDisAndCustm.setExtra(finExtra);
//保存附件
finBillFileService.deleteByFinAppSid(sid);
if (!yyzzFiles.isEmpty()) {
for (String yyzzFile : yyzzFiles) {
FinBillFileDto finBillFileDto = new FinBillFileDto();
if (yyzzFile.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
yyzzFile = yyzzFile.replace(fileUploadComponent.getUrlPrefix(), "");
}
finBillFileDto.setFileUrl(yyzzFile);
finBillFileDto.setBillAppSid(sid);
finBillFileDto.setAttachType(FinAttachTypeEnum.YYZZ.getAttachType());
finBillFileService.saveOrUpdateDto(finBillFileDto);
}
}
return rb.success().setData(finAppDisAndCustm);
}
QueryWrapper qw1 = new QueryWrapper<>();
@ -337,6 +390,20 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
return rb.setMsg("该企业开票信息已存在");
}
this.updateByDto(dto);
//保存附件
finBillFileService.deleteByFinAppSid(dtoSid);
if (!yyzzFiles.isEmpty()) {
for (String yyzzFile : yyzzFiles) {
FinBillFileDto finBillFileDto = new FinBillFileDto();
if (yyzzFile.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
yyzzFile = yyzzFile.replace(fileUploadComponent.getUrlPrefix(), "");
}
finBillFileDto.setFileUrl(yyzzFile);
finBillFileDto.setBillAppSid(dtoSid);
finBillFileDto.setAttachType(FinAttachTypeEnum.YYZZ.getAttachType());
finBillFileService.saveOrUpdateDto(finBillFileDto);
}
}
FinAppDisAndCustm finAppDisAndCustm = new FinAppDisAndCustm();
FinExtra finExtra = new FinExtra();
finAppDisAndCustm.setId(dtoSid);
@ -401,7 +468,7 @@ public class FinCompanyInvoicingService extends MybatisBaseService<FinCompanyInv
return rb.success().setData(finCompanyInvoicingDetailsVo);
}
CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.fetchSid(sid).getData();
if (crmCustomerTempVo == null){
if (crmCustomerTempVo == null) {
return rb.setMsg("该开票名称不存在,请重新选择");
}
finCompanyInvoicingDetailsVo.setSid(crmCustomerTempVo.getSid());

4
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -15,8 +15,8 @@ public enum ProcDefEnum {
ORDERAPPROVE("订单审批", "order_approve_96asleqi:1:227504"),
SALESPOLICY("销售政策审批流程", "process_biw9gfh7:3:917504"),
FINBILLAPPLICATION("开票申请流程", "process_hxys3ap3:5:5665004"),
QKFINBILLAPPLICATION("欠款开票申请流程", "process_q4evu61h:2:5100004"),
QKLPFINBILLAPPLICATION("欠款领票申请流程", "process_x9r8epty:5:4975008"),
QKFINBILLAPPLICATION("欠款开票申请流程", "process_q4evu61h:3:5682504"),
QKLPFINBILLAPPLICATION("欠款领票申请流程", "process_x9r8epty:6:5682508"),
ARREARSCARRYVEHICLE("欠款提车审批流程", "process_f2dkbvny:5:4975004"),
VEHICLEAPPLY("排产申请流程", "process_9egcg169:14:3120004"),
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:9:1865007"),

Loading…
Cancel
Save