|
@@ -46,7 +46,7 @@
|
|
|
<div style="display: inline-block;" class="allPrice">总数量: {{tableData.length}}</div>
|
|
<div style="display: inline-block;" class="allPrice">总数量: {{tableData.length}}</div>
|
|
|
<div style="display: inline-block;" class="allPrice active"></div>
|
|
<div style="display: inline-block;" class="allPrice active"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-dialog title="选择花材" v-if="isSelectNumber" :visible.sync="isSelectNumber" width="30%" center>
|
|
|
|
|
|
|
+ <el-dialog title="选择花材" v-if="showConfirmNum" :visible.sync="showConfirmNum" width="30%" center>
|
|
|
<div class="el-dialog-center">
|
|
<div class="el-dialog-center">
|
|
|
<span>{{ getItemList[getIndex].itemName }}</span>
|
|
<span>{{ getItemList[getIndex].itemName }}</span>
|
|
|
<el-input ref="bigInput" style="width: 130px;margin-left: 15px" placeholder="0" @keyup.key-backspace.native="backspaceFun('big')" @keyup.enter.native="enterFun()" type="number" v-model="big"></el-input>
|
|
<el-input ref="bigInput" style="width: 130px;margin-left: 15px" placeholder="0" @keyup.key-backspace.native="backspaceFun('big')" @keyup.enter.native="enterFun()" type="number" v-model="big"></el-input>
|
|
@@ -193,7 +193,7 @@ export default {
|
|
|
checked:true,
|
|
checked:true,
|
|
|
type:'自提',//取货方式
|
|
type:'自提',//取货方式
|
|
|
payType:'欠款',//结算方式
|
|
payType:'欠款',//结算方式
|
|
|
- isSelectNumber:false,//选择扎和支的弹窗
|
|
|
|
|
|
|
+ showConfirmNum:false,//选择扎和支的弹窗
|
|
|
isAmendPrice:false,//修改单价弹窗
|
|
isAmendPrice:false,//修改单价弹窗
|
|
|
isAccounts:false,//结账弹窗
|
|
isAccounts:false,//结账弹窗
|
|
|
priceAmend:0,//修改单价弹窗
|
|
priceAmend:0,//修改单价弹窗
|
|
@@ -280,7 +280,6 @@ export default {
|
|
|
self.$refs['priceInput'].focus();
|
|
self.$refs['priceInput'].focus();
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
if( e && e.key=='F9' ){
|
|
if( e && e.key=='F9' ){
|
|
|
self.orderMsg = '';
|
|
self.orderMsg = '';
|
|
@@ -375,15 +374,25 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
let that = this
|
|
let that = this
|
|
|
- this.getItemList = [];
|
|
|
|
|
- this.getIndex = 0;
|
|
|
|
|
- this.seekOldVal = this.seekVal;
|
|
|
|
|
- this.isSeek = true;
|
|
|
|
|
- await this.$service.item.getItemList({search:this.seekVal,requestType:'kd',pageSize:6}).then(res=>{
|
|
|
|
|
- let list = this.$util.copyObject(res.list)
|
|
|
|
|
- that.getItemList = list
|
|
|
|
|
- })
|
|
|
|
|
- that.$refs.showItemRef.setCurrentRow(that.getItemList[0])
|
|
|
|
|
|
|
+ if(this.seekVal == this.seekOldVal && this.seekList != ''){
|
|
|
|
|
+ this.isSeek = false;
|
|
|
|
|
+ this.showConfirmNum = true;
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
|
+ this.$refs['bigInput'].focus();
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.getItemList = [];
|
|
|
|
|
+ this.getIndex = 0;
|
|
|
|
|
+ this.seekOldVal = this.seekVal;
|
|
|
|
|
+ this.isSeek = true;
|
|
|
|
|
+ await this.$service.item.getItemList({search:this.seekVal,requestType:'kd',pageSize:6}).then(res=>{
|
|
|
|
|
+ let list = this.$util.copyObject(res.list)
|
|
|
|
|
+ that.getItemList = list
|
|
|
|
|
+ })
|
|
|
|
|
+ if(self.$util.isEmpty(that.getItemList)){
|
|
|
|
|
+ that.$refs.showItemRef.setCurrentRow(that.getItemList[0])
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
enterFun(){
|
|
enterFun(){
|
|
|
let selectList = this.getItemList[this.getIndex];
|
|
let selectList = this.getItemList[this.getIndex];
|
|
@@ -395,10 +404,6 @@ export default {
|
|
|
this.$message({message: '请先输入数量',type: 'warning'});
|
|
this.$message({message: '请先输入数量',type: 'warning'});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- // if(Number(selectList.stock)<Number(big) + Number(small) / Number(selectList.ratio)){
|
|
|
|
|
- // this.$message({message: '库存不足',type: 'warning'});
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
let money = Number(selectList.price) * (Number(big) + Number(small) / Number(selectList.ratio))
|
|
let money = Number(selectList.price) * (Number(big) + Number(small) / Number(selectList.ratio))
|
|
|
for (let i=0;i<this.tableData.length;i++){
|
|
for (let i=0;i<this.tableData.length;i++){
|
|
|
if(this.tableData[i].name==selectList.itemName){
|
|
if(this.tableData[i].name==selectList.itemName){
|
|
@@ -444,11 +449,10 @@ export default {
|
|
|
this.isAmendPrice = false;
|
|
this.isAmendPrice = false;
|
|
|
this.seekVal = '';
|
|
this.seekVal = '';
|
|
|
this.getItemList = [];
|
|
this.getItemList = [];
|
|
|
- this.isSelectNumber = false
|
|
|
|
|
|
|
+ this.showConfirmNum = false
|
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
|
this.$refs['itemSearchRef'].focus();
|
|
this.$refs['itemSearchRef'].focus();
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
backspaceFun(type){
|
|
backspaceFun(type){
|
|
|
switch (type){
|
|
switch (type){
|
|
@@ -459,7 +463,6 @@ export default {
|
|
|
this.small = null;
|
|
this.small = null;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
amendPrice(){
|
|
amendPrice(){
|
|
|
if(this.priceAmend==''){
|
|
if(this.priceAmend==''){
|
|
@@ -521,7 +524,7 @@ export default {
|
|
|
}else{
|
|
}else{
|
|
|
this.getIndex++;
|
|
this.getIndex++;
|
|
|
}
|
|
}
|
|
|
- this.$ref.showItemRef.setCurrentRow(this.getItemList[this.getIndex]);
|
|
|
|
|
|
|
+ this.$refs.showItemRef.setCurrentRow(this.getItemList[this.getIndex]);
|
|
|
}else{
|
|
}else{
|
|
|
let tableDataLength = this.tableData.length-1;
|
|
let tableDataLength = this.tableData.length-1;
|
|
|
if(tableDataLength==this.tableDataIndex){
|
|
if(tableDataLength==this.tableDataIndex){
|
|
@@ -540,7 +543,7 @@ export default {
|
|
|
}else{
|
|
}else{
|
|
|
this.getIndex--;
|
|
this.getIndex--;
|
|
|
}
|
|
}
|
|
|
- this.$ref.showItemRef.setCurrentRow(this.getItemList[this.getIndex]);
|
|
|
|
|
|
|
+ this.$refs.showItemRef.setCurrentRow(this.getItemList[this.getIndex]);
|
|
|
}else{
|
|
}else{
|
|
|
if(this.tableDataIndex==0){
|
|
if(this.tableDataIndex==0){
|
|
|
this.tableDataIndex = 0
|
|
this.tableDataIndex = 0
|