|
|
@ -103,9 +103,8 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getPathSidByUserSid } from '@/api/cheliang/dictcommons.js' |
|
|
|
import { getOrgSidByPath } from '@/api/cheliang/dictcommons.js' |
|
|
|
import { getCarInspectedInfo, saveCarInspectedInfo, submitCarInspectedInfo } from '@/api/supplychain/yancheguanli' |
|
|
|
import { getUseOrgByUserSid } from '@/api/cheliang/basevehicle' |
|
|
|
import Upload from '@/components/uploadFile/uploadImg.vue' |
|
|
|
import vehiclechecklist from '@/views/supplychain/yancheguanli/vehiclechecklist' |
|
|
|
|
|
|
@ -137,7 +136,8 @@ export default { |
|
|
|
inspectedSid: '', |
|
|
|
modelDifferenceExplain: '', |
|
|
|
guaranteeCardNo: '', |
|
|
|
engineNo: '' |
|
|
|
engineNo: '', |
|
|
|
orgPath: '' |
|
|
|
}, // 添加和修改 |
|
|
|
dialogFormVisible: false, // 添加修改对话框状态 |
|
|
|
dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
|
@ -200,11 +200,11 @@ export default { |
|
|
|
console.log('imgList01', this.imgList01) |
|
|
|
} |
|
|
|
if (this.temp.factoryImage.length > 0) { |
|
|
|
for (var i = 0; i < this.temp.factoryImage.length; i++) { |
|
|
|
const imgName = this.temp.factoryImage[i].split('/') |
|
|
|
for (var k = 0; k < this.temp.factoryImage.length; k++) { |
|
|
|
const imgName = this.temp.factoryImage[k].split('/') |
|
|
|
this.imgList02.push({ |
|
|
|
name: imgName[imgName.length - 1], |
|
|
|
url: this.temp.factoryImage[i] |
|
|
|
url: this.temp.factoryImage[k] |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log('imgList02', this.imgList02) |
|
|
@ -212,30 +212,6 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// showEdit(sid) { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs['dataForm'].clearValidate() |
|
|
|
// }) |
|
|
|
// this.dialogStatus = 'update' |
|
|
|
// this.viewTitle = '【修改】车辆台账' |
|
|
|
// this.temp.sid = sid |
|
|
|
// console.log('修改页面sid', this.temp.sid) |
|
|
|
// getCarInspected(sid).then((response) => { |
|
|
|
// if (response.code === '200') { |
|
|
|
// if (response.data.createOrg) { |
|
|
|
// console.log('级联选择1:', response.data.useOrg) |
|
|
|
// this.useOrgArry = response.data.createOrg |
|
|
|
// console.log('级联选择2:', this.useOrgArry) |
|
|
|
// } |
|
|
|
// this.temp = response.data |
|
|
|
// this.getLocation() |
|
|
|
// this.getModelConfig(this.temp.modelSid) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// this.getType() |
|
|
|
// this.getZuZhi() |
|
|
|
// this.getUseOrg() |
|
|
|
// }, |
|
|
|
handleChecklist() { |
|
|
|
this.isCheck = false |
|
|
|
this.$refs['divchecklist'].showCheck(this.temp.inspectedSid) |
|
|
@ -243,23 +219,9 @@ export default { |
|
|
|
resetState() { |
|
|
|
this.isCheck = true |
|
|
|
}, |
|
|
|
// 获得使用组织 |
|
|
|
getUseOrg() { |
|
|
|
const userSid = window.sessionStorage.getItem('userSid') |
|
|
|
getUseOrgByUserSid({ userSid: userSid }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.temp.useOrgName = res.data.name |
|
|
|
this.temp.useOrg = res.data.sid |
|
|
|
this.temp.createOrg = res.data.sid |
|
|
|
this.temp.createOrgName = res.data.name |
|
|
|
this.org_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getPathSid() { |
|
|
|
const userSid = window.sessionStorage.getItem('userSid') |
|
|
|
getPathSidByUserSid({ userSid: userSid }).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.listQuery.params.createOrgSId = res.data |
|
|
|
this.useOrg = res.data |
|
|
|
} |
|
|
@ -279,8 +241,8 @@ export default { |
|
|
|
if (this.imgList02.length > 0) { |
|
|
|
console.log('imgList02', this.imgList02) |
|
|
|
const img02_list = [] |
|
|
|
for (var i = 0; i < this.imgList02.length; i++) { |
|
|
|
img02_list.push(this.imgList02[i].url) |
|
|
|
for (var k = 0; k < this.imgList02.length; k++) { |
|
|
|
img02_list.push(this.imgList02[k].url) |
|
|
|
this.temp.factoryImage = img02_list |
|
|
|
} |
|
|
|
} else { |
|
|
@ -310,6 +272,7 @@ export default { |
|
|
|
// 提交添加数据 |
|
|
|
handleCreate() { |
|
|
|
this.getUrl() |
|
|
|
this.temp.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.FormLoading = true |
|
|
@ -342,6 +305,7 @@ export default { |
|
|
|
}, |
|
|
|
handlePass() { |
|
|
|
this.getUrl() |
|
|
|
this.temp.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
this.$refs['dataForm'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
submitCarInspectedInfo(this.temp).then((response) => { |
|
|
@ -377,16 +341,6 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 处理图片 |
|
|
|
// this.temp.vehiclePhoto = [] |
|
|
|
// if (this.vehiclePhoto_Images.length > 0) { |
|
|
|
// for (var i = 0; i < this.vehiclePhoto_Images.length; i++) { |
|
|
|
// var image_start = this.vehiclePhoto_Images.indexOf('/upload') + 8 |
|
|
|
// var image_url = this.vehiclePhoto_Images.substring(image_start) |
|
|
|
// this.temp.vehiclePhoto.push(image_url) |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|