10 changed files with 2038 additions and 772 deletions
@ -0,0 +1,346 @@ |
|||||
|
<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="100px" class="tab-header"> |
||||
|
<el-form-item label="申请日期"> |
||||
|
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
||||
|
<span style="padding: 0 8px">至</span> |
||||
|
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" 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.customerName" clearable 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> |
||||
|
<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 fixed width="60px" label="序号" type="index" :index="indexMethod" align="center"/> |
||||
|
<el-table-column fixed width="50px" type="selection" align="center"/> |
||||
|
<el-table-column fixed label="操作" width="150px" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='调价申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="状态" width="140px" 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.createTime }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="发起人" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.applyPeoName }}</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.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.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> |
||||
|
</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> |
||||
|
<discountpackageAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/> |
||||
|
<discountpackageInfo v-show="viewState == 4" ref="divInfo" @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 Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import discountpackageAdd from './discountpackageAdd.vue' |
||||
|
import discountpackageInfo from './discountpackageInfo.vue' |
||||
|
import req from '@/api/kucunguanli/price' |
||||
|
import { getOrgSidByPath, selectHaveMessage } from '@/api/dictcommons/dictcommons' |
||||
|
import { getStorage } from '@/utils/auth' |
||||
|
|
||||
|
export default { |
||||
|
name: 'priceguanli', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar, |
||||
|
discountpackageAdd, |
||||
|
discountpackageInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
url: '', |
||||
|
dialogHeight: '80%', |
||||
|
centerDialogVisible: false, |
||||
|
btndisabled: false, |
||||
|
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: '关闭' |
||||
|
} |
||||
|
], |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
viewState: 1, |
||||
|
// 查询条件 ----------- |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
sids: [], |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
listQuery: { |
||||
|
params: { |
||||
|
createStartTime: '', |
||||
|
createEndTime: '', |
||||
|
createOrgSid: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 加载列表 |
||||
|
this.init() |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
||||
|
window.addEventListener('message', this.handleMessage) |
||||
|
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))) |
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
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.createOrgSid = res.data |
||||
|
this.getList() |
||||
|
console.log(this.listQuery.params.createOrgSid) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach((element) => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
console.log('sids', this.sids) |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
req.listPage(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: { |
||||
|
createStartTime: '', |
||||
|
createEndTime: '', |
||||
|
createOrgSid: '' |
||||
|
}, |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0 |
||||
|
} |
||||
|
this.init() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
selectHaveMessage({ menuUrl: this.$route.path, orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divAdd'].showEdit(row) |
||||
|
}, |
||||
|
toInfo(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divInfo'].showInfo(row) |
||||
|
}, |
||||
|
doDel() { |
||||
|
if (this.sids.length === 0) { |
||||
|
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)' |
||||
|
}) |
||||
|
req.delBySids(this.sids).then(resp => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
this.getList() |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,128 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存 |
||||
|
</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submitVehicleApply()">提交 |
||||
|
</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
||||
|
<el-row style="border-top: 1px solid #E0E3EB"> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>合同编号</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"></el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>客户名称</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.customerName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>车型</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.modelName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>订单台数</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.num }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>备注</span> |
||||
|
</el-col> |
||||
|
<el-col :span="20"> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
<div>优惠包列表</div> |
||||
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="handleAdd">添加</el-button> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%;"> |
||||
|
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column> |
||||
|
<el-table-column fixed label="操作" align="center" width="80"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除 |
||||
|
</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="优惠包名称" align="center" width="130"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="价值" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="优惠包说明" align="center" min-idth="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="数量" align="center" width="80"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="总价值" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'YouHuiBaoAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
|
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showAdd() {}, |
||||
|
showEdit(row) {}, |
||||
|
handleAdd() { |
||||
|
|
||||
|
}, |
||||
|
dataDelete(index) {}, |
||||
|
saveOrUpdate() {}, |
||||
|
submitVehicleApply() {}, |
||||
|
handleReturn() {} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,110 @@ |
|||||
|
<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"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd"> |
||||
|
<el-row style="border-top: 1px solid #E0E3EB"> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>合同编号</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"></el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>客户名称</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.customerName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>车型</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.modelName }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>订单台数</span> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.num }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"> |
||||
|
<span>备注</span> |
||||
|
</el-col> |
||||
|
<el-col :span="20"> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
<div>优惠包列表</div> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.list" :index="index" border style="width: 100%;"> |
||||
|
<el-table-column fixed label="序号" type="index" :index="index + 1" align="center" width="60"></el-table-column> |
||||
|
<el-table-column label="优惠包名称" align="center" width="130"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="价值" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="优惠包说明" align="center" min-idth="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="数量" align="center" width="80"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="总价值" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'YouHuiBaoInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
|
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) {}, |
||||
|
handleReturn() {} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
</style> |
File diff suppressed because it is too large
@ -0,0 +1,182 @@ |
|||||
|
<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.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.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.vin }}</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 { getCanUseCars } from '@/api/tesheshenpi/qiankuantiche' |
||||
|
|
||||
|
export default { |
||||
|
name: 'SelectVehicle', |
||||
|
components: { |
||||
|
Pagination |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '隐藏查询条件', |
||||
|
tableKey: 0, |
||||
|
sids: [], |
||||
|
list: [], |
||||
|
listLoading: false, |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 5, |
||||
|
params: { |
||||
|
contractNo: '', |
||||
|
vinNo: '', |
||||
|
vinSids: [] |
||||
|
}, |
||||
|
total: 0 |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
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 |
||||
|
}, |
||||
|
// 返回 |
||||
|
handleReturn() { |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
getCanUseCars(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.vinNo = '' |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
this.sids = [] |
||||
|
const aa = [] |
||||
|
row.forEach((element) => { |
||||
|
aa.push({ |
||||
|
vinNo: element.vin, |
||||
|
carSid: element.carSid, |
||||
|
price: element.price, |
||||
|
subscribedAll: element.subscribedAll, |
||||
|
gcList: element.gcList |
||||
|
}) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
showData(value, contractNo) { |
||||
|
const aa = [] |
||||
|
if (value.length > 0) { |
||||
|
for (var i = 0; i < value.length; i++) { |
||||
|
aa.push(value[i].carSid) |
||||
|
} |
||||
|
this.listQuery.params.vinSids = aa |
||||
|
} else { |
||||
|
this.listQuery.params.vinSids = [] |
||||
|
} |
||||
|
this.listQuery.current = 1 |
||||
|
this.listQuery.total = 0 |
||||
|
this.listQuery.size = 5 |
||||
|
this.listQuery.params.contractNo = contractNo |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 添加修改返回 |
||||
|
AddUpdateReturn() { |
||||
|
if (this.sids.length > 0) { |
||||
|
this.$emit('backData', this.sids) |
||||
|
} else { |
||||
|
this.$notify({ |
||||
|
title: '提示', |
||||
|
message: '请选择至少一条记录!', |
||||
|
type: 'error', |
||||
|
duration: 2000 |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
Loading…
Reference in new issue