shish пре 4 година
родитељ
комит
0901bc32a1

+ 21 - 10
ghsApp/src/admin/billing/index.vue

@@ -25,17 +25,28 @@
 				<block v-if="!$util.isEmpty(globalClassItemList)">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
 						<view class="item_list_title">{{ classItem.className }}</view>
-						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
-								<Commondity v-if="classItem.isActive"
-									:checkStock="true"
-									:selectJobType="selectJobType"
-									:info="productItem"
-									@showAddModelFn="showAddModelFn"
-									@replaceItemFn="replaceItemFn"
-								></Commondity>
+
+						<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
+
+							<template v-for="(productItem, productIndex) in classItem.child">
+								<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+									<Commondity v-if="classItem.isActive"
+										:checkStock="true"
+										:selectJobType="selectJobType"
+										:info="productItem"
+										@showAddModelFn="showAddModelFn"
+										@replaceItemFn="replaceItemFn"
+									></Commondity>
+								</view>
+							</template>
+
+						</view>
+						<view v-else>
+							<view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
+								<view style="position: absolute;margin:auto;top:130upx;left:0;right:0;bottom:0;">暂无花材</view>
 							</view>
-						</template>
+						</view>
+
 					</view>
 				</block>
 				<block v-else>

+ 13 - 7
ghsApp/src/admin/home/apply.vue

@@ -6,12 +6,12 @@
                 {{item.title}}
             </view>
             <view class="tabs-wrap">
-                <view v-for="s in item.list" :key="s.url" class="tabs-list">
-                    <view @click="pageTo(s)">
+                <view v-for="info in item.list" :key="info.url" class="tabs-list">
+                    <view @click="goToPage(info)">
                     <view class="tabs-img">
-                        <image :src="s.img" alt mode="widthFix" ></image>
+                        <image :src="info.img" alt mode="widthFix" ></image>
                     </view>
-                    <view class="tabs-name">{{s.name}}</view>
+                    <view class="tabs-name">{{info.name}}</view>
                     </view>
                 </view>
             </view> 
@@ -23,7 +23,7 @@
 <script>
 import NotLogin from "@/components/not-login";
 export default {
-    name:'Apply',
+    name:'apply',
     components: {
         NotLogin
     },
@@ -33,8 +33,8 @@ export default {
                 {
                     title:'花材',
                     list:[
-                        {name: "花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list",query:{delStatus:1}},
-                        {name: "停用花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list"},
+                        {name: "花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list"},
+                        {name: "停用花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list?delStatus=1"},
                         {name: "花材分类",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/list"},
                         {name: "小菊颜色",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/xjSelect"},
                     ]
@@ -93,6 +93,12 @@ export default {
     },
     onPullDownRefresh() {
         uni.stopPullDownRefresh();
+    },
+    methods: {
+        goToPage(info){
+            console.log(info)
+            this.$util.pageTo(info)
+        }
     }
 }
 </script>

+ 4 - 3
ghsApp/src/admin/item/list.vue

@@ -3,7 +3,7 @@
 	<view class="billing_box_bg">
     <view class="input-wrap">
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="小菊输xj" @input="searchFn"/>
+				<app-search-module v-model="py" placeholder="小菊输xj搜索" @input="searchFn"/>
 			</view>
 			<view style="padding:0 0upx 0 20upx;" >
 				<button class="admin-button-com middle blue" style="margin-right:8upx;" @click="itemMore()">更多</button>
@@ -33,7 +33,9 @@
 							</template>
 						</view>
 						<view v-else>
-							<view style="height:55upx;text-align:center;color:#CCCCCC;">暂无花材</view>
+							<view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
+								<view style="position: absolute;margin:auto;top:130upx;left:0;right:0;bottom:0;">暂无花材</view>
+							</view>
 						</view>
 					</view>
 				</block>
@@ -47,7 +49,6 @@
 	</view>
  </view>
 </template>
-
 <script>
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";

+ 1 - 0
ghsApp/src/utils/util.js

@@ -235,6 +235,7 @@ export const $formatDate = (num, fmt = "YYYY-MM-DD HH:mm", all) => {
  * @parmas item.type 为跳转调用的函数 1为navigateTo, 2为redirectTo 关闭当前页面,跳转到应用内的某个页面 3为reLaunch 关闭所有页面,打开到应用内的某个页面  4为switchTab
  */
 export const pageTo = item => {
+	console.log(item,'itemitem')
 	if (isNumber(item)) {
 		uni.navigateBack({
 			delta: item