Merge branch 'main' of http://192.168.1.132:3000/Wance/rd_mes_uniapp
This commit is contained in:
@@ -85,3 +85,10 @@ export function delEmployeeLineRel(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getEmployeeByCode(code) {
|
||||||
|
return request({
|
||||||
|
url: '/basic/employee/getEmpByCode/' + code,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -73,7 +73,6 @@ export default {
|
|||||||
bind(_this.formData).then(res => {
|
bind(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("绑定成功!");
|
_this.$modal.msgSuccess("绑定成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -102,7 +101,6 @@ export default {
|
|||||||
unBind(_this.formData.locationCode).then(res => {
|
unBind(_this.formData.locationCode).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("解绑成功!");
|
_this.$modal.msgSuccess("解绑成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -117,13 +115,6 @@ export default {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
reset() {
|
|
||||||
this.formData = {
|
|
||||||
locationCode: null,
|
|
||||||
batchNo: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ export default {
|
|||||||
addDeliveryTask(_this.formData).then(res => {
|
addDeliveryTask(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_this.$tab.switchTab("/pages/work/index");
|
_this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -85,11 +84,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
reset() {
|
|
||||||
this.formData.srcLocationCode = null;
|
|
||||||
this.formData.destLocationCode = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ export default {
|
|||||||
delivery(_this.formData).then(res => {
|
delivery(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -96,7 +95,6 @@ export default {
|
|||||||
cancel(arr).then(res => {
|
cancel(arr).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("取消成功!");
|
_this.$modal.msgSuccess("取消成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -108,16 +106,6 @@ export default {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.formData = {
|
|
||||||
id: null,
|
|
||||||
srcLocationCode: null,
|
|
||||||
taskTyp: null,
|
|
||||||
robotType: null,
|
|
||||||
ctnrTyp: null,
|
|
||||||
};
|
|
||||||
this.destLocationCode = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ export default {
|
|||||||
addDeliveryTask(_this.formData).then(res => {
|
addDeliveryTask(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -76,10 +75,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.formData.srcLocationCode = null;
|
|
||||||
this.formData.destLocationCode = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,14 +21,10 @@
|
|||||||
<uni-easyinput type="text" v-model="formData.opTitle" />
|
<uni-easyinput type="text" v-model="formData.opTitle" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="开始时间" name="startTime">
|
<uni-forms-item label="开始时间" name="startTime">
|
||||||
<view>
|
|
||||||
<uni-datetime-picker type="datetime" v-model="formData.startTime" />
|
<uni-datetime-picker type="datetime" v-model="formData.startTime" />
|
||||||
</view>
|
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="结束时间" name="endTime">
|
<uni-forms-item label="结束时间" name="endTime">
|
||||||
<view>
|
|
||||||
<uni-datetime-picker type="datetime" v-model="formData.endTime" />
|
<uni-datetime-picker type="datetime" v-model="formData.endTime" />
|
||||||
</view>
|
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="操作人员" name="staff">
|
<uni-forms-item label="操作人员" name="staff">
|
||||||
<uni-easyinput type="text" v-model="formData.staff" @confirm="searchStaff" />
|
<uni-easyinput type="text" v-model="formData.staff" @confirm="searchStaff" />
|
||||||
@@ -56,7 +52,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { addRecord } from "@/api/mes/mesMachineSetUpRecord.js";
|
import { addRecord } from "@/api/mes/mesMachineSetUpRecord.js";
|
||||||
import { listPwoJob } from "@/api/mes/jobReport.js";
|
import { listPwoJob } from "@/api/mes/jobReport.js";
|
||||||
import { getUserInfo } from "@/api/system/user.js"
|
import { getUserInfo } from "@/api/system/user.js";
|
||||||
|
import { getEmployeeByCode } from "@/api/basic/employee.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -81,7 +79,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$set(this.formData, "staff", this.$store.state.user.name);
|
this.$set(this.formData, "staff", this.$store.state.employee.empName);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scanBar() {
|
scanBar() {
|
||||||
@@ -96,8 +94,12 @@ export default {
|
|||||||
},
|
},
|
||||||
searchStaff() {
|
searchStaff() {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
getUserInfo(_this.formData.staff).then(async res => {
|
getEmployeeByCode(_this.formData.staff).then(async res => {
|
||||||
_this.$set(_this.formData, "staff", res.data.userName);
|
if(res.data != null){
|
||||||
|
_this.$set(_this.formData, "staff", res.data.name);
|
||||||
|
}else{
|
||||||
|
_this.$modal.msg("未查询到该员工!");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData() {
|
||||||
@@ -159,7 +161,7 @@ export default {
|
|||||||
addRecord(_this.formData).then(res => {
|
addRecord(_this.formData).then(res => {
|
||||||
_this.$modal.closeLoading();
|
_this.$modal.closeLoading();
|
||||||
_this.$modal.msgSuccess("提交成功!");
|
_this.$modal.msgSuccess("提交成功!");
|
||||||
_this.reset();
|
// _this.reset();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.switchTab("/pages/work/index");
|
this.$tab.switchTab("/pages/work/index");
|
||||||
}, 500);
|
}, 500);
|
||||||
@@ -197,21 +199,6 @@ export default {
|
|||||||
// 拼接为 "YYYY-MM-DD HH:mm" 格式
|
// 拼接为 "YYYY-MM-DD HH:mm" 格式
|
||||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
||||||
},
|
},
|
||||||
reset() {
|
|
||||||
this.timeTake = null;
|
|
||||||
this.timeUnit = 'h';
|
|
||||||
this.formData = {
|
|
||||||
startTime: null,
|
|
||||||
endTime: null,
|
|
||||||
pwoJobCode: null,
|
|
||||||
pwoCode: null,
|
|
||||||
ptNoTar: null,
|
|
||||||
ptTitleTar: null,
|
|
||||||
opCode: null,
|
|
||||||
opTitle: null,
|
|
||||||
machineAdjustmentDuration: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user