shish 6 сар өмнө
parent
commit
d50b6c7e88

+ 1 - 0
ghsApp/src/admin/home/apply.vue

@@ -53,6 +53,7 @@ export default {
                         {name: "花材排序",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/itemClass/sort"},
                         {name: "已下架",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/outList"},
                         {name: "已删除",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/stopList"},
+                        {name: "隐藏花材",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/stat/hide"},
                         {name: "批量隐藏",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/changeHide"},
                         {name: "采购人管理",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/changeCgStaff"},
                         {name: "公告",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/picText/purchaseGuide"},

+ 247 - 0
ghsApp/src/admin/stat/hide.vue

@@ -0,0 +1,247 @@
+<template>
+	<view class="app-content">
+		<view class="ex-page">
+			<view class="input-wrap">
+				<view style="padding:0 0upx 0 20upx;" >
+					<button class="admin-button-com middle blue" style="background-color:green;border:1upx solid green;margin-right:20upx;" @click="allShow()">全部花材显示</button>
+				</view>
+			</view>
+			<view style="margin-left:30upx;padding-top:10upx;padding-bottom:10upx;font-size:28upx;">点击红色的成本可以将花材显示</view>
+			<scroll-view scroll-y scroll-with-animation class="main-view">
+				<view class="space-view ex-table">
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<t-tr header>
+							<t-th><view style="width:200upx;text-align:left;">花材</view></t-th>
+							<t-th>库存</t-th>
+							<t-th>路上</t-th>
+							<t-th>大客</t-th>
+							<t-th>批发</t-th>
+							<t-th>零售</t-th>
+							<t-th><view>成本</view></t-th>
+						</t-tr>
+						<block v-if="!$util.isEmpty(classItemData)">
+							<block v-for="(classItem,classIndex) in classItemData" :key="classIndex">
+								<block v-if="classItem.child && !$util.isEmpty(classItem.child)">
+									<t-tr>
+										<t-td>
+											<text style="color:#3385FF;font-weight:bold;width:200upx;text-align:left;">
+												{{ classItem.className }}
+											</text>
+										</t-td>
+										<t-td></t-td>
+										<t-td></t-td>
+										<t-td></t-td>
+										<t-td></t-td>
+										<t-td></t-td>
+										<t-td></t-td>
+									</t-tr>
+									<template v-if="classItem.child && !$util.isEmpty(classItem.child)">
+										<block v-for="(productItem, productIndex) in classItem.child" :key="productIndex">
+											<t-tr>
+												<t-td>
+													<view v-if="productItem.stock>0" style="width:200upx;text-align:left;color:black;font-size:29upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														{{productItem.name}}
+													</view>
+													<view v-else style="width:200upx;text-align:left;color:#b5b3b3;font-size:29upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														{{productItem.name}}
+													</view>
+												</t-td>
+												<t-td>
+													<view v-if="productItem.stock>0" style="color:#333333;font-weight:bold;font-size:29upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														{{productItem.stock?parseFloat(productItem.stock):0}}
+													</view>
+													<view v-else style="color:#b5b3b3;font-weight:bold;font-size:29upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														{{productItem.stock?parseFloat(productItem.stock):0}}
+													</view>
+												</t-td>
+												<t-td>
+													<text v-if="Number(productItem.onStock)>0" style="color:#0a97a9;font-size:30upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id,})">
+														{{productItem.onStock}}
+													</text>
+													<text v-else  style="color:#0a97a9;font-size:30upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id,})">
+														-
+													</text>
+												</t-td>
+												<t-td>
+													<view style="font-size:28upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														¥{{productItem.hjPrice?parseFloat(productItem.hjPrice):0}}
+													</view>
+												</t-td>
+												<t-td>
+													<view style="color:#3385FF;font-size:30upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														¥{{productItem.price?parseFloat(productItem.price):0}}
+													</view>
+												</t-td>
+												<t-td>
+													<view style="font-size:28upx;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														¥{{productItem.skPrice?parseFloat(productItem.skPrice):0}}
+													</view>
+												</t-td>
+												<t-td>
+													<view style="font-size:28upx;color:red;" @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+														¥{{productItem.avCost?parseFloat(productItem.avCost):0}}
+													</view>
+												</t-td>
+											</t-tr>
+										</block>
+									</template>
+								</block>
+							</block>
+						</block>
+					</t-table>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { getProductDataApi } from "@/api/product";
+import { allHideShow,classItemShow } from "@/api/item";
+import { allOut } from "@/api/stock-out"
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import {mapActions, mapGetters} from "vuex";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule},
+	mixins: [list],
+	computed: {		
+        ...mapGetters(["getDictionariesInfo","getLoginInfo","getMyShopInfo"])	
+    },
+	data() {
+		return {
+			isShow:false,
+			customizationTime:'',
+			shopId:'',
+			itemId:'',
+			nowTime: "",
+			showTimeDropdown: false,
+			nowShop: "",
+			showShopDropdown: false,
+			dataList: [],
+			profile:[],
+			storageData:[],
+			searchContent:'',
+            shopId:0,
+            classItemData:[],
+			form:{shopId:0,shopName:'',hasSelect:0},
+			confirmIn:0
+		};
+	},
+	onLoad() {
+		this.showHideItem()
+	},
+	methods: {
+		init(){
+		},
+		allShow(){
+			allHideShow().then(res=>{
+				if(res.code == 1){
+					this.$msg('操作成功')
+					this.showHideItem()
+				}
+			})
+		},
+		showHideItem(){
+			this.shopId = this.getMyShopInfo.id;
+			let type = '';
+			let that = this
+			uni.showLoading()
+			getProductDataApi({ type, shopId: this.shopId,status:0,requestType:'hideItem'}).then(res=>{
+				uni.hideLoading()
+				if(res.code == 1){
+					that.classItemData = res.data.classItem ? res.data.classItem : []
+				}
+			})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	padding-top:20upx;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.input-wrap {
+		display: flex;
+		padding: 0upx 20upx 0upx 13upx;
+		.search-bar {
+			flex: 1;
+		}
+	}
+	.top-bar {
+		width: 100%;
+		z-index: 20;
+		.bar{
+			width: 50%;
+			height: 100%;
+			text-align: center;
+			&:nth-child(1){
+				border-right: 1upx solid #eeeeec;
+			}
+		}
+	}
+	.main-view {
+		margin-top:10upx;
+		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 {
+			::v-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>

+ 1 - 4
ghsApp/src/admin/stat/stock.vue

@@ -10,10 +10,7 @@
 					<button class="admin-button-com middle default" @click="downStock()">下载Excel</button>
 				</view>
 			</view>
-			<view class="top-bar" style="margin-left:80upx;font-size:34upx;padding:30upx 0 20upx 0;">
-				<text @click="showStock">实时库存</text>
-			</view>
-			<view style="margin-left:30upx;padding-top:10upx;padding-bottom:10upx;font-size:28upx;">这个页面,请使用app打开,小程序打开会卡死</view>
+			<view style="margin-left:30upx;padding-top:10upx;padding-bottom:10upx;font-size:28upx;">此页面小程序打开经常会卡死,请优先使用app打开</view>
 			<scroll-view scroll-y scroll-with-animation class="main-view">
 				<view class="space-view ex-table">
 					<t-table :headerBackgroundColor="'#F0F2F6'">

+ 12 - 4
ghsApp/src/api/item/index.js

@@ -79,6 +79,18 @@ export const changeFrontHide = data => {
 	return https.get('/item/change-front-hide', data)
 }
 
+export const batchChangeFrontHide = data => {
+	return https.post('/item/batch-change-front-hide', data)
+}
+
+export const allHideShow = data => {
+	return https.get('/item/all-hide-show', data)
+}
+
+export const classItemShow = data => {
+	return https.get('/item/class-item-show', data)
+}
+
 export const batchRecover = data => {
 	return https.post('/item/batch-recover', data)
 }
@@ -95,10 +107,6 @@ export const batchStopItem = data => {
 	return https.post('/item/batch-stop', data)
 }
 
-export const batchChangeFrontHide = data => {
-	return https.post('/item/batch-change-front-hide', data)
-}
-
 export const getSkPoster = data => {
 	return https.get('/item/get-sk-poster', data)
 }

+ 1 - 0
ghsApp/src/pages.json

@@ -310,6 +310,7 @@
 				{"path": "sendYj","style": {"navigationBarTitleText": "配送业绩"}},
 				{"path": "cgFreight","style": {"navigationBarTitleText": "采购运费统计"}},
 				{"path": "stock","style": {"navigationBarTitleText": "库存总览"}},
+				{"path": "hide","style": {"navigationBarTitleText": "已经隐藏的花材"}},
 				{"path": "mayPayStat","style": {"navigationBarTitleText": "应付款"}},
 				{"path": "wastage","style": {"navigationBarTitleText": "损耗花材"}},
 				{"path": "waste","style": {"navigationBarTitleText": "损耗总览"}}