ysy 1 rok temu
rodzic
commit
20ce2aa85b

+ 5 - 6
src/views/materialReturn/components/returnPop.vue

@@ -19,13 +19,13 @@
 
           <el-col :span="6">
             <el-form-item label="退料单名称" prop="name" label-width="90px">
-              <el-input v-model="returnForm.name" :disabled="returnDetailsId"></el-input>
+              <el-input v-model="returnForm.name" :disabled="Boolean(returnDetailsId)"></el-input>
             </el-form-item>
           </el-col>
 
           <el-col :span="8">
             <el-form-item label="退料场景" prop="scene" label-width="90px">
-              <el-select v-model="returnForm.scene" :disabled="returnDetailsId" placeholder="请选择">
+              <el-select v-model="returnForm.scene" :disabled="Boolean(returnDetailsId)" placeholder="请选择">
                 <el-option
                   v-for="item in sceneList"
                   :key="item.value"
@@ -41,12 +41,12 @@
         <el-row :gutter="24">
           <el-col :span="20">
             <el-form-item label="退料描述" prop="remark" label-width="90px">
-              <el-input v-model="returnForm.remark" :disabled="returnDetailsId"></el-input>
+              <el-input v-model="returnForm.remark" :disabled="Boolean(returnDetailsId)"></el-input>
             </el-form-item>
           </el-col>
 
           <el-col :span="4">
-            <el-button type="primary" @click="selectOrder" v-if="!returnDetailsId"
+            <el-button type="primary" @click="selectOrder" v-if="!Boolean(returnDetailsId)"
               >选择领料单</el-button
             >
           </el-col>
@@ -128,7 +128,7 @@
               </template>
             </el-table-column>
 
-            <el-table-column label="操作" fixed="right" width="100px" v-if="!returnDetailsId">
+            <el-table-column label="操作" fixed="right" width="100px" v-if="!Boolean(returnDetailsId)">
               <template slot-scope="{ $index, row }">
                 <el-link type="danger" @click="removeItem(idx, $index)"
                   >删除</el-link
@@ -261,7 +261,6 @@
 
       getDetails() {
         getById(this.returnDetailsId).then((res) => {
-            console.log(res, 99);
             this.returnForm.code = res.code
             this.returnForm.name = res.name
             this.returnForm.remark = res.remark