|
@@ -22,6 +22,20 @@
|
|
|
{{ row.formingWeight }} {{ row.newWeightUnit }}
|
|
{{ row.formingWeight }} {{ row.newWeightUnit }}
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+ <template v-slot:priority="{ row }">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="row.priority"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ @change="priorityChange(row)"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <div class="sort-wrap">
|
|
|
|
|
+ <i class="el-icon-caret-top" @click="sortTop(row)"></i>
|
|
|
|
|
+ <i class="el-icon-caret-bottom" @click="sortBottom(row)"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -65,9 +79,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { getList, releaseWorkOrder } from '@/api/workOrder/index.js';
|
|
|
|
|
|
|
+ import { getList, releaseWorkOrder, updatePriority } from '@/api/workOrder/index.js';
|
|
|
import { teamPage } from '@/api/mainData/index.js';
|
|
import { teamPage } from '@/api/mainData/index.js';
|
|
|
import OrderSearch from './components/order-search.vue';
|
|
import OrderSearch from './components/order-search.vue';
|
|
|
|
|
+ import { debounce } from 'lodash';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
OrderSearch
|
|
OrderSearch
|
|
@@ -142,6 +157,24 @@
|
|
|
label: '型号',
|
|
label: '型号',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'batchNo',
|
|
|
|
|
+ label: '批号',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 100,
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'priority',
|
|
|
|
|
+ label: '优先级',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ slot: 'priority',
|
|
|
|
|
+ sortable: true
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
prop: 'formingNum',
|
|
prop: 'formingNum',
|
|
|
label: '要求生产数量',
|
|
label: '要求生产数量',
|
|
@@ -276,7 +309,34 @@
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.table.reload({ page: 1, where });
|
|
this.$refs.table.reload({ page: 1, where });
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ sortTop(row) {
|
|
|
|
|
+ row.priority = Number(row.priority) + 1;
|
|
|
|
|
+ this.priorityChange(row);
|
|
|
|
|
+ },
|
|
|
|
|
+ sortBottom(row) {
|
|
|
|
|
+ if (row.priority <= 1) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ row.priority = Number(row.priority) - 1;
|
|
|
|
|
+ this.priorityChange(row);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ priorityChange(row) {
|
|
|
|
|
+ this.priorityFn(row);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ priorityFn: debounce(function (row) {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ priority: row.priority
|
|
|
|
|
+ }
|
|
|
|
|
+ updatePriority(params).then((res) => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 800)
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|