|
|
@@ -6,7 +6,8 @@
|
|
|
<view class="list_box">
|
|
|
<u-list @scrolltolower="scrolltolower">
|
|
|
<view v-for="(item,index) in List" :key="index" class="card_box">
|
|
|
- <workOrderBom :item='item' pType="feed" @handleScan='handleScan'></workOrderBom>
|
|
|
+
|
|
|
+ <workOrderBom :item='item' pType="feed" :taskType="item.currentTaskDiagram.type" @handleScan='handleScan'></workOrderBom>
|
|
|
|
|
|
|
|
|
<paramBom v-if='item.paramDetailList.length != 0' :list='item.paramDetailList'></paramBom>
|
|
|
@@ -257,8 +258,14 @@
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- if(this.clientEnvironmentId == 3) {
|
|
|
+ if(this.clientEnvironmentId == 3 && this.List[0].currentTaskDiagram.type == 1) {
|
|
|
if(this.List[0] && this.List[0].executorTime && this.List[0].executorTime != undefined ) {
|
|
|
+ // 正则表达式1:匹配 yyyy-MM-dd 格式
|
|
|
+ let dateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
|
+ if(dateRegex.test(this.List[0].executorTime.trimRight())) {
|
|
|
+ this.List[0].executorTime = this.List[0].executorTime+' 00:00:00'
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: `请先选择时间投料时间`,
|
|
|
@@ -268,8 +275,15 @@
|
|
|
return false
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ const isDevice = await this.checkdDevice()
|
|
|
+ if (!isDevice) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('投料', this.List)
|
|
|
batchSave(this.List).then(res => {
|
|
|
|
|
|
uni.redirectTo({
|
|
|
@@ -672,8 +686,6 @@
|
|
|
},
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
openDetails(id) {
|
|
|
const storageKey = Date.now() + "";
|
|
|
uni.setStorageSync(storageKey, this.List || []);
|
|
|
@@ -682,6 +694,35 @@
|
|
|
url
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+ checkdDevice() {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ console.log(this.List)
|
|
|
+ let isFalse = this.List.every(item => {
|
|
|
+ return item.equipmentList && item.equipmentList.length > 0
|
|
|
+ })
|
|
|
+ if(isFalse) {
|
|
|
+ resolve(true)
|
|
|
+ } else {
|
|
|
+
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '没有选择设备,是否继续?',
|
|
|
+ confirmText: '确认', //这块是确定按钮的文字
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ resolve(true)
|
|
|
+ } else {
|
|
|
+ resolve(false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
},
|
|
|
|