Browse Source

Merge remote-tracking branch 'origin/master'

guoyujia 1 year ago
parent
commit
4cd53f855c

+ 13 - 1
pages/changeBox/index.vue

@@ -372,6 +372,18 @@
 				carrierRejectList.push(discardVehicleList.value[i])
 				carrierRejectList.push(discardVehicleList.value[i])
 			}
 			}
 		}
 		}
+		for (var j = 0; j < newBindList.value.length; j++) {
+			// 判断是否有相同箱码
+			let item = newBindList.value[j]
+			let index = newBindList.value.findIndex(e => e.carrierCode === item.carrierCode)
+			if (index >= 0 && index != j) {
+				uni.showToast({
+					icon: 'none',
+					title: '载具' + item.carrierCode + '重复'
+				});
+				return
+			}
+		}
 		if (carrierRejectList.length > 0 && newBindList.value.length > 0) {
 		if (carrierRejectList.length > 0 && newBindList.value.length > 0) {
 			addCarrierReject(carrierRejectList).then((response) => {
 			addCarrierReject(carrierRejectList).then((response) => {
 				if (response.code == 200) {
 				if (response.code == 200) {
@@ -387,7 +399,7 @@
 				}
 				}
 			})
 			})
 		}
 		}
-		console.log("dayWorkInfo", dayWorkInfo);
+		// console.log("dayWorkInfo", dayWorkInfo);
 		dayWorkInfo.dayworkCarriers = newBindList.value;
 		dayWorkInfo.dayworkCarriers = newBindList.value;
 		saveDayWork(dayWorkInfo).then(res => {
 		saveDayWork(dayWorkInfo).then(res => {
 			if (res.code === 200) {
 			if (res.code === 200) {

+ 1 - 1
pages/outsourcedReturnCheck/index.vue

@@ -39,7 +39,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<uni-load-more iconType="auto" :content-text="contentText" :status="status"
+			<uni-load-more v-if="total > 0" iconType="auto" :content-text="contentText" :status="status"
 				@clickLoadMore="clickLoadMore" />
 				@clickLoadMore="clickLoadMore" />
 		</view>
 		</view>
 		<!-- <uni-section title="外协单列表" type="line">
 		<!-- <uni-section title="外协单列表" type="line">

+ 15 - 6
pages/sortBatchReporting/index.vue

@@ -19,8 +19,8 @@
 				<text>暂无批次</text>
 				<text>暂无批次</text>
 			</view>
 			</view>
 			<!-- 批次列表 -->
 			<!-- 批次列表 -->
-			<view v-else v-for="(item, index) in listData" :key="index" class="list-item"
-				@click="handleToreportingForWork(item)">
+			<view v-else v-for="(item, index) in listData" :key="index" class="list-item" @click="checkStatus(item)">
+				<!-- @click="handleToreportingForWork(item)" -->
 				<view class="title-container uni-row" style="justify-content: flex-start;">
 				<view class="title-container uni-row" style="justify-content: flex-start;">
 					<view class="title uni-row">
 					<view class="title uni-row">
 						<text class="label">批次号:</text>
 						<text class="label">批次号:</text>
@@ -90,8 +90,9 @@
 					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
 					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
 				</view>
 				</view>
 				<view class="status-btn uni-row">
 				<view class="status-btn uni-row">
-					<view v-if="item.dayworkItemList[0].status == 0" class=" uni-row">
-						<button class="reporting-tag" size="mini" @click.stop="startReport(item)">开始报工</button>
+					<view v-if="item.dayworkItemList[0].status < 3" class=" uni-row">
+						<button class="reporting-tag" size="mini"
+							@click.stop="handleToreportingForWork(item)">开始报工</button>
 						<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
 						<!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
 					</view>
 					</view>
 					<view v-if="item['status'] == 2" class=" uni-row">
 					<view v-if="item['status'] == 2" class=" uni-row">
@@ -352,10 +353,18 @@
 		init(store.planDetails.id);
 		init(store.planDetails.id);
 	}
 	}
 
 
-	function handleToreportingForWork(item) {
-		if (item.dayworkItemList[0].status == 0) {
+	function checkStatus(item) {
+		if (item.dayworkItemList[0].status < 3) {
 			return
 			return
+		} else {
+			handleToreportingForWork(item)
 		}
 		}
+	}
+
+	function handleToreportingForWork(item) {
+		// if (item.dayworkItemList[0].status == 0) {
+		// 	return
+		// }
 		uni.$once("formBack", () => handleSearch())
 		uni.$once("formBack", () => handleSearch())
 		uni.navigateTo({
 		uni.navigateTo({
 			url: "/pages/sorting/form",
 			url: "/pages/sorting/form",