廖雁生 hace 11 meses
padre
commit
e5558ed586

+ 2 - 2
toktok-admin-screen/config/prod.env.js

@@ -1,6 +1,6 @@
 module.exports = {
   NODE_ENV: '"production"',
   ENV_CONFIG: '"prod"',
-  // BASE_API: '"http://stores.test.toktok.beer/tsa"'
-  BASE_API: '"https://stores.toktok.beer/tsa"'
+  BASE_API: '"http://stores.test.toktok.beer/tsa"'
+  // BASE_API: '"https://stores.toktok.beer/tsa"'
 }

+ 16 - 0
toktok-admin-screen/src/api/projection.js

@@ -805,3 +805,19 @@ export function beer_box_order_split_update_confirm_order(param) {
     params: param
   })
 }
+//关闭用户修改地址功能
+export function beer_box_order_split_update_modify_address_flag(param) {
+  return request({
+    url: '/beer_box_order_split/update/modify_address_flag',
+    method: 'post',
+    params: param
+  })
+}
+//所有盲盒列表
+export function beer_box_order_split_list_box(param) {
+  return request({
+    url: '/beer_box_order_split/list/box',
+    method: 'get',
+    params: param
+  })
+}

+ 36 - 24
toktok-admin-screen/src/views/toktok-stores/beer_box_order_split.vue

@@ -2,10 +2,12 @@
   <div id="beer_box_order_split" class="app-container">
 
     <div class="filter-container">
-      <el-input v-model="listQuery.orderNo" placeholder="订单号" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
-      <el-input v-model="listQuery.beerBoxName" placeholder="盲盒名" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
-      <el-input v-model="listQuery.month" placeholder="盲盒所属月份" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
-      <el-input v-model="listQuery.phone" placeholder="收货人手机号" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
+      <el-input v-model="listQuery.orderNo" placeholder="订单号" style="width: 200px;" type="text" @keyup.enter.native="handleFilter" />
+      <el-select v-model="beerBoxIds_list" multiple filterable placeholder="盲盒选择" @change="beerBoxIds_filter">
+        <el-option v-for="item in beerBoxList" :key="item.beerBoxId" :label="item.boxName" :value="item.beerBoxId" />
+      </el-select>
+      <el-input v-model="listQuery.month" placeholder="盲盒所属月份" style="width: 200px;" type="text" @keyup.enter.native="handleFilter" />
+      <el-input v-model="listQuery.phone" placeholder="收货人手机号" style="width: 200px;" type="text" @keyup.enter.native="handleFilter" />
       <el-button size="medium" @click="handleFilter" type="primary">搜索</el-button>
     </div>
 
@@ -48,7 +50,8 @@
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="待发货" name="待发货">
-        <el-button size="medium" type="primary" @click="exportData_wait_send_order" style="margin-bottom: 10px;">导出待发货数据</el-button>
+        <el-button size="medium" type="danger" @click="offMdiAd" style="margin-bottom: 10px;">关闭客户端修改地址</el-button>
+        <el-button size="medium" type="primary" @click="exportData" style="margin-bottom: 10px;">导出待发货数据</el-button>
         <el-upload
           ref="upload"
           action=""
@@ -70,6 +73,12 @@
             </template>
           </el-table-column>
           <el-table-column prop="userName" label="用户名" width="100" />
+          <el-table-column label="地址可修改状态">
+            <template slot-scope="scope">
+              <span v-if="scope.row.updateAddressFlag==0">开启</span>
+              <span v-else-if="scope.row.updateAddressFlag==1" style="color:red">关闭</span>
+            </template>
+          </el-table-column>
           <el-table-column prop="consignee" label="收件人" width="100" />
           <el-table-column prop="phone" label="收件人电话" width="100" />
           <el-table-column prop="address" label="收件地址" width="100" />
@@ -198,7 +207,8 @@
 <script>
 import { beer_box_order_split_list, beer_box_order_split_import_order_courierno,
   beer_box_order_split_list_bindable_sku, beer_box_order_split_update_bindable_sku,
-  beer_box_order_split_update_confirm_order } from '@/api/projection'
+  beer_box_order_split_update_confirm_order, beer_box_order_split_update_modify_address_flag,
+  beer_box_order_split_list_box } from '@/api/projection'
 import { deepClone, parseTime } from '@/utils'
 import { scrollTo } from '@/utils/scrollTo'
 import { getToken } from '@/utils/auth'
@@ -212,6 +222,8 @@ export default {
         currentPage: 1,
         pageSize: 20
       },
+      beerBoxList: [],
+      beerBoxIds_list: [],
       pageInfo: {},
       dialogVisible_sku: false,
       parmas_sku: {
@@ -223,9 +235,17 @@ export default {
   },
   mounted() {
     this.loadDatas();
-
+    this.getBeerBoxList();
   },
   methods: {
+    beerBoxIds_filter(e) {
+      this.listQuery.beerBoxIds = e.join(';')
+    },
+    offMdiAd() {
+      beer_box_order_split_update_modify_address_flag(this.listQuery).then(res => {
+        this.$notify.success({ title: '关闭成功' });
+      })
+    },
     confirmOrder() {
       beer_box_order_split_update_confirm_order().then(res => {
         this.$notify.success({ title: '更新成功' });
@@ -257,22 +277,6 @@ export default {
         this.$notify.success({ title: '上传成功' });
       })
     },
-    exportData_wait_send_order() {
-      var request = new XMLHttpRequest();
-      request.responseType = "blob";
-      request.open("POST", process.env.BASE_API+'/beer_box_order_split/export/wait_send_order');
-      request.setRequestHeader('Authorization', 'stores' + getToken());
-      request.setRequestHeader("Content-type", "application/x-www-form-urlencoded ; charset=utf-8");
-      request.onload = function () {
-        var _url = window.URL.createObjectURL(this.response);
-        var a = document.createElement("a");
-        document.body.appendChild(a);
-        a.href = _url;
-        a.download = '订单.xlsx';
-        a.click();
-      }
-      request.send()
-    },
     exportData() {
       const params = new URLSearchParams();
       for (const key in this.listQuery) {
@@ -288,14 +292,22 @@ export default {
       request.setRequestHeader("Content-type", "application/x-www-form-urlencoded ; charset=utf-8");
       request.send(urlParams)
       request.onload = function () {
+        let disposition_obj = request.getResponseHeader("content-disposition")
+        let matchArray = disposition_obj.match(/filename="(.*)"/)
+        const filename = matchArray[1];
         var _url = window.URL.createObjectURL(this.response);
         var a = document.createElement("a");
         document.body.appendChild(a);
         a.href = _url;
-        a.download = '订单.xlsx';
+        a.download = decodeURI(filename);
         a.click();
       }
     },
+    getBeerBoxList() {
+      beer_box_order_split_list_box(this.listQuery).then((res) => {
+        this.beerBoxList = res.data.data;
+      })
+    },
     // 获取数据
     loadDatas() {
       beer_box_order_split_list(this.listQuery).then((res) => {

+ 9 - 2
toktok-admin-screen/src/views/toktok-stores/subject.vue

@@ -13,7 +13,14 @@
           <img :src="scope.row.subLogo" style="width: 80px;">
         </template>
       </el-table-column>
-      <el-table-column prop="subColor" label="主题色" width="100"/>
+      <el-table-column label="主题色" width="100">
+        <template slot-scope="scope">
+          <div style="display:flex;flex-direction: column;">
+            <span>{{scope.row.subColor}}</span>
+            <span :style="'width: 40px;height: 40px;background:'+scope.row.subColor"></span>
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column label="主题背景图" width="150">
         <template slot-scope="scope">
           <img :src="scope.row.bg" style="width: 120px;">
@@ -37,7 +44,7 @@
           <el-input v-model="params.subName" placeholder="请填写主题名" />
         </el-form-item>
         <el-form-item label="主题颜色:" prop="subColor">
-          <el-input v-model="params.subColor" placeholder="请填写十六进制颜色" />
+          <el-input v-model="params.subColor" placeholder="请填写十六进制颜色" style="width: 200px;"/>
         </el-form-item>
         <el-form-item label="logo图:" prop="subLogo" style="width:400px">
           <el-upload

+ 15 - 0
toktok-wx-applet/app.js

@@ -7,6 +7,7 @@ App({
     // 自动登录
     login.autoLogin()
     this.getDistrictData()
+    this.getNavBarInfo()
   },
   getDistrictData() {
     let that = this;
@@ -17,7 +18,21 @@ App({
       }
     )
   },
+  getNavBarInfo() {
+    const that = this;
+    // 获取系统信息
+    const systemInfo = wx.getSystemInfoSync();
+    // 胶囊按钮位置信息
+    const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
+    // 导航栏高度 = 状态栏到胶囊的间距(胶囊距上距离-状态栏高度) * 2 + 胶囊高度 + 状态栏高度
+    that.globalData.navBarHeight = (menuButtonInfo.top - systemInfo.statusBarHeight) * 2 + menuButtonInfo.height + systemInfo.statusBarHeight;
+    that.globalData.menuTop = menuButtonInfo.top;
+    that.globalData.menuHeight = menuButtonInfo.height;
+  },
   globalData: {
+    navBarHeight: 0, // 导航栏高度
+    menuTop: 0, // 胶囊距顶部间距(保持顶部间距一致)
+    menuHeight: 0, // 胶囊高度(自定义内容可与胶囊高度保证一致)
     userInfo: null,
     content: '',
     imgList: [],

+ 5 - 7
toktok-wx-applet/pages/beerBoxDetail/beerBoxDetail.js

@@ -1,12 +1,16 @@
 // pages/beerBoxDetail/beerBoxDetail.js
 const request = require("../../utils/request.js");
 const login = require("../../utils/login.js");
+const app = getApp();
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    statusBar_top: app.globalData.menuTop,
+    navBarHeight: app.globalData.navBarHeight,
     popover_Status: true,
     boxId: null,
     beerBoxDetail: {},
@@ -29,13 +33,7 @@ Page({
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady() {
-    // 状态栏+导航栏高度
-    let res = wx.getSystemInfoSync()
-    let navBarHeight = res.statusBarHeight + 44
-    console.log(navBarHeight)
-    this.setData({
-      navBarHeight: navBarHeight
-    })
+
   },
 
   /**

+ 1 - 1
toktok-wx-applet/pages/beerBoxDetail/beerBoxDetail.wxml

@@ -1,6 +1,6 @@
 <!--pages/beerBoxDetail/beerBoxDetail.wxml-->
 <view class="top-view" hidden="{{topViewStatus}}" style="height:{{navBarHeight}}px;background: {{beerBoxDetail.bgColor}};"></view>
-<image class="back" src="/static/img/back.png" catchtap="backFun" />
+<image class="back" style="top:{{statusBar_top+4}}px;" src="/static/img/back.png" catchtap="backFun" />
 <image class="beer-bg" src="{{beerBoxDetail.detailBg}}" mode=""/>
 <view class="head-title">
   <text>{{beerBoxDetail.boxName}}</text>

+ 1 - 1
toktok-wx-applet/pages/mineOrderProgress/mineOrderProgress.wxml

@@ -44,7 +44,7 @@
       <view class="progress-msg">{{item.nodeDes}}
         <text wx:if="{{item.nodeAction==3001}}" style="color:#FF5700;">{{item.busiData}}</text>
       </view>
-      <view class="progress-btn" wx:if="{{item.nodeAction==1001}}" bindtap="toChangeAd">更改收货地址</view>
+      <view class="progress-btn" wx:if="{{item.nodeAction==1001&&orderInfo.updateAddressFlag==0}}" bindtap="toChangeAd">更改收货地址</view>
       <view class="progress-btn" wx:if="{{item.nodeAction==2001}}" bindtap="checkExpress" data-busi="{{item.busiData}}">查看物流进度</view>
     </view>
   </view>