Bläddra i källkod

货代海空进出增加核算部门 2024-2-28

caojunjie 1 år sedan
förälder
incheckning
6b3d1a91ff

+ 52 - 6
src/views/iosBasicData/AirtransportExport/bills/billsDetails.vue

@@ -341,6 +341,7 @@ import {
                     createUserId:JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // 默认登录人
                     businessType:'AE', // 业务类型 默认
                     billType:'DD', // 单据类型 默认 直单
+                    accDeptName:'',// 核算部门 默认登录人的部门
                     issueType:'正本', // 签单方式 默认 正本
                     mpaymode:'PP', // 主单付费方式 默认PP
                     hpaymode:'PP', // 分单付费方式 默认 PP
@@ -507,12 +508,31 @@ import {
                                 },
                             },
                         ],
-                        {
-                            label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
-                            text:"请输入REF MBLNO",
-                            prop: "refno",
-                            disabled:false,
-                        },
+                        [
+                            {
+                                label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
+                                text:"请输入REF MBLNO",
+                                prop: "refno",
+                                disabled:false,
+                            },
+                            {
+                                label: "核算部门", // 核算部门Id accDept 核算部门 accDeptName 调机构管理接口
+                                text:"请选择核算部门",
+                                prop: "accDeptName",
+                                type:'tree',
+                                dicData:[],
+                                disabled:false,
+                                forParameter:{
+                                    label: "title",
+                                    children:'children'
+                                },
+                                rules: [{
+                                    required: true,
+                                    message: " ",
+                                    trigger: "blur"
+                                }]
+                            },
+                        ],
                         [
                             {
                                 label: "业务编号",
@@ -694,6 +714,7 @@ import {
                 this.userGetListfun(undefined,true) // 获取用户管理数据
             }
             this.ownDeptLazyTreefun() // 获取公司数据
+            this.getLazylistfun() // 获取审核数据
             this.mpaymodeWorkDictsfun() // 获取 付款方式字典
             this.srcTypeWorkDictsfun()
             // 获取所属团队数据
@@ -745,6 +766,15 @@ import {
             userGetListfun(account = undefined,type = false,){
                 userGetList(1,10,{account},this.saberUserInfo.dept_pid.split(',')[0]).then(res=>{
                     // this.columnforfun('operatorName').dicData = res.data.data.records
+                    if (type) {
+                        // 核算部门 默认登录人的部门
+                        for (let item of res.data.data.records) {
+                            if (item.name == this.form.operatorName) {
+                                this.$set(this.form,'accDeptName',item.deptName)
+                                this.$set(this.form,'accDept',item.deptId)
+                            }
+                        }
+                    }
                 })
             },
             // 获取付款方式字典数据
@@ -755,6 +785,12 @@ import {
                     console.log(this.columnforfun('hpaymode'),792)
                 })
             },
+            // 获取核算部分数据 // 机构管理接口
+            getLazylistfun(){
+                getDeptTree().then(res=>{
+                    this.columnforfun('accDeptName').dicData = res.data.data
+                })
+            },
             // 获取客户名称数据 往来单位数据
             getBcorpsListfun(cnName){
                 getBcorpsList(1,10,{cnName}).then(res=>{
@@ -869,6 +905,8 @@ import {
             remoteMethod(value,name) {
                 if (name == 'operatorName') {
                     this.userGetListfun(value)
+                }else if (name == 'accDeptName') {
+                    this.getLazylistfun(value)
                 }else if (name == 'corpCnName') {
                     this.getBcorpsListfun(value)
                 }else if (name == 'mPayplace') {
@@ -914,6 +952,14 @@ import {
                         }
                     }
                 }
+                else if (name == 'accDeptName') {
+                    for(let item of this.columnforfun('accDeptName').dicData) {
+                        if (item.title == value) {
+                            this.form.accDeptName = item.title
+                            this.form.accDept = item.id
+                        }
+                    }
+                }
                 else if (name == 'corpCnName') {
                     if (value) {
                         this.columnforfun('corpAttnName').disabled = false

+ 50 - 6
src/views/iosBasicData/AirtransportImport/bills/billsDetails.vue

@@ -342,6 +342,7 @@ import {
                     createUserId:JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id, // 默认登录人
                     businessType:'AI', // 业务类型 默认
                     billType:'DD', // 单据类型 默认 直单
+                    accDeptName:'',// 核算部门 默认登录人的部门
                     issueType:'正本', // 签单方式 默认 正本
                     mpaymode:'PP', // 主单付费方式 默认PP
                     hpaymode:'PP', // 分单付费方式 默认 PP
@@ -508,12 +509,31 @@ import {
                                 },
                             },
                         ],
-                        {
-                            label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
-                            text:"请输入REF MBLNO",
-                            prop: "refno",
-                            disabled:false,
-                        },
+                        [
+                            {
+                                label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
+                                text:"请输入REF MBLNO",
+                                prop: "refno",
+                                disabled:false,
+                            },
+                            {
+                                label: "核算部门", // 核算部门Id accDept 核算部门 accDeptName 调机构管理接口
+                                text:"请选择核算部门",
+                                prop: "accDeptName",
+                                type:'tree',
+                                dicData:[],
+                                disabled:false,
+                                forParameter:{
+                                    label: "title",
+                                    children:'children'
+                                },
+                                rules: [{
+                                    required: true,
+                                    message: " ",
+                                    trigger: "blur"
+                                }]
+                            },
+                        ],
                         [
                             {
                                 label: "业务编号",
@@ -695,6 +715,7 @@ import {
                 this.userGetListfun(undefined,true) // 获取用户管理数据
             }
             this.ownDeptLazyTreefun() // 获取公司数据
+            this.getLazylistfun() // 获取审核数据
             this.mpaymodeWorkDictsfun() // 获取 付款方式字典
             this.srcTypeWorkDictsfun()
             // 获取所属团队数据
@@ -744,6 +765,15 @@ import {
             userGetListfun(account = undefined,type = false,){
                 userGetList(1,10,{account}).then(res=>{
                     // this.columnforfun('operatorName').dicData = res.data.data.records
+                    if (type) {
+                        // 核算部门 默认登录人的部门
+                        for (let item of res.data.data.records) {
+                            if (item.name == this.form.operatorName) {
+                                this.$set(this.form,'accDeptName',item.deptName)
+                                this.$set(this.form,'accDept',item.deptId)
+                            }
+                        }
+                    }
                 })
             },
             // 获取付款方式字典数据
@@ -756,6 +786,12 @@ import {
                     console.log(this.columnforfun('hpaymode'),792)
                 })
             },
+            // 获取核算部分数据 // 机构管理接口
+            getLazylistfun(){
+                getDeptTree().then(res=>{
+                    this.columnforfun('accDeptName').dicData = res.data.data
+                })
+            },
             // 获取客户名称数据 往来单位数据
             getBcorpsListfun(cnName){
                 getBcorpsList(1,10,{cnName}).then(res=>{
@@ -915,6 +951,14 @@ import {
                         }
                     }
                 }
+                else if (name == 'accDeptName') {
+                    for(let item of this.columnforfun('accDeptName').dicData) {
+                        if (item.title == value) {
+                            this.form.accDeptName = item.title
+                            this.form.accDept = item.id
+                        }
+                    }
+                }
                 else if (name == 'corpCnName') {
                     if (value) {
                         this.columnforfun('corpAttnName').disabled = false

+ 2 - 2
src/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue

@@ -777,7 +777,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         for (let item of this.columnforfun('operatorName').dicData) {
                             if (item.name == this.form.operatorName) {
                                 this.$set(this.form,'accDeptName',item.deptName)
-                                this.$set(this.form,'accDeptId',item.deptId)
+                                this.$set(this.form,'accDept',item.deptId)
                             }
                         }
                     }
@@ -985,7 +985,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                     for(let item of this.columnforfun('accDeptName').dicData) {
                         if (item.title == value) {
                             this.form.accDeptName = item.title
-                            this.form.accDeptId = item.id
+                            this.form.accDept = item.id
                         }
                     }
                 }

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -813,7 +813,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         for (let item of this.columnforfun('operatorName').dicData) {
                             if (item.name == this.form.operatorName) {
                                 this.$set(this.form,'accDeptName',item.deptName)
-                                this.$set(this.form,'accDeptId',item.deptId)
+                                this.$set(this.form,'accDept',item.deptId)
                             }
                         }
                     }
@@ -1028,7 +1028,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                     for(let item of this.columnforfun('accDeptName').dicData) {
                         if (item.title == value) {
                             this.form.accDeptName = item.title
-                            this.form.accDeptId = item.id
+                            this.form.accDept = item.id
                         }
                     }
                 }