|
@@ -226,7 +226,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="用户单位" prop="userUnit">
|
|
|
- <el-select v-model="form.userUnit" placeholder="请选择用户单位" @change="checkCategoryPromotion(form.userUnit)">
|
|
|
+ <el-select v-model="form.userUnit" placeholder="请选择用户单位" @change="checkCategoryPromotionUpdate(form.userUnit)">
|
|
|
<el-option
|
|
|
v-for="dict in userUnitOptions"
|
|
|
:key="dict.dictValue"
|
|
@@ -563,6 +563,15 @@ export default {
|
|
|
checkCategoryPromotion(oneId){
|
|
|
|
|
|
getUserByUnit(oneId).then(response => {
|
|
|
+ // this.form.userMg=null;
|
|
|
+ this.userMgOptions = response.data;
|
|
|
+ // let arr= response.data.userIds.split(',');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //修改用户单位时,级联的用户主管下拉数据应清空,否则会造成用户修改了用户单位,但未重新选择相应的用户主管
|
|
|
+ checkCategoryPromotionUpdate(oneId){
|
|
|
+ this.form.userMg=null;
|
|
|
+ getUserByUnit(oneId).then(response => {
|
|
|
// this.form.userMg=null;
|
|
|
this.userMgOptions = response.data;
|
|
|
// let arr= response.data.userIds.split(',');
|
|
@@ -850,11 +859,13 @@ export default {
|
|
|
const id = row.bookingticketId || this.ids
|
|
|
getBookingworkticket(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ // 回显用户主管
|
|
|
+ this.checkCategoryPromotion( response.data.userUnit);
|
|
|
this.open = true;
|
|
|
this.title = "修改预约作业票台账";
|
|
|
this.ruleForm=response.data.tInvoiceWorkcontentList
|
|
|
- // 回显用户主管
|
|
|
- this.checkCategoryPromotion(this.form.userUnit);
|
|
|
+
|
|
|
+
|
|
|
// console.log(row.floorLocation) 将后台的字符串数组重新转换为el-select要的数组格式
|
|
|
let arr=row.floorLocation.split(",")
|
|
|
let st=[]
|