|
@@ -23,7 +23,9 @@
|
|
|
<el-select
|
|
|
v-model="dataForm.level"
|
|
|
:disabled="display"
|
|
|
- placeholder="请选择">
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width:100%"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in optionsLevel"
|
|
|
:key="item.code"
|
|
@@ -58,11 +60,16 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row class="my-row">
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="掌握人" prop="masterIds">
|
|
|
<user-components v-model="dataForm.masterIds" :user-ids="dataForm.masterIds" @change='masterChange' :disabled="display" style="width:100%;"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="负责人" prop="masterIds">
|
|
|
+ <user-component v-model="dataForm.foreman" :user-id="dataForm.foreman" @userSelected='foremanChange' :disabled="display" style="width:100%;"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -75,11 +82,12 @@
|
|
|
|
|
|
<script>
|
|
|
import UserComponents from '../common/user-components'
|
|
|
+ import UserComponent from '../common/user-component'
|
|
|
import { getDictList } from '@/api/dict'
|
|
|
import { addOrUpdateWorkType, getWorkTypeDetail } from '@/api/product'
|
|
|
export default {
|
|
|
name: 'work-type-add-or-update',
|
|
|
- components: {UserComponents},
|
|
|
+ components: {UserComponents, UserComponent},
|
|
|
computed: {
|
|
|
orgId: {
|
|
|
get () { return this.$store.state.user.orgId }
|
|
@@ -142,7 +150,8 @@
|
|
|
orgId: this.orgId,
|
|
|
requirement: this.dataForm.requirement,
|
|
|
quotedPrice: this.dataForm.quotedPrice,
|
|
|
- typeId: this.id ? this.id : null
|
|
|
+ typeId: this.id ? this.id : null,
|
|
|
+ foreman: this.dataForm.foreman
|
|
|
}
|
|
|
addOrUpdateWorkType(params, !this.id).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
@@ -164,6 +173,9 @@
|
|
|
},
|
|
|
masterChange (val) {
|
|
|
this.dataForm.masterIds = val
|
|
|
+ },
|
|
|
+ foremanChange (val) {
|
|
|
+ this.dataForm.foreman = val
|
|
|
}
|
|
|
}
|
|
|
}
|