|
@ -17,7 +17,7 @@ |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item prop="contractNo"> |
|
|
<el-form-item prop="contractNo"> |
|
|
<span slot="label">合同编号</span> |
|
|
<span slot="label">合同编号</span> |
|
|
<el-input v-model="temp.contractNo" maxlength="125" placeholder="" class="addinputw" clearable/> |
|
|
<el-input v-model="temp.contractNo" placeholder="" class="addinputw" clearable/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
@ -61,13 +61,13 @@ |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item prop="address"> |
|
|
<el-form-item prop="address"> |
|
|
<span slot="label">签订地点</span> |
|
|
<span slot="label">签订地点</span> |
|
|
<el-input v-model="temp.address" maxlength="125" placeholder="" class="addinputw" clearable/> |
|
|
<el-input v-model="temp.address" placeholder="" class="addinputw" clearable/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item prop="contractAmount"> |
|
|
<el-form-item prop="contractAmount"> |
|
|
<span slot="label">合同金额</span> |
|
|
<span slot="label">合同金额</span> |
|
|
<el-input v-model="temp.contractAmount" maxlength="125" placeholder="" type="Number" class="addinputw" clearable/> |
|
|
<el-input v-model="temp.contractAmount" placeholder="" type="Number" class="addinputw" clearable/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -75,13 +75,13 @@ |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item prop="deposit"> |
|
|
<el-form-item prop="deposit"> |
|
|
<span slot="label">订金</span> |
|
|
<span slot="label">订金</span> |
|
|
<el-input v-model="temp.deposit" maxlength="125" placeholder="" type="Number" class="addinputw" clearable/> |
|
|
<el-input v-model="temp.deposit" placeholder="" type="Number" class="addinputw" clearable/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item prop="remarks"> |
|
|
<el-form-item> |
|
|
<span slot="label">备注</span> |
|
|
<span slot="label">备注</span> |
|
|
<el-input v-model="temp.remarks" maxlength="125" placeholder="" class="addinputw" clearable/> |
|
|
<el-input v-model="temp.remarks" placeholder="" class="addinputw" clearable/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -113,7 +113,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { saveContract, getOneContract, updateContract, submitVehicleApply } from '@/api/jichuxinxi/contract' |
|
|
import { getOneContract, updateContract, submitVehicleApply } from '@/api/jichuxinxi/contract' |
|
|
import Upload from '@/components/uploadFile/upload.vue' // 上传文件 |
|
|
import Upload from '@/components/uploadFile/upload.vue' // 上传文件 |
|
|
import { typeValues } from '@/api/dictcommons/dictcommons' |
|
|
import { typeValues } from '@/api/dictcommons/dictcommons' |
|
|
|
|
|
|
|
@ -122,7 +122,7 @@ export default { |
|
|
components: { Upload }, |
|
|
components: { Upload }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
submitdisabled: false, // 提交按钮 |
|
|
submitdisabled: false, // 提交按钮、保存按钮 |
|
|
viewTitle: '', |
|
|
viewTitle: '', |
|
|
// 图片上传 |
|
|
// 图片上传 |
|
|
dialogImageUrl: '', |
|
|
dialogImageUrl: '', |
|
@ -155,12 +155,13 @@ export default { |
|
|
remarks: '', |
|
|
remarks: '', |
|
|
sceneSignUrl: '', |
|
|
sceneSignUrl: '', |
|
|
sceneSignUrlList: [], |
|
|
sceneSignUrlList: [], |
|
|
|
|
|
idCardImages: [], |
|
|
sid: '', |
|
|
sid: '', |
|
|
staffName: '', |
|
|
staffName: '', |
|
|
staffSid: '' |
|
|
staffSid: '' |
|
|
}, |
|
|
}, |
|
|
rules: { |
|
|
rules: { |
|
|
contractType: [{ required: true, message: '合同类型不能为空', trigger: 'blur' }], |
|
|
contractType: [{ required: true, message: '合同类型不能为空', trigger: 'change' }], |
|
|
contractNo: [{ required: true, message: '合同编号不能为空', trigger: 'blur' }], |
|
|
contractNo: [{ required: true, message: '合同编号不能为空', trigger: 'blur' }], |
|
|
address: [{ required: true, message: '签订地点不能为空', trigger: 'blur' }], |
|
|
address: [{ required: true, message: '签订地点不能为空', trigger: 'blur' }], |
|
|
contractAmount: [{ required: true, message: '合同金额不能为空', trigger: 'blur' }], |
|
|
contractAmount: [{ required: true, message: '合同金额不能为空', trigger: 'blur' }], |
|
@ -191,27 +192,64 @@ export default { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs['temp_obj'].clearValidate() |
|
|
this.$refs['temp_obj'].clearValidate() |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.viewTitle = '【编辑】合同审核' |
|
|
getOneContract(row.sid).then((res) => { |
|
|
getOneContract(row.sid).then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.temp = res.data |
|
|
this.temp = res.data |
|
|
|
|
|
if (this.temp.pcCommonAppendixDtoList.length > 0) { |
|
|
|
|
|
this.temp.pcCommonAppendixDtoList.forEach((e) => { |
|
|
|
|
|
this.list1.push({ |
|
|
|
|
|
name: e.fileName, |
|
|
|
|
|
filePath: e.filePath, |
|
|
|
|
|
size: e.fileSize, |
|
|
|
|
|
url: e.filePath |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (this.temp.sceneSignUrlList.length > 0) { |
|
|
|
|
|
this.temp.sceneSignUrlList.forEach((e) => { |
|
|
|
|
|
this.list2.push({ |
|
|
|
|
|
name: e.fileName, |
|
|
|
|
|
filePath: e.filePath, |
|
|
|
|
|
size: e.fileSize, |
|
|
|
|
|
url: e.filePath |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (this.temp.idCardImages.length > 0) { |
|
|
|
|
|
this.temp.idCardImages.forEach((e) => { |
|
|
|
|
|
this.list3.push({ |
|
|
|
|
|
name: e.fileName, |
|
|
|
|
|
filePath: e.filePath, |
|
|
|
|
|
size: e.fileSize, |
|
|
|
|
|
url: e.filePath |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.viewTitle = '【编辑】合同审核' |
|
|
|
|
|
}, |
|
|
}, |
|
|
typeChange(val) { |
|
|
typeChange(val) { |
|
|
const choosetItem = this.typeList.filter((item) => item.dictValue === val) |
|
|
const choose = this.typeList.filter((item) => item.dictValue === val) |
|
|
this.temp.contractTypeKey = choosetItem[0].dictKey |
|
|
if (choose.length > 0) { |
|
|
|
|
|
this.temp.contractTypeKey = choose[0].dictKey |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 添加数据 |
|
|
// 添加数据 |
|
|
handleCreate() { |
|
|
handleCreate() { |
|
|
this.$refs['temp_obj'].validate((valid) => { |
|
|
this.$refs['temp_obj'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
|
|
|
this.getUrl() |
|
|
this.submitdisabled = true |
|
|
this.submitdisabled = true |
|
|
updateContract(this.temp).then((res) => { |
|
|
updateContract(this.temp).then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|
|
this.handleReturn('true') |
|
|
this.handleReturn('true') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.submitdisabled = false |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.submitdisabled = false |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -220,10 +258,11 @@ export default { |
|
|
handleSubmit() { |
|
|
handleSubmit() { |
|
|
this.$refs['temp_obj'].validate((valid) => { |
|
|
this.$refs['temp_obj'].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
|
|
|
this.getUrl() |
|
|
this.submitdisabled = true |
|
|
this.submitdisabled = true |
|
|
submitVehicleApply(this.temp).then((resp) => { |
|
|
submitVehicleApply(this.temp).then((resp) => { |
|
|
if (resp.success) { |
|
|
if (resp.success) { |
|
|
this.$message({ showClose: true, type: 'success', message: '提交成功'}) |
|
|
this.$message({ showClose: true, type: 'success', message: '提交成功' }) |
|
|
this.handleReturn('true') |
|
|
this.handleReturn('true') |
|
|
} else { |
|
|
} else { |
|
|
this.submitdisabled = false |
|
|
this.submitdisabled = false |
|
@ -235,19 +274,41 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getUrl() { |
|
|
getUrl() { |
|
|
for (var i = 0; i < this.list1.length; i++) { |
|
|
if (this.list1.length > 0) { |
|
|
var namese = this.list1[i].name |
|
|
for (var i = 0; i < this.list1.length; i++) { |
|
|
var nameArr = namese.split('.') |
|
|
this.temp.pcCommonAppendixDtoList.push({ |
|
|
console.log(this.temp) |
|
|
name: window.sessionStorage.getItem('name'), |
|
|
this.temp.pcCommonAppendixDtoList.push({ |
|
|
createBySid: window.sessionStorage.getItem('userSid'), |
|
|
attachType: '0001', |
|
|
fileName: this.list1[i].name, |
|
|
fileName: this.list1[i].name, |
|
|
filePath: this.list1[i].url, |
|
|
filePath: this.list1[i].url, |
|
|
fileSize: this.list1[i].size, |
|
|
fileSize: this.list1[i].size, |
|
|
fileType: this.list1[i].name.substr(this.list1[i].name.lastIndexOf('.')) |
|
|
createBySid: '', |
|
|
}) |
|
|
fileType: nameArr[nameArr.length - 1] |
|
|
} |
|
|
}) |
|
|
} |
|
|
console.log('11223344', this.temp.pcCommonAppendixDtoList) |
|
|
if (this.list2.length > 0) { |
|
|
|
|
|
for (var k = 0; k < this.list2.length; k++) { |
|
|
|
|
|
this.temp.sceneSignUrlList.push({ |
|
|
|
|
|
name: window.sessionStorage.getItem('name'), |
|
|
|
|
|
createBySid: window.sessionStorage.getItem('userSid'), |
|
|
|
|
|
fileName: this.list2[k].name, |
|
|
|
|
|
filePath: this.list2[k].url, |
|
|
|
|
|
fileSize: this.list2[k].size, |
|
|
|
|
|
fileType: this.list2[k].name.substr(this.list2[k].name.lastIndexOf('.')) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.list3.length > 0) { |
|
|
|
|
|
for (var p = 0; p < this.list3.length; p++) { |
|
|
|
|
|
this.temp.idCardImages.push({ |
|
|
|
|
|
name: window.sessionStorage.getItem('name'), |
|
|
|
|
|
createBySid: window.sessionStorage.getItem('userSid'), |
|
|
|
|
|
fileName: this.list3[p].name, |
|
|
|
|
|
filePath: this.list3[p].url, |
|
|
|
|
|
fileSize: this.list3[p].size, |
|
|
|
|
|
fileType: this.list3[p].name.substr(this.list3[p].name.lastIndexOf('.')) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 返回 |
|
|
// 返回 |
|
@ -269,7 +330,8 @@ export default { |
|
|
pcCommonAppendixDtoList: [], |
|
|
pcCommonAppendixDtoList: [], |
|
|
remarks: '', |
|
|
remarks: '', |
|
|
sceneSignUrl: '', |
|
|
sceneSignUrl: '', |
|
|
sceneSignUrlList: '', |
|
|
sceneSignUrlList: [], |
|
|
|
|
|
idCardImages: [], |
|
|
sid: '', |
|
|
sid: '', |
|
|
staffName: '', |
|
|
staffName: '', |
|
|
staffSid: '' |
|
|
staffSid: '' |
|
@ -277,6 +339,7 @@ export default { |
|
|
this.list3 = [] |
|
|
this.list3 = [] |
|
|
this.list2 = [] |
|
|
this.list2 = [] |
|
|
this.list1 = [] |
|
|
this.list1 = [] |
|
|
|
|
|
this.submitdisabled = false |
|
|
this.$refs['temp_obj'].resetFields() |
|
|
this.$refs['temp_obj'].resetFields() |
|
|
this.$emit('handleReturn') |
|
|
this.$emit('handleReturn') |
|
|
} |
|
|
} |
|
|