shish 4 лет назад
Родитель
Сommit
ec7a5b43bf
2 измененных файлов с 148 добавлено и 105 удалено
  1. 148 85
      ghsApp/src/admin/shop/changeShop.vue
  2. 0 20
      ghsApp/src/admin/stat/profit.vue

+ 148 - 85
ghsApp/src/admin/shop/changeShop.vue

@@ -1,95 +1,158 @@
 <template>
 <template>
-  <div class="app-content">
-    <div>
-      <form @submit="formSubmit">
-        <div class="module-com input-line-wrap">
-          <view class="list" v-for="(item, index) in shopList" :key="index">
-            <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title">门店:</div>
-                <view>{{item.merchantName}}-{{item.shopName}}</view> 
-                <button class="admin-button-com mini blue" style="margin-left:30upx;" @click="changeShop(item.id)">选择</button>
-            </tui-list-cell>
-          </view>
-        </div>
-      </form>
-    </div>
-  </div>
+<view class="app-content">
+	<view class="ex-page">
+		<view class="top-bar" style="margin-left:100upx;">今天</view>
+		<scroll-view scroll-y scroll-with-animation class="main-view">
+			<view class="space-view ex-table">
+				<block>
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<t-tr header>
+							<t-th><view style="width:180upx;">名称</view></t-th>
+							<t-th>收入</t-th>
+							<t-th>余额</t-th>
+							<t-th>门店数</t-th>
+							<t-th>操作</t-th>
+						</t-tr>
+						<t-tr v-for="(item, inIndex) in shopData.list" :key="inIndex" @click="changeShop(item.id)">
+							<t-td><view style="width:180upx;">{{item.merchantName}}<br />{{item.shopName}}</view></t-td>
+							<t-td><view>{{item.todaySale}}</view></t-td>
+							<t-td><view>{{item.balance}}</view></t-td>
+							<t-td><view>{{item.shopNum}}</view></t-td>
+							<t-td><view></view></t-td>
+						</t-tr>
+						<t-tr>
+							<t-td><view style="width:180upx;font-weight:bold;color:black;">合计</view></t-td>
+							<t-td><view style="font-weight:bold;color:black;">{{shopData.totalSale}}</view></t-td>
+							<t-td><view style="font-weight:bold;color:black;">{{shopData.totalBalance}}</view></t-td>
+							<t-td><view style="font-weight:bold;color:black;">{{shopData.totalShopNum}}</view></t-td>
+							<t-td><view style="font-weight:bold;color:black;"></view></t-td>
+						</t-tr>
+					</t-table>
+				</block>
+			</view>
+		</scroll-view>
+	</view>
+</view>
 </template>
 </template>
-
 <script>
 <script>
-import TuiListCell from "@/components/plugin/list-cell";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { getPtGhsShop,switchGhsShop } from "@/api/shop";
 import { getPtGhsShop,switchGhsShop } from "@/api/shop";
+import { list } from "@/mixins";
+import {mapGetters} from "vuex";
 export default {
 export default {
-  name: "changeShop",
-  components: {
-    TuiListCell,
-  },
-  data() {
-    return {
-        shopList:[]
-    };
-  },
-  onLoad() {
-  },
-  onShow() {
-  },
-  methods: {
-      init(){
-          getPtGhsShop().then(res=>{
-              this.shopList=res.data.list
-          })
-      },
-      changeShop(id){
-        let that = this
-        switchGhsShop({shopId:id}).then(res=>{
-          //有多处相似地方,请全项目搜索about_store_clear
-					// #ifdef MP-WEIXIN
-					that.$store.commit("setLoginInfo", {})
-					that.$util.pageTo({url: "/admin/home/workbench",type: 3})
-					// #endif
-					// #ifdef APP-PLUS
-					that.$store.commit("setLoginInfo", {})
-					that.$store.commit("setDictionariesInfo", {})
-					that.$store.commit("setMyShopInfo", {})
-					plus.runtime.restart()
-					// #endif
-        })
-      }
-  },
+	components: {AppWrapperEmpty},
+	mixins: [list],
+	computed: {		
+		...mapGetters(["getDictionariesInfo","getLoginInfo"])
+	},
+	data() {
+		return {
+			shopData:{}
+		};
+	},
+	methods: {
+		init(){
+			getPtGhsShop().then(res=>{
+				this.shopData = res.data
+			})
+		},
+		changeShop(id){
+			let that = this
+			switchGhsShop({shopId:id}).then(res=>{
+				//有多处相似地方,请全项目搜索about_store_clear
+				// #ifdef MP-WEIXIN
+				that.$store.commit("setLoginInfo", {})
+				that.$util.pageTo({url: "/admin/home/workbench",type: 3})
+				// #endif
+				// #ifdef APP-PLUS
+				that.$store.commit("setLoginInfo", {})
+				that.$store.commit("setDictionariesInfo", {})
+				that.$store.commit("setMyShopInfo", {})
+				plus.runtime.restart()
+				// #endif
+			})
+		}
+	},
 };
 };
 </script>
 </script>
-
 <style lang="scss" scoped>
 <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%;
-  }
+.ex-page {
+	background: white;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+		position: absolute;
+		left: 0;
+		display: flex;
+		width: 100%;
+		top:20upx;
+		z-index: 20;
+		.bar{
+			width: 50%;
+			height: 100%;
+			text-align: center;
+			&:nth-child(1){
+				border-right: 1upx solid #eeeeec;
+			}
+		}
+	}
+	.main-view {
+		margin-top: 80upx;
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+		}
+		.ex-info {
+			padding: 30upx;
+			.info-cell {
+				display: flex;
+				align-items: center;
+				font-size: 28upx;
+				&:not(:first-child) {
+					margin-top: 20upx;
+				}
+				.cell-label {
+					width: 110upx;
+					color: #666666;
+				}
+				.cell-value {
+					margin-left: 40upx;
+					color: #333;
+					&.warning {
+						color: #ffaf1d;
+					}
+					&.success {
+						color: #27c325;
+					}
+				}
+			}
+		}
+		.ex-table {
+			/deep/.icon-info {
+				color: #333333;
+			}
+		}
+	}
+	.bar-view {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+
+		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+		.info-view {
+			font-size: 26upx;
+		}
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+			}
+		}
+	}
 }
 }
 </style>
 </style>

+ 0 - 20
ghsApp/src/admin/stat/profit.vue

@@ -63,26 +63,6 @@ export default {
 			showTimeDropdown: false,
 			showTimeDropdown: false,
 			nowShop: "",
 			nowShop: "",
 			showShopDropdown: false,
 			showShopDropdown: false,
-			columns: [
-				{
-					name: "姓名",
-					dataIndex: "name",
-					color: "info"
-				},
-				{
-					name: "开单额",
-					dataIndex: "amount",
-					color: "info",
-					width: 120,
-					align: "center"
-				},
-				{
-					name: "开单数",
-					dataIndex: "num",
-					color: "info",
-					align: "center"
-				}
-			],
 			dataList: [],
 			dataList: [],
 			params:{
 			params:{
 				itemId: '',
 				itemId: '',