Procházet zdrojové kódy

售后计划修改 没有删除按钮bug修改

8521520123jsy před 1 rokem
rodič
revize
91e66f22b7

+ 16 - 2
src/views/salesServiceManagement/components/info.vue

@@ -5,7 +5,7 @@
     <el-row :gutter="24" v-if="source != '报工信息'">
       <el-col :span="6">
         <el-form-item label="需求编码:">
-          <el-input v-model="form.code" readonly />
+          <el-input v-model="form.code" disabled />
         </el-form-item>
       </el-col>
       <el-col :span="6">
@@ -212,7 +212,7 @@
               ></el-input>
             </template>
             <template v-slot:attachments="{ row }">
-              <fileMain v-model="row.attachments" :type="type == 'view' ? 'view' : 'add'"></fileMain>
+              <fileMain v-model="row.attachments" :type="fileStr"></fileMain>
             </template>
             <template v-slot:action="{ row:data,$index }">
               <el-popconfirm class="ele-action" title="确定要删除当前故障吗?" @confirm="delSon(row,$index)">
@@ -698,6 +698,16 @@ export default {
         return false;
       }
       return flag;
+    },
+
+    // 附件上传 更改设置
+    fileStr() {
+      let str;
+      if (this.source) {
+        return 'add';
+      }
+      str = this.type == 'view' ? 'view' : 'add';
+      return str
     }
   },
   props: {
@@ -857,6 +867,10 @@ export default {
     },
     // *** 删除联系人
     delContact() {
+      if (this.selection.length == 0) {
+        this.$message.warning('请至少选择一条联系人信息');
+        return;
+      }
       this.form.contactInfoVOS = this.form.contactInfoVOS.filter(
         (row) => !this.selection.includes(row)
       );

+ 6 - 5
src/views/salesServiceManagement/components/sparePartsList.vue

@@ -391,7 +391,7 @@ export default {
           slot: 'action',
           fixed: 'right',
           showOverflowTooltip: true,
-          show: this.type != 'edit'
+          show: this.type != 'view'
         }
       ];
     },
@@ -410,8 +410,9 @@ export default {
       };
     },
 
-    // 按钮显示权限
+    // 添加 按钮显示权限
     buttonJud() {
+      console.log(this.type,'type')
       if (this.source == '派单进来') {
         return true;
       }
@@ -421,14 +422,15 @@ export default {
     // 故障列表删除权限
     schemeOperate() {
       return (row) => {
+        console.log(row,'row ----')
         if (this.source == '配件回收') {
           return true;
         }
-        let flag =
-          this.type != 'view' && row.isApply != 1 && this.source != '报工信息';
         if (row.id && this.state == '可操作') {
           return false;
         }
+        let flag =
+          this.type != 'view' && row.isApply != 1 && this.source != '报工信息';
         return flag;
       };
     }
@@ -451,7 +453,6 @@ export default {
         }
       ];
     }
-    console.log(this.detailList, 'this.detailList');
     if (this.detailList.length > 0) {
       this.form.tableList = this.detailList;
     }

+ 6 - 5
src/views/salesServiceManagement/workOrder/components/declarationDialog.vue

@@ -19,7 +19,7 @@
         <!-- 用计划名称 -->
         <el-col :span="8">
           <el-form-item label="名称">
-            <el-input v-model="salesForm.code" size="small" placeholder="请输入" disabled></el-input>
+            <el-input v-model="salesForm.name" size="small" placeholder="请输入" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="8">
@@ -444,9 +444,11 @@ export default {
       // 确保输入是数字
       const totalMinutes = parseFloat(minutes);
       // 计算天、小时、分钟
-      const days = Math.floor(totalMinutes / (24 * 60));
-      const hours = Math.floor(totalMinutes / 60);
-      this.timeAssignment(days, hours, minutes);
+      const days = (totalMinutes / (24 * 60)).toFixed(1);
+      const hours = (totalMinutes / 60).toFixed(1);
+      this.days = days;
+      this.hours = hours;
+      this.minutes = minutes;
     },
     // 时间赋值
     timeAssignment(days, hours, mins) {
@@ -576,7 +578,6 @@ export default {
         costListVOS: this.$refs.sparePartsRef2.getTableValue(),
         salesDemandUpdatePO: obj
       };
-      console.log(data, 'data ---');
       // 报工 逻辑处理 配件申请清单数据
       let list = this.$refs.spareCycleRef.getSpareData() || [];
       if (list.length > 0) {

+ 3 - 2
src/views/salesServiceManagement/workOrder/components/planDialog.vue

@@ -49,12 +49,12 @@
     <el-row>
       <el-col :span="6">
         <el-form-item label="部门">
-          <el-input v-model="dataForm.code" size="small" placeholder="请输入" disabled></el-input>
+          <el-input v-model="dataForm.executeGroupName" size="small" placeholder="请输入" disabled></el-input>
         </el-form-item>
       </el-col>
       <el-col :span="6">
         <el-form-item label="执行人">
-          <el-input v-model="dataForm.code" size="small" placeholder="请输入" disabled></el-input>
+          <el-input v-model="dataForm.executeUserName" size="small" placeholder="请输入" disabled></el-input>
         </el-form-item>
       </el-col>
       <el-col :span="6">
@@ -88,6 +88,7 @@ export default {
   },
   methods:{
     async init(data){
+      console.log(data,'data')
         this.dataForm = data;
     }
   }