diff --git a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue
index e92802e8..f3cd4cb0 100644
--- a/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue
+++ b/mes/qd/src/views/wms/pdm/produce/dailyplan/index.vue
@@ -145,33 +145,30 @@
>
生成工令
+
+ 上移
+
+
+ 下移
+
-
-
-
-
-
-
-
-
-
+
+
@@ -272,6 +270,7 @@ export default {
XLList: [],
fileList: [],
checkrows: [],
+ now_row: null,
form: {},
rules: {
}}
@@ -299,6 +298,7 @@ export default {
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
+ this.now_row = null
return true
},
checkboxT(row) {
@@ -399,6 +399,48 @@ export default {
this.crud.loading = false
})
},
+ handleDtlCurrentChange(current) {
+ if (current !== null) {
+ this.now_row = current
+ } else {
+ this.now_row = null
+ }
+ },
+ moveUp2() {
+ if (this.now_row === null) {
+ return this.crud.notify('请选中一条数据!')
+ }
+ const data = this.crud.data
+ for (let i = 0; i < data.length; i++) {
+ if (data[i].plan_code === this.now_row.plan_code) {
+ if (i > 0) {
+ const upDate = this.crud.data[i - 1]
+ this.crud.data.splice(i - 1, 1)
+ this.crud.data.splice(i, 0, upDate)
+ } else {
+ this.$message.error('已经是第一条,不可上移')
+ }
+ }
+ }
+ },
+ moveDown2() {
+ if (this.now_row === null) {
+ return this.crud.notify('请选中一条数据!')
+ }
+ const data = this.crud.data
+ for (let i = 0; i < data.length; i++) {
+ if (data[i].plan_code === this.now_row.plan_code) {
+ if ((i + 1) === this.crud.data.length) {
+ this.$message.error('已经是最后一条,不可下移')
+ } else {
+ const downDate = this.crud.data[i + 1]
+ this.crud.data.splice(i + 1, 1)
+ this.crud.data.splice(i, 0, downDate)
+ break
+ }
+ }
+ }
+ },
querytable() {
this.crud.toQuery()
}