From fc294881353b4a540166341194ed5dfe0acd000e Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 18 七月 2024 18:02:04 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master
---
src/components/tool/value-table.vue | 76 +++++++
src/components/view/b1-report-preparation.vue | 22 +
package-lock.json | 5
src/components/do/b3-work-time-management/work-time-management.vue | 337 ++++++++++++++++++++++++-------------
src/components/view/b2-standard-template.vue | 4
src/components/do/b3-work-time-management/work-time-statistics.vue | 4
src/components/view/b1-inspect-order-plan.vue | 10
src/components/view/b1-inspection-order.vue | 13
src/components/do/b6-device-management/b6-data-acquisition-config.vue | 14 +
src/components/view/b1-expenses.vue | 54 +++++
10 files changed, 381 insertions(+), 158 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 03199f3..22e5b09 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10420,6 +10420,11 @@
"renderkid": "^2.0.4"
}
},
+ "print-js": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/print-js/-/print-js-1.6.0.tgz",
+ "integrity": "sha512-BfnOIzSKbqGRtO4o0rnj/K3681BSd2QUrsIZy/+WdCIugjIswjmx3lDEZpXB2ruGf9d4b3YNINri81+J0FsBWg=="
+ },
"printj": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
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 b500e82..34c91dc 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
@@ -18,7 +18,7 @@
</el-option>
</el-select>
</div>
- <div class="search_thing">
+ <div class="search_thing" style="width: 390px;">
<div class="search_label" style="width: 90px;">鏃堕棿鑼冨洿锛�</div>
<div class="search_input">
<el-date-picker
@@ -27,8 +27,8 @@
size="small"
type="daterange"
range-separator="鑷�"
- format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"
+ format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡" @change="refreshTable()" clearable>
</el-date-picker>
@@ -65,20 +65,21 @@
<p style="font-size: 14px;margin-right: 30px;">
鎬诲伐鏃舵眹鎬伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{ (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��'])? (totalInfo['浜ч噺宸ユ椂姹囨��']+totalInfo['杈呭姪宸ユ椂姹囨��']):0 }}</span> 浜ч噺宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['浜ч噺宸ユ椂姹囨��']?totalInfo['浜ч噺宸ユ椂姹囨��']:0}}</span> 杈呭姪宸ユ椂姹囨�伙細<span style="font-size: 16px;color: #3A7BFA;" v-if="totalInfo">{{totalInfo['杈呭姪宸ユ椂姹囨��']?totalInfo['杈呭姪宸ユ椂姹囨��']:0}}</span>
</p>
- <el-button size="small" type="primary" style="margin-right: 16px;" @click="openAdd" v-show="currentTable == 'ValueTable0'&&add">褰曞叆鏁版嵁</el-button>
+ <el-button size="small" type="primary" @click="openAdd" v-show="currentTable == 'ValueTable0'&&add">褰曞叆鏁版嵁</el-button>
<el-button size="small" type="primary"
v-if="down"
@click="handleOut" :loading="outLoading">瀵� 鍑�</el-button>
+ <el-button size="small" type="primary" v-show="currentTable == 'ValueTable0'&&add" @click="openBatchCheck(0)">鎵归噺瀹℃牳</el-button>
+ <el-button size="small" type="primary" v-show="currentTable == 'ValueTable0'&&add" @click="openBatchCheck(1)">鎵归噺鎵瑰噯</el-button>
</div>
</div>
<div class="table">
<ValueTable ref="ValueTable0"
- v-if="currentTable == 'ValueTable0'"
+ v-if="currentTable == 'ValueTable0'" :isColumnWidth="true"
:url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay"
:delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay" :componentData="componentData" :key="upIndex"
@delete="handleDelete" />
- <ValueTable ref="ValueTable1"
- v-if="currentTable == 'ValueTable1'"
+ <ValueTable ref="ValueTable1" v-if="currentTable == 'ValueTable1'" :isColumnWidth="true"
:url="$api.auxiliaryOutputWorkingHours.selectAuxiliaryOutputWorkingHours" :componentData="componentData1" :key="upIndex1" />
</div>
<el-dialog :title="formData.id?'缂栬緫':'褰曞叆鏁版嵁'" :visible.sync="addVisible" width="600px" :before-close="handleClose">
@@ -168,6 +169,9 @@
</el-option>
</el-select>
</el-form-item>
+ <el-form-item label="澶嶆牳璇存槑:">
+ <el-input v-model="formData0.reviewerRemark" type="textarea" :rows="3" size="small" :disabled="title=='鎵瑰噯'"></el-input>
+ </el-form-item>
</el-form>
</el-col>
<el-col :span="12">
@@ -176,6 +180,9 @@
<el-input v-model="formData0.number" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
<el-form-item label="鏁伴噺:" required>
+ <el-input v-model="formData0.amount" size="small" :disabled="title=='鎵瑰噯'"></el-input>
+ </el-form-item>
+ <el-form-item label="澶嶆牳鏁伴噺:" required>
<el-input v-model="formData0.reviewerNumber" size="small" :disabled="title=='鎵瑰噯'"></el-input>
</el-form-item>
<el-form-item label="鏍稿噯宸ユ椂:">
@@ -190,12 +197,6 @@
</el-form>
</el-col>
</el-row>
- <el-form :model="formData0" label-width="90px">
- <el-form-item label="澶嶆牳璇存槑:">
- <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">
<el-row>
<el-button @click="submitCheck(0)" :loading="checkLoadN">{{title=='瀹℃牳'?'涓嶉�氳繃':'涓嶆壒鍑�'}}</el-button>
@@ -203,6 +204,17 @@
</el-row>
</span>
</el-dialog>
+ <el-dialog
+ :title="batchCheckTitle"
+ :visible.sync="batchCheckDialog"
+ width="30%"
+ :before-close="closeBatchCheckDialog">
+ <span>{{batchCheckDialogMessage}}</span>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="batchCheckDialog = false">{{batchCheckTitle=='鎵归噺瀹℃牳'?'涓嶉�氳繃':'涓嶆壒鍑�'}}</el-button>
+ <el-button type="primary" @click="batchCheck">{{batchCheckTitle=='鎵归噺瀹℃牳'?'閫� 杩�':'鎵� 鍑�'}}</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -223,97 +235,104 @@
down:false,
add:false,
componentData: {
- entity: {
- week: null,
- weekDay: null,
- dateTime: new Date(),
- name:null,
- orderBy: {
- field: 'id',
- order: 'desc'
- }
- },
- isIndex: true,
- showSelect: false,
- select: false,
- do: [{
- id: 'delete',
- font: '鍒犻櫎',
- type: 'text',
- method: 'doDiy'
- }, {
- id: 'handleEdit',
- font: '缂栬緫',
- type: 'text',
- method: 'handleEdit'
- },{
- id: 'handleCheck',
- font: '瀹℃牳',
- type: 'text',
- method: 'handleCheck'
- }, {
- id: 'handleRatify',
- font: '鎵瑰噯',
- type: 'text',
- method: 'handleRatify'
- }],
- tagField: {
- shift:{
- select:[]
- },
- state:{
- select:[
- {
- label:'宸叉彁浜�',
- value:'宸叉彁浜�',
- type:'primary'
- },
- {
- label:'宸插鏍�',
- value:'宸插鏍�',
- type:'warning'
- },
- {
- label:'宸叉壒鍑�',
- value:'宸叉壒鍑�',
- type:'success'
- },
- ]
- },
- weekDay:{
- select:[]
- }
+ entity: {
+ week: null,
+ weekDay: null,
+ dateTime: null,
+ name:null,
+ orderBy: {
+ field: 'id',
+ order: 'desc'
+ }
+ },
+ isIndex: true,
+ showSelect: true,
+ select: true,
+ selectMethod: 'handleChangeTask',
+ do: [{
+ id: 'delete',
+ font: '鍒犻櫎',
+ type: 'text',
+ method: 'doDiy'
+ }, {
+ id: 'handleEdit',
+ font: '缂栬緫',
+ type: 'text',
+ method: 'handleEdit'
+ },{
+ id: 'handleCheck',
+ font: '瀹℃牳',
+ type: 'text',
+ method: 'handleCheck',
+ disabFun: (row, index) => {
+ return row.state === '宸插鏍�' || row.state === '宸叉壒鍑�'
+ }
+ }, {
+ id: 'handleRatify',
+ font: '鎵瑰噯',
+ type: 'text',
+ method: 'handleRatify',
+ disabFun: (row, index) => {
+ return row.state === '宸叉壒鍑�'
+ }
+ }],
+ tagField: {
+ shift:{
+ select:[]
},
- linkEvent: {},
- selectField: {
- shift:{
- select:[]
- },
- state:{
- select:[
- {
- label:'宸叉彁浜�',
- value:'宸叉彁浜�',
- type:'primary'
- },
- {
- label:'宸插鏍�',
- value:'宸插鏍�',
- type:'warning'
- },
- {
- label:'宸叉壒鍑�',
- value:'宸叉壒鍑�',
- type:'success'
- },
- ]
- },
- weekDay:{
- select:[]
- }
+ state:{
+ select:[
+ {
+ label:'宸叉彁浜�',
+ value:'宸叉彁浜�',
+ type:'primary'
+ },
+ {
+ label:'宸插鏍�',
+ value:'宸插鏍�',
+ type:'warning'
+ },
+ {
+ label:'宸叉壒鍑�',
+ value:'宸叉壒鍑�',
+ type:'success'
+ },
+ ]
},
- requiredAdd: [],
- requiredUp: []
+ weekDay:{
+ select:[]
+ }
+ },
+ linkEvent: {},
+ selectField: {
+ shift:{
+ select:[]
+ },
+ state:{
+ select:[
+ {
+ label:'宸叉彁浜�',
+ value:'宸叉彁浜�',
+ type:'primary'
+ },
+ {
+ label:'宸插鏍�',
+ value:'宸插鏍�',
+ type:'warning'
+ },
+ {
+ label:'宸叉壒鍑�',
+ value:'宸叉壒鍑�',
+ type:'success'
+ },
+ ]
+ },
+ weekDay:{
+ select:[]
+ }
+ },
+ requiredAdd: [],
+ requiredUp: []
},
entityCopy: {},
upIndex: 0,
@@ -321,7 +340,7 @@
entity: {
week: null,
weekDay: null,
- dateTime: null,
+ dateTime: [],
name:null,
orderBy: {
field: 'id',
@@ -380,6 +399,7 @@
reviewerNonproductiveTime:'',
auxiliaryProject:'',
reviewerRemark:'',
+ nameUser: ''
},
checkVisible:false,
checkLoadN:false,
@@ -402,7 +422,11 @@
],
totalInfo:null,
auxiliaryWorking:null,
- outLoading:false
+ outLoading:false,
+ batchCheckTitle: '鎵归噺瀹℃牳',
+ batchCheckDialog: false,
+ ValueTable0Selected: [],
+ batchCheckDialogMessage: ''
}
},
watch:{
@@ -477,10 +501,13 @@
let year = currentDate.getFullYear();
let month = String(currentDate.getMonth() + 1).padStart(2, '0');
let day = String(currentDate.getDate()).padStart(2, '0');
- let formattedDate1 = `${year}-${month}-${day} 00:00:00`;
- let formattedDate2 = `${year}-${month}-${day} 23:59:59`;
+ let formattedDate1 = `${year}-${month}-${day}`;
+ let formattedDate2 = `${year}-${month}-${day}`;
this.entity.dateTime.push(formattedDate1);
this.entity.dateTime.push(formattedDate2);
+ this.componentData1.entity.dateTime.push(formattedDate1);
+ this.componentData1.entity.dateTime.push(formattedDate2);
+ this.refreshTable()
},
getPower(){
let power = JSON.parse(sessionStorage.getItem('power'))
@@ -529,7 +556,7 @@
getYearAndMonthAndDays(date){
return getYearAndMonthAndDays(date)
},
- refreshTable(){
+ refreshTable(e){
let entity = {}
if(this.entity.week1&&this.entity.week2){
entity.week = JSON.stringify([this.entity.week1,this.entity.week2])
@@ -546,11 +573,12 @@
if(this.currentTable=='ValueTable0'){
entity.state = this.entity.state
this.componentData.entity = {...this.componentData.entity,...entity}
- this.$refs['ValueTable0'].selectList()
+ this.$refs['ValueTable0'].selectList(e)
}else{
this.componentData1.entity = {...this.componentData1.entity,...entity}
- this.$refs['ValueTable1'].selectList()
+ this.$refs['ValueTable1'].selectList(e)
}
+ this.collectWorkingHours()
},
refresh(){
this.entity = {}
@@ -610,8 +638,14 @@
this.addLoad = false
if (res.code == 201) return
this.$message.success('宸叉彁浜�')
- this.addVisible = false
- this.refreshTable()
+ this.formData.number = ''
+ this.formData.amount = ''
+ this.formData.remarks = ''
+ this.formData.approvedWorkingHour = ''
+ this.formData.nonproductiveTime = ''
+ this.formData.auxiliaryProject = ''
+ // this.addVisible = false
+ this.refreshTable('page')
this.collectWorkingHours()
})
}else{
@@ -625,8 +659,14 @@
this.addLoad = false
if (res.code == 201) return
this.$message.success('鎿嶄綔鎴愬姛')
- this.addVisible = false
- this.refreshTable()
+ this.formData.number = ''
+ this.formData.amount = ''
+ this.formData.remarks = ''
+ this.formData.approvedWorkingHour = ''
+ this.formData.nonproductiveTime = ''
+ this.formData.auxiliaryProject = ''
+ // this.addVisible = false
+ this.refreshTable('page')
this.collectWorkingHours()
})
}
@@ -640,6 +680,45 @@
this.title = '鎵瑰噯'
this.formData0 = row;
this.checkVisible = true
+ },
+ handleChangeTask (row) {
+ this.ValueTable0Selected = JSON.parse(JSON.stringify(row))
+ },
+ openBatchCheck (e) {
+ if (this.ValueTable0Selected.length > 0) {
+ const isChecked = this.ValueTable0Selected.every(item => item.state === '宸叉彁浜�')
+ const isApprove = this.ValueTable0Selected.every(item => item.state !== '宸叉壒鍑�')
+ console.log('this.isApprove---', isApprove)
+ this.batchCheckTitle = e === 0 ? '鎵归噺瀹℃牳' : '鎵归噺鎵瑰噯'
+ this.batchCheckDialogMessage = e === 0 ? '鏄惁鍏ㄩ儴閫氳繃瀹℃牳?' : '鏄惁鍏ㄩ儴閫氳繃鎵瑰噯?'
+ if (this.batchCheckTitle === '鎵归噺瀹℃牳') {
+ if (isChecked) {
+ this.batchCheckDialog = true
+ } else {
+ this.$message.error('璇烽�夋嫨鏈鏍告垨鏈壒鍑嗙殑鏁版嵁')
+ }
+ } else {
+ if (isApprove) {
+ this.batchCheckDialog = true
+ } else {
+ this.$message.error('璇烽�夋嫨鏈壒鍑嗙殑鏁版嵁')
+ }
+ }
+ } else {
+ this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�')
+ }
+ },
+ batchCheck () {
+ const e = this.batchCheckTitle === '鎵归噺瀹℃牳' ? 0 : 1
+ this.$refs.ValueTable0.batchCheck(e)
+ },
+ closeBatchCheckDialog () {
+ this.batchCheckDialog = false
+ },
+ submitBatchCheckDialog () {
+ this.batchCheckDialog = false
+ this.refreshTable('page')
+ this.collectWorkingHours()
},
submitCheck(e){
if(!this.formData0.number){
@@ -677,7 +756,7 @@
if (res.code == 201) return
this.$message.success('鎿嶄綔鎴愬姛')
this.checkVisible = false
- this.refreshTable()
+ this.refreshTable('page')
this.collectWorkingHours()
})
}else{
@@ -702,7 +781,7 @@
if (res.code == 201) return
this.$message.success('鎿嶄綔鎴愬姛')
this.checkVisible = false
- this.refreshTable()
+ this.refreshTable('page')
this.collectWorkingHours()
})
}
@@ -743,9 +822,28 @@
return String(d)
},
collectWorkingHours(){
- this.$axios.post(this.$api.auxiliaryOutputWorkingHours.collectWorkingHours).then(res => {
- this.totalInfo = res.data
- })
+ let entity = {}
+ if(this.entity.week1&&this.entity.week2){
+ entity.week = JSON.stringify([this.entity.week1,this.entity.week2])
+ }else{
+ entity.week = ''
+ }
+ if(this.entity.dateTime){
+ entity.dateTime = JSON.stringify(this.entity.dateTime)
+ }else{
+ entity.dateTime = ''
+ }
+ entity.weekDay = this.entity.weekDay
+ entity.name = this.entity.name
+ this.$axios.post(this.$api.auxiliaryOutputWorkingHours.collectWorkingHours,{
+ entity:entity
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.totalInfo = res.data
+ })
},
selectshiftByUser(){
this.$axios.post(this.$api.auxiliaryWorkingHoursDay.selectshiftByUser).then(res => {
@@ -822,4 +920,7 @@
height: calc(100% - 60px - 80px - 10px - 40px - 25px);
padding: 20px;
}
+>>>.el-dialog__wrapper {
+ z-index: 9999 !important; /* 鏍规嵁闇�瑕佽皟鏁村眰绾� */
+}
</style>
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 3b873af..cd0f643 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
@@ -56,11 +56,11 @@
</div>
<div class="table">
<ValueTable ref="ValueTable0"
- v-if="currentTable == 'value0'"
+ v-if="currentTable == 'value0'" :isColumnWidth="true"
:url="$api.auxiliaryOriginalHours.selectAuxiliaryOriginalHours"
:componentData="componentData" :key="upIndex" />
<ValueTable ref="ValueTable1"
- v-if="currentTable == 'value1'"
+ v-if="currentTable == 'value1'" :isColumnWidth="true"
:url="$api.auxiliaryCorrectionHours.selectAuxiliaryCorrectionHours"
:inputUrl="$api.auxiliaryCorrectionHours.upload"
:componentData="componentData0"
diff --git a/src/components/do/b6-device-management/b6-data-acquisition-config.vue b/src/components/do/b6-device-management/b6-data-acquisition-config.vue
index 80b9a92..0f5b5d3 100644
--- a/src/components/do/b6-device-management/b6-data-acquisition-config.vue
+++ b/src/components/do/b6-device-management/b6-data-acquisition-config.vue
@@ -203,11 +203,15 @@
// 鍒犻櫎鍏紡formItem
const index = this.domains.indexOf(item)
if (index !== -1 && this.domains.length > 1) {
- this.$axios.get(this.$api.deviceScope.deleteDataAcquisitionConfiguration + "?id=" + item.id).then(res => {
- if(res.code == 200) {
- this.domains.splice(index, 1)
- }
- })
+ if(item.id){
+ this.$axios.get(this.$api.deviceScope.deleteDataAcquisitionConfiguration + "?id=" + item.id).then(res => {
+ if(res.code == 200) {
+ this.domains.splice(index, 1)
+ }
+ })
+ } else {
+ this.domains.splice(index, 1)
+ }
} else {
this.$message.error('涓嶅厑璁稿垹闄ゆ渶鍚庝竴鏉℃暟鎹紒');
}
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 0f74844..cf0b8b7 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -115,12 +115,12 @@
:summary-method="getSummaries" :row-class-name="tableRowClassName" :row-key="record=>record.id"
:current-row-key="data.currentId" :highlight-current-row="data.highlight===undefined||data.highlight"
:span-method="spanMethod" :key="specialKey">
- <el-table-column type="selection" width="65" v-if="data.showSelect" :key="Math.random()">
+ <el-table-column type="selection" :width="selectionWidth" v-if="data.showSelect" :key="Math.random()">
</el-table-column>
- <el-table-column type="index" align="center" label="搴忓彿" width="65" v-if="data.isIndex" :key="Math.random()">
+ <el-table-column type="index" align="center" label="搴忓彿" :width="selectionWidth" v-if="data.isIndex" :key="Math.random()">
</el-table-column>
- <el-table-column :prop="a.label" :label="a.value" :sortable="data.sort==false?false:'custom'"
- v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip min-width="155" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))">
+ <el-table-column :prop="a.label" :label="a.value" :sortable="data.sort==false?false:'custom'" :isColumnWidth="isColumnWidth" :width="a.width"
+ v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip :min-width="columnMinWidth" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))">
<template slot-scope="scope">
<div v-if="showType(a.label, data.tagField) != null">
<template v-if="typeof(scope.row[a.label]) == 'object'">
@@ -335,6 +335,18 @@
} from 'jquery';
export default {
props: {
+ selectionWidth: {
+ type: String,
+ default: () => '65'
+ },
+ columnMinWidth: {
+ type: String,
+ default: () => '155'
+ },
+ isColumnWidth: {
+ type: Boolean,
+ default: () => false
+ },
tableRowClassName: {
type: Function
},
@@ -574,9 +586,14 @@
this.selectList('page')
},
selectList(val) {
+ console.log('val---', val)
+ console.log('this.page---', this.page)
this.loading = true
if(val===undefined){
this.page.current = 1;
+ }
+ if (val === 'lastPage') {
+ this.page.current = this.page.current - 1 // 渚嬪鍒犻櫎鏈〉鏈�鍚庝竴鏉℃暟鎹紝灏嗗綋鍓嶉〉闈㈠畾涓轰笂涓�椤碉紝闄ょ涓�椤靛
}
if (this.data.isPage != undefined && this.data.isPage != true) {
this.page = {
@@ -599,6 +616,26 @@
this.total = res.data.body.total
this.tableHead = res.data.head
this.tableData = res.data.body.records
+ if (this.tableData.length === 0 && this.page.current > 1) {
+ this.selectList('lastPage')
+ }
+ if (this.isColumnWidth) {
+ this.tableHead.forEach(item => {
+ if (item.value.length === 4) {
+ item.width = 120
+ } else if (item.value.length === 3){
+ item.width = 100
+ } else if (item.value.length === 5){
+ item.width = 130
+ } else if (item.value.length === 7){
+ item.width = 160
+ } else if (item.value.length === 6){
+ item.width = 150
+ } else {
+ item.width = 86
+ }
+ })
+ }
// console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData))
for (var a in this.data.selectField) {
if (this.data.selectField[a].choose == true) {
@@ -766,7 +803,7 @@
return
}
this.$message.success('鍒犻櫎鎴愬姛')
- this.selectList()
+ this.selectList('page')
this.$emit('delete')
}).catch(e => {
this.$message.error('鍒犻櫎澶辫触')
@@ -828,7 +865,7 @@
}
this.$message.success('淇敼鎴愬姛')
this.upDia = false
- this.selectList()
+ this.selectList('page')
this.$refs.eltable.doLayout();
this.upLoad = false
}).catch(e => {
@@ -920,7 +957,7 @@
}
this.$message.success('娣诲姞鎴愬姛')
this.addDia = false
- this.selectList()
+ this.selectList('page')
this.addLoad = false
}).catch(e => {
this.addDia = false
@@ -1106,6 +1143,31 @@
this.$message.error('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁')
}
},
+ // 鏃ュ伐鏃剁鐞嗚緟鍔╁伐鏃�--鎵归噺瀹℃牳鍜屾壒鍑�
+ batchCheck(e) {
+ if (this.multipleSelection && this.multipleSelection.length > 0) {
+ const list = JSON.parse(JSON.stringify(this.multipleSelection))
+ const url = e === 0 ? this.$api.auxiliaryWorkingHoursDay.check : this.$api.auxiliaryWorkingHoursDay.approve
+ const state = e === 0 ? '宸插鏍�' : '宸叉壒鍑�'
+ list.forEach(item => {
+ this.$axios.post(url, {id: item.id, state: state
+ },{
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }
+ ).then(res => {
+ if (res.code === 201) {
+ return
+ }
+ this.$parent.submitBatchCheckDialog()
+ this.$message.success('鎿嶄綔鎴愬姛')
+ })
+ })
+ } else {
+ this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�')
+ }
+ },
getRedColor(label,row){
if(this.data.cellSpecialStyle&&this.data.cellSpecialStyle.redColorByKey&&label.includes(this.data.cellSpecialStyle.redColorByKey)&&row[(label.replace(this.data.cellSpecialStyle.redColorByKey, ""))]){
return true
diff --git a/src/components/view/b1-expenses.vue b/src/components/view/b1-expenses.vue
index 786e791..79d87c5 100644
--- a/src/components/view/b1-expenses.vue
+++ b/src/components/view/b1-expenses.vue
@@ -65,10 +65,18 @@
</el-date-picker>
</div>
</div>
- <div class="search_thing">
+ <div class="search_thing" style="width: 340px">
<div class="search_label">濮旀墭鍗曚綅锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.company" @keyup.enter.native="refreshTable()"></el-input></div>
+ <div class="search_input">
+<!-- <el-input size="small" placeholder="璇疯緭鍏�" clearable-->
+<!-- @keyup.enter.native="refreshTable()"></el-input>-->
+ <el-select @focus="getCompanyOptions" @change="refreshTable()" clearable
+ size="small" v-model="componentData.entity.company" style="width: 100%">
+ <el-option v-for="item in companyOptions" :key="item.value"
+ :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
</div>
<div class="search_thing" style="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
@@ -78,7 +86,7 @@
</div>
<div class="table">
<ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" :key="upIndex"
- @handleWeave="handleWeave" />
+ @handleWeave="handleWeave" :column-min-width="'140'"/>
</div>
</div>
<el-dialog title="鍦ㄧ嚎缂栧埗" :visible.sync="claimVisible" width="70%" :modal-append-to-body="false">
@@ -187,7 +195,18 @@
claimVisible: false,
dates: [],
index2: 0,
- total: 0
+ total: 0,
+ companyOptions: [], // 濮旀墭鍗曚綅鏋氫妇鍊�
+ entity: {
+ orderBy: {
+ field: 'id',
+ order: 'asc'
+ }
+ },
+ page: {
+ current: -1,
+ size: -1,
+ },
}
},
mounted() {
@@ -226,6 +245,31 @@
this.index2++
this.componentData.entity.dates = `["${startDate}","${endDate}"]`
},
+ getCompanyOptions () {
+ this.$axios.post(this.$api.user.selectCustomPageList, {
+ page: this.page,
+ entity: this.entity
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }
+ ).then(res => {
+ if (res.code === 200) {
+ const list = res.data.body.records
+ this.companyOptions = []
+ list.map((item) => {
+ const obj = Object.assign({
+ value: item.id,
+ label: item.company,
+ })
+ this.companyOptions.push(obj)
+ })
+ }
+ }).catch(e => {
+ this.$message.error('鏌ヨ澶辫触')
+ })
+ },
refreshTable() {
this.$refs['ValueTable'].selectList()
this.getTotal()
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index ed93408..0ca77b4 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -388,15 +388,15 @@
this.loading = false;
this.$message.success("璁ら鎴愬姛")
this.claimVisible = false
- this.refreshTable()
+ this.refreshTable('page')
}
}).catch(error => {
console.error(error)
this.loading = false;
})
},
- refreshTable() {
- this.$refs.insOrderPlan.selectList()
+ refreshTable(e) {
+ this.$refs.insOrderPlan.selectList(e)
},
changeRowClass({
row,
@@ -491,7 +491,7 @@
},
goback() {
this.state = 0
- this.refreshTable()
+ this.refreshTable('page')
},
handleInspection(row){
this.state = 1;
@@ -511,7 +511,7 @@
if (res.code === 200) {
this.loading = false;
this.$message.success("鎿嶄綔鎴愬姛")
- this.refreshTable()
+ this.refreshTable('page')
}
this.connectVisible = false
}).catch(error => {
diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 4e6d293..e7ac309 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -156,7 +156,7 @@
<template>
<div class="inspection_order">
- <div style="width: 100%;height: 100%;" v-if="active == 0">
+ <div style="width: 100%;height: 100%;" v-show="active == 0">
<div>
<el-row class="title">
<el-col :span="12" style="padding-left: 20px;text-align: left;">妫�楠屼笅鍗�</el-col>
@@ -773,8 +773,8 @@
this.personList = data
})
},
- refreshTable() {
- this.$refs['ValueTable'].selectList()
+ refreshTable(e) {
+ this.$refs['ValueTable'].selectList(e)
},
refresh() {
this.componentData.entity = this.HaveJson(this.entityCopy)
@@ -901,7 +901,7 @@
this.$message.success('淇敼鎴愬姛')
this.upLoad = false
this.issuedDialogVisible = false
- this.refreshTable()
+ this.refreshTable('page')
}).catch(e => {
this.$message.error('淇敼澶辫触')
this.upLoad = false
@@ -914,7 +914,7 @@
if (res.code===200){
this.upLoad=false
this.quashDialogVisible=false
- this.refreshTable()
+ this.refreshTable('page')
this.$message.success("鏇存柊鎴愬姛")
}
})
@@ -923,7 +923,7 @@
if (res.code===200){
this.upLoad = false
this.quashDialogVisible = false
- this.refreshTable()
+ this.refreshTable('page')
this.$message.success("鏇存柊鎴愬姛")
}
})
@@ -938,6 +938,7 @@
// 涓嬪崟
playOrder(num) {
this.active = num
+ this.refreshTable('page')
},
handleTab(m, i) {
this.tabIndex = i;
diff --git a/src/components/view/b1-report-preparation.vue b/src/components/view/b1-report-preparation.vue
index ab65de2..ad04cde 100644
--- a/src/components/view/b1-report-preparation.vue
+++ b/src/components/view/b1-report-preparation.vue
@@ -332,8 +332,8 @@
// }
},
methods: {
- refreshTable() {
- this.$refs['ValueTable'].selectList()
+ refreshTable(e) {
+ this.$refs['ValueTable'].selectList(e)
},
refresh() {
this.componentData.entity = this.HaveJson(this.entityCopy)
@@ -438,13 +438,14 @@
document.body.appendChild(link);
link.click();
},
+ // 杩樺師鎿嶄綔
handleRestore(row) {
this.$axios.post(this.$api.insReport.upReportUrl, {
id: row.id
}).then(res => {
if (res.code === 200) {
this.$message.success('鎿嶄綔鎴愬姛')
- this.refreshTable()
+ this.refreshTable('page')
}
})
},
@@ -466,6 +467,7 @@
}
this.issuedVisible = true;
},
+ // 瀹℃牳閫氳繃
subIssued() {
this.loadingIssued = true;
this.$axios.post(this.$api.insReport.examineReport, {
@@ -477,7 +479,7 @@
return
}
this.$message.success('鎻愪氦鎴愬姛')
- this.refreshTable()
+ this.refreshTable('page')
this.currentInfo = null;
this.issuedVisible = false;
}).catch(e => {
@@ -503,6 +505,7 @@
}
this.approveVisible = true;
},
+ // 鎵瑰噯閫氳繃
subApprove() {
this.loadingApprove = true;
this.$axios.post(this.$api.insReport.ratifyReport, {
@@ -515,11 +518,12 @@
return
}
this.$message.success('宸叉壒鍑�')
- this.refreshTable()
+ this.refreshTable('page')
this.currentInfo = null;
this.approveVisible = false;
})
},
+ // 鎻愪氦鎿嶄綔
handleSubmit(row) {
this.$confirm('鏄惁鎻愪氦褰撳墠鎶ュ憡?', "鎻愪氦", {
confirmButtonText: "鎻愪氦",
@@ -533,12 +537,13 @@
return
}
this.$message.success('鎻愪氦鎴愬姛')
- this.refreshTable()
+ this.refreshTable('page')
}).catch(e => {
this.$message.error('鎻愪氦澶辫触')
})
}).catch(() => {})
},
+ // 瀹℃牳涓嶉�氳繃鍘熷洜鎻愪氦
handleIssuedReason() {
if (!this.reason) {
return this.$message.error('璇疯緭鍏ュ師鍥�')
@@ -554,7 +559,7 @@
return
}
this.$message.success('鎿嶄綔鎴愬姛')
- this.refreshTable()
+ this.refreshTable('page')
this.currentInfo = null;
this.reason = '';
this.issuedVisible = false;
@@ -564,6 +569,7 @@
this.loadingIssuedReason = false;
})
},
+ // 涓嶆壒鍑嗗師鍥犳彁浜�
handleApproveReason() {
if (!this.reason) {
return this.$message.error('璇疯緭鍏ュ師鍥�')
@@ -579,7 +585,7 @@
return
}
this.$message.success('鎿嶄綔鎴愬姛')
- this.refreshTable()
+ this.refreshTable('page')
this.currentInfo = null;
this.reason = '';
this.issuedVisible = false;
diff --git a/src/components/view/b2-standard-template.vue b/src/components/view/b2-standard-template.vue
index d873b1b..7b37cae 100644
--- a/src/components/view/b2-standard-template.vue
+++ b/src/components/view/b2-standard-template.vue
@@ -134,8 +134,8 @@
// window.excelExport = this.excelExport
},
methods: {
- refreshTable() {
- this.$refs['ValueTable'].selectList()
+ refreshTable(e) {
+ this.$refs['ValueTable'].selectList(e)
},
refresh() {
this.componentData.entity = this.HaveJson(this.entityCopy)
--
Gitblit v1.9.3