shish 10 месяцев назад
Родитель
Сommit
9f12ed8143

+ 116 - 1
ghsApp/src/admin/home/me.vue

@@ -23,7 +23,10 @@
                 <view> {{ myInfo.shopName||'' }}
                 <text v-if="myInfo.shopInfo && myInfo.shopInfo.default && myInfo.shopInfo.default == 1" class="default-shop">总店</text>
                 </view>
-                <view> <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text> </view>
+                <view style="display: flex; align-items: center;">
+                  <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text>
+                  <text class="edit-icon" @click.stop="editShopName">✏️</text>
+                </view>
               </view>
               <view class="top-info_box" @click="pageTo({url:'/admin/home/login'})" v-else>
                 <view style="font-size:40upx;"> 登录/注册 </view>
@@ -235,6 +238,25 @@
       ></htz-image-upload>
     </uni-popup>
 
+    <!-- 修改名称弹出框 -->
+    <uni-popup ref="editPopup" type="center" :animation="false">
+      <view class="edit-modal">
+        <view class="modal-title">修改名称</view>
+        <view class="modal-content">
+          <input 
+            v-model="editName" 
+            placeholder="请输入名称" 
+            class="edit-input"
+            maxlength="20"
+          />
+        </view>
+        <view class="modal-buttons">
+          <button class="cancel-btn" @click="cancelEdit">取消</button>
+          <button class="confirm-btn" @click="confirmEdit">确认</button>
+        </view>
+      </view>
+    </uni-popup>
+
   </view>
 </template>
 <script>
@@ -242,6 +264,7 @@ import AppAvatarModule from "@/components/module/app-avatar";
 import TuiListCell from "@/components/plugin/list-cell";
 import { mainMy, applyCash } from "@/api/home";
 import { clearLogin } from "@/api/admin";
+import { modifySjName } from "@/api/shop";
 import { inMoney,outMoney } from "@/api/shop-money";
 import ShopSelect from "@/components/module/shopSelect";
 import { list } from "@/mixins";
@@ -278,6 +301,7 @@ export default {
       showDeadline:false,
       avatarImgData: [],
       headers: { token: '' },
+      editName: ''
     };
   },
   onPullDownRefresh () {
@@ -545,6 +569,27 @@ export default {
         this.$msg('图片上传失败')
       }
     },
+    editShopName() {
+      this.editName = this.myInfo.sjName || ''
+      this.$refs.editPopup.open('center')
+    },
+    cancelEdit() {
+      this.$refs.editPopup.close()
+      this.editName = ''
+    },
+    confirmEdit() {
+      if (!this.editName.trim()) {
+        this.$msg('请输入名称')
+        return
+      }
+      modifySjName({name:this.editName}).then(res=>{
+        if(res.code == 1){
+          this.myInfo.sjName = this.editName
+          this.$refs.editPopup.close()
+          this.$msg('修改成功')
+        }
+      })
+    },
   },
 };
 </script>
@@ -754,5 +799,75 @@ export default {
     margin-top: 25upx;
     width: 30vw;
   }
+
+  /* 修改名称相关样式 */
+  .edit-icon {
+    margin-left: 15upx;
+    font-size: 28upx;
+    color: #666666;
+    padding: 5upx;
+    cursor: pointer;
+  }
+
+  .edit-modal {
+    background: white;
+    border-radius: 20upx;
+    padding: 40upx;
+    width: 80vw;
+    max-width: 500upx;
+    box-shadow: 0 10upx 30upx rgba(0,0,0,0.3);
+  }
+
+  .modal-title {
+    font-size: 36upx;
+    font-weight: bold;
+    color: #333;
+    text-align: center;
+    margin-bottom: 40upx;
+  }
+
+  .modal-content {
+    margin-bottom: 40upx;
+  }
+
+  .edit-input {
+    width: 100%;
+    height: 80upx;
+    border: 2upx solid #e5e5e5;
+    border-radius: 10upx;
+    padding: 0 20upx;
+    font-size: 32upx;
+    color: #333;
+    box-sizing: border-box;
+  }
+
+  .edit-input:focus {
+    border-color: #3385FF;
+  }
+
+  .modal-buttons {
+    display: flex;
+    justify-content: space-between;
+    gap: 20upx;
+  }
+
+  .cancel-btn, .confirm-btn {
+    flex: 1;
+    height: 80upx;
+    border-radius: 40upx;
+    font-size: 32upx;
+    border: none;
+    cursor: pointer;
+  }
+
+  .cancel-btn {
+    background: #f5f5f5;
+    color: #666;
+  }
+
+  .confirm-btn {
+    background: #3385FF;
+    color: white;
+  }
 }
 </style>

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

@@ -151,4 +151,8 @@ export const getInfo = data => {
 
 export const miniGatheringCode = data => {
 	return https.get('/shop/mini-gathering-code', data)
+}
+
+export const modifySjName = data => {
+	return https.get('/shop/modify-sj-name', data)
 }

+ 7 - 2
ghsApp/src/pagesClient/member/modify.vue

@@ -4,9 +4,10 @@
 			<view class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
 					<view class="tui-title">城市</view>
-					<view class="tui-input" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
-					<view class="tui-placeholder" v-else>请选择</view>
+					<view class="tui-input" style="width:280upx;" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
+					<view class="tui-placeholder" style="width:280upx;" v-else>请选择</view>
 					<input v-model="form.province" name="province" hidden />
+					<button class="admin-button-com blue small" @click.stop="onHere">我在昆明</button>
 				</tui-list-cell>
 				<tui-list-cell v-if="hasMap == 0" class="line-cell" :hover="false">
 					<view class="tui-title">地址</view>
@@ -83,6 +84,10 @@ export default {
 		}
 	},
 	methods: {
+		onHere(){
+			this.form.province = '云南省'
+			this.form.city = '昆明市'
+		},
 		init() {
 			getHasMap().then(res=>{
 				this.hasMap = res.data.hasMap

+ 1 - 1
hdApp/src/admin/home/apply.vue

@@ -49,7 +49,7 @@ export default {
                 { name: "库存预警", img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs2.png`, url: "/pagesStorehouse/stockWarn/manage",pf:1},
                 { name: "买花", img: `${this.$constant.hostUrl}/image/ghs/home/icon_ghs2.png`, url: "/pagesPurchase/order",pf:1},
                 { name: "买花记录", img: `${this.$constant.hostUrl}/image/ghs/home/icon_caigou2.png`, url: "/pagesPurchase/shopping",pf:1},
-                { name: "已屏蔽", img: `${this.$constant.hostUrl}/image/ghs/home/icon_ghs2.png`, url: "/pagesPurchase/pb",pf:1},
+                { name: "已删除", img: `${this.$constant.hostUrl}/image/ghs/home/icon_ghs2.png`, url: "/pagesPurchase/pb",pf:1},
                 { name: "损耗", img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs2.png`, url: "/admin/breakage/list",pf:1},
                 { name: "拆散", img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs2.png`, url: "/admin/part/list",pf:1}
             ]

+ 117 - 3
hdApp/src/admin/home/me.vue

@@ -19,7 +19,10 @@
 
               <view class="top-info_box" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentShopId > 0" @click="pageTo({url: '/admin/shop/add?id='+myInfo.shopInfo.id})">
                 <view> {{ myInfo.shopName||'' }} </view>
-                <view><text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text></view>
+                <view style="display: flex; align-items: center;">
+                  <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text>
+                  <text class="edit-icon" @click.stop="editShopName">✏️</text>
+                </view>
               </view>
 
               <view class="top-info_box" @click="pageTo({url:'/admin/home/login'})" v-else>
@@ -131,13 +134,32 @@
       </view>
     </template>
     <NotLogin></NotLogin>
+    
+    <!-- 修改名称弹出框 -->
+    <uni-popup ref="editPopup" type="center" :animation="false">
+      <view class="edit-modal">
+        <view class="modal-title">修改名称</view>
+        <view class="modal-content">
+          <input 
+            v-model="editName" 
+            placeholder="请输入名称" 
+            class="edit-input"
+            maxlength="20"
+          />
+        </view>
+        <view class="modal-buttons">
+          <button class="cancel-btn" @click="cancelEdit">取消</button>
+          <button class="confirm-btn" @click="confirmEdit">确认</button>
+        </view>
+      </view>
+    </uni-popup>
   </view>
 </template>
 <script>
 import AppAvatarModule from "@/components/module/app-avatar";
 import TuiListCell from "@/components/plugin/list-cell";
 import { mainMy, applyCash } from "@/api/home";
-import { openPfFn } from "@/api/apply";
+import { modifySjName } from "@/api/shop";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import { selectShop } from "@/mixins";
 import { list } from "@/mixins";
@@ -161,7 +183,8 @@ export default {
       constant:this.$constant,
       myInfo:{},
       version:'1.0.0',
-      lookMoney:0
+      lookMoney:0,
+      editName: ''
     };
   },
   onPullDownRefresh () {
@@ -329,6 +352,27 @@ export default {
           that.$msg('操作成功')
         }
       })
+    },
+    editShopName() {
+      this.editName = this.myInfo.sjName || ''
+      this.$refs.editPopup.open('center')
+    },
+    cancelEdit() {
+      this.$refs.editPopup.close()
+      this.editName = ''
+    },
+    confirmEdit() {
+      if (!this.editName.trim()) {
+        this.$msg('请输入名称')
+        return
+      }
+      modifySjName({name:this.editName}).then(res=>{
+        if(res.code == 1){
+          this.myInfo.sjName = this.editName
+          this.$refs.editPopup.close()
+          this.$msg('修改成功')
+        }
+      })
     }
   },
 };
@@ -505,4 +549,74 @@ export default {
     border-radius: 10upx;
   }
 }
+
+/* 修改名称相关样式 */
+.edit-icon {
+  margin-left: 15upx;
+  font-size: 28upx;
+  color: #666666;
+  padding: 5upx;
+  cursor: pointer;
+}
+
+.edit-modal {
+  background: white;
+  border-radius: 20upx;
+  padding: 40upx;
+  width: 80vw;
+  max-width: 500upx;
+  box-shadow: 0 10upx 30upx rgba(0,0,0,0.3);
+}
+
+.modal-title {
+  font-size: 36upx;
+  font-weight: bold;
+  color: #333;
+  text-align: center;
+  margin-bottom: 40upx;
+}
+
+.modal-content {
+  margin-bottom: 40upx;
+}
+
+.edit-input {
+  width: 100%;
+  height: 80upx;
+  border: 2upx solid #e5e5e5;
+  border-radius: 10upx;
+  padding: 0 20upx;
+  font-size: 32upx;
+  color: #333;
+  box-sizing: border-box;
+}
+
+.edit-input:focus {
+  border-color: #3385FF;
+}
+
+.modal-buttons {
+  display: flex;
+  justify-content: space-between;
+  gap: 20upx;
+}
+
+.cancel-btn, .confirm-btn {
+  flex: 1;
+  height: 80upx;
+  border-radius: 40upx;
+  font-size: 32upx;
+  border: none;
+  cursor: pointer;
+}
+
+.cancel-btn {
+  background: #f5f5f5;
+  color: #666;
+}
+
+.confirm-btn {
+  background: #3385FF;
+  color: white;
+}
 </style>

+ 3 - 3
hdApp/src/admin/home/workbench.vue

@@ -463,7 +463,7 @@
     <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
       <view style="width:100vw;margin-top:8upx;"><button @click="rechargeChange()">充值记录</button></view>
       <view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动</button></view>
-      <!-- <view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">屏蔽此商家</button></view> -->
+      <view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">删除此商家</button></view>
       <view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
     </view>
   </uni-popup>
@@ -821,7 +821,7 @@ export default {
     goMore(){
       let that = this
       let shopkeeper = this.loginInfo.staff && this.loginInfo.staff.founder == 2 //判断店主(老板)
-      let items = shopkeeper ? ['已屏蔽商家', '改进建议', '开关商城', '也要一个此商城', '修改密码', '退出登录'] : ['已屏蔽商家', '我已离职', '开关商城', '也要一个此商城', '修改密码', '退出登录'];
+      let items = shopkeeper ? ['已删除商家', '改进建议', '开关商城', '也要一个此商城', '修改密码', '退出登录'] : ['已删除商家', '我已离职', '开关商城', '也要一个此商城', '修改密码', '退出登录'];
       uni.showActionSheet({
         itemList: items,
         success: function (res) {
@@ -907,7 +907,7 @@ export default {
     },
     bpSj(){
       let that = this
-      that.$util.confirmModal({content:'确认屏蔽此商家?',okText:'确认'},() => {
+      that.$util.confirmModal({content:'确认删除此商家?',okText:'确认'},() => {
         that.confirmPb(that.currentGhs)
 			})
     },

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

@@ -124,4 +124,8 @@ export const kjCustomSet = data => {
 
 export const miniGatheringCode = data => {
 	return https.get('/shop/mini-gathering-code', data)
+}
+
+export const modifySjName = data => {
+	return https.get('/shop/modify-sj-name', data)
 }

+ 1 - 1
hdApp/src/pages.json

@@ -489,7 +489,7 @@
 				{ "path": "particulars", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": true } },
 				{ "path": "details", "style": { "navigationBarTitleText": "确认订单" } },
 				{ "path": "order", "style": { "navigationBarTitleText": "买花", "enablePullDownRefresh": true } },
-				{ "path": "pb", "style": { "navigationBarTitleText": "已屏蔽商家", "enablePullDownRefresh": true } },
+				{ "path": "pb", "style": { "navigationBarTitleText": "已删除商家", "enablePullDownRefresh": true } },
 				{ "path": "open", "style": { "navigationBarTitleText": "商城功能开关", "enablePullDownRefresh": true } },
 				{ "path": "shopping", "style": { "navigationBarTitleText": "采购", "enablePullDownRefresh": true } },
 				{ "path": "ghsProduct", "style": { "navigationBarTitleText": "采购花材", "enablePullDownRefresh": false } },

+ 1 - 1
hdApp/src/pagesPurchase/order.vue

@@ -129,7 +129,7 @@
 			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
         <view style="width:100vw;margin-top:8upx;"><button @click="rechargeChange()">充值记录</button></view>
 				<view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动记录</button></view>
-				<!-- <view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">屏蔽此商家</button></view> -->
+				<view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">删除此商家</button></view>
 				<view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
 			</view>
 		  </uni-popup>

+ 2 - 2
hdApp/src/pagesPurchase/pb.vue

@@ -29,7 +29,7 @@
               <image class="icon_3" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps83ag7scu3a8bfq22ciodg5hiu0x9cesxjbfb4c9ca-ee3f-45ec-a6d7-6f166e13d6e6.png" />
             </view>
           </view>
-          <view class="button_4 flex-col" @click="recover(ghsInfo)"><text class="text_13">取消屏蔽</text></view>
+          <view class="button_4 flex-col" @click="recover(ghsInfo)"><text class="text_13">恢复</text></view>
         </view>
     </view>
 
@@ -80,7 +80,7 @@ export default {
   methods: {
     recover(ghs){
       let that = this
-      that.$util.confirmModal({content:'确认取消屏蔽?',okText:'确认'},() => {
+      that.$util.confirmModal({content:'确认恢复?',okText:'确认'},() => {
         that.confirmRecover(ghs)
 			})
     },