shish 2 лет назад
Родитель
Сommit
b80094918a
2 измененных файлов с 24 добавлено и 7 удалено
  1. 8 1
      ghs/src/views/member/list.vue
  2. 16 6
      ghs/src/views/order/add.vue

+ 8 - 1
ghs/src/views/member/list.vue

@@ -79,6 +79,7 @@
 
 			<template #slot-column-option="{scope}">
 				<el-button size="small" type="primary" @click="beginRecharge(scope.row)">充值清账</el-button>
+				<el-button size="small" type="primary" @click="kd(scope.row)">开单</el-button>
 			</template>
 
 		</x-crud>
@@ -158,6 +159,12 @@ export default {
 	mounted() {},
 	methods: {
 		...mapActions(['getLevel']),
+		kd(info){
+			let query = {}
+			query.customId = info.id
+			query.customName = info.name
+			this.$router.push({path:'/order/add',query})
+		},
 		beginRecharge(info){
 			this.rechargePop = true
 			this.rechargeTitle = '【'+info.name+'】充值清账'
@@ -307,7 +314,7 @@ export default {
 					op: {
 						visible: true,
 						props: {
-							width: 200,
+							width: 220,
 							align: 'center',
 							fixed: 'right',
 							label: '操作'

+ 16 - 6
ghs/src/views/order/add.vue

@@ -331,6 +331,13 @@ export default {
         this.$refs.customref.focus()
       })
     }
+
+    if (this.$route.query.customId && this.$route.query.customName) {
+      let id = this.$route.query.customId
+      let name = this.$route.query.customName
+      this.goSelectItem(id,name)
+    }
+
     let that = this;
     document.onkeydown=function(e) {
       console.log(e)
@@ -499,19 +506,22 @@ export default {
     },
     selectCustomFn(e){
       if(e.id && e.name){
-        let that = this
+        this.goSelectItem(e.id,e.name)
+      }
+		},
+    goSelectItem(id,name){
+      let that = this
         that.TT = setTimeout(function(){
           that.desk = 'selectedList'
         },2300)
-        this.form.customId = e.id
-        this.form.customName = e.name
-        this.selectJobId = e.id
+        this.form.customId = id
+        this.form.customName = name
+        this.selectJobId = id
         this.getFromStorage(true)
         this.$nextTick(()=>{
           this.$refs['itemSearchRef'].focus()
         })
-      }
-		},
+    },
 		searchCustomInfo(query) {
 			let that = this
 			if (query !== '') {