|
|
@ -76,14 +76,6 @@ |
|
|
|
<el-option v-for="item in transferState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item prop="certificateSituation">--> |
|
|
|
<!-- <span slot="label">合格证情况:</span>--> |
|
|
|
<!-- <el-select v-model="temp.certificateSituation" class="addinputw" placeholder="请选择合格证情况"--> |
|
|
|
<!-- @change="getQingkuang">--> |
|
|
|
<!-- <el-option v-for="item in qingkuang_list" :key="item.dictKey" :label="item.dictValue"--> |
|
|
|
<!-- :value="item.dictKey"/>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item prop="receiver" v-show="temp.certificateState == '0002'"> |
|
|
@ -289,22 +281,6 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
<!-- <el-form-item>--> |
|
|
|
<!-- <span slot="label">制造厂商:</span>--> |
|
|
|
<!-- <el-autocomplete v-model="temp.manufacturer" :fetch-suggestions="querySearchAsync3" class="addinputw" placeholder="请输入制造厂商" @select="handleSelect3">--> |
|
|
|
<!-- <i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear3"/>--> |
|
|
|
<!-- <template slot-scope="{ item }">--> |
|
|
|
<!-- <div style="paddingg:5px;background-color:Azure;">--> |
|
|
|
<!-- <span>制造厂商:</span>--> |
|
|
|
<!-- <span style="color:red">{{ item.manufacturerName }}</span><br>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-autocomplete>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label">合格印章:</span> |
|
|
@ -340,12 +316,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { details, SaveList, Update } from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { namesDownBySid, selectDownPlus } from '@/api/cheliang/basevehiclemodel' |
|
|
|
import { namesDown } from '@/api/cheliang/basevehicle' |
|
|
|
import { getNamesDownes } from '@/api/cheliang/basemanufacturer' |
|
|
|
import { getChe } from '@/utils/baocun' |
|
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
import ImageUpload from '@/components/uploadFile/ManyImageUpload' // 上传文件 |
|
|
|
export default { |
|
|
@ -356,18 +327,6 @@ export default { |
|
|
|
viewTitle: '', |
|
|
|
dialogVisible: false, |
|
|
|
smRemarks: '', |
|
|
|
// --按钮菜单------- |
|
|
|
menuState: { |
|
|
|
add: false, // 添加 |
|
|
|
edit: false, // 编辑 |
|
|
|
delete: false, // 删除 |
|
|
|
view: false, // 查看 |
|
|
|
audit: false, // 审核 |
|
|
|
input: false, // 导入 |
|
|
|
output: false, // 导出 |
|
|
|
upload: false, // 同步 |
|
|
|
release: false // 下发 |
|
|
|
}, |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
temp: { |
|
|
@ -379,30 +338,13 @@ export default { |
|
|
|
certificateStateValue: '正式', // 合格证状态value |
|
|
|
noticeModel: '', // 公告型号 |
|
|
|
smRemarks: '', |
|
|
|
carModel: '', |
|
|
|
carModel: '' |
|
|
|
}, // 添加和修改 |
|
|
|
templook: {}, // 查看实体 |
|
|
|
Situation: [], |
|
|
|
qingkuang_list: [], |
|
|
|
transferState_list: [], |
|
|
|
stateId: 0, |
|
|
|
dialogFormVisible: false, // 添加修改对话框状态 |
|
|
|
dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
|
|
dialogStatus: '', // 对话框状态 |
|
|
|
fenzuOptions: [], |
|
|
|
attachTypeYingyezhizhao: [], |
|
|
|
props: { |
|
|
|
value: 'id', |
|
|
|
label: 'name', |
|
|
|
children: 'children', |
|
|
|
checkStrictly: true |
|
|
|
}, |
|
|
|
carBrandes: [], |
|
|
|
ChangShangsid: '', |
|
|
|
CJsid: '', |
|
|
|
vinNosse: [], |
|
|
|
Model: [], |
|
|
|
vSid: null, |
|
|
|
rules: { |
|
|
|
certificationNo: [ |
|
|
|
{ required: true, message: '请填写合格证编号', trigger: 'blur' } |
|
|
@ -422,50 +364,28 @@ export default { |
|
|
|
certificateStateValue: [ |
|
|
|
{ required: true, message: '请选择合格证状态', trigger: 'change' } |
|
|
|
] |
|
|
|
// certificatePhoto: [ |
|
|
|
// { required: true, message: '请选择合格证照片', trigger: 'blur' }, |
|
|
|
// ], |
|
|
|
} |
|
|
|
// ------------------------------------ |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'id', |
|
|
|
'roles', |
|
|
|
'rolesIds', |
|
|
|
'departmentId', |
|
|
|
'departmentCode' |
|
|
|
]) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.setDate() |
|
|
|
this.getXChangshang() |
|
|
|
// this.getCheXingHao() |
|
|
|
this.getCheJia() |
|
|
|
this.vSid = getChe() |
|
|
|
console.log('999999999999999999999', this.vSid) |
|
|
|
// 初始化变量 |
|
|
|
// this.init() |
|
|
|
// 加载列表 |
|
|
|
// this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
init() { |
|
|
|
this.stateId = this.$route.params.id |
|
|
|
if (this.stateId !== '0') { |
|
|
|
details(this.stateId).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.temp = response.data |
|
|
|
this.getPinPainting(response.data.manufacturer) |
|
|
|
console.log(this.temp.carBrand, 1111) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
this.setDate() |
|
|
|
this.getXChangshang() |
|
|
|
// this.getCheXingHao() |
|
|
|
this.getCheJia() |
|
|
|
setDate() { |
|
|
|
// 合格证状态 |
|
|
|
typeValues({ type: 'certificateState' }).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.Situation = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
// 移交状态 |
|
|
|
typeValues({ type: 'transferState' }).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.transferState_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showAdd(createOrgSid) { |
|
|
|
this.$nextTick(() => { |
|
|
@ -477,18 +397,19 @@ export default { |
|
|
|
this.temp.certificateStateValue = '正式' |
|
|
|
this.temp.createOrgSid = createOrgSid |
|
|
|
}, |
|
|
|
|
|
|
|
showEdit(sid, row, createOrgSid) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【编辑】合格证信息' |
|
|
|
this.dialogStatus = 'update' |
|
|
|
details(sid).then(resp => { |
|
|
|
const data = resp.data |
|
|
|
this.temp = data |
|
|
|
this.temp.sid = sid |
|
|
|
this.temp.createOrgSid = createOrgSid |
|
|
|
details(sid).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
const data = resp.data |
|
|
|
this.temp = data |
|
|
|
this.temp.sid = sid |
|
|
|
this.temp.createOrgSid = createOrgSid |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
this.temp = row |
|
|
|
}) |
|
|
@ -512,107 +433,6 @@ export default { |
|
|
|
} |
|
|
|
return val |
|
|
|
}, |
|
|
|
getCheXingHao(sid) { |
|
|
|
var sid = { |
|
|
|
sid: sid |
|
|
|
} |
|
|
|
console.log('wowopwpwp', sid) |
|
|
|
selectDownPlus(sid).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.Model = res.data |
|
|
|
console.log('车辆型号', this.Model) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 车架号 |
|
|
|
getCheJia() { |
|
|
|
namesDown({ vinNo: this.temp.vinNo }).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.vinNosse = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 选择数据 |
|
|
|
handleSelect(e) { |
|
|
|
this.temp.vinNo = e.vinNo |
|
|
|
this.CJsid = e.sid |
|
|
|
this.temp.vehicleSid = this.CJsid |
|
|
|
}, |
|
|
|
// 文本模糊查询 |
|
|
|
querySearchAsync(queryString, cb) { |
|
|
|
console.log('查询条件:', queryString) |
|
|
|
if (queryString !== null && queryString !== undefined && queryString !== '') { |
|
|
|
namesDown({ |
|
|
|
name: queryString |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
console.log('1111111111111', response) |
|
|
|
this.datas = response.data |
|
|
|
cb(response.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
cb(this.vinNosse) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 厂商 |
|
|
|
getXChangshang() { |
|
|
|
getNamesDownes({ name: this.temp.manufacturer }).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
console.log('777777777777', res) |
|
|
|
this.facturer = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleSelect3(e) { |
|
|
|
console.log('46588888888888', e) |
|
|
|
this.temp.manufacturer = e.manufacturerName |
|
|
|
this.ChangShangsid = e.sid |
|
|
|
this.getPinPainting(this.ChangShangsid) |
|
|
|
}, |
|
|
|
// 清空信息 |
|
|
|
inputclear3() { |
|
|
|
this.manufacturerName = '' |
|
|
|
this.brandCode = '' |
|
|
|
}, |
|
|
|
// 文本模糊查询 |
|
|
|
querySearchAsync3(queryString, cb) { |
|
|
|
console.log('查询条件:', queryString) |
|
|
|
|
|
|
|
if ( |
|
|
|
queryString !== null && |
|
|
|
queryString !== undefined && |
|
|
|
queryString !== '' |
|
|
|
) { |
|
|
|
getNamesDownes({ |
|
|
|
name: queryString |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
console.log('1111111111111', response) |
|
|
|
this.datas = response.data |
|
|
|
cb(response.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
cb(this.facturer) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 品牌 |
|
|
|
getPinPainting(sid) { |
|
|
|
var manufacturerSid = { |
|
|
|
manufacturerSid: sid |
|
|
|
} |
|
|
|
namesDownBySid(manufacturerSid).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
console.log('品牌数据', res) |
|
|
|
this.carBrandes = res.data |
|
|
|
this.carBrandes.forEach((e) => { |
|
|
|
this.getCheXingHao(e.sid) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 合格证状态 |
|
|
|
getHeGeZheng(value) { |
|
|
|
let bb = null |
|
|
@ -630,20 +450,6 @@ export default { |
|
|
|
this.temp.noticeModel = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
// 合格证情况 |
|
|
|
getQingkuang(value) { |
|
|
|
let bb = null |
|
|
|
this.qingkuang_list.forEach(e => { |
|
|
|
if (e.dictKey === value) { |
|
|
|
bb = { |
|
|
|
name: e.dictValue, |
|
|
|
key: e.dictKey |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.temp.certificateSituationValue = bb.name |
|
|
|
console.log('value值', this.temp.certificateSituationValue) |
|
|
|
}, |
|
|
|
// 移交状态 |
|
|
|
transferStateChange(val) { |
|
|
|
if (val) { |
|
|
@ -652,60 +458,10 @@ export default { |
|
|
|
console.log('name:', this.temp.transferStateValue, 'key:', this.temp.transferStateKey) |
|
|
|
} |
|
|
|
}, |
|
|
|
setDate() { |
|
|
|
// 合格证状态 |
|
|
|
typeValues({ type: 'certificateState' }).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.Situation = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
// 合格证情况 |
|
|
|
typeValues({ type: 'certificateSituation' }).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.qingkuang_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
// 移交状态 |
|
|
|
typeValues({ type: 'transferState' }).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.transferState_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
fileChangeIt(files, imgFiles) { |
|
|
|
this.temp.certificatePhoto = imgFiles |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.temp = { |
|
|
|
certificateSituation: '', |
|
|
|
certificateSituationValue: '', |
|
|
|
certificatePhoto: [], |
|
|
|
certificateState: '0002', // 合格证状态key |
|
|
|
certificateStateValue: '正式', // 合格证状态value |
|
|
|
smRemarks: '' |
|
|
|
} // 添加和修改 |
|
|
|
this.dialogVisible = false |
|
|
|
this.smRemarks = '' |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
|
|
|
|
// 添加前数据初始化 |
|
|
|
resetTemp() { |
|
|
|
this.temp = { |
|
|
|
jc: '', // false string |
|
|
|
organizationId: '', // false string |
|
|
|
qc: '', // false string |
|
|
|
remark: '', // false |
|
|
|
string: '', // |
|
|
|
state: '' // 状态 |
|
|
|
} |
|
|
|
}, |
|
|
|
// 提交添加数据 |
|
|
|
handleCreate() { |
|
|
|
if (this.temp.vinNo !== '' && this.temp.vinNo !== null && this.temp.vinNo !== undefined && this.temp.vinNo.length < 17 && this.temp.vinNo.length !== 8) { |
|
|
@ -720,12 +476,10 @@ export default { |
|
|
|
if (valid) { |
|
|
|
this.FormLoading = true |
|
|
|
if (this.dialogStatus === 'add') { |
|
|
|
console.log('3333333333333', this.temp) |
|
|
|
// this.temp.certificatePhoto = this.attachTypeYingyezhizhao |
|
|
|
SaveList(this.temp).then((response) => { |
|
|
|
console.log('数据聚聚聚' + JSON.stringify(response)) |
|
|
|
this.FormLoading = false |
|
|
|
if (response.code === '200') { |
|
|
|
if (response.success) { |
|
|
|
this.dialogFormVisible = false |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
@ -742,7 +496,6 @@ export default { |
|
|
|
Update(this.temp).then((response) => { |
|
|
|
this.FormLoading = false |
|
|
|
if (response.success) { |
|
|
|
// this.getList() |
|
|
|
if (response.msg !== '该车架号后八位与车辆台账中车架号不符,请填写说明原因') { |
|
|
|
this.dialogFormVisible = false |
|
|
|
this.$notify({ |
|
|
@ -773,84 +526,21 @@ export default { |
|
|
|
this.smRemarks = '' |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
handleUpdate(row) { |
|
|
|
// this.resetTemp() |
|
|
|
// const tempData = Object.assign({}, row) // copy obj |
|
|
|
// this.FormLoading = true |
|
|
|
// getServiceType(tempData.id).then(response => { |
|
|
|
// console.log('修改打开:' + JSON.stringify(response.data)) |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.temp = response.data |
|
|
|
// this.dialogStatus = 'update' |
|
|
|
// this.dialogFormVisible = true |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs['dataForm'].clearValidate() |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: '修改失败', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 提交修改数据 |
|
|
|
updateData() { |
|
|
|
// this.$refs['dataForm'].validate(valid => { |
|
|
|
// if (valid) { |
|
|
|
// // 转换撰写时间类型 |
|
|
|
// this.FormLoading = true |
|
|
|
// // console.log('提交信息:' + JSON.stringify(this.temp)) |
|
|
|
// editServiceType(this.temp).then(response => { |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.getList() |
|
|
|
// this.dialogFormVisible = false |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '修改成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: '修改失败', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开查看 |
|
|
|
handleCheck(row) { |
|
|
|
// const tempData = Object.assign({}, row) // copy obj |
|
|
|
// getServiceType(tempData.id).then(response => { |
|
|
|
// if (response.code === 20000) { |
|
|
|
// // 1. 回显查看 |
|
|
|
// this.templook = response.data |
|
|
|
// // 2. 打开查看 |
|
|
|
// this.dialogFormShowVisible = true |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// 返回 |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.temp = { |
|
|
|
certificateSituation: '', |
|
|
|
certificateSituationValue: '', |
|
|
|
certificatePhoto: [], |
|
|
|
certificateState: '0002', // 合格证状态key |
|
|
|
certificateStateValue: '正式', // 合格证状态value |
|
|
|
smRemarks: '' |
|
|
|
} // 添加和修改 |
|
|
|
this.dialogVisible = false |
|
|
|
this.smRemarks = '' |
|
|
|
this.$emit('doback') |
|
|
|
} |
|
|
|
// imgdata(item) { |
|
|
|
// console.log('8888888888888888888888',item) |
|
|
|
// this.attachTypeYingyezhizhao.push(item.data.filePath) |
|
|
|
// console.log(this.attachTypeYingyezhizhao, 999999999999) |
|
|
|
// }, |
|
|
|
// removeIds(ids) { |
|
|
|
// this.attachTypeYingyezhizhao.forEach((e, index) => { |
|
|
|
// if (e.filePath === ids) { |
|
|
|
// this.attachTypeYingyezhizhao.splice(index, 1) |
|
|
|
// } |
|
|
|
// console.log(this.attachTypeYingyezhizhao, 6666666666) |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|