Browse Source

完善验车管理分页列表

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

Loading…
Cancel
Save