diff --git a/src/api/productManagement/workoder_v2.js b/src/api/productManagement/workoder_v2.js
index 3923c84..a2e9102 100644
--- a/src/api/productManagement/workoder_v2.js
+++ b/src/api/productManagement/workoder_v2.js
@@ -69,4 +69,11 @@ export function updateSort(query) {
}
-
+// 生成工作工单
+export function GenerateWorkorder(query) {
+ return request({
+ url: '/mes/pro/workorder_v2/generateWorkorder',
+ method: 'get',
+ params: query,
+ })
+}
\ No newline at end of file
diff --git a/src/views/productManagement/workorder2.vue b/src/views/productManagement/workorder2.vue
index 4260e1f..a3b7514 100644
--- a/src/views/productManagement/workorder2.vue
+++ b/src/views/productManagement/workorder2.vue
@@ -6,20 +6,19 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
搜索
@@ -27,6 +26,7 @@
导入工单
导出工单
删除工单
+ 生成工单
@@ -90,6 +90,7 @@
+
@@ -126,8 +127,6 @@
@click="addworkorder(row)"
>
- 上移
- 下移
@@ -235,6 +234,7 @@ import {
deleteworkorder,
updateworkorder,
updateSort,
+ GenerateWorkorder
} from '@/api/productManagement/workoder_v2.js'
import Sortable from 'sortablejs'
import { getToken } from '@/utils/auth'
@@ -245,8 +245,8 @@ export default {
return {
search: {
year: new Date().getFullYear(),
- week: null,
- date: null,
+ week: 1,
+ date: 1,
},
pagination: {
total: 0,
@@ -551,6 +551,38 @@ export default {
this.workorderItem.week = row.week
this.workorderItem.date = row.date
},
+ //todo 生成工单
+ generate_workorder() {
+ this.$modal
+ .confirm('是否确认重新生成工单')
+ .then(()=> {
+ if (this.search.year == undefined) {
+ this.$message.error('请选择年份');
+ return
+ }
+ if (this.search.week == undefined) {
+ this.$message.error('请选择周');
+ return
+ }
+ if (this.search.date == undefined) {
+ this.$message.error('请选择日期');
+ return
+ }
+
+ return GenerateWorkorder(this.search)
+ })
+ .then((res) => {
+ if (res.code == 200) {
+ if (res.data>0) {
+ this.$notify.success('生成工单成功')
+ this.getList()
+ } else {
+ this.$notify.error('生成工单失败')
+ }
+ }
+ })
+ .catch(() => {})
+ },
},
}
diff --git a/src/views/productManagement/workorder_online.vue b/src/views/productManagement/workorder_online.vue
index 73a0bac..25061fa 100644
--- a/src/views/productManagement/workorder_online.vue
+++ b/src/views/productManagement/workorder_online.vue
@@ -6,7 +6,7 @@
-
+
diff --git a/src/views/productManagement/workplan2.vue b/src/views/productManagement/workplan2.vue
index 58f6ee4..60c0960 100644
--- a/src/views/productManagement/workplan2.vue
+++ b/src/views/productManagement/workplan2.vue
@@ -6,7 +6,7 @@
-
+