From ff76b3ed3494474e9301c49cf635f1553d49ecc5 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 17 六月 2023 14:58:03 +0800
Subject: [PATCH] 1.生产管理、报表管理引入分车间概念
---
src/views/reportManager/personSalaryList.vue | 129 +++++++++++++++++--------------------------
1 files changed, 51 insertions(+), 78 deletions(-)
diff --git a/src/views/reportManager/personSalaryList.vue b/src/views/reportManager/personSalaryList.vue
index 5ea0ea2..afc05ac 100644
--- a/src/views/reportManager/personSalaryList.vue
+++ b/src/views/reportManager/personSalaryList.vue
@@ -40,6 +40,16 @@
style="display: flex; "
>
<div class="elForm">
+ <el-form-item label="鐢熶骇杞﹂棿" style=" display: flex;">
+ <el-select v-model="form.wkshopcode" style="width: 200px" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in WorkShopArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
<el-form-item label="宸ュ崟缂栧彿" style="display: flex;">
<el-input v-model="form.wocode" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
@@ -49,9 +59,9 @@
<el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
<el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="瑙勬牸鍨嬪彿" style=" display: flex;">
- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
- </el-form-item>
+ <!-- <el-form-item label="瑙勬牸鍨嬪彿" style=" display: flex;">-->
+ <!-- <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />-->
+ <!-- </el-form-item>-->
<el-form-item v-show="isExpandForm" label="宸ュ簭鍚嶇О" style=" display: flex;">
<el-input v-model="form.stepname" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
@@ -189,6 +199,18 @@
show-tooltip-when-overflow
sortable="custom"
/>
+ <el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ width="110"
+ show-tooltip-when-overflow
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="group_name"
label="鐢熶骇鐝粍"
@@ -348,6 +370,18 @@
sortable="custom"
/>
<el-table-column
+ prop="wkshp_name"
+ label="鐢熶骇杞﹂棿"
+ width="110"
+ show-tooltip-when-overflow
+ sortable="custom"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.wkshp_name">{{ row.wkshp_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
prop="group_name"
label="鐢熶骇鐝粍"
width="110"
@@ -475,6 +509,7 @@
import elDragDialog from '@/directive/el-drag-dialog'
import waves from '@/directive/waves'
import { StepSelect } from '@/api/makeModel'
+import { WorkShopSelect } from '@/api/deviceManager'
export default {
name: 'Zzjg',
@@ -498,6 +533,7 @@
groupcode: '', // 鐢熶骇鐝粍
reportname: '', // 鎿嶄綔浜哄憳
reportdate: '', // 鎿嶄綔鏃堕棿
+ wkshopcode: this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '', // 鎵�灞炶溅闂�
rejectstepcode: [], // 鍓旈櫎宸ュ簭(鍥哄畾钖祫宸ュ簭涓嶅弬涓庤绠�
compute: 'last', // 璁′欢鏂瑰紡
prop: 'partcode', // 鎺掑簭瀛楁
@@ -505,6 +541,7 @@
page: 1, // 绗嚑椤�
rows: 20 // 姣忛〉澶氬皯鏉�
},
+ WorkShopArr: [],
groupArr: [],
total: 10,
tableData: [],
@@ -562,9 +599,15 @@
this.getPeopleSalaryReportSearch().then(res => {
if (res.code === '200') {
this.getMesOrderStepReportSelectUserGroup()
- this.getStepSelect()
+ this.getWorkShopSelect()
+ // this.getStepSelect()
}
})
+ },
+ // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
+ async getWorkShopSelect() {
+ const { data: res } = await WorkShopSelect()
+ this.WorkShopArr = res
},
// 鑾峰彇宸ュ簭涓嬫媺鎺ュ彛
async getStepSelect() {
@@ -624,6 +667,7 @@
stepname: this.form.stepname,
groupcode: this.form.groupcode,
compute: this.form.compute,
+ wkshopcode: this.form.wkshopcode,
reportname: this.form.reportname,
rejectstepcode: this.form.rejectstepcode.join(','),
reportdate: tempDate,
@@ -647,7 +691,7 @@
},
async getMesOrderStepReportSelectUserGroup() {
- const { data: res } = await MesOrderStepReportSelectUserGroup()
+ const { data: res } = await MesOrderStepReportSelectUserGroup({ wkshopcode: this.form.wkshopcode })
this.groupArr = res
},
tabClick(val) {
@@ -682,6 +726,7 @@
groupcode: this.form.groupcode,
compute: this.form.compute,
reportname: this.form.reportname,
+ wkshopcode: this.form.wkshopcode,
reportdate: tempDate
}
@@ -710,82 +755,10 @@
this.form.groupcode = ''
this.form.reportname = ''
this.form.reportdate = ''
+ this.form.wkshopcode = this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '' // 鎵�灞炶溅闂�
this.getPeopleSalaryReportSearch()
},
- // 鏂板鎸夐挳
- add(operation) {
- this.operation = operation
- this.dialogVisible = true
- },
- // 淇敼鎸夐挳
- async edit(operation, row) {
- this.operation = operation
- this.dialogVisible = true
-
- const res = await GroupSalaryReportSearchUser({ id: row.id })
- this.tagArr = res.data.map(r => r.reportname)
- // this.tagArr = ['妤兼潕淇�', '寮犱笁', '鏉庡洓']
- // this.$nextTick(() => {
- // this.dialogForm.OrgCode = row.org_code
- // this.dialogForm.OrgName = row.org_name
- // this.dialogForm.SupUnit = row.parent_id
- // })
- },
- // 鍒犻櫎鎸夐挳
- async del(row) {
- // this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
- // confirmButtonText: '纭畾',
- // cancelButtonText: '鍙栨秷',
- // type: 'warning'
- // }).then(() => {
- // DeleteOrganization({ orgid: row.code }).then(res => {
- // if (res.code === '200') {
- // this.$message.success('鍒犻櫎鎴愬姛!')
- // if (this.form.page > 1 && this.tableData.length === 1) {
- // this.form.page--
- // }
- // this.getPeopleSalaryReportSearch()
- // }
- // })
- // }).catch(() => {
- // this.$message.info('宸插彇娑堝垹闄�')
- // })
- },
- // 瀵硅瘽妗嗗叧闂簨浠�
- handleClose() {
- this.dialogForm.OrgType = ''
- this.dialogForm.OrgCode = ''
- this.dialogForm.OrgName = ''
- this.dialogForm.SupUnit = ''
- this.$refs.dialogForm.clearValidate()
- },
- // 瀵硅瘽妗嗗彇娑�
- dialogVisibleCancel() {
- this.dialogVisible = false
- },
- // 瀵硅瘽妗嗙‘璁�
- dialogVisibleConfirm() {
- this.$refs.dialogForm.validate(valid => {
- if (valid) {
- const data = {
- OrganCode: this.dialogForm.OrgCode,
- OrganName: this.dialogForm.OrgName,
- OperType: this.operation === 'add' ? 'Add' : 'Update',
- Operator: getCookie('admin')
- }
- // AddUpdateOrganization(data).then(res => {
- // if (res.code === '200') {
- // this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
- // this.dialogVisible = false
- // this.getPeopleSalaryReportSearch()
- // } else {
- // this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
- // }
- // })
- }
- })
- },
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
--
Gitblit v1.9.3