Commit 1b759ef8 authored by huai.li's avatar huai.li

下班提交

parent b6d441b9
......@@ -7,5 +7,14 @@ export default {
},
getReimNew: {
url: '/vue/reimbursement/get-new'
},
searchProjectByClientId: {
url: '/vue/search/project-by-client-id'
},
saveNewReim: {
url: '/vue/reimbursement/save-new'
},
saveEditReim: {
url: '/vue/reimbursement/save-edit'
}
}
......@@ -45,14 +45,14 @@
:value="option.key"></el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="项目名称:" prop="client_id" class="ec-clear-left ec-form-item-lg is-required">
<el-select v-model="model.client_id" placeholder="请选择">
<el-option v-for="(option, optKey) in item.value"
<el-form-item label="项目名称:" prop="project_id" class="ec-clear-left ec-form-item-lg">
<el-select v-model="model.project_id" size="small" placeholder="请选择">
<el-option v-for="(option, optKey) in options.projectArray"
:key="optKey"
:label="option.name"
:value="option.key"></el-option>
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item label="审核人:" prop="form_reimbursementVerifyRels" class="ec-clear-left ec-form-item-lg is-required">
<el-select v-model="model.form_reimbursementVerifyRels" size="small" multiple placeholder="请选择">
<el-option v-for="(option, optKey) in reimbursementVerifyRels"
......@@ -91,6 +91,10 @@ import settleAccountSelect from './settleAccountSelect'
import singleRadio from '../common/singleRadio'
import settingMixin from '../common/settingMixin'
import depSelect from '../schedule/depSelect'
import {
requestAPI,
api
} from '@/lib/commonMixin'
export default {
name: 'scheduleForm',
......@@ -113,12 +117,18 @@ export default {
return time.getTime() < Date.now() - 8.64e7
}
},
options: {
projectArray: []
},
rules: {},
query: {}
}
},
created () {
this.$watch('model.client_id', function (val) {
this.getProjectArray(val)
})
},
mounted () {
......@@ -129,6 +139,13 @@ export default {
},
methods: {
getProjectArray (id) {
requestAPI(api.searchProjectByClientId, {
client_id: id
}).then(res => {
this.options.projectArray = res
})
}
}
}
</script>
......
......@@ -37,7 +37,9 @@ export default {
client_name: '', // 客户
form_reimbursementVerifyRels: [],
form_reimbursementCarbonCopyRels: [],
description: ''
description: '',
project_id: '',
attachmentFiles: []
}
}
},
......@@ -60,9 +62,10 @@ export default {
},
save () {
let _params = Object.assign({}, setModule(this.model, 'Schedules'))
let _apiUrl = !this.model.id ? api.saveNewSchedule : api.saveEditSchedule
!this.model.id && delete _params['Schedules[id]']
console.log(this.model)
let _params = Object.assign({}, setModule(this.model, 'Reimbursements'))
let _apiUrl = !this.model.id ? api.saveNewReim : api.saveEditReim
!this.model.id && delete _params['Reimbursements[id]']
requestAPI(Object.assign(_apiUrl, { method: 'POST' }), _params)
.then((res) => {
this.$refs.scheduleSidePopup.close()
......
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