You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

178 lines
6.5 KiB

<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="">
<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="工单编号" class="searchlist">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="客户名称" class="searchlist">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车牌号" class="searchlist">
<el-input v-model="listQuery.params.vehMark" placeholder="" clearable />
</el-form-item>
<el-form-item label="进厂日期">
<el-date-picker v-model="listQuery.params.entryTimeStart" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px">至</span>
<el-date-picker v-model="listQuery.params.entryTimeEnd" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</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="50" type="selection" align="center"/>
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column prop="billNo" label="工单编号" align="center" width="170" />
<el-table-column prop="billType" label="工单类型" align="center" width="120" />
<el-table-column prop="isGoOut" label="是否外出" align="center" width="100" />
<el-table-column prop="customerName" label="客户名称" align="center" min-width="120" />
<el-table-column prop="mobile" label="联系电话" align="center" width="120" />
<el-table-column prop="vinNo" label="车架号" align="center" width="130" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="130" />
<el-table-column prop="entryTime" label="进厂日期" align="center" width="120" />
</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/operation/workorderinvoicing'
export default {
name: 'ChooseRepairbill',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 5,
params: {
billNo: '',
customerName: '',
vehMark: '',
entryTimeStart: '',
entryTimeEnd: '',
deptSid: ''
},
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
},
// 查询列表信息
getList() {
this.listLoading = true
req.bwBillPageList(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.billNo = ''
this.listQuery.params.customerName = ''
this.listQuery.params.vehMark = ''
this.listQuery.params.entryTimeStart = ''
this.listQuery.params.entryTimeEnd = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// const aa = []
// if (value.length > 0) {
// for (var i = 0; i < value.length; i++) {
// aa.push(value[i].saleVehSid)
// }
// this.listQuery.params.saleVehSids = aa
// } else {
// this.listQuery.params.saleVehSids = []
// }``
this.listQuery.params.deptSid = deptSid
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.getList()
},
// 添加修改返回
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({ title: '提示', message: '请至少选择一条记录进行操作', type: 'error', duration: 2000 })
}
},
// 返回
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>