Browse Source

完善销售车辆交付查询

master
yunuo970428 1 year ago
parent
commit
6a11eef836
  1. 6
      anrui-buscenter/anrui-buscenter-ui/src/router/index.js
  2. 2
      anrui-buscenter/anrui-buscenter-ui/src/utils/request.js
  3. 769
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/cheliangjiaofu/cheliangjiaofu.vue

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

@ -232,10 +232,8 @@ export const constantRoutes = [
path: '/xiaoshouguanli/cheliangjiaofu',
component: () =>
import('@/views/xiaoshouguanli/cheliangjiaofu/cheliangjiaofu.vue'),
name: 'cheliangjiaofu',
meta: {
title: '车辆交付'
}
name: 'CheLiangJiaoFu',
meta: { title: '车辆交付', noCache: true }
},
// 客户登记单
{

2
anrui-buscenter/anrui-buscenter-ui/src/utils/request.js

@ -77,7 +77,7 @@ service.interceptors.response.use(
}
return Promise.reject(new Error(res.message || 'Error'))
} else {
if (!res.success) {
if (!res.success && res.success !== null && res.success !== undefined) {
Message({
message: res.msg || 'Error',
type: 'error',

769
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/cheliangjiaofu/cheliangjiaofu.vue

@ -1,528 +1,329 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div class="lefttit">交车确认单</div>
<div>
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button>
<el-button type="primary" size="small">提交</el-button>
<el-button type="primary" size="small">打印</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="190px" class="formadd" :rules="rules">
<div class="tit">交车确认单</div>
<el-row class="bordertopline">
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">客户名称</span>
<el-input v-model="temp.name" maxlength="20" placeholder="请输入客户名称" class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">证件号码</span>
<el-input v-model="temp.name" maxlength="20" placeholder="请输入证件号码" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">车辆交付日期</span>
<el-input v-model="temp.name" maxlength="20" placeholder="请输入车辆交付日期" class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">车辆交付地点</span>
<el-input v-model="temp.name" maxlength="20" placeholder="请输入车辆交付地点" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
<div class="titcon">
<div class="title">交付车辆信息</div>
<!-- Start 列表页面 -->
<div>
<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.useOrgName" clearable placeholder="" />
</el-form-item>
<el-form-item label="部门">
<el-input v-model="listQuery.params.deptName" clearable placeholder="" />
</el-form-item>
<el-form-item label="业务员">
<el-input v-model="listQuery.params.staffName" clearable placeholder="" />
</el-form-item>
<el-form-item label="客户">
<el-input v-model="listQuery.params.customerName" clearable placeholder="" />
</el-form-item>
<el-form-item label="合同号">
<el-input v-model="listQuery.params.contractNo" clearable placeholder="" />
</el-form-item>
<el-form-item label="销售类型">
<el-input v-model="listQuery.params.saleType" clearable placeholder="" />
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" clearable placeholder="" />
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.modelName" clearable placeholder="" />
</el-form-item>
<el-form-item label="销售日期">
<el-date-picker v-model="listQuery.params.saleDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.saleDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="交付状态">
<el-input v-model="listQuery.params.handoverState" clearable placeholder="" />
</el-form-item>
<el-form-item label="交付日期">
<el-date-picker v-model="listQuery.params.handoverDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.handoverDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter" icon="el-icon-search" size="small">查询</el-button>
<el-button type="primary" @click="handleReset" icon="el-icon-refresh" size="small">重置</el-button>
</div>
</div>
</div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%">
<!-- <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width">
<template slot-scope="{ row }">
<el-button size="mini" type="danger" @click="handleCheck(row)">删除</el-button>
</template>
</el-table-column> -->
<el-table-column label="车辆名称" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.name" maxlength="125" placeholder="" class="addinputw" clearable />
</template>
</el-table-column>
<el-table-column label="车辆型号" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.linkType" maxlength="125" placeholder="" class="addinputw" clearable />
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.mobile" maxlength="125" placeholder="" class="addinputw" type="number" clearable />
</template>
</el-table-column>
<el-table-column label="颜色" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.remarks" maxlength="125" placeholder="" class="addinputw" clearable />
</template>
</el-table-column>
</el-table>
<div class="title">交接清单</div>
<el-row>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">发票</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">合格证</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">一致性证书</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">申请表</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">保修手册</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">环保清单</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">驾驶员卡</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">GPS入网</span>
<el-radio-group v-model="temp.guaranteeOrNot">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item prop="name">
<span slot="label">其他工具</span>
<el-input v-model="temp.name" maxlength="20" placeholder="请输入其他工具" class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="12" />
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="name">
<span slot="label">上传委托书照片</span>
<div class="yihang">
<Upload style="float:left;" types="0004" @handleSuccess="imgdata" @handleRemove="removeIds" />
<span class="notetu bluezi">非本人提车时</span>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="name">
<span slot="label">上传现场交车照片</span>
<Upload style="float:left;" types="0004" @handleSuccess="imgdata" @handleRemove="removeIds" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="yanshou">经验收随车工具齐全车辆状况良好已接收车辆</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="ganzhang"> 接收人签字或盖章</div>
</el-col>
</el-row>
</el-form>
<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 :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column fixed label="序号" width="60" type="index" :index="indexMethod" align="center"/>
<el-table-column label="分公司" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.useOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="部门" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.deptName }}</span>
</template>
</el-table-column>
<el-table-column label="销售专员" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.staffName }}</span>
</template>
</el-table-column>
<el-table-column label="客户" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customerName }}</span>
</template>
</el-table-column>
<el-table-column label="合同号" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.contractNo }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center" min-width="180">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center" width="170">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="销售类型" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.saleType }}</span>
</template>
</el-table-column>
<el-table-column label="销售日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.saleDate }}</span>
</template>
</el-table-column>
<el-table-column label="交付状态" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.handoverState }}</span>
</template>
</el-table-column>
<el-table-column label="交付日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.handoverDate }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<!-- End 列表页面 -->
</div>
</template>
<script>
import { mapGetters } from 'vuex'
// import { savePcCustomerInfo, namesDown } from '@/api/jichuxinxi/crmcustomer'
// import { typeValues } from '@/api/dictcommons/shujuzidian'
// import Upload from '@/components/uploadFile/upload' //
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { listPage, exportExcel } from '@/api/cheiliangjiaofu/cheliangjiaofu'
export default {
name: 'Cheliangjiaofu',
components: {},
name: 'CheLiangJiaoFu',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
// ---------
menuState: {
add: false, //
edit: false, //
delete: false, //
view: false, //
audit: false, //
input: false, //
output: false, //
upload: false, //
release: false, //
},
customerClass: 'customerClass',
merClass: [],
customerSource: 'customerSource',
sourceLisst: [],
customerLevel: 'customerLevel',
induslevel: [],
visitWay: 'visitWay',
industway: [],
documenttype: 'documenttype',
cateType: [],
customerType: 'customerType',
merType: [],
ncySid: [],
edOrgSid: [
btndisabled: false,
btnList: [
{
dictKey: '001',
dictValue: '河北长安红旗分公司',
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'doExport',
btnLabel: '导出'
},
{
dictKey: '002',
dictValue: '河北贵人鸟分公司',
},
{
dictKey: '003',
dictValue: '河北草泥马分公司',
},
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
consignmentType: 'consignmentType',
signmentT: [],
consignment: 'consignment',
consign: [],
industrytype: 'industrytype',
industry_type: [],
kehusid: '',
visible: false,
stateId: 0,
isSearchShow: false,
searchxianshitit: '显示查询条件',
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
temp: {}, //
textMap: {
update: '编辑 ',
create: '创建',
},
dialogStatus: '', //
rules: {
manageName: [
{
required: true,
message: '请填写资方名称',
trigger: 'blur',
},
],
// name: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// }
// ],
mobile: [
{
required: true,
message: '请填写联系电话',
trigger: 'blur',
},
{
pattern: /^1[3-9]\d{9}$/,
message: '手机号格式错误',
},
],
},
// ------------------------------------
listQuery: {
params: {
useOrgName: '',
deptName: '',
staffName: '',
customerName: '',
contractNo: '',
saleType: '',
vinNo: '',
modelName: '',
saleDateStart: '',
saleDateEnd: '',
handoverState: '',
handoverDateStart: '',
handoverDateEnd: '',
userSid: '',
orgPath: '',
menuUrl: ''
},
current: 1,
size: 10,
total: 0
}
}
},
computed: {
...mapGetters([
'id',
'roles',
'rolesIds',
'departmentId',
'departmentCode',
]),
},
created() {
//
// this.init()
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// init() {
// this.getShuJUZiDian()
// },
imgdata(item) {
this.attachTypeYingyezhizhao.push(item.data)
},
removeIds(ids) {
this.attachTypeYingyezhizhao.forEach((e, index) => {
if (e.filePath === ids) {
this.attachTypeYingyezhizhao.splice(index, 1)
}
console.log(this.attachTypeYingyezhizhao, 6666666666)
})
},
addRenyuan() {
this.$router.push({
path: '/kehuguanli/cheliangxuqiuAdd',
})
},
openUpdate(sid, showed) {
this.stateId = sid
if (this.stateId !== '0') {
basefinbankDetails(this.stateId).then((response) => {
if (response.code === '200') {
this.$refs['dataForm'].clearValidate()
this.temp = response.data
this.visible = true
if (showed && typeof showed === 'function') {
showed()
}
}
})
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
openCreate(showed) {
this.$refs['dataForm'].clearValidate()
this.stateId = '0'
this.resetTemp()
this.visible = true
if (showed && typeof showed === 'function') {
showed()
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ------------------------------------------------------
//
handleReturn() {
this.visible = false
this.$emit('handleReturn')
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
resetTemp() {
this.temp = {
manageName: '', //
mobile: '', //
name: '',
}
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.saleOrderSid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
handleCreate() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
// this.dialogStatus = 'create'
if (this.stateId === '0') {
console.log('传入值:', this.temp)
savePcCustomerInfo(this.temp).then((response) => {
console.log('返回值:', response)
this.FormLoading = false
if (response.code === '200') {
this.$notify({
title: '提示',
message: '添加成功',
type: 'success',
duration: 2000,
})
this.$emit('created')
} else {
this.$notify({
title: '提示',
message: '添加失败',
type: 'error',
duration: 2000,
})
}
})
} else {
basefinbankUpdate(this.temp).then((response) => {
this.dialogStatus = 'update'
console.log('response', response)
this.FormLoading = false
if (response.code === '200') {
this.$notify({
title: '提示',
message: '编辑 成功',
type: 'success',
duration: 2000,
})
this.$emit('updated')
} else {
this.$notify({
title: '失败',
message: '编辑 失败',
type: 'error',
})
}
})
}
//
getList() {
this.listLoading = true
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.menuUrl = this.$route.path
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
}
})
},
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
//
dataCreated() {
this.visible = true
this.handleFilter()
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
dataUpdated() {
this.visible = true
handleReset() {
this.listQuery = {
params: {
useOrgName: '',
deptName: '',
staffName: '',
customerName: '',
contractNo: '',
saleType: '',
vinNo: '',
modelName: '',
saleDateStart: '',
saleDateEnd: '',
handoverState: '',
handoverDateStart: '',
handoverDateEnd: '',
userSid: '',
orgPath: '',
menuUrl: ''
},
current: 1,
size: 10,
total: 0
}
this.getList()
},
//
// handleUpdate() {
// if (this.sids.length === 1) {
// this.dialogStatus = 'update'
// this.$refs.addAndUpdate.openUpdate(this.sids[0], () => {
// this.visible = false
// })
// } else if (this.sids.length > 1) {
// this.$notify({
// title: '',
// message: ' !!',
// type: 'info',
// duration: 2000,
// })
// } else {
// this.$notify({
// title: '',
// message: '!!',
// type: 'error',
// duration: 2000,
// })
// return
// }
// },
//
handleCheck(row) {
this.$refs.info.openInfo(row.sid, () => {
this.visible = false
//
doExport() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
},
// ID
handleDelete() {
basefinbankDeleteBySids(this.sids).then((response) => {
console.log('3455', response)
if (response.code === '200') {
this.$notify({
title: '提示',
message: '删除成功',
type: 'success',
duration: 2000,
})
this.getList()
} else {
this.$notify({
title: '删除失败',
message: response.msg,
type: 'error',
})
}
exportExcel(this.listQuery.params).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'
})
const fileName = '销售车辆交付情况表' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.formadd {
width: 95%;
margin: 0 auto;
}
.yanshou {
color: #999;
text-align: center;
padding: 30px;
font-size: 22px;
}
.ganzhang {
color: #333;
padding: 10px;
height: 90px;
}
.yihang {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
color: #999;
position: relative;
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
.notetu {
display: block;
position: absolute;
top: 35px;
left: 700px;
font-size: 16px;
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

Loading…
Cancel
Save