Merge remote-tracking branch 'origin/master'

master
xhj 8 months ago
commit 092b6828d9

@ -0,0 +1,107 @@
<template>
<div class="middle-event">
<el-select type="primary" v-model="workType" @change="changeWorkType" v-show="!isRestDay(data)" style="width: 50%;">
<el-option value="0" key="0" label="白班" />
<el-option value="1" key="1" label="二班" />
<el-option value="2" key="2" label="夜班" />
<el-option value="3" key="3" label="双班(白+夜)" />
</el-select>
<el-button type="primary" @click="changeDay(data)" plain >{{ isRestDay(data)?'休息':'工作' }}</el-button>
</div>
</template>
<script>
import {update} from "@/api/sjzx/gcrlWH";
export default {
name:"GcrlProperties",
props:{
data:{
type:Date,
default:{}
},
restDays:{
type:Array,
default: []
},
eb:{
type:Array,
default: []
},
yb:{
type:Array,
default: []
},
sb:{
type:Array,
default: []
},
},
data(){
return{
workType:null,
}
},
mounted(){
this.handler()
console.log(this.workType)
},
methods:{
handler(){
const data=this.dateFormat(this.$props.data)
console.log(data)
if (this.$props.eb.includes(data)){
this.workType='1'
return
}
console.log(this.$props.yb);
if (this.$props.yb.includes(data)){
this.workType='2'
return
}
if (this.$props.sb.includes(data)){
this.workType='3'
return
}
this.workType='0'
},
changeWorkType(val){
const dateF=this.dateFormat(this.$props.data);
update({pb:this.workType,gl:dateF})
},
changeDay(date){
var dateF=this.dateFormat(date);
if (this.$props.restDays.includes(dateF)){
update({xxr:'1',gl:dateF}).then((res)=>{
this.$props.restDays.splice(this.$props.restDays.indexOf(dateF) , 1)
})
}else {
update({xxr:'0',gl:dateF}).then((res)=>{
this.$props.restDays.push(dateF)
})
}
},
isRestDay(date){
const dateF=this.dateFormat(date);
return this.$props.restDays.includes(dateF)
},
dateFormat(date){
const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2);
const day = ('0' + date.getDate()).slice(-2);
var dateF=year+'/'+month+'/'+day;
return dateF;
},
isHidden(date){
// let today = new Date(Date.UTC(2024, 5, 18));
let today = new Date();
if (today.getDate()<21){
return !(this.$props.data < today);
}else {
var lastDay= new Date(today.getFullYear(), today.getMonth()+1, 1);
return !(date < lastDay);
}
},
}
}
</script>

@ -40,12 +40,9 @@
:class="{ faded: !isCurrentMonth(day.date),}"
>
<div class="top-day">{{ day.date.getDate() }}</div>
<div class="middle-event" v-show="isHidden(day.date)" >
<el-button type="primary" @click="changeDay(day.date)" plain >{{ isRestDay(day.date)?'休息':'工作' }}</el-button>
</div>
<GcrlProperties v-if="flag" :data="day.date" :eb="eb" :yb="yb" :sb="sb" :rest-days="restDays"/>
<div class="bottom-event" >
</div>
</div>
</td>
</tr>
@ -56,15 +53,22 @@
</template>
<script>
import { getList, generate, update } from "@/api/sjzx/gcrlWH";
import GcrlProperties from "@/components/Gcrl/GcrlProperties.vue";
export default {
components: {GcrlProperties},
data() {
return {
workType:'0',
current: new Date(),
today: new Date(),
restDays:[],
years:[],
nextYear:0,
flag:false
flag:false,
eb:[],//
yb:[],//
sb:[],//
showProperties:false
};
},
@ -91,7 +95,6 @@ export default {
}
},
methods: {
generateNextYear(){
this.years.length-1
generate('').then((res) => {
@ -107,33 +110,12 @@ export default {
this.years = res.data.years;
this.restDays=res.data.restDays;
this.nextYear=res.data.nextYear;
this.eb=res.data.eb;
this.yb=res.data.yb
this.sb=res.data.sb
this.flag=true
});
},
changeDay(date){
var dateF=this.dateFormat(date);
if (this.restDays.includes(dateF)){
update({xxr:'1',gl:dateF}).then((res)=>{
this.restDays.splice(this.restDays.indexOf(dateF) , 1)
})
}else {
update({xxr:'0',gl:dateF}).then((res)=>{
this.restDays.push(dateF)
})
}
},
isHidden(date){
// let today = new Date(Date.UTC(2024, 5, 18));
let today = new Date();
if (today.getDate()<21){
return !(date < today);
}else {
var lastDay= new Date(today.getFullYear(), today.getMonth()+1, 1);
return !(date < lastDay);
}
},
getCurDate() {
var year = this.current.getFullYear();
var month = this.current.getMonth() + 1; // getMonth() returns a zero-based value (0-11)

@ -6,15 +6,7 @@
<el-row>
<el-col :span="4">
<el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.cbbm"
:label="item.cbbm"
:value="item.cbbm"
>
</el-option>
</el-select>
<ProjectSelect ref="projectSelectRef" :_style="{width:'200px'}"/>
</el-form-item>
</el-col>
<el-col :span="4">
@ -39,7 +31,6 @@
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button
>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
@ -101,12 +92,13 @@ import { getCzxx } from "@/api/jhzx/qfxq";
import {getToken} from "@/utils/auth";
import {endLoading, startLoading} from "@/utils";
import {Message} from "element-ui";
import ProjectSelect from "@/components/ProjectSelect/index.vue";
export default {
name: "dhqdWH",
components: {ProjectSelect},
data() {
return {
request: {
dcCh: "",
Zt: "0",
},
list: [],
@ -458,6 +450,69 @@ export default {
],
filterRender: { name: "FilterCombination" },
},
{
field: "plzlsl",
title: "批量组立数量",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "kdzlsl",
title: "跨道组立数量",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "ptybsl",
title: "平铁用板数量",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "Zt",
title: "状态",
@ -517,7 +572,7 @@ export default {
//
initList() {
getList({
...this.request,
...this.request,dcCh:this.$refs.projectSelectRef.getDcch()
}).then((res) => {
if (res.success) {
this.list = res.data;

@ -142,7 +142,7 @@ import { getCzxx } from "@/api/jhzx/qfxq";
import {Message} from "element-ui";
import {getCzplBase} from "@/api/sjzx/jcsj";
export default {
name: "zrcWH",
name: "ZrcWH",
data() {
return {
uploadData:{
@ -210,27 +210,27 @@ export default {
],
filterRender: { name: "FilterCombination" },
},
{
field: "zdh",
title: "总段号",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
// {
// field: "zdh",
// title: "",
// align: "center",
// minWidth: "80",
// filters: [
// {
// data: {
// checks: [],
// sVal: "",
// sMenu: "",
// fType1: "",
// fVal1: "",
// fMode: "and",
// fType2: "",
// fVal2: "",
// },
// },
// ],
// filterRender: { name: "FilterCombination" },
// },
{
field: "dcFd",
title: "分段号",
@ -252,48 +252,48 @@ export default {
],
filterRender: { name: "FilterCombination" },
},
{
field: "qy",
title: "区域",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "yzd",
title: "预组段",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
// {
// field: "qy",
// title: "",
// align: "center",
// minWidth: "70",
// filters: [
// {
// data: {
// checks: [],
// sVal: "",
// sMenu: "",
// fType1: "",
// fVal1: "",
// fMode: "and",
// fType2: "",
// fVal2: "",
// },
// },
// ],
// filterRender: { name: "FilterCombination" },
// },
// {
// field: "yzd",
// title: "",
// align: "center",
// minWidth: "80",
// filters: [
// {
// data: {
// checks: [],
// sVal: "",
// sMenu: "",
// fType1: "",
// fVal1: "",
// fMode: "and",
// fType2: "",
// fVal2: "",
// },
// },
// ],
// filterRender: { name: "FilterCombination" },
// },
{
field: "zl",
title: "重量",

Loading…
Cancel
Save