6 changed files with 614 additions and 227 deletions
@ -0,0 +1,37 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// Pc根据条件分页查询数据的列表
|
||||
|
export function pagerList(data) { |
||||
|
return request({ |
||||
|
url: '/buscenter/v1/busvehicledatahandover/listPage', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 回显
|
||||
|
export function fetchDetailsBySid(data) { |
||||
|
return request({ |
||||
|
url: '/buscenter/v1/busvehicledatahandover/getDeliveryInfoBySids', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 确认
|
||||
|
export function saveDeliveryInfo(data) { |
||||
|
return request({ |
||||
|
url: '/buscenter/v1/busvehicledatahandover/saveDeliveryInfo', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
} |
@ -0,0 +1,319 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!-- Start 列表页面 --> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<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="110px" class="tab-header"> |
||||
|
<el-form-item label="合同编号"> |
||||
|
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="客户名称"> |
||||
|
<el-input v-model="listQuery.params.customerName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="车型"> |
||||
|
<el-input v-model="listQuery.params.model" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="车架号"> |
||||
|
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="完成状态"> |
||||
|
<el-input v-model="listQuery.params.completeValue" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="单据编号"> |
||||
|
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">交车资料确认单列表</div> |
||||
|
<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 width="60" label="序号" type="index" :index="indexMethod" align="center"/> |
||||
|
<el-table-column label="操作" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="完成状态" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.completeStateValue }}</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.customerName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车型" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.model }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="车架号" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vinNo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="创建人" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.createName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="创建日期" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.createTime }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="图片" align="center" width="180px" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="mini" v-show="scope.row.witMatUrl !== ''" type="primary" @click="handleGetCheck(scope.row)">查看</el-button> |
||||
|
</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 列表页面 --> |
||||
|
<!-- 交车确认编辑 --> |
||||
|
<datapreparationAdd v-show="viewState == 2" ref="divAdd" @doback="reseaState" @reloadlist="getList"/> |
||||
|
<!-- 交车确认详情 --> |
||||
|
<datapreparationInfo v-show="viewState == 3" ref="divInfo" @doback="reseaState"/> |
||||
|
<!-- 照片弹窗 --> |
||||
|
<el-dialog :append-to-body="true" :visible.sync="dialogImgVisible"> |
||||
|
<el-image v-for="(item,index) in dialogUrl" :key="index" :src="item" style="width: 100px; height: 100px" :preview-src-list="dialogUrl"> |
||||
|
</el-image> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { pagerList } from '@/api/suicheziliao/jiaocheziliao' |
||||
|
import { getOrgSidByPath } from '@/api/dictcommons/dictcommons' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import datapreparationAdd from './datapreparationAdd' |
||||
|
import datapreparationInfo from './datapreparationInfo' |
||||
|
// import upload from '@/components/uploadFileimg/upload' |
||||
|
|
||||
|
export default { |
||||
|
name: 'Datapreparation', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
// upload, |
||||
|
ButtonBar, |
||||
|
datapreparationAdd, |
||||
|
datapreparationInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: '', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '上传确认单' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
dialogImgVisible: false, |
||||
|
dialogFileVisible: false, |
||||
|
// 查询条件 ----------- |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
sids: [], |
||||
|
multipleSelection: [], |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
listQuery: { |
||||
|
params: { |
||||
|
vinNo: '', |
||||
|
useOrgSid: '', |
||||
|
contractNo: '', |
||||
|
customerName: '', |
||||
|
model: '', |
||||
|
completeValue: '', |
||||
|
billNo: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
}, |
||||
|
dialogUrl: [] |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 初始化变量 |
||||
|
this.init() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
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 |
||||
|
} |
||||
|
}, |
||||
|
init() { |
||||
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.listQuery.params.useOrgSid = res.data |
||||
|
this.getList() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
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 |
||||
|
pagerList(this.listQuery).then((response) => { |
||||
|
console.log('列表查询结果:', 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 = { |
||||
|
params: { |
||||
|
vinNo: '', |
||||
|
useOrgSid: '', |
||||
|
contractNo: '', |
||||
|
customerName: '', |
||||
|
model: '', |
||||
|
completeValue: '', |
||||
|
billNo: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
} |
||||
|
this.init() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
if (this.sids.length > 0) { |
||||
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
||||
|
if (this.multipleSelection[i].completeStateValue === '已完成') { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择完成状态未完成的记录进行操作' }) |
||||
|
return |
||||
|
} |
||||
|
if (this.multipleSelection[i].contractNo !== this.multipleSelection[this.multipleSelection.length - 1].contractNo) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择合同编号相同的记录进行操作' }) |
||||
|
return |
||||
|
} |
||||
|
} |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showInfo(this.sids) |
||||
|
} else { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' }) |
||||
|
} |
||||
|
}, |
||||
|
toInfo(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divInfo'].showInfo(row) |
||||
|
}, |
||||
|
handleGetCheck(row) { |
||||
|
this.dialogImgVisible = true |
||||
|
this.dialogImageUrl = row.witMatUrl |
||||
|
}, |
||||
|
reseaState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.upload_img { |
||||
|
display: inline-block; |
||||
|
padding-left: 10px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,158 @@ |
|||||
|
<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" @click="handleConfirm()">确认</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<div class="titwu">交车资料确认单</div> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #E0E3EB"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">合同编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.contractNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">客户名称</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty"><span class="icon">*</span>交接人</div> |
||||
|
<el-form-item prop="recName"><el-input v-model="formobj.recName" class="addinputInfo" style="width: 40%" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty"><span class="icon">*</span>交接日期</div> |
||||
|
<el-form-item prop="recDate"><el-date-picker v-model="formobj.recDate" class="addinputInfo" style="width: 40%" type="date" value-format="yyyy-MM-dd" placeholder="请选择"/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
<div>交车列表</div> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.vinList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="车架号" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vinNo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="交接资料" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.items }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { fetchDetailsBySid, saveDeliveryInfo } from '@/api/suicheziliao/jiaocheziliao' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DatapreparationAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sids: [], |
||||
|
contractNo: '', |
||||
|
createName: '', |
||||
|
recName: '', |
||||
|
recDate: '', |
||||
|
userSid: '', |
||||
|
orgSidPath: '', |
||||
|
vinList: [] |
||||
|
}, |
||||
|
rules: { |
||||
|
recName: [{ required: true, message: '交接人不能为空', trigger: 'blur' }], |
||||
|
recDate: [{ required: true, message: '交接日期不能为空', trigger: 'blur' }] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '交车资料确认' |
||||
|
console.log(row) |
||||
|
fetchDetailsBySid(row).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
var nowDate = new Date() |
||||
|
var date = { |
||||
|
year: nowDate.getFullYear(), |
||||
|
month: nowDate.getMonth() + 1, |
||||
|
day: nowDate.getDate() |
||||
|
} |
||||
|
this.formobj.recDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) |
||||
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.formobj.orgSidPath = window.sessionStorage.getItem('defaultOrgPath') |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleConfirm() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: '交车资料确认单正在生成中,请稍等', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
saveDeliveryInfo(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
loading.close() |
||||
|
this.$message({ showClose: true, type: 'success', message: '操作成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
loading.close() |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
loading.close() |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sids: [], |
||||
|
contractNo: '', |
||||
|
createName: '', |
||||
|
recName: '', |
||||
|
recDate: '', |
||||
|
userSid: '', |
||||
|
orgSidPath: '', |
||||
|
vinList: [] |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 100px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 90px !important; |
||||
|
} |
||||
|
/deep/ .el-form-item__error { |
||||
|
margin-left: 90px !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,93 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<div class="titwu">交车资料确认单</div> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-row style="border-top: 1px solid #E0E3EB"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">合同编号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.contractNo }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">客户名称</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.customerName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">交接人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.recName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">交接日期</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.recDate }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
<div>交车列表</div> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.vinList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column label="车架号" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vinNo }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="交接资料" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.items }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { fetchDetailsBySid } from '@/api/suicheziliao/jiaocheziliao' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DatapreparationInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
contractNo: '', |
||||
|
createName: '', |
||||
|
recName: '', |
||||
|
recDate: '', |
||||
|
vinList: [] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '交车资料确认详情' |
||||
|
const aa = [] |
||||
|
aa.push(row.sid) |
||||
|
fetchDetailsBySid(aa).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn() { |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
@ -1,220 +0,0 @@ |
|||||
<template> |
|
||||
<div class="app-container"> |
|
||||
<div> |
|
||||
<div class="tab-header webtop"> |
|
||||
<div>车辆查询</div> |
|
||||
<div> |
|
||||
<el-button type="primary" size="small" @click="AddUpdateReturn">交车资料确认</el-button> |
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="main-content"> |
|
||||
<div class="searchcon"> |
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
||||
<div v-show="isSearchShow" class="search"> |
|
||||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|
||||
<el-form-item label="合同编号"> |
|
||||
<el-input v-model="listQuery.params.contractNo" clearable class="addinputw" placeholder=""/> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="客户名称"> |
|
||||
<el-input v-model="listQuery.params.customerName" clearable class="addinputw" placeholder=""/> |
|
||||
</el-form-item> |
|
||||
<el-form-item label="车架号"> |
|
||||
<el-input v-model="listQuery.params.vinNo" clearable class="addinputw" placeholder=""/> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
<div class="btn" style="text-align: center;"> |
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button> |
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="listtop"> |
|
||||
<div class="tit">现车列表</div> |
|
||||
</div> |
|
||||
<div class=""> |
|
||||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|
||||
<el-table-column width="50px" type="selection" align="center"/> |
|
||||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|
||||
<el-table-column label="合同编号" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.brandName }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="客户名称" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.vehicleAlias }}</span> |
|
||||
</template> |
|
||||
</el-table-column> |
|
||||
<el-table-column label="车型" align="center"> |
|
||||
<template slot-scope="scope"> |
|
||||
<span>{{ scope.row.color }}</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> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import Pagination from '@/components/pagination' |
|
||||
import req from '@/api/weishoumaiduan/unsold' |
|
||||
|
|
||||
export default { |
|
||||
name: 'xianchechaxun', |
|
||||
components: { |
|
||||
Pagination |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
isSearchShow: false, |
|
||||
searchxianshitit: '隐藏查询条件', |
|
||||
tableKey: 0, |
|
||||
sids: [], |
|
||||
list: [], |
|
||||
listLoading: false, |
|
||||
listQuery: { |
|
||||
current: 1, |
|
||||
size: 5, |
|
||||
params: { |
|
||||
contractNo: '', |
|
||||
vinNo: '', |
|
||||
userSid: '', |
|
||||
orgPath: '', |
|
||||
customerName: '', |
|
||||
vinNoList: [] |
|
||||
}, |
|
||||
total: 0 |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
// 搜索条件效果 |
|
||||
clicksearchShow() { |
|
||||
this.isSearchShow = !this.isSearchShow |
|
||||
if (this.isSearchShow) { |
|
||||
this.searchxianshitit = '隐藏查询条件' |
|
||||
} else { |
|
||||
this.searchxianshitit = '显示查询条件' |
|
||||
} |
|
||||
}, |
|
||||
init() { |
|
||||
this.getList() |
|
||||
}, |
|
||||
indexMethod(index) { |
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
||||
var pageindex = index + 1 + pagestart |
|
||||
return pageindex |
|
||||
}, |
|
||||
// 返回 |
|
||||
handleReturn() { |
|
||||
this.$emit('doback') |
|
||||
}, |
|
||||
// 查询列表信息 |
|
||||
getList() { |
|
||||
this.listLoading = true |
|
||||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|
||||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
||||
req.pageList(this.listQuery).then((response) => { |
|
||||
this.listLoading = false |
|
||||
if (response.success) { |
|
||||
this.listQuery.total = response.data.total |
|
||||
this.list = response.data.records |
|
||||
} else { |
|
||||
this.listQuery.total = 0 |
|
||||
this.list = [] |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
// 查询按钮 |
|
||||
handleFilter() { |
|
||||
this.listQuery.current = 1 |
|
||||
this.getList() |
|
||||
}, |
|
||||
// 重置按钮 |
|
||||
handleReset() { |
|
||||
this.listQuery.current = 1 |
|
||||
this.listQuery.size = 5 |
|
||||
this.listQuery.total = 0 |
|
||||
this.listQuery.params.contractNo = '' |
|
||||
this.listQuery.params.vinNo = '' |
|
||||
this.listQuery.params.customerName = '' |
|
||||
this.listQuery.params.userSid = '' |
|
||||
this.listQuery.params.orgPath = '' |
|
||||
this.getList() |
|
||||
}, |
|
||||
handleSelectionChange(row) { |
|
||||
this.sids = [] |
|
||||
const aa = [] |
|
||||
row.forEach((element) => { |
|
||||
aa.push({ |
|
||||
vinNo: element.vinNo, |
|
||||
configName: element.configName, |
|
||||
location: element.location, |
|
||||
locationSid: element.locationSid, |
|
||||
vehicleAlias: element.vehicleAlias, |
|
||||
modelSid: element.modelSid, |
|
||||
priceDate: element.priceDate, |
|
||||
priced: element.priced, |
|
||||
insideCode: element.insideCode, |
|
||||
vehicleNum: element.vehicleNum, |
|
||||
dayNum: element.dayNum, |
|
||||
vehicleVersionValue: element.vehicleVersionValue, |
|
||||
fuelTypeValue: element.fuelTypeValue, |
|
||||
gearboxTypeValue: element.gearboxTypeValue, |
|
||||
emissionStandardValue: element.emissionStandardValue |
|
||||
}) |
|
||||
}) |
|
||||
this.sids = aa |
|
||||
}, |
|
||||
showData(value) { |
|
||||
const aa = [] |
|
||||
if (value.length > 0) { |
|
||||
for (var i = 0; i < value.length; i++) { |
|
||||
aa.push(value[i].vinNo) |
|
||||
} |
|
||||
this.listQuery.params.vinNoList = aa |
|
||||
} else { |
|
||||
this.listQuery.params.vinNoList = [] |
|
||||
} |
|
||||
this.listQuery.current = 1 |
|
||||
this.listQuery.total = 0 |
|
||||
this.listQuery.size = 5 |
|
||||
this.init() |
|
||||
}, |
|
||||
// 添加修改返回 |
|
||||
AddUpdateReturn() { |
|
||||
if (this.sids.length > 0) { |
|
||||
for (var i = 0; i < this.sids.length; i++) { |
|
||||
if (this.sids[i].contractNo !== this.sids[this.sids.length - 1].contractNo) { |
|
||||
this.$message({ showClose: true, type: 'error', message: '请选择同一合同编号下的车辆' }) |
|
||||
return |
|
||||
} |
|
||||
} |
|
||||
this.$emit('backData', this.sids) |
|
||||
} else { |
|
||||
this.$notify({ |
|
||||
title: '提示', |
|
||||
message: '请选择至少一条车型记录!', |
|
||||
type: 'error', |
|
||||
duration: 2000 |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
<style scoped> |
|
||||
</style> |
|
Loading…
Reference in new issue