Ver Fonte

优先级顶掉,switch branch

Karsa há 3 meses atrás
pai
commit
9af8d63fff

+ 10 - 6
src/views/dataEntry_manage/dataEntry/components/edbDetail.vue

@@ -119,11 +119,11 @@
     >
       <div class="item" @click="handleOptTable('insert_up_row')">
         向上插入
-        <el-input v-model="rightMouseMenu.insertUpRows" size="mini" style="width:50px;" @change="val => { rightMouseMenu.insertUpRows = Number(val) }"/>
+        <el-input v-model="rightMouseMenu.insertUpRows" size="mini" style="width:50px;" @change="val => { rightMouseMenu.insertUpRows = Number(val) }" @click.native.stop/>
       </div>
       <div class="item" @click="handleOptTable('insert_down_row')">
         向下插入
-        <el-input v-model="rightMouseMenu.insertDownRows" size="mini" style="width:50px;" @change="val => { rightMouseMenu.insertDownRows = Number(val) }"/>
+        <el-input v-model="rightMouseMenu.insertDownRows" size="mini" style="width:50px;" @change="val => { rightMouseMenu.insertDownRows = Number(val) }" @click.native.stop/>
       </div>
       <div class="item" @click="handleOptTable('del_row')"><!-- 删除行 -->{{$t('ManualEntryPage.right_op_delrow')}}</div>
     </div>
@@ -205,6 +205,8 @@ export default {
       dataList: [],
 
       readonly:  false,//日期只读
+      temInputVal:{},
+      tempTime:'',
 
       rightMouseMenu: {
         rindex:-1,
@@ -252,7 +254,7 @@ export default {
 
       this.rightMouseMenu.rindex = rindex;
       this.rightMouseMenu.cindex = cindex;
-      this.temInputVal = JSON.parse(JSON.stringify(e));
+      this.temInputVal = _.cloneDeep(e)
     },
 
     // input 值改变 失去焦点
@@ -390,14 +392,16 @@ export default {
       let newItem = {
         Close: '',
         Dt: '',
-        TradeCode: ''
+        TradeCode: this.edbInfo.Detail.TradeCode
       }
       console.log(type)
       if(type==='insert_up_row') {
-        console.log(this.rightMouseMenu)
         let insertArr = new Array(this.rightMouseMenu.insertUpRows).fill('').map(_ => newItem)
         console.log(insertArr)
-        this.dataList.splice(this.rightMouseMenu.rindex-1, 0, ...insertArr);
+        this.dataList.splice(this.rightMouseMenu.rindex, 0, ...insertArr);
+      }else {
+        let insertArr = new Array(this.rightMouseMenu.insertDownRows).fill('').map(_ => newItem)
+        this.dataList.splice(this.rightMouseMenu.rindex+1, 0, ...insertArr);
       }
     },