Explorar el Código

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

liujt hace 8 meses
padre
commit
0f8c12c161

+ 18 - 11
src/components/jimureport/browseModal.vue

@@ -11,7 +11,9 @@
       <browse :url="fileUrl"></browse
     ></ele-modal>
     <!-- <el-link type="primary" @click="open">{{ text }}</el-link> -->
-    <el-link v-if="!browseShow" type="primary" @click="open">{{ text }}</el-link>
+    <el-link v-if="!browseShow" type="primary" @click="open">{{
+      text
+    }}</el-link>
   </span>
 </template>
 
@@ -34,10 +36,14 @@
       businessCode: {
         default: ''
       },
+      roleName: {
+        type: String,
+        default: ''
+      },
       // ***  公共按钮形式触发
-      browseShow:{
-        type:Boolean,
-        default:false
+      browseShow: {
+        type: Boolean,
+        default: false
       }
     },
     data() {
@@ -46,9 +52,9 @@
         showEditFlag: false
       };
     },
-    // *** 新增 
-    mounted(){
-      if(this.browseShow){
+    // *** 新增
+    mounted() {
+      if (this.browseShow) {
         // this.showEditFlag = this.browseShow;
         this.open();
       }
@@ -57,13 +63,14 @@
       async open() {
         this.showEditFlag = true;
         let url = await getJmPrintViewUrl(this.businessCode);
-        this.fileUrl = `${url}?token=${getToken()}&id=${this.businessId}`;
+        console.log(this.roleName);
+        this.fileUrl = `${url}?token=${getToken()}&id=${this.businessId}&userName=${this.roleName}`;
       },
       // *** 新增
-      cancel(){
+      cancel() {
         this.showEditFlag = false;
-        if(this.browseShow){
-          this.$emit('cancelQuo')
+        if (this.browseShow) {
+          this.$emit('cancelQuo');
         }
       }
     }

+ 14 - 4
src/views/salesServiceManagement/components/info.vue

@@ -163,9 +163,10 @@
       </el-col>
       <el-col :span="6">
         <el-form-item label="业务员:" prop="salesmanName">
-          <el-input
-            v-model="form.contractInfo.salesmanName"
-            readonly
+          <personSelect
+            ref="directorRef"
+            v-model="form.salesmanName"
+            @selfChange="changeUserInfo"
             :disabled="type == 'view'"
           />
         </el-form-item>
@@ -944,6 +945,7 @@ import { getToken } from '@/utils/token-util';
 import processSubmitDialog from '@/views/salesServiceManagement/components/processSubmitDialog/processSubmitDialog.vue';
 import { getByCode } from '@/api/system/dictionary-data';
 
+import personSelect from '@/components/CommomSelect/person-select.vue';
 import GYSparentList from '@/views/purchasingManage/supplierManage/components/parentList.vue';
 export default {
   mixins: [dictMixins],
@@ -956,7 +958,8 @@ export default {
     ProductDialog,
     processSubmitDialog,
     spareParts,
-    GYSparentList
+    GYSparentList,
+    personSelect
   },
   computed: {
     ...mapGetters(['getDictValue']),
@@ -1364,6 +1367,7 @@ export default {
         faultDetailList: [],
         associationType: '1',
         aftertype: '',
+        salesmanName:'',
         charge: '',
         part: '',
         car: '',
@@ -1401,6 +1405,9 @@ export default {
     this.getPietypeCode('pie_car_type');
   },
   methods: {
+    changeUserInfo(val, info) {
+      this.form.salesmanName = info.name;
+    },
     // 获取售后类型字典
     async getAftertypeCode(code) {
       try {
@@ -1472,6 +1479,8 @@ export default {
         res.afterSalesType ? String(res.afterSalesType) : ''
       );
       this.$set(this.form, 'charge', res.isFee ?? '');
+      
+      this.$set(this.form, 'salesmanName', res.salesmanName ?? '');
       this.$set(this.form, 'part', res.isWithAccessories ?? '');
       this.$set(this.form, 'car', res.isPieCar ?? '');
       this.$set(
@@ -1674,6 +1683,7 @@ export default {
         orderId: '',
         associationType: '1',
         aftertype: '',
+        salesmanName:'',
         charge: '',
         part: '',
         car: '',

+ 7 - 8
src/views/salesServiceManagement/demandList/components/addDialog.vue

@@ -164,16 +164,15 @@ export default {
       let sparePartsData = (this.$refs.infoRef.getSpareInfoData() || []).map(
         (item) => ({
           ...item,
-    typeId: item.typeId,
+          typeId: item.typeId,
           code: item.code,
           name: item.name,
-          feeType:item.feeType,//费用类别
-          modelType: item.categoryModel,//型号
-          
-          specification: item.specification,//规格
-          content: item.content,//详情内容
-          totalCount: item.totalCount,//数量
-          measureUnit:item.measureUnit,
+          feeType: item.feeType, //费用类别
+          modelType: item.categoryModel, //型号
+          specification: item.specification, //规格
+          content: item.content, //详情内容
+          totalCount: item.totalCount, //数量
+          measureUnit: item.measureUnit,
           singlePrice: item.singlePrice,
           settlementPrice: item.settlementPrice
         })

+ 20 - 0
src/views/salesServiceManagement/workOrder/index.vue

@@ -196,6 +196,7 @@
       :browseShow="browseShow"
       :businessId="currentRow.id"
       :businessCode="currentBusinessCode"
+      :role-name="roleName"
     ></jimureportBrowse>
   </div>
 </template>
@@ -222,6 +223,7 @@ import {
 } from '@/api/salesServiceManagement/index';
 import { getByCode } from '@/api/system/dictionary-data';
 import dictMixins from '@/mixins/dictMixins';
+import { getCurrentUser } from '@/utils/token-util';
 export default {
   mixins: [dictMixins],
   components: {
@@ -242,6 +244,7 @@ export default {
         accepterUserName: '',
         accepterRemark: ''
       },
+      roleName: '',
       currentBusinessCode: '',
       contactInfoVOS: [],
       workOrderStatus: [
@@ -459,6 +462,23 @@ export default {
         type === 'technical'
           ? 'eomTechnicalDispatchOrder' // 技术派工单
           : 'eomServiceDispatchOrder'; // 服务派工单
+      const currentUser = getCurrentUser();
+      const { currentGroupId, currentRoleId } = currentUser || {};
+      const groupList =
+        this.$store.state.user?.info?.loginChangeGroupVOList || [];
+      const targetGroup = groupList.find(
+        (group) => group.groupId === currentGroupId
+      );
+      let roleName = '';
+      if (targetGroup && targetGroup.loginChangeRoleVOList) {
+        const targetRole = targetGroup.loginChangeRoleVOList.find(
+          (role) => role.roleId === currentRoleId
+        );
+        roleName = targetRole?.roleName || '';
+      }
+
+      this.roleName = roleName;
+
       this.browseShow = true;
     },
     cancelQuo() {