合同\工单
This commit is contained in:
@@ -30,28 +30,36 @@
|
||||
label="工单ID">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="carType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="小车类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dictData[0] | findByValue(scope.row.carType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="errorType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="异常类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dictData[1] | findByValue(scope.row.errorType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contractNumber"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ dictData[2] | findByValue(scope.row.contractNumber) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="clientId"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="客户">
|
||||
<template slot-scope="scope">
|
||||
{{ dictData[3] | findByValue(scope.row.clientId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="description"
|
||||
@@ -127,13 +135,13 @@
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :cartypeOpt="cartypeOpt" :contractOpt="contractOpt" :clientIdOpt="clientIdOpt" :dictsOpt="dictsOpt" @refreshDataList="getDataList"></add-or-update>
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :dictData="dictData" @refreshDataList="getDataList"></add-or-update>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './tickets-add-or-update'
|
||||
import { dictDetail } from '@/utils/dict'
|
||||
import { apiUtils } from '@/utils/dict'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -147,52 +155,18 @@
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false,
|
||||
cartypeOpt: [],
|
||||
contractOpt: [],
|
||||
clientIdOpt: []
|
||||
dictConfigs: [{url: '/car/car/list', type: 'list', value: 'carId', label: 'carName'}, {type: 'dict', code: 'error_type'}, {url: '/flow/contract/list', type: 'list', value: 'contractId', label: 'contractNumber'}, {url: '/client/client/list', type: 'list', value: 'clientId', label: 'clientName'}],
|
||||
dictData: []
|
||||
}
|
||||
},
|
||||
mixins: [dictDetail(['error_type'])],
|
||||
mixins: [apiUtils],
|
||||
components: {
|
||||
AddOrUpdate
|
||||
},
|
||||
activated () {
|
||||
this.getDataList()
|
||||
this.getDictDetail()
|
||||
},
|
||||
methods: {
|
||||
getDictDetail () {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/car/car/list?page=0&limit=9999'),
|
||||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
this.cartypeOpt = data.page.list
|
||||
this.cartypeOpt.map(el => {
|
||||
this.$set(el, 'value', el.carId)
|
||||
this.$set(el, 'label', el.carName)
|
||||
})
|
||||
})
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/flow/contract/list?page=0&limit=9999'),
|
||||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
this.contractOpt = data.page.list
|
||||
this.contractOpt.map(el => {
|
||||
this.$set(el, 'value', el.contractId)
|
||||
this.$set(el, 'label', el.contractNumber)
|
||||
})
|
||||
})
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/client/client/list?page=0&limit=9999'),
|
||||
method: 'get'
|
||||
}).then(({data}) => {
|
||||
this.clientIdOpt = data.page.list
|
||||
this.clientIdOpt.map(el => {
|
||||
this.$set(el, 'value', el.clientId)
|
||||
this.$set(el, 'label', el.clientName)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList () {
|
||||
this.dataListLoading = true
|
||||
|
||||
Reference in New Issue
Block a user