فهرست منبع

快捷开单设置

shish 1 سال پیش
والد
کامیت
7d0e4c137a
3فایلهای تغییر یافته به همراه108 افزوده شده و 11 حذف شده
  1. 2 11
      hdApp/src/admin/home/me.vue
  2. 105 0
      hdApp/src/admin/shop/sk.vue
  3. 1 0
      hdApp/src/pages.json

+ 2 - 11
hdApp/src/admin/home/me.vue

@@ -97,8 +97,8 @@
               <view class="tui-title">美团云音箱</view>
               <view class="tui-title">美团云音箱</view>
             </tui-list-cell>
             </tui-list-cell>
 
 
-            <tui-list-cell @click="openPfShop()" class="line-cell" :hover="false" :arrow="true" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentShopId > 0 && getLoginInfo.pfShopId == 0">
-              <view class="tui-title" style="color:red;">我要开批发店</view>
+            <tui-list-cell @click="pageTo({ url: '/admin/shop/sk' })" class="line-cell" :hover="false" :arrow="true">
+              <view class="tui-title">快捷开单</view>
             </tui-list-cell>
             </tui-list-cell>
 
 
             <!-- #ifdef APP-PLUS -->
             <!-- #ifdef APP-PLUS -->
@@ -174,15 +174,6 @@ export default {
     // #endif
     // #endif
   },
   },
   methods: {
   methods: {
-    openPfShop(){
-			this.$util.confirmModal({content:'确认提交申请?客服将在一个工作日内与您电话联系'},() => {
-        openPfFn().then(res=>{
-          if(res.code == 1){
-            this.$msg(res.msg)
-          }
-        })				
-			})
-    },
     goAdmin(){
     goAdmin(){
       this.$util.pageTo({ url: '/admin/staff/admin'})
       this.$util.pageTo({ url: '/admin/staff/admin'})
     },
     },

+ 105 - 0
hdApp/src/admin/shop/sk.vue

@@ -0,0 +1,105 @@
+<template>
+  <div class="app-content">
+    <div>
+      <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>
+            <view>{{form.customName}}</view>
+          </tui-list-cell>
+        </div>
+        <div class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">提交</button>
+        </div>
+      </form>
+    </div>
+  </div>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import { skCustom,skCustomSet } from "@/api/shop";
+export default {
+  name: "sk",
+  components: {TuiListCell},
+  data() {
+    return {
+      form:{
+        customName:'',
+        customId:0
+      },
+      hasLoad:false
+    };
+  },
+  methods: {
+    init(){
+      if(this.hasLoad){
+        return false
+      }
+      skCustom().then(res=>{
+        if(res.code == 1){
+          this.hasLoad = true
+          this.form.customName = res.data.custom.name
+          this.form.customId = res.data.custom.id
+          this.$forceUpdate()
+        }
+      })
+    },
+    selectCustom(){
+      this.$util.pageTo({ url: '/admin/custom/selectCustom?style=2'})
+    },
+    formSubmit() {
+      let that = this
+      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);
+  padding-top: 20upx;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30upx;
+  margin-bottom: 30upx;
+}
+.module-com {
+  margin-bottom: 20upx;
+  .member-wrap {
+    .member-det {
+      font-size: 24upx;
+      margin-left: 20upx;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240upx;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60upx);
+  margin: 60upx 30upx 20upx;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 1 - 0
hdApp/src/pages.json

@@ -237,6 +237,7 @@
 				{"path": "list","style": {"navigationBarTitleText": "门店"}},
 				{"path": "list","style": {"navigationBarTitleText": "门店"}},
 				{"path": "downloadCode","style": {"navigationBarTitleText": "收款码"}},
 				{"path": "downloadCode","style": {"navigationBarTitleText": "收款码"}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
+				{"path": "sk","style": {"navigationBarTitleText": "设置快捷开单"}},
 				{"path": "print","style": {"navigationBarTitleText": "前台小票机"}},
 				{"path": "print","style": {"navigationBarTitleText": "前台小票机"}},
 				{"path": "mtPrint","style": {"navigationBarTitleText": "美团小票机"}},
 				{"path": "mtPrint","style": {"navigationBarTitleText": "美团小票机"}},
 				{"path": "makePrint","style": {"navigationBarTitleText": "操作台小票机"}},
 				{"path": "makePrint","style": {"navigationBarTitleText": "操作台小票机"}},