Browse Source

供货商

shish 3 years ago
parent
commit
f31423da88

+ 1 - 0
hdApp/src/admin/home/me.vue

@@ -258,6 +258,7 @@ export default {
         // #ifdef MP-WEIXIN
         // #ifdef MP-WEIXIN
         this.$store.commit("setLoginInfo", {})
         this.$store.commit("setLoginInfo", {})
         this.$store.commit("setMyShopInfo", {})
         this.$store.commit("setMyShopInfo", {})
+        this.$store.commit("setDictionariesInfo", {})
         this.$util.pageTo({url: "/admin/home/me",type: 3})
         this.$util.pageTo({url: "/admin/home/me",type: 3})
         // #endif
         // #endif
         // #ifdef APP-PLUS
         // #ifdef APP-PLUS

+ 18 - 6
hdApp/src/admin/home/workbench.vue

@@ -99,7 +99,7 @@
           <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/admin/stat/cgItem'})">采购统计</button>
           <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/admin/stat/cgItem'})">采购统计</button>
           <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="suggest()">改进建议</button>
           <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="suggest()">改进建议</button>
           <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/pb'})">已屏蔽商家</button>
           <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/pb'})">已屏蔽商家</button>
-          <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/open'})">申请完整功能</button>
+          <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/open'})">开启完整功能</button>
         </view>
         </view>
 
 
         <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in supplierList" :key="index">
         <view class="ghs_box flex-col justify-end" v-for="(ghsInfo, index) in supplierList" :key="index">
@@ -147,14 +147,15 @@
 </template>
 </template>
 <script>
 <script>
 import { mapGetters, mapState } from "vuex";
 import { mapGetters, mapState } from "vuex";
-import { getWeixinId } from "@/api/invite/index";
+import { getWeixinId } from "@/api/invite";
 import { getStat } from '@/api/console'
 import { getStat } from '@/api/console'
 import { getShopInfo } from "@/utils/auth";
 import { getShopInfo } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
 import { consoleIndex } from "@/api/workbench";
 import NotLogin from "@/components/not-login";
 import NotLogin from "@/components/not-login";
 import autoUpdateMixins from "@/mixins/autoUpdate";
 import autoUpdateMixins from "@/mixins/autoUpdate";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { ghsList } from "@/api/purchase/index";
+import { ghsList } from "@/api/purchase";
+import { changeDelStatus } from "@/api/ghs";
 export default {
 export default {
   name: "workbench",
   name: "workbench",
   components: { NotLogin,AppWrapperEmpty },
   components: { NotLogin,AppWrapperEmpty },
@@ -259,8 +260,19 @@ export default {
       const { id } = item
       const { id } = item
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
     },
     },
-    bpSj(item){
-
+    bpSj(ghs){
+      let that = this
+      that.$util.confirmModal({content:'确认屏蔽此商家?',okText:'确认'},() => {
+        that.confirmPb(ghs)
+			})
+    },
+    confirmPb(ghs){
+      let that = this
+      changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
+        if(res.code == 1){
+          that.getGHSList()
+        }
+      })
     },
     },
     enterShop(item) {
     enterShop(item) {
       if(item.isOpen == 0){
       if(item.isOpen == 0){
@@ -786,7 +798,7 @@ export default {
         background-size: 137upx 137upx;
         background-size: 137upx 137upx;
         width: 130upx;
         width: 130upx;
         position: absolute;
         position: absolute;
-        left: 585upx;
+        left: 575upx;
         top: 105upx;
         top: 105upx;
         border-radius:39upx;
         border-radius:39upx;
         .text_13 {
         .text_13 {

+ 4 - 0
hdApp/src/api/ghs/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 import https from '@/plugins/luch-request_0.0.7/request'
 
 
+export const changeDelStatus = data => {
+	return https.get('/ghs/change-del-status', data)
+}
+
 export const getGhsWl = data => {
 export const getGhsWl = data => {
 	return https.get('/ghs/get-all-wl', data)
 	return https.get('/ghs/get-all-wl', data)
 }
 }

+ 4 - 0
hdApp/src/api/shop/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 import https from '@/plugins/luch-request_0.0.7/request'
 
 
+export const changeOnlyCg = data => {
+	return https.get('/shop/change-only-cg', data)
+}
+
 export const getDetail = data => {
 export const getDetail = data => {
 	return https.get('/shop/detail', data)
 	return https.get('/shop/detail', data)
 }
 }

+ 2 - 2
hdApp/src/pages.json

@@ -382,8 +382,8 @@
 				{ "path": "particulars", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": true } },
 				{ "path": "particulars", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": true } },
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
 				{ "path": "order", "style": { "navigationBarTitleText": "供货商", "enablePullDownRefresh": true } },
 				{ "path": "order", "style": { "navigationBarTitleText": "供货商", "enablePullDownRefresh": true } },
-				{ "path": "pb", "style": { "navigationBarTitleText": "已屏蔽列表", "enablePullDownRefresh": true } },
-				{ "path": "open", "style": { "navigationBarTitleText": "申请完整功能", "enablePullDownRefresh": true } },
+				{ "path": "pb", "style": { "navigationBarTitleText": "已屏蔽商家", "enablePullDownRefresh": true } },
+				{ "path": "open", "style": { "navigationBarTitleText": "开启完整功能", "enablePullDownRefresh": true } },
 				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
 				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },
 				{ "path": "setPsd", "style": { "navigationBarTitleText": "设置密码", "enablePullDownRefresh": true } },
 				{ "path": "setPsd", "style": { "navigationBarTitleText": "设置密码", "enablePullDownRefresh": true } },

+ 28 - 2
hdApp/src/pagesPurchase/open.vue

@@ -6,14 +6,15 @@
           您正在申请花店零售所需的完整功能,包括商城、订单管理、客户管理和财务管理等。
           您正在申请花店零售所需的完整功能,包括商城、订单管理、客户管理和财务管理等。
         </div>
         </div>
         <div class="confirm-btn">
         <div class="confirm-btn">
-          <button class="admin-button-com big blue"> 申请开通 </button>
-          <button class="admin-button-com big default" style="margin-top:30upx;"> 申请关闭 </button>
+          <button class="admin-button-com big blue" @click="changeCg(0)"> 申请开通 </button>
+          <button class="admin-button-com big default" style="margin-top:30upx;" @click="changeCg(1)"> 申请关闭 </button>
         </div>
         </div>
       </form>
       </form>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
+import { changeOnlyCg } from "@/api/shop";
 export default {
 export default {
   name: "open",
   name: "open",
   data() {
   data() {
@@ -21,6 +22,31 @@ export default {
     };
     };
   },
   },
   methods: {
   methods: {
+    changeCg(num){
+      let that = this
+      let title = num == 0 ? '开通' :'关闭' 
+      that.$util.confirmModal({content:'确认'+title+'?',okText:'确认'},() => {
+        that.confirmRecover(num)
+			})
+    },
+    confirmRecover(num){
+      let that = this
+      changeOnlyCg({onlyCg:num}).then(res=>{
+        if(res.code == 1){
+
+          that.$store.commit("setLoginInfo", {})
+          that.$store.commit("setMyShopInfo", {})
+          that.$store.commit("setDictionariesInfo", {})
+
+          // #ifdef APP-PLUS
+          plus.runtime.restart()
+          // #endif
+          // #ifdef MP-WEIXIN
+          that.pageTo({url:'/admin/home/workbench',type:3})
+          // #endif
+        }
+      })
+    }
   }
   }
 };
 };
 </script>
 </script>

+ 17 - 5
hdApp/src/pagesPurchase/order.vue

@@ -6,7 +6,7 @@
         <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/admin/stat/cgItem'})">采购统计</button>
         <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/admin/stat/cgItem'})">采购统计</button>
         <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="suggest()">改进建议</button>
         <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="suggest()">改进建议</button>
         <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/pb'})">已屏蔽商家</button>
         <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/pb'})">已屏蔽商家</button>
-        <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/open'})">申请完整功能</button>
+        <button class="admin-button-com mini-btn blue" style="margin-left:13upx;padding-top:15upx;padding-bottom:15upx;" @click="pageTo({url:'/pagesPurchase/open'})">开启完整功能</button>
       </view>
       </view>
 
 
       <template v-if="!$util.isEmpty(supplierList)">
       <template v-if="!$util.isEmpty(supplierList)">
@@ -53,7 +53,8 @@
 </template>
 </template>
 <script>
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { ghsList } from "@/api/purchase/index";
+import { ghsList } from "@/api/purchase";
+import { changeDelStatus } from "@/api/ghs";
 export default {
 export default {
   components: {
   components: {
     AppWrapperEmpty
     AppWrapperEmpty
@@ -87,8 +88,19 @@ export default {
       const { id } = item
       const { id } = item
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
       this.pageTo({url: '/pagesPurchase/bookProduct?id='+id})
     },
     },
-    bpSj(item){
-
+    bpSj(ghs){
+      let that = this
+      that.$util.confirmModal({content:'确认屏蔽此商家?',okText:'确认'},() => {
+        that.confirmPb(ghs)
+			})
+    },
+    confirmPb(ghs){
+      let that = this
+      changeDelStatus({delStatus:1,ghsId:ghs.id}).then(res=>{
+        if(res.code == 1){
+          that.getGHSList()
+        }
+      })
     },
     },
     enterShop(item) {
     enterShop(item) {
       if(item.isOpen == 0){
       if(item.isOpen == 0){
@@ -376,7 +388,7 @@ export default {
         background-size: 137upx 137upx;
         background-size: 137upx 137upx;
         width: 130upx;
         width: 130upx;
         position: absolute;
         position: absolute;
-        left: 585upx;
+        left: 575upx;
         top: 105upx;
         top: 105upx;
         border-radius:39upx;
         border-radius:39upx;
         .text_13 {
         .text_13 {

+ 18 - 3
hdApp/src/pagesPurchase/pb.vue

@@ -39,7 +39,8 @@
 </template>
 </template>
 <script>
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { ghsList } from "@/api/purchase/index";
+import { ghsList } from "@/api/purchase";
+import { changeDelStatus } from "@/api/ghs";
 export default {
 export default {
   components: {
   components: {
     AppWrapperEmpty
     AppWrapperEmpty
@@ -55,6 +56,20 @@ export default {
     })
     })
   },
   },
   methods: {
   methods: {
+    recover(ghs){
+      let that = this
+      that.$util.confirmModal({content:'确认取消屏蔽?',okText:'确认'},() => {
+        that.confirmRecover(ghs)
+			})
+    },
+    confirmRecover(ghs){
+      let that = this
+      changeDelStatus({delStatus:0,ghsId:ghs.id}).then(res=>{
+        if(res.code == 1){
+          that.getGHSList()
+        }
+      })
+    },
     init() {
     init() {
       this.getGHSList()
       this.getGHSList()
     },
     },
@@ -329,11 +344,11 @@ export default {
         height: 80upx;
         height: 80upx;
         line-height:80upx;
         line-height:80upx;
         text-align:center;
         text-align:center;
-        background-color:#3385FF;
+        background-color:#e88f0b;
         background-size: 137upx 137upx;
         background-size: 137upx 137upx;
         width: 180upx;
         width: 180upx;
         position: absolute;
         position: absolute;
-        left: 520upx;
+        left: 515upx;
         top: 105upx;
         top: 105upx;
         border-radius:10upx;
         border-radius:10upx;
         .text_13 {
         .text_13 {