Browse Source

1、工序报工-当前人员无报工内容提示

master
bjang03 7 months ago
parent
commit
ee5c0b78f4
  1. 31
      src/pages/mes/workScheduling/processReportForm.vue
  2. 4
      src/pages/mes/workScheduling/processReportPeopleCheck.vue

31
src/pages/mes/workScheduling/processReportForm.vue

@ -64,11 +64,12 @@ import { _confirm, _toast } from "@/utils/common"
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
let show = ref(false) let show = ref(false)
let dataInput = ref() let dataInput = ref()
function selectReworkTime(datetime){ function selectReworkTime(datetime: { year: any; month: any; day: any; hour: any; minute: any; second: any; }){
dataInput.value = `${datetime.year}-${datetime.month}-${datetime.day} ${datetime.hour}:${datetime.minute}:${datetime.second}` dataInput.value = `${datetime.year}-${datetime.month}-${datetime.day} ${datetime.hour}:${datetime.minute}:${datetime.second}`
show.value = false show.value = false
} }
const isLeader = uni.getStorageSync("isLeader") const isLeader = uni.getStorageSync("isLeader")
let params = { let params = {
year: true, year: true,
month: true, month: true,
@ -100,7 +101,7 @@ function toCheckPeople(){
url: "./processReportPeopleCheck" url: "./processReportPeopleCheck"
}) })
} }
function remove(index){ function remove(index: number){
if (list.value.length > 1) { if (list.value.length > 1) {
_confirm('确定要删除吗?',function(){ _confirm('确定要删除吗?',function(){
list.value.splice(index, 1) list.value.splice(index, 1)
@ -113,32 +114,6 @@ function remove(index){
onShow(() => { onShow(() => {
list.value = uni.getStorageSync("processReportList") list.value = uni.getStorageSync("processReportList")
}) })
function getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
let hour = date.getHours()
let minute = date.getMinutes()
let second = date.getSeconds()
if (type === 'start') {
year = year - 10;
} else if (type === 'end') {
year = year + 10;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}
let date = getDate({
format: true
})
function bindDateChange(e){
date = e.detail.value
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

4
src/pages/mes/workScheduling/processReportPeopleCheck.vue

@ -61,6 +61,10 @@ async function getList() {
if (res.data.leader) { if (res.data.leader) {
list.value = res.data.list list.value = res.data.list
} else { } else {
if (res.data.list.length == 0){
_toast("没有可以报工项")
return
}
uni.setStorageSync("processReportList", res.data.list) uni.setStorageSync("processReportList", res.data.list)
uni.redirectTo({ uni.redirectTo({
url: "./processReportForm" url: "./processReportForm"

Loading…
Cancel
Save