|
|
@@ -12,7 +12,7 @@
|
|
|
<span style="font-weight:bold;color:black;">客户:{{form.customName}}</span>
|
|
|
<span>全屏:F11</span>
|
|
|
<span>提交:F9</span>
|
|
|
- <span>修改:/</span>
|
|
|
+ <span>修改:回车</span>
|
|
|
<span>删除:Delete</span>
|
|
|
<span>删除所有:Page Down</span>
|
|
|
</p>
|
|
|
@@ -413,13 +413,17 @@ export default {
|
|
|
comeBack(){
|
|
|
this.form.customId = 0
|
|
|
this.form.customName = ''
|
|
|
+ this.desk = 'searchCustom'
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.customref.focus()
|
|
|
})
|
|
|
},
|
|
|
searchSelectCustom(e){
|
|
|
if(e.id && e.name){
|
|
|
- this.desk = 'selectedList'
|
|
|
+ let that = this
|
|
|
+ setTimeout(function(){
|
|
|
+ that.desk = 'selectedList'
|
|
|
+ },1000)
|
|
|
this.form.customId = e.id
|
|
|
this.form.customName = e.name
|
|
|
this.selectJobId = e.id
|
|
|
@@ -575,10 +579,18 @@ export default {
|
|
|
this.selectCurrentItem(e)
|
|
|
},
|
|
|
pickAddCurrentItem(){
|
|
|
- this.changeType = 'add'
|
|
|
- if(this.getItemList[this.getIndex]){
|
|
|
- let currentItem = this.getItemList[this.getIndex]
|
|
|
- this.selectCurrentItem(currentItem)
|
|
|
+ if(this.desk == 'searchList'){
|
|
|
+ this.changeType = 'add'
|
|
|
+ if(this.getItemList[this.getIndex]){
|
|
|
+ let currentItem = this.getItemList[this.getIndex]
|
|
|
+ this.selectCurrentItem(currentItem)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.desk == 'selectedList'){
|
|
|
+ if(this.selectList[this.selectIndex]){
|
|
|
+ let currentItem = this.selectList[this.selectIndex]
|
|
|
+ this.pickModifyItem(currentItem)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
selectCurrentItem(currentItem){
|
|
|
@@ -614,12 +626,14 @@ export default {
|
|
|
sumPrice = parseFloat(sumPrice.toFixed(2))
|
|
|
currentItem = {...currentItem,bigCount:this.customData.bigCount,userPrice:this.customData.userPrice,smallCount:this.customData.smallCount,sumPrice:sumPrice}
|
|
|
this.replaceItemFn(currentItem,1,'add')
|
|
|
- this.selectIndex = this.selectList.length-1;
|
|
|
- this.$refs.singleTable.setCurrentRow(this.selectList[this.selectList.length-1]);
|
|
|
this.backToSearchItem();
|
|
|
},
|
|
|
backToSearchItem(){
|
|
|
this.desk = 'selectedList'
|
|
|
+ if(this.selectList[0]){
|
|
|
+ this.selectIndex = 0
|
|
|
+ this.$refs.singleTable.setCurrentRow(this.selectList[0])
|
|
|
+ }
|
|
|
this.clearPop = false;
|
|
|
this.searchVal = '';
|
|
|
this.getItemList = [];
|