|
@@ -391,7 +391,7 @@ import { listBookingworkticket, getBookingworkticket, delBookingworkticket, addB
|
|
|
import { listWorkcontent, getWorkcontent, delWorkcontent, addWorkcontent, updateWorkcontent, exportWorkcontent,getWorkcontentBybookingticketId} from "@/api/invoice/workcontent";
|
|
|
import { listDevice, getDevice, delDevice, updateDevice, exportDevice, selectDevice} from "@/api/invoice/device";
|
|
|
import { listUnit, getUnit, delUnit, addUnit, updateUnit, exportUnit,getUserByUnit} from "@/api/invoice/unit";
|
|
|
-import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus,userDataScope } from "@/api/system/user";
|
|
|
+import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus,userDataScope,getUserByUserName } from "@/api/system/user";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -560,7 +560,7 @@ export default {
|
|
|
checkCategoryPromotion(oneId){
|
|
|
|
|
|
getUserByUnit(oneId).then(response => {
|
|
|
- this.form.userMg=null;
|
|
|
+ // this.form.userMg=null;
|
|
|
this.userMgOptions = response.data;
|
|
|
// let arr= response.data.userIds.split(',');
|
|
|
});
|
|
@@ -803,8 +803,11 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.resetForm1();
|
|
|
- var names =this.$store.state.user.name
|
|
|
- this.form.workUnit=names;
|
|
|
+ var names =this.$store.state.user.name
|
|
|
+ //查询用户归属的部门名称
|
|
|
+ getUserByUserName(names).then(response => {
|
|
|
+ this.form.workUnit=response.data.dept.deptName;
|
|
|
+ });
|
|
|
this.open = true;
|
|
|
this.title = "添加预约作业票台账";
|
|
|
|
|
@@ -812,21 +815,22 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- // console.log(row)
|
|
|
const id = row.bookingticketId || this.ids
|
|
|
getBookingworkticket(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
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=[]
|
|
|
+ let arr=row.floorLocation.split(",")
|
|
|
+ let st=[]
|
|
|
// 将字符串数组的每一项转换成Number,生成一个新的数组
|
|
|
for (var arrInt in arr) {
|
|
|
- st.push(parseInt(arr[arrInt]))
|
|
|
+ st.push(parseInt(arr[arrInt]))
|
|
|
}
|
|
|
- this.form.floorLocation=st
|
|
|
+ this.form.floorLocation=st
|
|
|
|
|
|
this.ruleForm.length=response.data.tInvoiceWorkcontentList.length
|
|
|
});
|