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

下班提交

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