Commit e6714fc7 authored by huai.li's avatar huai.li

修复新建工单

parent 2ac46e87
<template> <template>
<section> <section>
<sidePopup ref="sidePopup" title="新建文档" :width="50" @update:close="() => btnClose()"> <sidePopup ref="sidePopup" title="新建工单" :width="50" @update:close="() => btnClose()">
<CaseForm <CaseForm
ref="form" ref="form"
:model="model"> :model="model">
...@@ -69,9 +69,11 @@ export default { ...@@ -69,9 +69,11 @@ export default {
}, },
save () { save () {
let _params = Object.assign({}, setModule(this.model, 'Documents')) let _params = Object.assign({}, setModule(this.model, 'Cases'))
_params['CaseAssignments[engineer_id]'] = _params['Cases[engineer_id]']
delete _params['Cases[engineer_id]']
let _apiUrl = !this.model.id ? api.saveCaseNew : api.saveCaseEdit let _apiUrl = !this.model.id ? api.saveCaseNew : api.saveCaseEdit
!this.model.id && delete _params['Documents[id]'] !this.model.id && delete _params['Cases[id]']
this.$refs['form']._validate(() => { this.$refs['form']._validate(() => {
requestAPI(Object.assign(_apiUrl, { method: 'POST' }), _params) requestAPI(Object.assign(_apiUrl, { method: 'POST' }), _params)
.then((res) => { .then((res) => {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</el-col> </el-col>
</el-form> </el-form>
<el-form ref="clientTimeRange" :model="clientTimeRange" size="mini"> <el-form ref="clientTimeRange" :model="clientTimeRange" size="mini">
<el-col :span="8" :offset="8" :xs="{span: 24, offset: 0}" class="form-content-time-range"> <el-col :span="9" :offset="7" :xs="{span: 24, offset: 0}" class="form-content-time-range">
<el-form-item label-width="0"> <el-form-item label-width="0">
<el-date-picker <el-date-picker
size="mini" size="mini"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment