|
|
@@ -98,6 +98,7 @@
|
|
|
import VKeyboard from '@/components/vKeyboard/VKeyboard.vue'
|
|
|
import productMins from "@/mixins/product";
|
|
|
import { getAllStaff} from '@/api/shop-admin'
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
name:'selectCustomer',
|
|
|
data() {
|
|
|
@@ -149,6 +150,7 @@ export default {
|
|
|
components:{ VKeyboard },
|
|
|
mixins: [productMins],
|
|
|
computed:{
|
|
|
+ ...mapGetters(["getLoginInfo"]),
|
|
|
totalPrice(){
|
|
|
let price = 0
|
|
|
if(!this.$util.isEmpty(this.groupInfo)){
|
|
|
@@ -198,16 +200,25 @@ export default {
|
|
|
this.getStaffList = res.data.list
|
|
|
this.shopAdminIdList = res.data.list
|
|
|
if(!this.$util.isEmpty(this.getStaffList)){
|
|
|
- this.form.getStaffId = this.getStaffList[0].id
|
|
|
- this.form.getStaffName = this.getStaffList[0].name
|
|
|
-
|
|
|
- this.form.shopAdminId = this.getStaffList[0].id
|
|
|
- this.form.shopAdminName = this.getStaffList[0].name
|
|
|
-
|
|
|
+ let currentId = 0
|
|
|
+ let currentName = ''
|
|
|
+ this.getStaffList.forEach((staff) => {
|
|
|
+ if(this.getLoginInfo.shopAdminId && staff.id == this.getLoginInfo.shopAdminId){
|
|
|
+ currentId = staff.id
|
|
|
+ currentName = staff.name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(currentId == 0){
|
|
|
+ currentId = this.getStaffList[0].id
|
|
|
+ currentName = this.getStaffList[0].name
|
|
|
+ }
|
|
|
+ this.form.getStaffId = currentId
|
|
|
+ this.form.getStaffName = currentName
|
|
|
+ this.form.shopAdminId = currentId
|
|
|
+ this.form.shopAdminName = currentName
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
changeShopAdminId(item){
|
|
|
@@ -382,7 +393,9 @@ export default {
|
|
|
flex-wrap: wrap;
|
|
|
padding: 6upx 0;
|
|
|
& > view {
|
|
|
- width: 80upx;
|
|
|
+ min-width:80upx;
|
|
|
+ padding-left:5upx;
|
|
|
+ padding-right:5upx;
|
|
|
height: 25upx;
|
|
|
text-align: center;
|
|
|
line-height: 25upx;
|