hi пре 1 месец
родитељ
комит
4dccf94e43

+ 1 - 1
App.vue

@@ -6,7 +6,7 @@ export default {
 		
 		console.log('onLaunch')
 		// 检测客户端更新
-		this.$store.dispatch('update/update', 0)
+		// this.$store.dispatch('update/update', 0)
 	},
 	onShow() {
 		// #ifdef APP-PLUS

+ 1 - 1
env.js

@@ -1,7 +1,7 @@
 /**
  *  全局配置文件
  */
-export const BASE_URL = process.env.NODE_ENV === "development" ? 'http://192.168.168.40:8080' : 'https://erp.xianglitech.com.cn/prod-api'
+export const BASE_URL = process.env.NODE_ENV === "development" ? 'http://192.168.168.42:8080' : 'https://erp.xianglitech.com.cn/prod-api'
 // https://erp.xianglitech.com.cn/prod-api
 // https://test-erp.xianglitech.com.cn/stage-api
 

+ 2 - 2
pages/index/index.vue

@@ -27,7 +27,7 @@
 		<use-pop :userInfo="userInfo" v-model="meunShow" @close="meunShow = false"></use-pop>
 	
 		<!-- 今日任务有未读 -->
-		<u-popup :show="updateShow" :closeOnClickOverlay="false" :safeAreaInsetBottom="false" mode="center" :round="16"  @close="state.taskNumShow = false">
+		<!-- <u-popup :show="updateShow" :closeOnClickOverlay="false" :safeAreaInsetBottom="false" mode="center" :round="16"  @close="state.taskNumShow = false">
 			<view class="reason-box">
 				<image class="icon-img" src="https://qiuyu-shuzhi.oss-cn-beijing.aliyuncs.com/image/task-pop-img.png" mode=""></image>
 				<view class="reason-box-title">象力WMS邀请你升级至新版本</view>
@@ -36,7 +36,7 @@
 					<button class="reset-button confirm-btn" @click="toUpdate">下载更新</button>
 				</view>
 			</view>
-		</u-popup>
+		</u-popup> -->
 	</view>
 </template>
 

+ 19 - 10
pages/inventory-task/components/check-item.vue

@@ -14,42 +14,42 @@
 				<view class="tips-box tips-yellow">盘点中</view> -->
       </view>
     </view>
-    <view class="cont-box">
+    <view class="cont-box" @click="toDetail">
       <view class="cont-item">
         <view class="item-label">盘点仓库</view>
-        <view class="item-val">{{ info.depotName }}</view>
+        <view class="item-val">{{ info.depotName || '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">创建人</view>
-        <view class="item-val">{{ info.createByName }}</view>
+        <view class="item-val">{{ info.createName || '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">盘点负责人</view>
-        <view class="item-val">{{ info.creatorName }}</view>
+        <view class="item-val">{{ info.creatorName || '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">货物种类</view>
-        <view class="item-val">{{ info.categoryCount }}</view>
+        <view class="item-val">{{ info.categoryCount || '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">货物总量</view>
-        <view class="item-val">{{ info.materialCount }}</view>
+        <view class="item-val">{{ info.materialCount || '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">库位范围</view>
-        <view class="item-val">{{ info.positionRange }}</view>
+        <view class="item-val">{{ info.positionRange || '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">创建时间</view>
-        <view class="item-val">{{ info.createTime }}</view>
+        <view class="item-val">{{ info.createTime ? $u.timeFormat(info.createTime, 'yyyy-mm-dd') : '-' }}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">盘点时间</view>
-        <view class="item-val">{{ info.operTime }}</view>
+        <view class="item-val">{{$u.timeFormat(info.operTime, 'yyyy-mm-dd')}}</view>
       </view>
       <view class="cont-item">
         <view class="item-label">盘点人</view>
-        <view class="item-val">{{ info.operName }}</view>
+        <view class="item-val">{{ info.operName || '-' }}</view>
       </view>
     </view>
 
@@ -121,6 +121,15 @@ export default {
       };
       this.$emit("btnClick", params);
     },
+		toDetail() {
+			let text = ''
+			if(this.status === 3 || this.status === 4) {
+				text = '详情'
+			}else if (this.status === 1 || this.status === 2) {
+				text = '去盘点'
+			}
+			this.handleCick(text)
+		}
   },
 };
 </script>

+ 3 - 4
pages/inventory-task/detail.vue

@@ -28,7 +28,7 @@
           </view>
           <view class="info-item">
             <text class="info-label">盘点人:</text>
-            <text class="info-value">{{ inventoryInfo.creatorName }}</text>
+            <text class="info-value">{{ inventoryInfo.creatorName || '-'}}</text>
           </view>
         </view>
 
@@ -97,11 +97,11 @@
             </view>
             <view class="goods-field half-w">
               <text class="field-label">盘点人:</text>
-              <text class="field-value">{{ item.createName }}</text>
+              <text class="field-value">{{ item.createName || '-' }}</text>
             </view>
             <view class="goods-field">
               <text class="field-label">盘点时间:</text>
-              <text class="field-value">{{ item.operTime }}</text>
+              <text class="field-value">{{ item.operTime ? $u.timeFormat(item.operTime, 'yyyy-mm-dd') : '-' }}</text>
             </view>
             <view class="stock-row">
               <view class="stock-item">
@@ -340,7 +340,6 @@ export default {
     async getTaskStocktakingDetail(taskId) {
       try {
         const res = await taskStocktakingDetail(taskId);
-        console.log("taskStocktakingDetail======", res);
         this.inventoryInfo = res.data;
       } catch (error) {}
     },

+ 10 - 1
pages/inventory-task/index.vue

@@ -91,6 +91,7 @@ export default {
         submitActionFlag: false,
         errorText: "是否提交盘点?",
       },
+			startTaskId:null,
     };
   },
   onLoad() {
@@ -100,6 +101,13 @@ export default {
     // 初始化数据
     this.loadData();
   },
+	onShow() {
+		if(this.startTaskId) {
+			let index = this.list.findIndex(item=>item.id == this.startTaskId)
+			this.list[index].taskStatus = 2
+			this.startTaskId = null
+		}
+	},
   onPullDownRefresh() {
     // 下拉刷新
     this.onRefresh();
@@ -175,6 +183,7 @@ export default {
               uni.navigateTo({
                 url: `/pages/inventory-task/detail?id=${data.id}&pageType=1`,
               });
+							this.startTaskId = data.id
             } else {
               uni.$u.toast(res.data);
             }
@@ -182,7 +191,6 @@ export default {
           break;
         case "去提交":
           taskStocktakingDetail(data.id).then((res) => {
-            console.log("taskStocktakingDetail=======", res);
             let { finishCount, materialCount } = res.data;
             const a = Number(finishCount || 0);
             const b = Number(materialCount || 0);
@@ -212,6 +220,7 @@ export default {
           this.resetErrorPopData();
           if (res.code === 200) {
             uni.$u.toast(res.msg);
+						this.actionPop.errorShow  = false
             this.onRefresh();
           } else {
             uni.$u.toast(res.data);