Prechádzať zdrojové kódy

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app into dengfei

695593266@qq.com 9 mesiacov pred
rodič
commit
adc0435fb2

+ 2 - 2
pages/home/home.vue

@@ -488,7 +488,7 @@
 				color: #fff;
 
 				.num {
-					font-size: 40rpx;
+					font-size: 28rpx;
 				}
 
 				.label {
@@ -611,7 +611,7 @@
 				color: #000;
 
 				.num {
-					font-size: 40rpx;
+					font-size: 28rpx;
 				}
 
 				.label {

+ 1 - 1
pages/index/index.vue

@@ -56,7 +56,7 @@
 			</view>
 		</view>
 		<view>
-			<CellTip title="售后服务管理"></CellTip>
+			<CellTip title="售后服务管理" v-if="serviceList.length > 0"></CellTip>
 			<view class="nav">
 				<view class="nav-content">
 					<view class="nav-item" v-for="(item, index) in serviceList" @click="toNav(item.path)">

+ 7 - 0
pages/pda/components/workCard.vue

@@ -46,6 +46,13 @@
       </view>
     </view>
 
+    <view class="item_box rx-sc">
+      <view class="item_one perce50 rx-sc">
+        <view class="lable">规格:</view>
+        <view class="gylx">{{ item.specification }}</view>
+      </view>
+    </view>
+    
     <view class="item_box rx-bc">
       <view class="item_one perce50 rx-sc">
         <view class="lable">生产数量:</view>

+ 33 - 5
pages/pda/feeding/components/workOrderBom.vue

@@ -90,6 +90,7 @@
 
 					<view class="content ">
 						<uni-datetime-picker type="datetime" 
+							:value="currentExecutorTime"
 							@change="changeTime($event, item)" />
 					</view>
 				</view>
@@ -102,6 +103,7 @@
 </template>
 
 <script>
+import { parameterGetByCode } from "@/api/mainData/index.js";
 export default {
 	props: {
 		item: {
@@ -126,22 +128,48 @@ export default {
 	},
 	data() {
 		return {
-			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId
+			clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,
+			currentExecutorTime: ''
 		}
 	},
+	created() {
+		console.log('item', this.item)
+		this.getByCode();
+	},
 	methods: {
 		changeTime(e, val) {
 
 			let a = e.split(' ');
 			console.log(a);
 			if (a[1] !== "") {
-				this.item.executorTime = e
+				this.currentExecutorTime = e
 			} else {
-				this.item.executorTime = `${e}00:00:00`
-				
+				this.currentExecutorTime = `${e}00:00:00`
 			}
+			this.item.executorTime = this.currentExecutorTime;
+			console.log('executorTime', this.item.executorTime)
+		},
+		getByCode() {
+			parameterGetByCode({ code: "mes_order_feed_by_default_date" }).then((res) => {
+				console.log('res', res)
+				if(res.value == "1") {
+					if(!this.item.executorTime) {
+						const now = new Date();
+						const year = now.getFullYear();
+						const month = String(now.getMonth() + 1).padStart(2, '0');
+						const day = String(now.getDate()).padStart(2, '0');
+						const hours = String(now.getHours()).padStart(2, '0');
+						const minutes = String(now.getMinutes()).padStart(2, '0');
+						const seconds = String(now.getSeconds()).padStart(2, '0');
+						this.currentExecutorTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+						this.item.executorTime = this.currentExecutorTime;
+						console.log('executorTime', this.item.executorTime)
+						console.log('item', this.item)
+						this.$forceUpdate();
+					}
+				}
+			});
 		},
-
 		handleScan(id) {
 			this.$emit('handleScan', id, 'wordOrder')
 		},

+ 64 - 2
pages/pda/workOrder/extrusionMolding/index.vue

@@ -81,7 +81,12 @@
           <text class="lable">牌号</text>
           <text>{{ info.brandNo }}</text>
         </view>
-
+		
+        <view class="item_list rx-bc">
+          <text class="lable">规格</text>
+          <text>{{ info.specification }}</text>
+        </view>
+		
         <view class="item_list rx-bc">
           <text class="lable">型号</text>
           <text>{{ info.model }}</text>
@@ -102,6 +107,16 @@
           <text>{{ info.singleReport == 1 ? "单个报工" : "批量报工" }}</text>
         </view>
 
+        <view class="item_list rx-bc">
+          <text class="lable">领料状态</text>
+          <text>{{ isPickingStatus }}</text>
+        </view>
+
+        <view class="item_list rx-bc">
+          <text class="lable">投料状态</text>
+          <text>{{ isFeedStatus }}</text>
+        </view>
+
         <view class="item_list rx-bc">
           <text class="lable">已完成生产数量</text>
           <text>{{ info.formedNum }}</text>
@@ -261,6 +276,18 @@ export default {
       return v == 1 ? "未委外" : v == 2 ? "委外中" : v == 3 ? "完成委外" : "";
     },
   },
+  computed: {
+    isFeedStatus() {
+      const currentStep = this.stepsList?.[this.currentStepIndex]
+      // 投料状态 0未投料 1已投料 2已报工
+      return this.feedStatusOption.find(item => item.value === currentStep?.feedStatus)?.label || ''
+    },
+    isPickingStatus() {
+      const currentStep = this.stepsList?.[this.currentStepIndex]
+      // 领料状态 0未领料 1领料中2已出库3已驳回
+      return this.pickStatusOption.find(item => item.value === currentStep?.pickStatus)?.label || ''
+    }
+  },
   data() {
     return {
       title: "",
@@ -284,6 +311,39 @@ export default {
         uni.getStorageSync("userInfo") &&
         uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
       feedNeedEquipment: 1, //投料是否要添加生产设备1是0否
+      currentStepIndex: 0, // 当前步骤索引
+      pickStatusOption: [
+        {
+          label: '未领料',
+          value: 0
+        },
+        {
+          label: '领料中',
+          value: 1
+        },
+        {
+          label: '已出库',
+          value: 2
+        },
+        {
+          label: '已驳回',
+          value: 3
+        }
+      ],
+      feedStatusOption: [
+        {
+          label: '未投料',
+          value: 0
+        },
+        {
+          label: '已投料',
+          value: 1
+        },
+        {
+          label: '已报工',
+          value: 2
+        }
+      ]
     };
   },
 
@@ -354,6 +414,7 @@ export default {
             (this.currentType = f.type),
               (this.existOutsource = f.existOutsource);
             this.controlReportMethod = f.controlReportMethod;
+            this.currentStepIndex = f.index;
           }
         });
     },
@@ -367,13 +428,14 @@ export default {
 
     // 点击工序列表
     selectStep(item) {
+      console.log('item', item)
       this.currentTaskId = item.taskId;
       this.currentTaskName = item.taskTypeName;
       this.existOutsource = item.existOutsource;
       this.currentType = item.type;
       this.controlReportMethod = item.controlReportMethod;
       this.feedNeedEquipment = item.feedNeedEquipment;
-
+      this.currentStepIndex = item.index;
       this.feedStatus();
     },
 

+ 27 - 18
pages/warehouse/inventory/index.vue

@@ -3,7 +3,7 @@
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="库存查询" @clickLeft="back"></uni-nav-bar>
 		<view class="top-wrapper">
 			<uni-section>
-				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.keyWord" placeholder="请输入编码/名称">
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.keyWord" placeholder="请输入编码/名称/规格/型号">
 				</uni-easyinput>
 			</uni-section>
 			<view style="display: flex;">
@@ -16,16 +16,18 @@
 		<view class="mainBox">
 			<view class="scroll_box">
 				<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower">
-					<uni-table border stripe emptyText="暂无更多数据">
+					<uni-table border stripe emptyText="暂无更多数据" style="width: 100%;">
 						<uni-tr style="width: 100%;">
-							<uni-th align="center">序号</uni-th>
-							<uni-th align="center">名称</uni-th>
-							<uni-th align="center">数量</uni-th>
-							<uni-th align="center">重量</uni-th>
+							<uni-th width="50" align="center">序号</uni-th>
+							<uni-th width="120" align="center">名称</uni-th>
+							<uni-th width="100" align="center">数量</uni-th>
+							<uni-th width="100" align="center">重量</uni-th>
+							<uni-th width="100" align="center">规格</uni-th>
+							<uni-th width="100" align="center">型号</uni-th>
 						</uni-tr>
 						<!-- 表格数据行 -->
-						<uni-tr v-for="(item, index) in listData" :key="index" style="width: 100%;">
-							<uni-td width="50">
+						<uni-tr v-for="(item, index) in listData" :key="index">
+							<uni-td>
 								<view @click="goDetails(item)">{{index+Number(1)}}</view>
 							</uni-td>
 							<uni-td>
@@ -39,6 +41,12 @@
 							<uni-td>
 								<view @click="goDetails(item)">{{ item.weight }}{{ item.weightUnit }}</view>
 							</uni-td>
+							<uni-td>
+								<view @click="goDetails(item)">{{ item.specification }}</view>
+							</uni-td>
+							<uni-td>
+								<view @click="goDetails(item)">{{ item.categoryModel }}</view>
+							</uni-td>
 						</uni-tr>
 					</uni-table>
 				</scroll-view>
@@ -469,16 +477,16 @@
 				//   }
 				// 批次维度
 				//   if (this.form.dimension == 2) {
-				let par = {
-					dimension: this.form.dimension,
-					categoryCode: item.categoryCode,
-					categoryId: item.categoryId,
-					info: encodeURIComponent(JSON.stringify(item))
-				}
-				par = this.URLSearchParams(par)
-				uni.navigateTo({
-					url: '/pages/warehouse/inventory/batch/batch?' + par
-				})
+				// let par = {
+				// 	dimension: this.form.dimension,
+				// 	categoryCode: item.categoryCode,
+				// 	categoryId: item.categoryId,
+				// 	info: encodeURIComponent(JSON.stringify(item))
+				// }
+				// par = this.URLSearchParams(par)
+				// uni.navigateTo({
+				// 	url: '/pages/warehouse/inventory/batch/batch?' + par
+				// })
 				//   }
 			},
 			// inputChange() {
@@ -492,6 +500,7 @@
 			// },
 			search() {
 				this.listData = []
+				this.page = 1
 				this.getData()
 			},
 			getMoreLists() {