shish 4 лет назад
Родитель
Сommit
807e13677b
3 измененных файлов с 18 добавлено и 27 удалено
  1. 1 3
      ghsApp/src/admin/home/workbench.vue
  2. 16 23
      ghsApp/src/admin/shop/sk.vue
  3. 1 1
      ghsApp/src/pages.json

+ 1 - 3
ghsApp/src/admin/home/workbench.vue

@@ -197,8 +197,6 @@ export default {
 			this.pageTo({ url: '/admin/custom/selectCustom',query: {style:1}})
 		},
 		skKd(){
-			this.$msg('请在零售端开单')
-			return false
 			let that = this
 			let currentId = 0;
 			if(this.skCustomId > 0){
@@ -214,7 +212,7 @@ export default {
 					this.$util.pageTo({url: "/admin/billing/index",query: {customId: currentId}})
 				}
 			}else{
-				that.$util.confirmModal({content:'请设置您的零售店',okText:'好的',cancelText:'取消'},() => {
+				that.$util.confirmModal({content:'请设置您要快捷开单的客户',okText:'好的',cancelText:'取消'},() => {
 					that.$util.pageTo({url: '/admin/shop/sk'})	
 				})
 			}

+ 16 - 23
ghsApp/src/admin/shop/sk.vue

@@ -4,7 +4,7 @@
       <form @submit="formSubmit">
         <div class="module-com input-line-wrap">
           <tui-list-cell class="line-cell" :arrow="true" @click="selectCustom">
-            <div class="tui-title">请选择门店:</div>
+            <div class="tui-title">请选择客户:</div>
             <view>{{form.customName}}</view>
           </tui-list-cell>
         </div>
@@ -17,7 +17,7 @@
 </template>
 <script>
 import TuiListCell from "@/components/plugin/list-cell";
-import { skCustom,bindLsShop } from "@/api/shop";
+import { skCustom,skCustomSet } from "@/api/shop";
 export default {
   name: "sk",
   components: {TuiListCell},
@@ -29,11 +29,6 @@ export default {
       },
       hasLoad:false
     };
-  },
-  onLoad() {
-  },
-  onShow() {
-
   },
   methods: {
     init(){
@@ -54,28 +49,26 @@ export default {
     },
     formSubmit() {
       let that = this
-      uni.showModal({
-        title: '提示',
-        content: '确认绑定?确认零售店的欠款已全部结清?!!!',
-        success: function (res) {
-          if (res.confirm) {
-            uni.showLoading({mask:true})
-            bindLsShop({id:that.form.customId}).then(res=>{
-              uni.hideLoading()
-              if(res.code == 1){
-                that.$msg(res.msg)
-                setTimeout(function(){
-                  uni.navigateBack()
-                },2000)
-              }
-            })
+      if(that.form.customId == 0 || that.$util.isEmpty(that.form.customId)){
+        that.$msg('请选择门店')
+        return false
+      }
+      skCustomSet({id:that.form.customId}).then(res=>{
+          if(res.code == 1){
+            that.$msg(res.msg)
+            setTimeout(function(){
+
+              that.$store.commit("setLoginInfo", {})
+              that.$util.pageTo({url: "/admin/home/workbench",type: 3})
+
+            },1000)
           }
-        }
       })
     }
   },
 };
 </script>
+
 <style lang="scss" scoped>
 .app-content {
   min-height: calc(100vh - 20upx);

+ 1 - 1
ghsApp/src/pages.json

@@ -153,7 +153,7 @@
 				{"path": "print","style": {"navigationBarTitleText": "云打印"}},
 				{"path": "trumpet","style": {"navigationBarTitleText": "收款播报设置"}},
 				{"path": "changeShop","style": {"navigationBarTitleText": "切换门店"}},
-				{"path": "sk","style": {"navigationBarTitleText": "我的零售店"}},
+				{"path": "sk","style": {"navigationBarTitleText": "快捷开单设置"}},
 				{"path": "password","style": {"navigationBarTitleText": "密码修改"}}
 			]
 		},