From 8324311952b44b60e0d7944b25dffb7badec28c1 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 30 五月 2024 16:57:46 +0800
Subject: [PATCH] 完成80%日工时管理接口对接
---
src/components/tool/value-table.vue | 1
src/main.js | 4
src/components/do/b1-inspect-order-plan/Inspection.vue | 3
src/components/do/b3-work-time-management/work-time-management.vue | 501 +++++++++++++++++++++++++++++++++----------------
src/components/do/b3-work-time-management/work-time-config.vue | 17 +
src/components/do/b3-work-time-management/work-time-statistics.vue | 10
src/components/do/b1-ins-order/fiberoptic-config.vue | 1
src/assets/api/controller.js | 21 ++
8 files changed, 377 insertions(+), 181 deletions(-)
diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 4b91f5d..dc2db2a 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -25,7 +25,9 @@
performanceShift,
auxiliaryWorkingHours,
unPass,
- companies
+ companies,
+ auxiliaryOutputWorkingHours,
+ auxiliaryWorkingHoursDay,
}
}
@@ -300,3 +302,20 @@
selectSimpleList: "/companies/selectSimpleList", //鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳
addPersonUser: "/companies/addPersonUser", //鑾峰彇浜轰簨绯荤粺缁勭粐涓嬬殑浜哄憳
}
+
+const auxiliaryOutputWorkingHours = {
+ selectAuxiliaryOutputWorkingHours: "/auxiliaryOutputWorkingHours/selectAuxiliaryOutputWorkingHours", //鏌ヨ浜ч噺宸ユ椂
+ collectWorkingHours: "/auxiliaryOutputWorkingHours/collectWorkingHours", //缁熻浜ч噺宸ユ椂姹囨�诲拰杈呭姪宸ユ椂姹囨��
+ exportWorkingHours: "/auxiliaryOutputWorkingHours/exportWorkingHours", //瀵煎嚭
+}
+
+const auxiliaryWorkingHoursDay = {
+ selectAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/selectAuxiliaryWorkingHoursDay", //鏌ヨ杈呭姪宸ユ椂
+ deleteAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/deleteAuxiliaryWorkingHoursDay", //鍒犻櫎
+ insertAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/insertAuxiliaryWorkingHoursDay", //鏂板
+ selectAuxiliaryWorkingHoursByNumber: "/auxiliaryWorkingHoursDay/selectAuxiliaryWorkingHoursByNumber", //鏍规嵁缂栧彿鏌ヨ杈呭姪宸ユ椂閰嶇疆淇℃伅
+ selectshiftByUser: "/auxiliaryWorkingHoursDay/selectshiftByUser", //鏍规嵁缂栧彿褰撳墠鐢ㄦ埛淇℃伅鏌ヨ鎵�鍦ㄧ彮娆�
+ updateAuxiliaryWorkingHoursDay: "/auxiliaryWorkingHoursDay/updateAuxiliaryWorkingHoursDay", //缂栬緫
+ check: "/auxiliaryWorkingHoursDay/check", //瀹℃牳
+ approve: "/auxiliaryWorkingHoursDay/approve", //鎵瑰噯
+}
diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue
index 6b301fa..aaa8bcb 100644
--- a/src/components/do/b1-ins-order/fiberoptic-config.vue
+++ b/src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -355,6 +355,7 @@
} else {
this.bushing = []
}
+ console.log(1111111,this.bushing)
},
getStandTreeBySampleType() {
this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, {
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 391167a..d26207a 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -393,9 +393,6 @@
</template>
<script>
- import {
- set
- } from 'shelljs';
import ValueTable from '../../tool/value-table.vue'
export default {
props: ['sonLaboratory', 'orderId', 'state'],
diff --git a/src/components/do/b3-work-time-management/work-time-config.vue b/src/components/do/b3-work-time-management/work-time-config.vue
index d26142d..e0f1c59 100644
--- a/src/components/do/b3-work-time-management/work-time-config.vue
+++ b/src/components/do/b3-work-time-management/work-time-config.vue
@@ -8,7 +8,8 @@
</div>
<div class="search_thing">
<div class="search_label">瀹為獙瀹わ細</div>
- <el-select v-model="componentData.entity.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
+ <el-select v-model="componentData.entity.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()"
+ clearable>
<el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -16,10 +17,12 @@
<div class="search_thing">
<div class="search_label">閮ㄩ棬锛�</div>
<div class="search_input">
- <el-select v-model="componentData.entity.department" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
+ <!-- <el-select v-model="componentData.entity.department" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
<el-option v-for="item in partList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
- </el-select>
+ </el-select> -->
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="componentData.entity.department" @keyup.enter.native="refreshTable()"></el-input>
</div>
</div>
<div class="search_thing" style="padding-left: 30px;">
@@ -37,7 +40,6 @@
</template>
<script>
-import { number } from 'echarts'
import ValueTable from '../../tool/value-table.vue'
export default {
components: {
@@ -67,7 +69,8 @@
id: 'update',
font: '缂栬緫',
type: 'text',
- method: 'doDiy'
+ method: 'doDiy',
+ field: ['department']
}],
tagField: {
laboratory: {
@@ -93,8 +96,8 @@
// select: []
// },
},
- requiredAdd: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour','department'],
- requiredUp: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour','department']
+ requiredAdd: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour'],
+ requiredUp: ['number','auxiliaryProject','laboratory','unit','approvedWorkingHour']
},
entityCopy: {},
upIndex: 0,
diff --git a/src/components/do/b3-work-time-management/work-time-management.vue b/src/components/do/b3-work-time-management/work-time-management.vue
index 17c0b8a..e5dbe6f 100644
--- a/src/components/do/b3-work-time-management/work-time-management.vue
+++ b/src/components/do/b3-work-time-management/work-time-management.vue
@@ -5,15 +5,15 @@
<div class="search_label">鍛ㄦ锛�</div>
<div class="search_input" style="display: flex;align-items: center;">
<el-input size="small" placeholder="寮�濮嬪懆娆�" clearable
- v-model="componentData.entity.number"></el-input>
+ v-model="entity.week1"></el-input>
<span> - </span>
<el-input size="small" placeholder="缁撴潫鍛ㄦ" clearable
- v-model="componentData.entity.number"></el-input>
+ v-model="entity.week2"></el-input>
</div>
</div>
<div class="search_thing" style="width: 200px;">
<div class="search_label">鏄熸湡锛�</div>
- <el-select v-model="componentData.entity.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
+ <el-select v-model="entity.weekDay" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()" clearable>
<el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -23,12 +23,14 @@
<div class="search_input">
<el-date-picker
style="width: 100%;"
- v-model="componentData.entity.number"
+ v-model="entity.dateTime"
size="small"
type="daterange"
range-separator="鑷�"
+ format="yyyy-MM-dd HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡" @change="refreshTable()">
+ end-placeholder="缁撴潫鏃ユ湡" @change="refreshTable()" clearable>
</el-date-picker>
</div>
</div>
@@ -36,11 +38,11 @@
<div class="search_thing" style="width: 200px;">
<div class="search_label" >鍚嶅瓧锛�</div>
<el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.number" @keyup.enter.native="refreshTable()"></el-input>
+ v-model="entity.name" @keyup.enter.native="refreshTable()"></el-input>
</div>
- <div class="search_thing" style="width: 200px;">
- <div class="search_label">鐘舵�侊細</div>
- <el-select v-model="componentData.entity.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
+ <div class="search_thing" style="width: 200px;" v-if="currentTable == 'ValueTable0'">
+ <div class="search_label" >鐘舵�侊細</div>
+ <el-select v-model="entity.state" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
<el-option v-for="item in stateList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -61,69 +63,73 @@
</el-radio-group>
<div style="display: flex;align-items: center;">
<p style="font-size: 14px;margin-right: 30px;">
- 浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">11.333</span> 杈呭姪宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">12.333</span>
+ 鎬诲伐鏃舵眹鎬伙細<span style="font-size: 16px;color: #3A7BFA;">{{ (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��'])? (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��']):0 }}</span> 浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['浜ч噺宸ユ椂姹囨��']?totalInfo['浜ч噺宸ユ椂姹囨��']:0}}</span> 杈呭姪宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;">{{totalInfo['杈呭姪宸ユ椂姹囨��']?totalInfo['杈呭姪宸ユ椂姹囨��']:0}}</span>
</p>
- <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd">褰曞叆鏁版嵁</el-button>
- <el-button size="small" type="primary">瀵� 鍑�</el-button>
+ <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'">褰曞叆鏁版嵁</el-button>
+ <el-button size="small" type="primary" @click="handleOut" :loading="outLoading">瀵� 鍑�</el-button>
</div>
</div>
<div class="table">
<ValueTable ref="ValueTable0"
- v-show="currentTable == 'ValueTable0'"
- :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :upUrl="$api.auxiliaryWorkingHours.upAuxiliaryWorkingHours"
- :delUrl="$api.auxiliaryWorkingHours.deleteAuxiliaryWorkingHours" :componentData="componentData" :key="upIndex" />
+ v-if="currentTable == 'ValueTable0'"
+ :url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay"
+ :delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay" :componentData="componentData" :key="upIndex"
+ @delete="handleDelete" />
<ValueTable ref="ValueTable1"
- v-show="currentTable == 'ValueTable1'"
- :url="$api.auxiliaryWorkingHours.selectAuxiliaryWorkingHours" :upUrl="$api.auxiliaryWorkingHours.upAuxiliaryWorkingHours"
- :delUrl="$api.auxiliaryWorkingHours.deleteAuxiliaryWorkingHours" :componentData="componentData1" :key="upIndex1" />
+ v-if="currentTable == 'ValueTable1'"
+ :url="$api.auxiliaryOutputWorkingHours.selectAuxiliaryOutputWorkingHours" :componentData="componentData1" :key="upIndex1" />
</div>
<el-dialog :title="formData.id?'缂栬緫':'褰曞叆鏁版嵁'" :visible.sync="addVisible" width="600px" :before-close="handleClose">
<el-row style="display:flex;justify-content: space-around;">
<el-col :span="12">
<el-form :model="formData" label-width="90px">
<el-form-item label="褰曞叆鏃堕棿:">
- <el-radio-group v-model="formData.value0" size="small">
- <el-radio :label="0">浠婂ぉ</el-radio>
- <el-radio :label="1">鏄ㄥぉ</el-radio>
+ <el-radio-group v-model="formData.dateTime" size="small">
+ <el-radio :label="getYearAndMonthAndDays()+' 00:00:00'">浠婂ぉ</el-radio>
+ <el-radio :label="getYearAndMonthAndDays(new Date((new Date()).getTime() - 24 * 60 * 60 * 1000))+' 00:00:00'">鏄ㄥぉ</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="骞翠唤:">
<el-input v-model="formData.year" disabled size="small"></el-input>
</el-form-item>
<el-form-item label="鍛ㄦ:">
- <el-input v-model="formData.value2" size="small" disabled></el-input>
+ <el-input v-model="formData.week" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="鏄熸湡:">
- <el-input v-model="formData.value3" size="small" disabled></el-input>
+ <!-- <el-input v-model="formData.weekDay" size="small" disabled></el-input> -->
+ <el-select v-model="formData.weekDay" placeholder="璇烽�夋嫨" size="small" disabled>
+ <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
</el-form-item>
<el-form-item label="鐝:">
- <el-input v-model="formData.value4" size="small" disabled></el-input>
+ <el-input v-model="formData.shift" size="small" disabled></el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form :model="formData" label-width="90px">
- <el-form-item label="缂栧彿:">
- <el-input v-model="formData.value5" size="small"></el-input>
+ <el-form-item label="缂栧彿:" required>
+ <el-input v-model="formData.number" size="small" @blur="getInfoByCode"></el-input>
</el-form-item>
- <el-form-item label="鏁伴噺:">
- <el-input v-model="formData.value6" size="small" ></el-input>
+ <el-form-item label="鏁伴噺:" required>
+ <el-input v-model="formData.amount" size="small" ></el-input>
</el-form-item>
<el-form-item label="鏍稿噯宸ユ椂:">
- <el-input v-model="formData.value7" size="small" disabled></el-input>
+ <el-input v-model="formData.approvedWorkingHour" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="杈呭姪宸ユ椂:">
- <el-input v-model="formData.value8" size="small" disabled></el-input>
+ <el-input v-model="formData.nonproductiveTime" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="杈呭姪椤圭洰:">
- <el-input v-model="formData.value9" size="small" disabled></el-input>
+ <el-input v-model="formData.auxiliaryProject" size="small" disabled></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-form :model="formData" label-width="90px">
<el-form-item label="杈呭姪璇存槑:">
- <el-input v-model="formData.value10" type="textarea"
+ <el-input v-model="formData.remarks" type="textarea"
:rows="3" size="small"></el-input>
</el-form-item>
</el-form>
@@ -139,19 +145,23 @@
<el-col :span="12">
<el-form :model="formData0" label-width="90px">
<el-form-item label="骞翠唤:">
- <el-input v-model="formData0.year" size="small"></el-input>
+ <el-input v-model="formData0.year" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
<el-form-item label="鍛ㄦ:">
- <el-input v-model="formData0.value2" size="small"></el-input>
+ <el-input v-model="formData0.week" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
<el-form-item label="鏄熸湡:">
- <el-input v-model="formData0.value3" size="small"></el-input>
+ <!-- <el-input v-model="formData0.weekDay" size="small" :disabled="title=='鎵瑰噯'"></el-input> -->
+ <el-select v-model="formData0.weekDay" placeholder="璇烽�夋嫨" size="small" :disabled="title=='鎵瑰噯'">
+ <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
</el-form-item>
<el-form-item label="濮撳悕:">
- <el-input v-model="formData0.value4" size="small" disabled></el-input>
+ <el-input v-model="formData0.nameUser" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="鐝:">
- <el-select v-model="formData0.value4" placeholder="璇烽�夋嫨" size="small">
+ <el-select v-model="formData0.shift" placeholder="璇烽�夋嫨" size="small" :disabled="title=='鎵瑰噯'">
<el-option v-for="item in classType" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -160,28 +170,28 @@
</el-col>
<el-col :span="12">
<el-form :model="formData0" label-width="90px">
- <el-form-item label="缂栧彿:">
- <el-input v-model="formData0.value5" size="small"></el-input>
+ <el-form-item label="缂栧彿:" required>
+ <el-input v-model="formData0.number" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
- <el-form-item label="鏁伴噺:">
- <el-input v-model="formData0.value6" size="small" ></el-input>
+ <el-form-item label="鏁伴噺:" required>
+ <el-input v-model="formData0.amount" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
<el-form-item label="鏍稿噯宸ユ椂:">
- <el-input v-model="formData0.value7" size="small" disabled></el-input>
+ <el-input v-model="formData0.approvedWorkingHour" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="杈呭姪宸ユ椂:">
- <el-input v-model="formData0.value8" size="small" disabled></el-input>
+ <el-input v-model="formData0.nonproductiveTime" size="small" disabled></el-input>
</el-form-item>
<el-form-item label="杈呭姪椤圭洰:">
- <el-input v-model="formData0.value9" size="small" disabled></el-input>
+ <el-input v-model="formData0.auxiliaryProject" size="small" disabled></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-form :model="formData0" label-width="90px">
<el-form-item label="澶嶆牳璇存槑:">
- <el-input v-model="formData0.value10" type="textarea"
- :rows="3" size="small"></el-input>
+ <el-input v-model="formData0.reviewerRemark" type="textarea"
+ :rows="3" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -196,17 +206,22 @@
<script>
import ValueTable from '../../tool/value-table.vue'
+import {
+ getYearAndMonthAndDays
+ } from '../../../util/date'
export default {
components: {
ValueTable
},
data () {
return{
+ entity:{},
componentData: {
entity: {
- number: null,
- department: null,
- laboratory: null,
+ week: null,
+ weekDay: null,
+ dateTime: null,
+ name:null,
orderBy: {
field: 'id',
order: 'desc'
@@ -237,37 +252,16 @@
method: 'handleRatify'
}],
tagField: {
- deviceStatus: {
- select: []
- },
- equipmentManager: {
- select: []
- },
- authorizedPerson: {
- select: []
- },
- insProductIds:{
+ shift:{
select:[]
}
- },
- linkEvent: {
- deviceName: {
- method: 'selectAllByOne'
- }
- },
+ },
+ linkEvent: {},
selectField: {
- authorizedPerson: {
- select: [],
- choose: true
- },
- equipmentManager: {
- select: []
- },
- insProductIds:{
- select:[],
- choose: true
+ shift:{
+ select:[]
}
- },
+ },
requiredAdd: [],
requiredUp: []
},
@@ -275,9 +269,10 @@
upIndex: 0,
componentData1: {
entity: {
- number: null,
- department: null,
- laboratory: null,
+ week: null,
+ weekDay: null,
+ dateTime: null,
+ name:null,
orderBy: {
field: 'id',
order: 'desc'
@@ -288,78 +283,52 @@
select: false,
do: [],
tagField: {
- deviceStatus: {
- select: []
- },
- equipmentManager: {
- select: []
- },
- authorizedPerson: {
- select: []
- },
- insProductIds:{
- select:[]
- }
},
- linkEvent: {
- deviceName: {
- method: 'selectAllByOne'
- }
- },
- selectField: {
- authorizedPerson: {
- select: [],
- choose: true
- },
- equipmentManager: {
- select: []
- },
- insProductIds:{
- select:[],
- choose: true
- }
- },
+ linkEvent: {},
+ selectField: {},
requiredAdd: [],
requiredUp: []
},
- upIndex1:0,
+ entityCopy1: {},
+ upIndex1:100,
weekList:[
- {label: '鏄熸湡涓�', value: 1},
- {label: '鏄熸湡浜�', value: 2},
- {label: '鏄熸湡涓�', value: 3},
- {label: '鏄熸湡鍥�', value: 4},
- {label: '鏄熸湡浜�', value: 5},
- {label: '鏄熸湡鍏�', value: 6},
- {label: '鏄熸湡鏃�', value: 7}
+ {label: '鏄熸湡涓�', value: '1'},
+ {label: '鏄熸湡浜�', value: '2'},
+ {label: '鏄熸湡涓�', value: '3'},
+ {label: '鏄熸湡鍥�', value: '4'},
+ {label: '鏄熸湡浜�', value: '5'},
+ {label: '鏄熸湡鍏�', value: '6'},
+ {label: '鏄熸湡鏃�', value: '7'}
],
currentTable:'ValueTable0',
addVisible:false,
addLoad:false,
formData:{
- value0:0,
+ dateTime:getYearAndMonthAndDays()+' 00:00:00',
year:new Date().getFullYear(),
- value2:this.getCurrentWeekNumber(),
- value3:this.getWeek(),
- value4:'',
- value5:'',
- value6:'',
- value7:'',
- value8:'',
- value9:'',
- value10:'',
+ week:this.getCurrentWeekNumber(),
+ weekDay:this.getWeek(),
+ shift:'',
+ number:'',
+ amount:'',
+ approvedWorkingHour:'',
+ nonproductiveTime:'',
+ auxiliaryProject:'',
+ remarks:'',
},
formData0:{
- value0:0,
+ dateTime:0,
year:new Date().getFullYear(),
- value2:this.getCurrentWeekNumber(),
- value3:this.getWeek(),
- value4:'',
- value5:'',
- value6:'',
- value7:'',
- value8:'',
- value9:'',
- value10:'',
+ week:this.getCurrentWeekNumber(),
+ weekDay:this.getWeek(),
+ createUser:'',
+ shift:'',
+ number:'',
+ amount:'',
+ approvedWorkingHour:'',
+ nonproductiveTime:'',
+ auxiliaryProject:'',
+ reviewerRemark:'',
},
checkVisible:false,
checkLoadN:false,
@@ -368,57 +337,129 @@
classType:[],
stateList:[
{
- value:0,
+ value:'宸叉彁浜�',
label:'宸叉彁浜�'
},
{
- value:1,
+ value:'宸插鏍�',
label:'宸插鏍�'
},
{
- value:2,
+ value:'宸叉壒鍑�',
label:'宸叉壒鍑�'
},
- ]
+ ],
+ totalInfo:{},
+ auxiliaryWorking:null,
+ outLoading:false
}
},
watch:{
- 'formData.value0'(val){
- if(val==0){
+ 'formData.dateTime'(val){
+ if(val==(getYearAndMonthAndDays()+' 00:00:00')){
this.formData.year = new Date().getFullYear();
- this.formData.value2 = this.getCurrentWeekNumber()
- this.formData.value3 = this.getWeek()
+ this.formData.week = this.getCurrentWeekNumber()
+ this.formData.weekDay = this.getWeek()
}else{
var today = new Date(); // 鑾峰彇褰撳墠鏃ユ湡
var yesterday = new Date(today); // 澶嶅埗褰撳墠鏃ユ湡
yesterday.setDate(today.getDate() - 1); // 璁剧疆涓哄墠涓�澶�
var timestamp = new Date(yesterday.getTime());
this.formData.year = timestamp.getFullYear();
- this.formData.value2 = this.getCurrentWeekNumber(timestamp)
- this.formData.value3 = this.getWeek(timestamp)
+ this.formData.week = this.getCurrentWeekNumber(timestamp)
+ this.formData.weekDay = this.getWeek(timestamp)
+ }
+ },
+ 'formData.amount'(val){
+ if(val){
+ if(!isNaN(val)){
+ if(this.formData.approvedWorkingHour){
+ this.formData.nonproductiveTime = this.formData.approvedWorkingHour*val
+ }
+ }else{
+ this.$message.error('璇疯緭鍏ユ暟瀛�')
+ this.formData.amount = ''
+ }
+ }
+ },
+ 'formData.approvedWorkingHour'(val){
+ if(val&&this.formData.amount){
+ this.formData.nonproductiveTime = this.formData.amount*val
+ }
+ },
+ 'formData0.amount'(val){
+ if(val){
+ if(!isNaN(val)){
+ if(this.formData0.approvedWorkingHour){
+ this.formData0.nonproductiveTime = this.formData0.approvedWorkingHour*val
+ }
+ }else{
+ this.$message.error('璇疯緭鍏ユ暟瀛�')
+ this.formData0.amount = ''
+ }
+ }
+ },
+ 'formData0.approvedWorkingHour'(val){
+ if(val&&this.formData0.amount){
+ this.formData0.nonproductiveTime = this.formData0.amount*val
}
}
},
mounted(){
this.getCurrentWeekNumber()
this.selectEnumByCategory()
+ this.collectWorkingHours()
+ this.selectshiftByUser()
+ this.entityCopy = this.HaveJson(this.componentData.entity);
+ this.entityCopy1 = this.HaveJson(this.componentData1.entity);
},
methods:{
- refreshTable(){},
- refresh(){},
+ getYearAndMonthAndDays(date){
+ return getYearAndMonthAndDays(date)
+ },
+ refreshTable(){
+ let entity = {}
+ if(this.entity.week1&&this.entity.week2){
+ entity.week = JSON.stringify([this.entity.week1,this.entity.week2])
+ }
+ if(this.entity.dateTime){
+ entity.dateTime = JSON.stringify(this.entity.dateTime)
+ }
+ entity.weekDay = this.entity.weekDay
+ entity.name = this.entity.name
+ if(this.currentTable=='ValueTable0'){
+ entity.state = this.entity.state
+ this.componentData.entity = {...this.componentData.entity,...entity}
+ this.$refs['ValueTable0'].selectList()
+ }else{
+ this.componentData1.entity = {...this.componentData1.entity,...entity}
+ this.$refs['ValueTable1'].selectList()
+ }
+ },
+ refresh(){
+ this.entity = {}
+ if(this.currentTable=='ValueTable0'){
+ this.componentData.entity = this.HaveJson(this.entityCopy)
+ this.upIndex++
+ }else{
+ this.componentData1.entity = this.HaveJson(this.entityCopy1)
+ this.upIndex1++
+ }
+ this.refreshTable()
+ },
openAdd(){
this.formData = {
- value0:0,
+ dateTime:getYearAndMonthAndDays()+' 00:00:00',
year:new Date().getFullYear(),
- value2:this.getCurrentWeekNumber(),
- value3:this.getWeek(),
- value4:'',
- value5:'',
- value6:'',
- value7:'',
- value8:'',
- value9:'',
- value10:'',
+ week:this.getCurrentWeekNumber(),
+ weekDay:this.getWeek(),
+ shift:'',
+ number:'',
+ amount:'',
+ approvedWorkingHour:'',
+ nonproductiveTime:'',
+ auxiliaryProject:'',
+ remarks:'',
}
this.addVisible = true
},
@@ -426,19 +467,53 @@
this.formData = row;
this.addVisible = true
},
+ handleDelete(){
+ this.collectWorkingHours()
+ },
handleClose(){
this.addVisible = false
},
submitAdd(){
- if(!this.formData.value5){
+ if(!this.formData.number){
this.$message.error('璇疯緭鍏ョ紪鍙�')
return
}
- if(!this.formData.value6){
+ if(!this.formData.amount){
this.$message.error('璇疯緭鍏ユ暟閲�')
return
}
this.addLoad = true
+ if(!this.formData.id){
+ this.$axios.post(this.$api.auxiliaryWorkingHoursDay.insertAuxiliaryWorkingHoursDay, {
+ ...this.formData
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.addLoad = false
+ if (res.code == 201) return
+ this.$message.success('宸叉彁浜�')
+ this.addVisible = false
+ this.refreshTable()
+ this.collectWorkingHours()
+ })
+ }else{
+ this.$axios.post(this.$api.auxiliaryWorkingHoursDay.updateAuxiliaryWorkingHoursDay, {
+ ...this.formData
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.addLoad = false
+ if (res.code == 201) return
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.addVisible = false
+ this.refreshTable()
+ this.collectWorkingHours()
+ })
+ }
},
handleCheck(row){
this.title = '瀹℃牳'
@@ -451,21 +526,67 @@
this.checkVisible = true
},
submitCheck(e){
- if(!this.formData0.value5){
+ if(!this.formData0.number){
this.$message.error('璇疯緭鍏ョ紪鍙�')
return
}
- if(!this.formData0.value6){
+ if(!this.formData0.amount){
this.$message.error('璇疯緭鍏ユ暟閲�')
return
}
this.checkLoadY = true
+ if(this.title == '瀹℃牳'){
+ // if(e==0){
+ // // 瀹℃牳涓嶉�氳繃
+ // }else{
+ // // 瀹℃牳閫氳繃
+ // }
+ this.formData0.state = e==0?'瀹℃牳涓嶉�氳繃':'瀹℃牳閫氳繃'
+ this.$axios.post(this.$api.auxiliaryWorkingHoursDay.check, {
+ ...this.formData0
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.checkLoadY = false
+ if (res.code == 201) return
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.checkVisible = false
+ this.refreshTable()
+ this.collectWorkingHours()
+ })
+ }else{
+ // if(e==0){
+ // // 瀹℃牳涓嶉�氳繃
+ // }else{
+ // // 瀹℃牳閫氳繃
+ // }
+ this.$axios.post(this.$api.auxiliaryWorkingHoursDay.approve, {
+ id:this.formData0.id,
+ state:e==0?'鎵瑰噯涓嶉�氳繃':'鎵瑰噯閫氳繃'
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.checkLoadY = false
+ if (res.code == 201) return
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.checkVisible = false
+ this.refreshTable()
+ this.collectWorkingHours()
+ })
+ }
},
selectEnumByCategory() {
this.$axios.post(this.$api.enums.selectEnumByCategory, {
category: "鐝绫诲瀷"
}).then(res => {
this.classType = res.data
+ this.componentData.tagField.shift.select = res.data
+ this.classType = res.data
+ this.componentData.selectField.shift.select = res.data
})
},
getCurrentWeekNumber(now=new Date()) {
@@ -491,7 +612,59 @@
let d = e.getDay()
// let c = str.charAt(d)
// return `鍛�${c}`
- return d
+ return String(d)
+ },
+ collectWorkingHours(){
+ this.$axios.post(this.$api.auxiliaryOutputWorkingHours.collectWorkingHours).then(res => {
+ this.totalInfo = res.data
+ })
+ },
+ selectshiftByUser(){
+ this.$axios.post(this.$api.auxiliaryWorkingHoursDay.selectshiftByUser).then(res => {
+ this.formData.shift = res.data
+ })
+ },
+ getInfoByCode(){
+ if(this.formData.number){
+ this.$axios.post(this.$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursByNumber+'?number='+this.formData.number).then(res => {
+ this.auxiliaryWorking = res.data
+ this.formData.approvedWorkingHour = this.auxiliaryWorking.approvedWorkingHour
+ this.formData.auxiliaryProject = this.auxiliaryWorking.auxiliaryProject
+ })
+ }
+ },
+ handleOut(){
+ this.outLoading = true
+ this.$axios.post(this.$api.auxiliaryOutputWorkingHours.exportWorkingHours,{responseType: 'blob'}).then(res => {
+ this.outLoading = false
+ this.$message.success('瀵煎嚭鎴愬姛')
+ // let fileName="鏃ュ伐鏃舵眹鎬昏〃";
+ // const blob = new Blob([res], {
+ // type: 'application/force-download'
+ // })
+ // const filename = decodeURI(fileName+'.xlsx')
+ // // 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠�
+ // const elink = document.createElement('a')
+ // elink.download = filename
+ // elink.style.display = 'none'
+ // elink.href = URL.createObjectURL(blob)
+ // document.body.appendChild(elink)
+ // elink.click()
+ // URL.revokeObjectURL(elink.href) // 閲婃斁URL 瀵硅薄
+ // document.body.removeChild(elink)
+ const blob = new Blob([res], {
+ type: 'application/force-download'
+ })
+ const link = document.createElement('a')
+ link.href = URL.createObjectURL(blob)
+ link.download = decodeURI('鏃ュ伐鏃舵眹鎬昏〃'+'.xlsx')
+ document.body.appendChild(link)
+ link.click()
+ window.setTimeout(function () {
+ URL.revokeObjectURL(blob)
+ document.body.removeChild(link)
+ }, 0)
+ })
},
}
}
diff --git a/src/components/do/b3-work-time-management/work-time-statistics.vue b/src/components/do/b3-work-time-management/work-time-statistics.vue
index fd79c90..321f637 100644
--- a/src/components/do/b3-work-time-management/work-time-statistics.vue
+++ b/src/components/do/b3-work-time-management/work-time-statistics.vue
@@ -23,10 +23,12 @@
<div class="search_thing">
<div class="search_label">閮ㄩ棬锛�</div>
<div class="search_input">
- <el-select v-model="componentData.entity.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
- <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
+ <!-- <el-select v-model="componentData.entity.laboratory" placeholder="鍏ㄩ儴" size="small" @change="refreshTable()">
+ <el-option v-for="item in weekList" :key="item.value" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select> -->
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="componentData.entity.department" @keyup.enter.native="refreshTable()"></el-input>
</div>
</div>
<div class="search_thing" style="padding-left: 30px;width: 100px;">
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 57471ca..9f76c3b 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -764,6 +764,7 @@
}
this.$message.success('鍒犻櫎鎴愬姛')
this.selectList()
+ this.$emit('delete')
}).catch(e => {
this.$message.error('鍒犻櫎澶辫触')
})
diff --git a/src/main.js b/src/main.js
index 72b15e5..314efeb 100644
--- a/src/main.js
+++ b/src/main.js
@@ -13,8 +13,8 @@
//鏈湴
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
-const javaApi = 'http://192.168.11.200:8001';//鏉�
-// const javaApi = 'http://192.168.11.249:8001';//寮�
+// const javaApi = 'http://192.168.11.200:8001';//鏉�
+const javaApi = 'http://192.168.144.249:8001';//寮�
// const javaApi = 'http://172.20.10.3:8001';//濮�
// const javaApi = 'http://192.168.11.2:8001';//鏌�
// const javaApi = 'http://127.0.0.1:8001';//鏅�
--
Gitblit v1.9.3