|
|
@@ -1816,15 +1816,67 @@
|
|
|
|
|
|
checkJobBook(list) {
|
|
|
let wordCodeList = [];
|
|
|
+ let reportCodeList = [];
|
|
|
for (let item of list) {
|
|
|
if (item.reportFormed != '0') {
|
|
|
wordCodeList.push(item.workOrderCode);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (wordCodeList.length != 0) {
|
|
|
+ if (!this.isReportTime) {
|
|
|
+ for (let item of list) {
|
|
|
+ for (let it of this.List) {
|
|
|
+ if (item.workOrderCode == it.code) {
|
|
|
+ if (item.feedDate) {
|
|
|
+ const t1 = new Date(item.feedDate);
|
|
|
+ const t2 = new Date(it.workReportInfo.executorTime);
|
|
|
+
|
|
|
+ if (t1 > t2) {
|
|
|
+ reportCodeList.push(item.workOrderCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.reportDate) {
|
|
|
+ const t1 = new Date(item.reportDate);
|
|
|
+ const t2 = new Date(it.workReportInfo.executorTime);
|
|
|
+
|
|
|
+ if (t1 > t2) {
|
|
|
+ reportCodeList.push(item.workOrderCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (reportCodeList.length != 0) {
|
|
|
+ this.$confirm(
|
|
|
+ `工单号${reportCodeList.join(
|
|
|
+ ','
|
|
|
+ )}报工时间大于上道工序的执行时间,是否继续报工?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ center: true
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ return this.checkWorkCode(wordCodeList);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading.close();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.checkWorkCode(wordCodeList);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ checkWorkCode(list) {
|
|
|
+ if (list.length != 0) {
|
|
|
this.$confirm(
|
|
|
- `工单号${wordCodeList.join(',')}已有报工,是否继续重复报工?`,
|
|
|
+ `工单号${list.join(',')}已有报工,是否继续重复报工?`,
|
|
|
'提示',
|
|
|
{
|
|
|
confirmButtonText: '确定',
|