|
|
@@ -337,20 +337,17 @@ export default {
|
|
|
}
|
|
|
return todaty
|
|
|
},
|
|
|
- /**拿到所有数据*/
|
|
|
getAllList(){
|
|
|
this.$service.product.list().then(res => {
|
|
|
this.allList = res.list;
|
|
|
});
|
|
|
},
|
|
|
- /**获取客户列表**/
|
|
|
getShopAll(){
|
|
|
this.$service.custom.shopListAll().then(res => {
|
|
|
this.allShopList = res.list;
|
|
|
this.$refs['selectShopListInput'].focus();
|
|
|
});
|
|
|
},
|
|
|
- /**生成订单**/
|
|
|
createOrder(){
|
|
|
const product = this.tableData.map(ele => {
|
|
|
return { productId: ele.id, bigNum: ele.big, smallNum: ele.small };
|
|
|
@@ -379,25 +376,24 @@ export default {
|
|
|
printOrder() {
|
|
|
|
|
|
},
|
|
|
- /** 搜索--按键回车*/
|
|
|
async enterSeekFun(){
|
|
|
- if(this.seekVal==''){this.isSeek = false;return;}
|
|
|
- if(this.seekVal==this.seekOldVal&&this.seekList!=''){
|
|
|
+ if(this.seekVal==''){
|
|
|
+ this.isSeek = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.seekVal == this.seekOldVal && this.seekList != ''){
|
|
|
// if(Number(this.seekList[this.seekListIndex].stock)==0){
|
|
|
// this.$message({message: '库存不足',type: 'warning'});
|
|
|
// return;
|
|
|
// }
|
|
|
this.isSeek = false;
|
|
|
this.isSelectNumber = true;
|
|
|
- console.log(this.seekList[this.seekListIndex])
|
|
|
this.$nextTick(()=>{
|
|
|
this.$refs['bigInput'].focus();
|
|
|
})
|
|
|
- console.log('两个值相同')
|
|
|
}else{
|
|
|
this.seekList = [];
|
|
|
this.seekListIndex = 0;
|
|
|
- console.log('两个不相同,赋值')
|
|
|
this.seekOldVal = this.seekVal;
|
|
|
this.isSeek = true;
|
|
|
let list = this.$util.copyObject(this.allList);
|
|
|
@@ -413,7 +409,6 @@ export default {
|
|
|
this.$refs.seekList.setCurrentRow(this.seekList[0]);
|
|
|
}
|
|
|
},
|
|
|
- /** 选择数量--按键回车*/
|
|
|
enterFun(){
|
|
|
let selectList = this.seekList[this.seekListIndex];
|
|
|
let big = this.big;
|