Browse Source

完善验车管理分页列表

zhanglei
yunuo970428 3 years ago
parent
commit
1bf1fe46e5
  1. 98
      anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue

98
anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue

@ -2,39 +2,30 @@
<div class="app-container"> <div class="app-container">
<div v-show="viewState == 1"> <div v-show="viewState == 1">
<button-bar view-title="验车管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> <button-bar view-title="验车管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!-- <div class="switch_btn">-->
<!-- <el-button :class="{btn_style:viewState === 1}">待验车列表</el-button>-->
<!-- <el-button class="" @click="handleInvoiceList">已验车列表</el-button>-->
<!-- </div>-->
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }} <el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">
{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }}
</el-button> </el-button>
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header"> <el-form :inline="true" class="tab-header">
<el-form-item label="车型"> <el-form-item label="车型">
<el-select v-model="listQuery.params.model" placeholder="请选择" filterable clearable <el-select v-model="listQuery.params.model" placeholder="请选择" filterable clearable class="addinputw addinputw_chexing">
class="addinputw addinputw_chexing">
<el-option v-for="item in modelName_list" :key="item.sid" :label="item.modelName" :value="item.sid"/> <el-option v-for="item in modelName_list" :key="item.sid" :label="item.modelName" :value="item.sid"/>
</el-select> </el-select>
<!-- <el-input v-model="listQuery.params.warehouseAttribute" placeholder="请输入存放地点属性" clearable/>-->
</el-form-item> </el-form-item>
<el-form-item label="车架号"> <el-form-item label="车架号">
<el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/> <el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="采购类型"> <el-form-item label="采购类型">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw"> <el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue" <el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
:value="item.dictKey"/>
</el-select> </el-select>
<!-- <el-input v-model="listQuery.params.warehouseContract" placeholder="请输入负责人" clearable/>-->
</el-form-item> </el-form-item>
<el-form-item label="验车日期"> <el-form-item label="验车日期">
<el-date-picker v-model="listQuery.params.inspectedStartDate" class="filter-item" type="date" <el-date-picker v-model="listQuery.params.inspectedStartDate" class="filter-item" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
<label></label> <label></label>
<el-date-picker v-model="listQuery.params.inspectedEndDate" class="filter-item" type="date" <el-date-picker v-model="listQuery.params.inspectedEndDate" class="filter-item" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="btn" style="text-align: center;"> <div class="btn" style="text-align: center;">
@ -46,17 +37,15 @@
<!--Start 项目列表头部--> <!--Start 项目列表头部-->
<div class="listtop"> <div class="listtop">
<div class="tit">车辆列表</div> <div class="tit">车辆列表</div>
<pageye v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" <pageye v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="loadList"/>
:limit.sync="listQuery.size" class="pagination" @pagination="loadList"/>
</div> </div>
<!--End 项目列表头部--> <!--End 项目列表头部-->
<!--Start 项目列表--> <!--Start 项目列表-->
<div class=""> <!--@selection-change="handleSelectionChange"--> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"> <el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<!-- <el-table-column width="50px" type="selection" align="center"/>-->
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> <el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="操作" align="center" width="130px" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="130px" class-name="small-padding fixed-width">
<template slot-scope="{row}"><!--v-show="!row.result"--> <template slot-scope="{row}">
<el-button size="mini" type="primary" v-show="row.showInspectedBtn" @click="handleYanche(row)">验车 <el-button size="mini" type="primary" v-show="row.showInspectedBtn" @click="handleYanche(row)">验车
</el-button> </el-button>
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> <el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button>
@ -68,21 +57,18 @@
<el-table-column width="140px" prop="dispatchedDate" label="发车日期" align="center"/> <el-table-column width="140px" prop="dispatchedDate" label="发车日期" align="center"/>
<el-table-column width="140px" prop="inspectedDate" label="验车日期" align="center"/> <el-table-column width="140px" prop="inspectedDate" label="验车日期" align="center"/>
<el-table-column width="140px" prop="inspectedName" label="验车人" align="center"/> <el-table-column width="140px" prop="inspectedName" label="验车人" align="center"/>
<el-table-column width="150px" prop="inspectedType" label="验车结果" align="center"/> <el-table-column width="150px" label="验车结果" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inspectedType == '1' ? '待验车' : '已验车' }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<!--End 项目列表--> <!--End 项目列表-->
<div class="pages"> <div class="pages">
<div class="tit"/> <div class="tit"/>
<!-- 翻页 --> <!-- 翻页 -->
<pagination <pagination v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="loadList"/>
v-show="dataList.length > 0"
:total="listQuery.total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
class="pagination"
@pagination="loadList"
/>
</div> </div>
</div> </div>
</div> </div>
@ -91,7 +77,6 @@
<yancheguanli-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getList"/> <yancheguanli-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getList"/>
<!--详情部分组件--> <!--详情部分组件-->
<yancheguanli-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/> <yancheguanli-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/>
</div> </div>
</template> </template>
@ -120,21 +105,18 @@ export default {
isSearchShow: false, isSearchShow: false,
tableLoading: false, tableLoading: false,
dataList: [], dataList: [],
useOrg_list: [],
modelName_list: [], modelName_list: [],
purchaseType_list: [], purchaseType_list: [],
useOrg: '', // 使
useOrgSid: '', // 使sid
listQuery: { listQuery: {
current: 1, current: 1,
size: 10, size: 5,
total: 0, total: 0,
params: { params: {
vin: '', vin: '',
model: '', model: '',
purchaseType: '', purchaseType: '',
inspectedStartDate:'', inspectedStartDate: '',
inspectedEndDate:'', inspectedEndDate: '',
userSid: window.sessionStorage.getItem('userSid') userSid: window.sessionStorage.getItem('userSid')
} }
}, },
@ -153,7 +135,6 @@ export default {
created() { created() {
this.getList() this.getList()
this.getType() this.getType()
// this.getUseOrg()
this.getModelName() this.getModelName()
}, },
mounted() { mounted() {
@ -190,45 +171,33 @@ export default {
resetQuery() { resetQuery() {
this.listQuery = { this.listQuery = {
current: 1, current: 1,
size: 10, size: 5,
total: 0, total: 0,
params: { params: {
vin: '', vin: '',
model: '', model: '',
purchaseType: '', purchaseType: '',
inspectedStartDate:'', inspectedStartDate: '',
inspectedEndDate:'', inspectedEndDate: '',
userSid: window.sessionStorage.getItem('userSid') userSid: window.sessionStorage.getItem('userSid')
} }
} }
this.getList() this.getList()
}, },
loadList() { loadList() {
const _this = this
this.tableLoading = true this.tableLoading = true
selectCarInspectedList(this.listQuery) selectCarInspectedList(this.listQuery).then(resp => {
.then(resp => { this.tableLoading = false
_this.tableLoading = false const data = resp.data
const data = resp.data this.listQuery.total = data.total
_this.listQuery.total = data.total this.dataList = data.records
_this.dataList = data.records }).catch(() => {
for (var i = 0; i < this.dataList.length; i++) { this.tableLoading = false
if (this.dataList[i].inspectedType == '1') { })
this.dataList[i].inspectedType = '待验车'
} else {
this.dataList[i].inspectedType = '已验车'
}
}
})
.catch(() => {
_this.tableLoading = false
})
}, },
getType() { getType() {
typeValues({ typeValues({ type: 'purchaseOrderType ' }).then((response) => {
type: 'purchaseOrderType ' if (response.success && response.data) {
}).then((response) => {
if (response.code === '200' && response.data) {
this.purchaseType_list = response.data this.purchaseType_list = response.data
} }
}) })
@ -246,8 +215,6 @@ export default {
const userSid = window.sessionStorage.getItem('userSid') const userSid = window.sessionStorage.getItem('userSid')
getUseOrgByUserSid({ userSid: userSid }).then((res) => { getUseOrgByUserSid({ userSid: userSid }).then((res) => {
if (res.success) { if (res.success) {
this.useOrg = res.data.name // 使
this.useOrgSid = res.data.sid // 使sid
this.listQuery.params.useOrgSid = res.data.sid this.listQuery.params.useOrgSid = res.data.sid
this.loadList() this.loadList()
} }
@ -269,7 +236,6 @@ export default {
<style scoped> <style scoped>
.addinputw_chexing { .addinputw_chexing {
width: 500px; width: 300px;
} }
</style> </style>

Loading…
Cancel
Save