WMS系统文件新增,NPM添加功能(kr-print-designer打印功能插件=》预计作为二维码条码使用) (moment时间简易处理插件)(stylus stylus-loader css样式预处理)
This commit is contained in:
@@ -132,9 +132,9 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8"><el-form-item label="车数" prop="vehicleNumber">
|
||||
<el-input v-model="workorderItem.vehicleNumber" placeholder="毛坯号"></el-input> </el-form-item></el-col>
|
||||
<el-input v-model="workorderItem.vehicleNumber" placeholder="毛坯号" @input="vehicleNumberInput"></el-input> </el-form-item></el-col>
|
||||
<el-col :span="8"><el-form-item label="挂具摆放数" prop="hangNumber">
|
||||
<el-input v-model="workorderItem.hangNumber" placeholder="挂具摆放数"></el-input> </el-form-item></el-col>
|
||||
<el-input v-model="workorderItem.hangNumber" placeholder="挂具摆放数" @input="hangNumberInput"></el-input> </el-form-item></el-col>
|
||||
<el-col :span="8"><el-form-item label="上件数" prop="previousNumber">
|
||||
<el-input v-model="workorderItem.previousNumber" placeholder="上件数"></el-input> </el-form-item></el-col>
|
||||
</el-row>
|
||||
@@ -178,6 +178,7 @@
|
||||
deleteworkorder,
|
||||
updateworkorder,
|
||||
updateSort,
|
||||
updateSort2,
|
||||
GenerateWorkorder,
|
||||
} from '@/api/productManagement/workoder_v2.js'
|
||||
import Sortable from 'sortablejs'
|
||||
@@ -189,6 +190,7 @@
|
||||
return {
|
||||
mqttClient: null,
|
||||
mqttClientId: emqxUtil.title + Math.random().toString(16).substring(2, 8),
|
||||
sortable:null,
|
||||
search: {
|
||||
year: new Date().getFullYear(),
|
||||
week: 1,
|
||||
@@ -260,8 +262,8 @@
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.drag()
|
||||
|
||||
// this.drag()
|
||||
this.rowDrop();
|
||||
},
|
||||
methods: {
|
||||
//todo 拖拽
|
||||
@@ -296,6 +298,41 @@
|
||||
},
|
||||
})
|
||||
},
|
||||
//XXX新方案
|
||||
rowDrop() {
|
||||
this.$nextTick(() => {
|
||||
let xTable = this.$refs.xTable;
|
||||
this.sortable = Sortable.create(
|
||||
xTable.$el.querySelector(".body--wrapper>.vxe-table--body tbody"),
|
||||
{
|
||||
handle: ".vxe-body--row",
|
||||
animation: 150,
|
||||
onEnd: ({ newIndex, oldIndex }) => { // 拖拽后回调
|
||||
// 解决方案
|
||||
this.workorder_table_data.splice(newIndex, 0, this.workorder_table_data.splice(oldIndex, 1)[0]);
|
||||
let newArray = this.workorder_table_data.slice(0);
|
||||
this.workorder_table_data = [];
|
||||
this.$nextTick(function () {
|
||||
this.workorder_table_data = newArray;
|
||||
const query = {
|
||||
oldId:this.workorder_table_data[oldIndex].id,
|
||||
oldSort:this.workorder_table_data[oldIndex].sort,
|
||||
newId:this.workorder_table_data[newIndex].id,
|
||||
newSort:this.workorder_table_data[newIndex].sort,
|
||||
}
|
||||
updateSort2(query).then((res) => {
|
||||
if (res.code == 200 && res.data > 0) {
|
||||
this.$notify.success('修改成功')
|
||||
}else{
|
||||
this.$notify.error('修改失败')
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
handleClick() {
|
||||
this.getList()
|
||||
@@ -535,6 +572,22 @@
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
vehicleNumberInput(value) {
|
||||
if (this.workorderItem.vehicleNumber >= 0 && this.workorderItem.hangNumber >= 0) {
|
||||
this.workorderItem.previousNumber = this.workorderItem.vehicleNumber * this.workorderItem.hangNumber
|
||||
} else {
|
||||
this.workorderItem.previousNumber = 0;
|
||||
}
|
||||
|
||||
},
|
||||
hangNumberInput(value) {
|
||||
if (this.workorderItem.vehicleNumber >= 0 && this.workorderItem.hangNumber >= 0) {
|
||||
this.workorderItem.previousNumber = this.workorderItem.vehicleNumber * this.workorderItem.hangNumber
|
||||
} else {
|
||||
this.workorderItem.previousNumber = 0;
|
||||
}
|
||||
},
|
||||
|
||||
initMqtt() {
|
||||
const that = this;
|
||||
if (that.mqttClient !== null && that.mqttClient.connected) {
|
||||
|
||||
Reference in New Issue
Block a user