合同
This commit is contained in:
@@ -37,6 +37,9 @@ function dictDetail (names) {
|
|||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
dictLabel (index, array) {
|
dictLabel (index, array) {
|
||||||
|
if (array === null || array === undefined) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
const value = String(index)
|
const value = String(index)
|
||||||
const valueToLabelMap = new Map(array.map(item => [String(item.value), item.label]))
|
const valueToLabelMap = new Map(array.map(item => [String(item.value), item.label]))
|
||||||
const label = valueToLabelMap.get(value)
|
const label = valueToLabelMap.get(value)
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
:title="!dataForm.contractId ? '新增' : '修改'"
|
:title="!dataForm.contractId ? '新增' : '修改'"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="visible">
|
:visible.sync="visible">
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px" size="mini">
|
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmit()" label-width="100px" size="mini">
|
||||||
<el-row>
|
<el-tabs v-model="activeName">
|
||||||
<el-col :span="12">
|
<el-tab-pane label="基本信息" name="first">
|
||||||
|
<div class="tab_box_wraper">
|
||||||
<el-form-item label="合同类型" prop="contractType">
|
<el-form-item label="合同类型" prop="contractType">
|
||||||
<el-select v-model="dataForm.contractType" placeholder="合同类型" style="width: 100%;">
|
<el-select v-model="dataForm.contractType" placeholder="合同类型" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -16,15 +17,9 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="合同编号" prop="contractNumber">
|
<el-form-item label="合同编号" prop="contractNumber">
|
||||||
<el-input v-model="dataForm.contractNumber" placeholder="合同编号"></el-input>
|
<el-input v-model="dataForm.contractNumber" placeholder="合同编号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="是否是主合同" prop="isMaster">
|
<el-form-item label="是否是主合同" prop="isMaster">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="dataForm.isMaster"
|
v-model="dataForm.isMaster"
|
||||||
@@ -34,8 +29,6 @@
|
|||||||
:inactive-value="0"
|
:inactive-value="0"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="是否验收" prop="isAcceptance">
|
<el-form-item label="是否验收" prop="isAcceptance">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="dataForm.isAcceptance"
|
v-model="dataForm.isAcceptance"
|
||||||
@@ -45,10 +38,6 @@
|
|||||||
:inactive-value="0"
|
:inactive-value="0"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="客户" prop="clientId">
|
<el-form-item label="客户" prop="clientId">
|
||||||
<el-select v-model="dataForm.clientId" placeholder="客户" style="width: 100%;">
|
<el-select v-model="dataForm.clientId" placeholder="客户" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -59,13 +48,41 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注" prop="remarks">
|
<el-form-item label="备注" prop="remarks">
|
||||||
<el-input v-model="dataForm.remarks" placeholder="备注"></el-input>
|
<el-input v-model="dataForm.remarks" placeholder="备注"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-show="fileData.length" label="附件列表">
|
||||||
|
<div class="file-item" v-for="(e, i) in fileData" :key="e.storageId">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="2"><i class="el-icon-document"></i></el-col>
|
||||||
|
<el-col :span="14">
|
||||||
|
<div class="file-item-name">{{e.realName}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="4" style="text-align: right;"><el-button type="primary" icon="el-icon-delete" @click="deleteFile(e)"></el-button></el-col>
|
||||||
|
<el-col :span="4" style="text-align: right;"><el-button type="primary" icon="el-icon-download" @click="downloadFile(e, i)"></el-button></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上传">
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:action="$baseUrl + '/api/localStorage' + '?name=' + dataForm.filename"
|
||||||
|
:limit="1"
|
||||||
|
:headers="headers"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
:on-error="handleError"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<el-button slot="trigger" size="mini" type="primary">文件</el-button>
|
||||||
|
<el-button style="margin-left: 10px;" size="mini" type="success" @click="submitUpload">上传到服务器</el-button>
|
||||||
|
<div slot="tip" class="el-upload__tip">可上传任意格式文件,且不超过100M</div>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="选择物料" name="second">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-button size="mini" type="primary" @click="addMaterial">选择物料</el-button>
|
<el-button size="mini" type="primary" @click="addMaterial">选择物料</el-button>
|
||||||
@@ -76,12 +93,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="materData"
|
:data="materData"
|
||||||
border
|
border
|
||||||
size="mini"
|
size="mini"
|
||||||
max-height="200"
|
max-height="500"
|
||||||
style="width: 100%;">
|
style="width: 100%;">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="materialCode"
|
prop="materialCode"
|
||||||
@@ -156,6 +172,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="mini" @click="visible = false">取消</el-button>
|
<el-button size="mini" @click="visible = false">取消</el-button>
|
||||||
<el-button size="mini" type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button size="mini" type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
@@ -248,7 +267,9 @@
|
|||||||
clientId: '',
|
clientId: '',
|
||||||
isAcceptance: 0,
|
isAcceptance: 0,
|
||||||
remarks: '',
|
remarks: '',
|
||||||
totalSum: 0
|
totalSum: 0,
|
||||||
|
filename: null,
|
||||||
|
storageId: null
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
contractType: [
|
contractType: [
|
||||||
@@ -270,7 +291,10 @@
|
|||||||
totalPage: 0,
|
totalPage: 0,
|
||||||
dataListLoading: false,
|
dataListLoading: false,
|
||||||
dataListSelections: [],
|
dataListSelections: [],
|
||||||
materData: []
|
materData: [],
|
||||||
|
activeName: 'first',
|
||||||
|
headers: { 'Token': this.$cookie.get('token') },
|
||||||
|
fileData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -306,11 +330,22 @@
|
|||||||
this.dataForm.materialJson = data.contract.materialJson
|
this.dataForm.materialJson = data.contract.materialJson
|
||||||
this.dataForm.isAcceptance = data.contract.isAcceptance
|
this.dataForm.isAcceptance = data.contract.isAcceptance
|
||||||
this.dataForm.remarks = data.contract.remarks
|
this.dataForm.remarks = data.contract.remarks
|
||||||
|
this.materData = JSON.parse(data.contract.materialJson)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.getFile()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getFile () {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/api/localStorage'),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({'contractId': this.dataForm.contractId})
|
||||||
|
}).then(({data}) => {
|
||||||
|
this.fileData = [...data]
|
||||||
|
})
|
||||||
|
},
|
||||||
addMaterial () {
|
addMaterial () {
|
||||||
this.innerVisible = true
|
this.innerVisible = true
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
@@ -326,6 +361,10 @@
|
|||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit () {
|
dataFormSubmit () {
|
||||||
|
let ids = this.fileData.length > 0 ? this.fileData.map(item => item.storageId).join(',') : ''
|
||||||
|
if (ids) {
|
||||||
|
ids += ','
|
||||||
|
}
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
@@ -340,7 +379,7 @@
|
|||||||
'materialJson': JSON.stringify(this.materData),
|
'materialJson': JSON.stringify(this.materData),
|
||||||
'isAcceptance': this.dataForm.isAcceptance,
|
'isAcceptance': this.dataForm.isAcceptance,
|
||||||
'remarks': this.dataForm.remarks,
|
'remarks': this.dataForm.remarks,
|
||||||
'totalSum': this.dataForm.totalSum
|
'storageId': `${ids}${this.dataForm.storageId}`
|
||||||
})
|
})
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
@@ -349,6 +388,7 @@
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
|
this.$refs.upload.clearFiles()
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
}
|
}
|
||||||
@@ -403,12 +443,61 @@
|
|||||||
},
|
},
|
||||||
deleteHandle(index) {
|
deleteHandle(index) {
|
||||||
this.materData.splice(index, 1)
|
this.materData.splice(index, 1)
|
||||||
|
},
|
||||||
|
// 上传文件
|
||||||
|
beforeUpload(file) {
|
||||||
|
let isLt2M = true
|
||||||
|
isLt2M = file.size / 1024 / 1024 < 100
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$message.error('上传文件大小不能超过 100MB!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dataForm.filename = file.name
|
||||||
|
return isLt2M
|
||||||
|
},
|
||||||
|
handleSuccess(response, file, fileList) {
|
||||||
|
this.$notify({title: '上传成功',type: 'success'})
|
||||||
|
this.dataForm.storageId = response.storageId
|
||||||
|
},
|
||||||
|
handleError(e, file, fileList) {
|
||||||
|
const msg = JSON.parse(e.message)
|
||||||
|
this.$notify({
|
||||||
|
title: msg.message,
|
||||||
|
type: 'error',
|
||||||
|
duration: 2500
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleRemove (file, fileList) {
|
||||||
|
this.dataForm.storageId = null
|
||||||
|
},
|
||||||
|
submitUpload () {
|
||||||
|
this.$refs.upload.submit()
|
||||||
|
},
|
||||||
|
deleteFile (e, i) {
|
||||||
|
this.fileData.splice(i, 1)
|
||||||
|
},
|
||||||
|
downloadFile (e) {
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = e.path
|
||||||
|
link.download = e.realName
|
||||||
|
link.click()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.tab_box_wraper {
|
||||||
|
width: 460px;
|
||||||
|
}
|
||||||
|
.file-item {
|
||||||
|
border: 1px solid #eee;
|
||||||
|
padding: 5px 8px 5px 15px;
|
||||||
|
}
|
||||||
|
.file-item-name {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@@ -114,7 +114,6 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.contractId)">修改</el-button>
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.contractId)">修改</el-button>
|
||||||
<el-button type="text" size="small" @click="addTempHandle(scope.row.contractId)">模板</el-button>
|
<el-button type="text" size="small" @click="addTempHandle(scope.row.contractId)">模板</el-button>
|
||||||
<el-button type="text" size="small" @click="uploadHandle(scope.row.contractId)">上传</el-button>
|
|
||||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.contractId)">删除</el-button>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.contractId)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -131,14 +130,12 @@
|
|||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :clientIdOpt="clientIdOpt" :contractTypeOpt="dictsOpt['contract_type']" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :clientIdOpt="clientIdOpt" :contractTypeOpt="dictsOpt['contract_type']" @refreshDataList="getDataList"></add-or-update>
|
||||||
<temp-add-or-update v-if="tempVisible" ref="tempAdd"></temp-add-or-update>
|
<temp-add-or-update v-if="tempVisible" ref="tempAdd"></temp-add-or-update>
|
||||||
<file-upload v-if="uploadVisible" ref="fileUpload"></file-upload>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AddOrUpdate from './contract-add-or-update'
|
import AddOrUpdate from './contract-add-or-update'
|
||||||
import TempAddOrUpdate from './temp-add-or-update'
|
import TempAddOrUpdate from './temp-add-or-update'
|
||||||
import FileUpload from './file-upload'
|
|
||||||
import { dictDetail } from '@/utils/dict'
|
import { dictDetail } from '@/utils/dict'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
@@ -154,15 +151,13 @@
|
|||||||
dataListSelections: [],
|
dataListSelections: [],
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
tempVisible: false,
|
tempVisible: false,
|
||||||
uploadVisible: false,
|
|
||||||
clientIdOpt: []
|
clientIdOpt: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [dictDetail(['contract_type'])],
|
mixins: [dictDetail(['contract_type'])],
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
TempAddOrUpdate,
|
TempAddOrUpdate
|
||||||
FileUpload
|
|
||||||
},
|
},
|
||||||
activated () {
|
activated () {
|
||||||
this.getDictDetail()
|
this.getDictDetail()
|
||||||
@@ -261,13 +256,6 @@
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.tempAdd.init(id)
|
this.$refs.tempAdd.init(id)
|
||||||
})
|
})
|
||||||
},
|
|
||||||
// 上传文件
|
|
||||||
uploadHandle (id) {
|
|
||||||
this.uploadVisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.fileUpload.init(id)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
title="文件上传"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:visible.sync="visible"
|
|
||||||
width="500px">
|
|
||||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
|
||||||
<el-form-item label="文件名" prop="name">
|
|
||||||
<el-input v-model="dataForm.name" placeholder="文件名"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="上传">
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:limit="1"
|
|
||||||
:before-upload="beforeUpload"
|
|
||||||
:auto-upload="false"
|
|
||||||
:headers="headers"
|
|
||||||
:on-success="handleSuccess"
|
|
||||||
:on-error="handleError"
|
|
||||||
:action="$baseUrl + '/api/localStorage' + '?name=' + dataForm.name"
|
|
||||||
>
|
|
||||||
<div class="eladmin-upload"><i class="el-icon-upload" />添加文件</div>
|
|
||||||
<div slot="tip" class="el-upload__tip">可上传任意格式文件,且不超过100M</div>
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="upload">确定</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
visible: false,
|
|
||||||
dataForm: {
|
|
||||||
name: ''
|
|
||||||
},
|
|
||||||
headers: { 'Token': this.$cookie.get('token') }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init (id) {
|
|
||||||
this.visible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs['dataForm'].resetFields()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
beforeUpload(file) {
|
|
||||||
let isLt2M = true
|
|
||||||
isLt2M = file.size / 1024 / 1024 < 100
|
|
||||||
if (!isLt2M) {
|
|
||||||
this.$message.error('上传文件大小不能超过 100MB!')
|
|
||||||
}
|
|
||||||
this.dataForm.name = file.name
|
|
||||||
return isLt2M
|
|
||||||
},
|
|
||||||
handleSuccess(response, file, fileList) {
|
|
||||||
this.$notify({title: '上传成功',type: 'success'})
|
|
||||||
this.$refs.upload.clearFiles()
|
|
||||||
},
|
|
||||||
handleError(e, file, fileList) {
|
|
||||||
const msg = JSON.parse(e.message)
|
|
||||||
this.$notify({
|
|
||||||
title: msg.message,
|
|
||||||
type: 'error',
|
|
||||||
duration: 2500
|
|
||||||
})
|
|
||||||
},
|
|
||||||
upload() {
|
|
||||||
this.$refs.upload.submit()
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('refreshDataList')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<el-form-item label="小车类型" prop="carType">
|
<el-form-item label="小车类型" prop="carType">
|
||||||
<el-select v-model="dataForm.carType" placeholder="小车类型">
|
<el-select v-model="dataForm.carType" placeholder="小车类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictsOpt['car_type']"
|
v-for="item in cartypeOpt"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="异常类型" prop="errorType">
|
<el-form-item label="异常类型" prop="errorType">
|
||||||
<el-select v-model="dataForm.carType" placeholder="异常类型">
|
<el-select v-model="dataForm.errorType" placeholder="异常类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictsOpt['error_type']"
|
v-for="item in dictsOpt['error_type']"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -64,8 +64,6 @@
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
carTypeOpt: [],
|
|
||||||
errorTypeOpt: [],
|
|
||||||
dataForm: {
|
dataForm: {
|
||||||
ticketsId: null,
|
ticketsId: null,
|
||||||
carType: '',
|
carType: '',
|
||||||
@@ -89,6 +87,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
cartypeOpt: Array,
|
||||||
contractOpt: Array,
|
contractOpt: Array,
|
||||||
clientIdOpt: Array,
|
clientIdOpt: Array,
|
||||||
dictsOpt: Object
|
dictsOpt: Object
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
layout="total, sizes, prev, pager, next, jumper">
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :contractOpt="contractOpt" :clientIdOpt="clientIdOpt" :dictsOpt="dictsOpt" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :cartypeOpt="cartypeOpt" :contractOpt="contractOpt" :clientIdOpt="clientIdOpt" :dictsOpt="dictsOpt" @refreshDataList="getDataList"></add-or-update>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -147,11 +147,12 @@
|
|||||||
dataListLoading: false,
|
dataListLoading: false,
|
||||||
dataListSelections: [],
|
dataListSelections: [],
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
|
cartypeOpt: [],
|
||||||
contractOpt: [],
|
contractOpt: [],
|
||||||
clientIdOpt: []
|
clientIdOpt: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [dictDetail(['car_type', 'error_type'])],
|
mixins: [dictDetail(['error_type'])],
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate
|
AddOrUpdate
|
||||||
},
|
},
|
||||||
@@ -161,6 +162,16 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDictDetail () {
|
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({
|
this.$http({
|
||||||
url: this.$http.adornUrl('/flow/contract/list?page=0&limit=9999'),
|
url: this.$http.adornUrl('/flow/contract/list?page=0&limit=9999'),
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
|||||||
Reference in New Issue
Block a user