2 Commits 2437ca57e1 ... 53f2e010a7

Author SHA1 Message Date
  wfg 53f2e010a7 Merge remote-tracking branch 'origin/dev' into dev 2 weeks ago
  wfg 8e5e3cf6ed 2025.12.08 2 weeks ago

+ 8 - 3
src/page/index/logo.vue

@@ -27,11 +27,16 @@ export default {
     };
   },
   created() {
-    if (JSON.parse(localStorage.getItem('user-Information')).logoUrl.includes("png")) {
-      this.logoUrl = JSON.parse(localStorage.getItem('user-Information')).logoUrl
+    try{
+      if (JSON.parse(localStorage.getItem('user-Information')).logoUrl.includes("png")) {
+        this.logoUrl = JSON.parse(localStorage.getItem('user-Information')).logoUrl
+      }
+    }catch (e) {
+      this.logoUrl = "";
     }
     if(!this.logoUrl){
-      this.logoUrl = "/bladex/409341/1703930204684140545/jms.png"
+      // http://192.168.161.11:9000/bladex/409341/1703930204684140545/jms.png
+      this.logoUrl = "http://192.168.161.11:9000/bladex/409341/1703930204684140545/jms.png"
     }
   },
   computed: {

+ 21 - 21
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -207,19 +207,19 @@ export default {
                         // type:"number",
                         width: "120"
                     },
-                    {
-                        label: "温度单位",
-                        prop: "temperatureUnit",
-                        type: 'select',
-                        cell: true,
-                        dicData: [{
-                            label: '摄氏度',
-                            value: 'C'
-                        }, {
-                            label: '华氏度',
-                            value: 'F'
-                        }]
-                    },
+                    // {
+                    //     label: "温度单位",
+                    //     prop: "temperatureUnit",
+                    //     type: 'select',
+                    //     cell: true,
+                    //     dicData: [{
+                    //         label: '摄氏度',
+                    //         value: 'C'
+                    //     }, {
+                    //         label: '华氏度',
+                    //         value: 'F'
+                    //     }]
+                    // },
                     {
                         label: "通风度",
                         prop: "ventilation",
@@ -600,10 +600,10 @@ export default {
                         name: "温度",
                         value: "temperature",
                     },
-                    {
-                        name: "温度单位",
-                        value: "temperatureUnit",
-                    },
+                    // {
+                    //     name: "温度单位",
+                    //     value: "temperatureUnit",
+                    // },
                     {
                         name: "通风度",
                         value: "ventilation",
@@ -655,10 +655,10 @@ export default {
                         name: "温度",
                         value: "temperature",
                     },
-                    {
-                        name: "温度单位",
-                        value: "temperatureUnit",
-                    },
+                    // {
+                    //     name: "温度单位",
+                    //     value: "temperatureUnit",
+                    // },
                     {
                         name: "通风度",
                         value: "ventilation",

+ 7 - 7
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -1708,13 +1708,13 @@ export default {
     // 获取当前登录人个人信息
     this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
 
-    this.optionBack.column.forEach((col, index) => {
-      col.index = index + 1;
-      col.filters = false;
-    });
-    this.mawbOptionBack.column.forEach((col, index) => {
-      col.index = index + 1;
-    });
+    // this.optionBack.column.forEach((col, index) => {
+    //   col.index = index + 1;
+    //   col.filters = false;
+    // });
+    // this.mawbOptionBack.column.forEach((col, index) => {
+    //   col.index = index + 1;
+    // });
 
     this.option = await this.getColumnData(this.getColumnName(309), this.optionBack);
     this.mawbOption = await this.getColumnData(this.getColumnName(309.7), this.mawbOptionBack); // 主单列表

+ 1 - 1
src/views/iosBasicData/accounts/assembly/accountsDialog.vue

@@ -52,7 +52,7 @@
                         <el-form-item label="上级科目:" prop="parentCode">
                             <el-input style="width: 100%;" v-model="form.parentCode"
                                       size="small" autocomplete="off" :disabled="true"
-                                      clearable placeholder="请输入上级科目" >
+                                      clearable placeholder="上级科目" >
                             </el-input>
                         </el-form-item>
                     </el-col>

+ 8 - 2
src/views/iosBasicData/accounts/index.vue

@@ -80,7 +80,7 @@
           :visible.sync="accountsVisible"
           class="el-dialogDeep"
           width="60%"
-          :close-on-click-modal="false"	
+          :close-on-click-modal="false"
           :before-close="handleClose">
           <accounts-dialog ref="accountsDialog" :form="form"></accounts-dialog>
           <span slot="footer" class="dialog-footer">
@@ -96,7 +96,7 @@
           :visible.sync="sopenblcVisible"
           class="el-dialogDeep"
           width="70%"
-          :close-on-click-modal="false"	
+          :close-on-click-modal="false"
           :before-close="handleClose">
           <accitemsopenblc :form="form" ></accitemsopenblc>
           <span slot="footer" class="dialog-footer">
@@ -711,6 +711,12 @@ import {
         accountsList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
+
+          // 前端去掉凭证明细中已使用的判断
+          data.records.forEach(item => {
+            // item.count = "0"
+          })
+
           this.data = data.records;
           this.loading = false;
           this.selectionClear();

+ 3 - 7
src/views/iosBasicData/psBcorps/detailsPage.vue

@@ -1202,7 +1202,7 @@ export default {
           trigger: 'change'
         }],
         cnAddr: [{
-          required: true,
+          required: false,
           message: ' ',
           trigger: 'change'
         }],
@@ -1212,7 +1212,7 @@ export default {
         //   trigger: 'change'
         // }],
         uscc: [{
-          required: true,
+          required: false,
           message: ' ',
           trigger: 'change'
         }],
@@ -1312,7 +1312,7 @@ export default {
       this.rateOptions = res.data.data.records
     })
     // 获取客户类别
-    bcorpstypedefineList(1, 9999,{cnName:'PS客户'}).then(res => {
+    bcorpstypedefineList(1, 9999,{type: 1, cnName:'PS客户'}).then(res => {
       this.customTypeData = res.data.data.records
       if(!this.detailData.id){
         this.customTypeData.forEach(e=>{
@@ -1346,14 +1346,12 @@ export default {
 
       // PS RATE 内部报价最大值
       isProcurement({ "param": "psRate.Internal.max" }).then(res => {
-          console.log('psRateInternalMax', res.data.data)
           // res.data.data= 0.5
           let n = Number(res.data.data)
           this.psRateInternalMax = isNaN(n) ? 0.5 : n
       })
       // PS RATE 外部报价最大值
       isProcurement({ "param": "psRate.external.max" }).then(res => {
-          console.log('psRateExternalMax', res.data.data)
           // default res.data.data= 0.7
           let n = Number(res.data.data)
           this.psRateExternalMax = isNaN(n) ? 0.7 : n
@@ -1521,7 +1519,6 @@ export default {
         }
       this.formData.corpType = ids.join(",")
       this.formData.corpTypeName = arr.join(",")
-      // console.log(this.formData.corpTypeName);
     },
     salesChange(id) {
       if (id == null) {
@@ -1755,7 +1752,6 @@ export default {
     },
     // 删除
     corpsAttnDelete(scope) {
-        console.log(scope.row.id,1697)
       this.$confirm('确认要删除吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 56 - 25
src/views/iosBasicData/psBcorps/index.vue

@@ -28,9 +28,10 @@
             @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 304)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 304)" @on-load="onLoad">
             <template slot="cnName" slot-scope="scope">
-                <div style="color: #1e9fff;cursor: pointer;" @click.stop="editOpen(scope.row)">
+                <div v-if="permission.edit" style="color: #1e9fff;cursor: pointer;" @click.stop="editOpen(scope.row)">
                     {{scope.row.cnName}}
                 </div>
+                <span v-else>{{scope.row.cnName}}</span>
             </template>
               <template slot="status" slot-scope="scope">
                   <div v-for="(item,index) of ifInvoiceData" :key="index" v-if="scope.row.status == item.dictKey"
@@ -38,24 +39,24 @@
               </template>
 
             <template slot="menuLeft">
-              <el-button type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入</el-button>
-              <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
+              <el-button v-if="permission.add" type="warning" size="small" icon="el-icon-printer" @click="excelBox = true">导入</el-button>
+              <el-button v-if="this.isAdmin" type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
               <!--<el-button type="primary" size="small" icon="el-icon-turn-off" @click="Deactivatefun" >批量停用</el-button>-->
               <!--<el-button type="success" size="small" @click="handleReportDesigner" icon="el-icon-printer">设计报表</el-button>-->
               <!--<el-button type="success" size="small" @click="handleReportPreview" icon="el-icon-printer">预览报表</el-button>-->
             </template>
             <template slot-scope="{ row, index }" slot="menu">
-              <el-button icon="el-icon-edit" type="text" size="small" @click.stop="editOpen(row)">
+              <el-button v-if="permission.edit" icon="el-icon-edit" type="text" size="small" @click.stop="editOpen(row)">
                 编辑
               </el-button>
-              <el-button icon="el-icon-delete" type="text" size="small" @click.stop="rowDel(row, index)">
+              <el-button v-if="permission.delete" icon="el-icon-delete" type="text" size="small" @click.stop="rowDel(row, index)">
                 删除
               </el-button>
-                <el-button icon="el-icon-turn-off" v-if="row.status == 1" type="text" style="color: #85e967" size="small"
+                <el-button v-if="row.status==1 && permission.edit" icon="el-icon-turn-off" type="text" style="color: #85e967" size="small"
                            @click.stop="statusfun(row.id,0)">
                     启用
                 </el-button>
-                <el-button icon="el-icon-turn-off" v-if="row.status == 0" type="text" style="color: #e83c3a" size="small"
+                <el-button v-if="row.status==0 && permission.edit" icon="el-icon-turn-off" type="text" style="color: #e83c3a" size="small"
                            @click.stop="statusfun(row.id,1)">
                     停用
                 </el-button>
@@ -67,7 +68,7 @@
 
     <reportContainer ref="reportContainer"></reportContainer>
 
-    <detailPage v-if="!isShow" ref="detail" @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData"></detailPage>
+    <detailPage v-if="!isShow" ref="detail" @goBack="goBack" :detailData="detailData"></detailPage>
 
     <!--类别弹窗-->
     <el-dialog title="类别" v-dialogdrag :visible.sync="corpTypeVisible" append-to-body width="60%" :before-close="corpTypeClose">
@@ -168,7 +169,9 @@ export default {
       customTypeData: [],
       excelBox: false,
       form: {},
-      query: {},
+      query: {
+        corpType: undefined,
+      },
       detailData: {},
       isShow: true,
       loading: true,
@@ -192,7 +195,7 @@ export default {
         index: true,
         viewBtn: true,
         selection: true,
-        addBtnText: '新建往来单位',
+        addBtnText: '新建 PS 客户',
         dialogClickModal: false,
           menuWidth: 220,
         column: [
@@ -203,7 +206,7 @@ export default {
             search: true,
             rules: [{
               required: true,
-              message: "请输入单位编码",
+              message: "请输入 PS 客户编码",
               trigger: "blur"
             }],
             overHidden:true,
@@ -237,7 +240,7 @@ export default {
             prop: "uscc",
             width: 160,
             rules: [{
-              required: true,
+              required: false,
               message: "请输入统一社会信用代码",
               trigger: "blur"
             }],
@@ -295,7 +298,7 @@ export default {
             width: "200",
             search: true,
             rules: [{
-              required: true,
+              required: false,
               message: "请输入中文地址",
               trigger: "blur"
             }],
@@ -307,7 +310,7 @@ export default {
             width: "200",
             search: true,
             rules: [{
-              required: true,
+              required: false,
               message: "请输入英文地址",
               trigger: "blur"
             }],
@@ -414,8 +417,15 @@ export default {
         designer: null,
       },
       data: [],
-        // 字典数据
-        ifInvoiceData:[],
+      // 字典数据
+      ifInvoiceData:[],
+      roleName: [], // 当前登录人的角色权限
+      permission:{
+        add: false,
+        edit: false,
+        delete: false,
+      },
+      isAdmin: false, // 当前登录人是否有系统管理员角色
     };
   },
   props:{
@@ -428,12 +438,21 @@ export default {
   computed: {
     ...mapGetters(["permission"]),
     permissionList() {
-      return {
+      let permission = {
         // addBtn: this.vaildData(this.permission.bcorps_add, false),
-        viewBtn: this.vaildData(this.permission.bcorps_view, false),
-        delBtn: this.vaildData(this.permission.bcorps_delete, false),
-        editBtn: this.vaildData(this.permission.bcorps_edit, false)
+        // viewBtn: this.vaildData(this.permission.bcorps_view, false),
+        // delBtn: this.vaildData(this.permission.bcorps_delete, false),
+        // editBtn: this.vaildData(this.permission.bcorps_edit, false)
+        addBtn: this.permission.add,
+        // viewBtn: true,
+        // delBtn: this.permission.delete,
+        // editBtn: this.permission.edit,
+        viewBtn: false,
+        delBtn: false,
+        editBtn: false,
       };
+
+      return permission;
     },
     ids() {
       let ids = [];
@@ -444,6 +463,12 @@ export default {
     }
   },
   async created() {
+    this.roleName = localStorage.getItem('roleName').split(',') // 获取角色数据
+    this.isAdmin = this.roleName.indexOf('admin') >= 0;
+    this.permission.add = this.roleName.indexOf('PS 客户新增')>=0
+    this.permission.edit = this.roleName.indexOf('PS 客户修改')>=0
+    this.permission.delete = this.roleName.indexOf('PS 客户删除')>=0
+
     this.option = await this.getColumnData(this.getColumnName(304), this.optionBack);
     // 这个是从海运出口跳进来的
     if (this.$route.query.corpType) {
@@ -479,7 +504,6 @@ export default {
           const arrIds = this.selectionList.map(item=>{
               return item.id
           })
-          console.log(arrIds,482)
       },
       // 获取国家数据
       bcountrysListfun(){
@@ -505,12 +529,19 @@ export default {
                   let obj = res.data.data;
                   obj.status = status
                   updateBcorps(obj).then(res=>{
+                      this.loading = false
                       this.onLoad(this.page);
                       this.$message({
                           type: "success",
                           message: "操作成功!"
                       });
-                  })
+                  }).catch(err=>{
+                    console.log(err);
+                    this.loading = false
+                  });
+              }).catch(err=>{
+                console.log(err);
+                this.loading = false
               });
           })
 
@@ -589,7 +620,7 @@ export default {
     },
     // 获取客户类别
     bcorpstypedefineListfun() {
-      bcorpstypedefineList(1,30,{cnName:'PS客户'}).then(res => {
+      bcorpstypedefineList(1,30,{type: 1, cnName:'PS客户'}).then(res => {
         this.customTypeData = res.data.data.records
       })
     },
@@ -597,6 +628,7 @@ export default {
       this.detailData = {
         id: row.id
       };
+      // roleName.indexOf('PS 客户修改')>=0
       this.isShow = false;
     },
     rowSave(row, done, loading) {
@@ -676,6 +708,7 @@ export default {
       if (this.query.corpType != null) {
         this.detailData.corpType = this.query.corpType
       }
+      console.log("beforeOpen", this.detailData)
       this.isShow = false;
       // if (["edit", "view"].includes(type)) {
       //   getBcorpsDetail(this.form.id).then(res => {
@@ -720,10 +753,8 @@ export default {
       this.query.type='1'
       BcorpsList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
         const data = res.data.data;
-        console.log(res.data.data)
         this.page.total = data.total;
         this.data = data.records;
-        console.log(data)
         this.loading = false;
         this.selectionClear();
       });