Quellcode durchsuchen

Fix: 采购列表新增按钮不可见问题

liqianyi vor 2 Jahren
Ursprung
Commit
80c912bf61
1 geänderte Dateien mit 7 neuen und 10 gelöschten Zeilen
  1. 7 10
      src/views/modules/sale/purchase-add-or-update.vue

+ 7 - 10
src/views/modules/sale/purchase-add-or-update.vue

@@ -1,9 +1,9 @@
 <!-- 采购新增/修改 -->
 <template>
   <div>
-      <div class="my-title">{{ !id ? '新增': display ? '详情' : '修改' }}</div>
+      <div class="my-title">{{ !id ? '新增': '修改' }}</div>
       <!-- 工作流 -->
-      <div v-show="display && dataForm.workFlowBusinessExt">
+      <div v-show="dataForm.workFlowBusinessExt">
         <el-steps :active="dataForm.workFlowBusinessExt&&dataForm.workFlowBusinessExt.workFlowProcessStepList?dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2:0" align-center style="margin-bottom: 20px">
           <template v-for="(item, i) in stepList">
             <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
@@ -30,7 +30,7 @@
           </el-col>
           <el-col :span="16" style="padding-left: 20px">
             <el-form-item label="付款方式" prop="payType">
-              <el-radio-group v-model="dataForm.payType" :disabled="display">
+              <el-radio-group v-model="dataForm.payType">
                 <el-radio :label='"0"'>对公转账</el-radio>
                 <el-radio :label='"1"'>先行垫付</el-radio>
                 <el-radio :label='"2"'>财务预支</el-radio>
@@ -115,7 +115,6 @@
               label="备注">
             </el-table-column>
             <el-table-column
-              v-if="!display"
               fixed="right"
               header-align="center"
               align="center"
@@ -128,13 +127,13 @@
             </el-table-column>
           </el-table>
         </el-row>
-        <el-row v-if="!display" style="text-align: center; margin-top: 10px;">
+        <el-row style="text-align: center; margin-top: 10px;">
           <el-button type="primary" icon="el-icon-plus" @click="addMaterial"></el-button>
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
       <el-button @click="onChose">取消</el-button>
-      <el-button v-if="!display" type="primary" @click="dataFormSubmit()">确定</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
     </span>
     <!-- 新增物品 -->
     <Add v-show="addMaterialVisible" ref="comAddMaterial" @addItem="addMaterialCallback"/>
@@ -156,7 +155,6 @@
     data () {
       return {
         visible: false,
-        display: false,
         dataList: [],
         id: 0,
         dataForm: {},
@@ -183,16 +181,15 @@
           }
         })
       },
-      async init (id, display) {
+      async init (id) {
         this.materialDetails = []
         this.dataForm = {
           payType: '0'
         }
         this.visible = true
         this.id = id || 0
-        this.display = display
         // 获取采购类别字典
-        if (!id || !display) {
+        if (!id) {
           this.getTypeList()
         }
         if (!id) return