yusheng пре 1 година
родитељ
комит
22caf6d189

+ 9 - 4
src/views/salesServiceManagement/workOrder/components/declarationDialog.vue

@@ -18,17 +18,20 @@
           range-separator="至"
           start-placeholder="实际开始日期"
           end-placeholder="实际结束日期"
+          :disabled="type=='view'"
         >
         </el-date-picker>
       </el-form-item>
       <el-form-item label="附件:" prop="attachments">
-        <fileMain v-model="addForm.attachments"></fileMain>
+        <fileMain v-model="addForm.attachments" :type="type=='view'?'view':''"></fileMain>
       </el-form-item>
       <el-form-item label="备注:" prop="reason">
         <el-input
           type="textarea"
           placeholder="请输入内容"
           v-model="addForm.reason"
+          :disabled="type=='view'"
+
         >
         </el-input>
       </el-form-item>
@@ -39,7 +42,7 @@
     <header-title title="方案"></header-title>
     <spareParts ref="sparePartsRef" :type="type"></spareParts>
     <div slot="footer" class="footer">
-      <el-button type="primary" @click="submitAdd">提交</el-button>
+      <el-button type="primary" @click="submitAdd" v-if="type!='view'">提交</el-button>
       <el-button @click="handleClose">取消</el-button>
     </div>
   </ele-modal>
@@ -70,14 +73,16 @@
           attachments: [],
           reason: ''
         },
-        row: {}
+        row: {},
+        type:'add'
       };
     },
     created() {},
     methods: {
-      open(row) {
+      open(row,type) {
         this.row = row;
         this.visibleDialog = true;
+        this.type=type
         this.getDetail(row);
       },
       async getDetail(row) {

+ 1 - 1
src/views/salesServiceManagement/workOrder/index.vue

@@ -248,7 +248,7 @@ export default {
             this.$refs.declarationDialogRef.open(row)
         },
         goDetail(row) {
-            this.$refs.detailDialogRef.open(row);
+            this.$refs.declarationDialogRef.open(row,'view');
         },
         handleCommand(command, row) {
             if (command === 'addSpareItems') {