|
|
@@ -32,7 +32,7 @@
|
|
|
:row-style="{ height: '20px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:header-cell-style="{ padding: '0px' }" @row-click="ontable" @row-dblclick="doubleClick">
|
|
|
- <el-table-column type="selection" width="55" />
|
|
|
+ <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
<el-table-column align="left" label="员工编号" prop="员工编号" width="120"/>
|
|
|
<el-table-column align="left" label="员工姓名" prop="员工姓名" width="120"/>
|
|
|
<el-table-column align="left" label="职称职务" prop="职称职务" width="160"/>
|
|
|
@@ -82,7 +82,7 @@
|
|
|
</div>
|
|
|
<!-- 弹出框 -->
|
|
|
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '添加' : '修改'"
|
|
|
- destroy-on-close width="1200px">
|
|
|
+ destroy-on-close width="1200px" style="height: 700px;" >
|
|
|
<!-- <el-scrollbar height="500px"> -->
|
|
|
<el-form :model="formData" label-position="left" ref="elFormRef" :rules="rule">
|
|
|
|
|
|
@@ -91,10 +91,10 @@
|
|
|
<el-form-item label="关联人员工号" prop="name">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-input v-model="formData.员工编号" :clearable="true" placeholder="ZT01733" />
|
|
|
+ <el-input v-model="formData.关联人员工号" @keyup.enter.native="getygsubmit" :clearable="true" placeholder="ZT01733" />
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-input v-model="formData.员工姓名" :clearable="true" placeholder="ZT01733" />
|
|
|
+ <el-input v-model="formData.关联人员姓名" :clearable="true" placeholder="ZT01733" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
@@ -112,14 +112,14 @@
|
|
|
<el-form-item label="关联系数" prop="name">
|
|
|
<el-row :gutter="3">
|
|
|
<el-col :span="12">
|
|
|
- <el-input v-model="formData.关联系数" :clearable="true" placeholder="ZT01733" />
|
|
|
+ <el-input v-model="formData.日关联系数" :clearable="true" placeholder="ZT01733" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
<el-col :span="3">
|
|
|
- <el-button type="primary" @click="onrelevancy">刷新</el-button>
|
|
|
+ <el-button type="primary" @click="onflushed">刷新</el-button>
|
|
|
</el-col>
|
|
|
|
|
|
</el-col>
|
|
|
@@ -127,19 +127,68 @@
|
|
|
<el-form-item label="关联人数" prop="name">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
- <el-input v-model="formData.关联人数" :clearable="true" placeholder="ZT01733" />
|
|
|
+ <el-input v-model="formData.日关联人数" :clearable="true" placeholder="ZT01733" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
-
|
|
|
</el-form>
|
|
|
+
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ tooltip-effect="dark"
|
|
|
+ :data="relevancyselectData"
|
|
|
+ row-key="ID"
|
|
|
+ highlight-current-row="true"
|
|
|
+ border
|
|
|
+ style="width:100%"
|
|
|
+ height="400px"
|
|
|
+ @row-dblclick="relevancySelectClick"
|
|
|
+ :selectable="row => rowSelectable(row)"
|
|
|
+ @selection-change="relevancySelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" label=""></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="日期"
|
|
|
+ label="日期"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="班组员工编号"
|
|
|
+ label="班组员工编号"
|
|
|
+ width="400"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="组员权重"
|
|
|
+ label="组员权重"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="计件工资基数"
|
|
|
+ label="计件工资基数"
|
|
|
+ width="400"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="加班工资基数"
|
|
|
+ label="加班工资基数"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="UniqID"
|
|
|
+ label="UniqID"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+
|
|
|
<!-- </el-scrollbar> -->
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
- <el-button @click="closeDialog">取 消</el-button>
|
|
|
+ <el-button @click="batchadd">批量附加组员</el-button>
|
|
|
+ <el-button @click="batchdel">批量删除组员</el-button>
|
|
|
+ <el-button @click="uprelevancy">更新关联系数</el-button>
|
|
|
+ <el-button @click="oncopy">组员复制</el-button>
|
|
|
+ <el-button @click="closeDialog">取 消</el-button>
|
|
|
<el-button type="primary" @click="enterDialog">确 定</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -147,18 +196,226 @@
|
|
|
|
|
|
|
|
|
<el-dialog v-model="positioningVisibleshow" :before-close="closepositioningVisible" :title="type==='create'?'添加':'修改'" destroy-on-close>
|
|
|
- <el-card>
|
|
|
- <el-form-item label="员工编号" prop="name">
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="12">
|
|
|
- <el-input v-model="positionvalue" :clearable="true" placeholder="ZT01733" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form-item>
|
|
|
- </el-card>
|
|
|
- <el-button type="primary" @click="enterpositioning">确 定</el-button>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="员工编号" prop="name">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.员工编号" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.姓名" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="部门名称" prop="name">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.部门名称" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="职务" prop="name">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.职务" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="入职日期" prop="name">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.入职日期" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="关联权重" prop="name">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.关联权重" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-dialog>
|
|
|
|
|
|
+
|
|
|
+ <el-dialog v-model="batchaddshow" :before-close="closepositioningVisible" :title="type==='create'?'添加':'修改'" destroy-on-close>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="定位" prop="name">
|
|
|
+ <el-row :gutter="3">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="formData.定位" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button type="primary" @click="oninvestigate">查找</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ tooltip-effect="dark"
|
|
|
+ :data="batchaddselectData"
|
|
|
+ row-key="ID"
|
|
|
+ highlight-current-row="true"
|
|
|
+ border
|
|
|
+ style="width:100%"
|
|
|
+ height="400px"
|
|
|
+ @row-dblclick="batchaddSelectClick"
|
|
|
+ :selectable="row => rowSelectable(row)"
|
|
|
+ @selection-change="batchaddSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" label=""></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="日期"
|
|
|
+ label="日期"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="所在部门"
|
|
|
+ label="所在部门"
|
|
|
+ width="400"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="职称职务"
|
|
|
+ label="职称职务"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="班组员工编号"
|
|
|
+ label="班组员工编号"
|
|
|
+ width="400"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="班组"
|
|
|
+ label="班组"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="计件工资基数"
|
|
|
+ label="计件工资基数"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="加班工资基数"
|
|
|
+ label="加班工资基数"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="UniqID"
|
|
|
+ label="UniqID"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="batchup">提 交</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <el-dialog v-model="copyshow" :before-close="closepositioningVisible" :title="type==='create'?'添加':'修改'" destroy-on-close>
|
|
|
+
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="日期" prop="name">
|
|
|
+ <el-row :gutter="3">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-input v-model="formData.old_time" @keyup.enter.native="getcopylist" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="13">
|
|
|
+ <el-form-item label="复制成" prop="name">
|
|
|
+ <el-row :gutter="3">
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-input v-model="formData.new_time" :clearable="true" placeholder="ZT01733" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button type="primary" @click="oncopyup">执行</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ tooltip-effect="dark"
|
|
|
+ :data="copyselectData"
|
|
|
+ row-key="ID"
|
|
|
+ highlight-current-row="true"
|
|
|
+ border
|
|
|
+ style="width:100%"
|
|
|
+ height="400px"
|
|
|
+ @row-dblclick="copySelectClick"
|
|
|
+ :selectable="row => rowSelectable(row)"
|
|
|
+ @selection-change="copySelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" label=""></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="员工编号"
|
|
|
+ label="员工编号"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="员工姓名"
|
|
|
+ label="员工姓名"
|
|
|
+ width="400"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="所在部门"
|
|
|
+ label="所在部门"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="职称职务"
|
|
|
+ label="职称职务"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="UniqID"
|
|
|
+ label="UniqID"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
@@ -179,7 +436,16 @@ import {
|
|
|
relatedList,
|
|
|
relatedsearch,
|
|
|
relatedAllList,
|
|
|
- setting
|
|
|
+ setting,
|
|
|
+ getYg,
|
|
|
+ weightDetail,
|
|
|
+ updateNum,
|
|
|
+ batchAddLst,
|
|
|
+ copyLst,
|
|
|
+ batchAdd,
|
|
|
+ batchDel,
|
|
|
+ copy,
|
|
|
+ batchAddSearch
|
|
|
} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
@@ -188,6 +454,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { Search, Refresh, Download } from '@element-plus/icons-vue'
|
|
|
import { ref, reactive, onMounted, onBeforeMount } from 'vue'
|
|
|
import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
|
|
|
+import { Value } from 'sass'
|
|
|
|
|
|
defineOptions({
|
|
|
name: '06-packingDocuments'
|
|
|
@@ -223,11 +490,22 @@ getTabdata();
|
|
|
|
|
|
// 自动化生成的字典(可能为空)以及字段
|
|
|
const formData = ref({
|
|
|
- 员工编号: '',
|
|
|
- 员工姓名: '',
|
|
|
+ 关联人员工号: '',
|
|
|
+ 关联人员姓名: '',
|
|
|
+ 日关联系数: '',
|
|
|
+ 日关联人数: '',
|
|
|
日期: '',
|
|
|
- 关联系数: '',
|
|
|
- 关联人数: ''
|
|
|
+
|
|
|
+ 员工编号:'',
|
|
|
+ 姓名:'',
|
|
|
+ 部门名称:'',
|
|
|
+ 职务:'',
|
|
|
+ 入职日期:'',
|
|
|
+ 关联权重:'',
|
|
|
+ 定位:'',
|
|
|
+
|
|
|
+ old_time:'',
|
|
|
+ new_time:'',
|
|
|
})
|
|
|
|
|
|
// 验证规则
|
|
|
@@ -357,11 +635,207 @@ const handleNodeClick = (node, check) => {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+const relevancyselectData=ref([]);
|
|
|
// 关联工资设置
|
|
|
function onrelevancy() {
|
|
|
console.log(formData)
|
|
|
-dialogFormVisible.value=true
|
|
|
+ console.log(code)
|
|
|
+ console.log(time)
|
|
|
+ Setting(time.value,code.value)
|
|
|
+
|
|
|
+}
|
|
|
+//获取关联工资信息
|
|
|
+const Setting = async (date,code) => {
|
|
|
+
|
|
|
+ const res = await setting({date:date,code:code})
|
|
|
+ console.log(res)
|
|
|
+ if (res.code === 0) {
|
|
|
+ relevancyselectData.value=res.data
|
|
|
+ formData.value.日期=res.data[0].日期
|
|
|
+ formData.value.关联人员工号=res.data[0].关联人员工号
|
|
|
+ formData.value.关联人员姓名=res.data[0].关联人员姓名
|
|
|
+ formData.value.日关联人数=res.data[0].日关联人数
|
|
|
+ formData.value.日关联系数=res.data[0].日关联系数
|
|
|
+ dialogFormVisible.value=true
|
|
|
+ }
|
|
|
+}
|
|
|
+//员工编号回车事件
|
|
|
+const getygsubmit = (event) => {
|
|
|
+ GetYg()
|
|
|
+}
|
|
|
+//获取员工信息
|
|
|
+const GetYg = async () => {
|
|
|
+ const response = await getYg({sczl_bh:formData.value.关联人员工号});
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ console.log(response.data.ygxm)
|
|
|
+ formData.value.关联人员姓名=response.data.ygxm
|
|
|
+ }
|
|
|
+}
|
|
|
+function onflushed() {
|
|
|
+ Setting(formData.value.日期,formData.value.关联人员工号)
|
|
|
+}
|
|
|
+
|
|
|
+const relevancySelection=ref([])
|
|
|
+//列表勾选
|
|
|
+const relevancySelectionChange = (val) => {
|
|
|
+ relevancySelection.value = val.map(item => {
|
|
|
+ return {
|
|
|
+ UniqID: item.UniqID,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log(relevancySelection.value)
|
|
|
+}
|
|
|
+const copyselectData=ref([])
|
|
|
+// 组员复制
|
|
|
+const oncopy = () => {
|
|
|
+ copyshow.value=true
|
|
|
+}
|
|
|
+
|
|
|
+//时间回车事件
|
|
|
+const getcopylist = (event, inputName) => {
|
|
|
+ CopyLst()
|
|
|
+}
|
|
|
+//获取复制信息
|
|
|
+const CopyLst = async () => {
|
|
|
+ const response = await copyLst({date:formData.value.old_time});
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ copyselectData.value=response.data
|
|
|
+ }
|
|
|
+}
|
|
|
+const copySelection=ref([])
|
|
|
+//列表勾选
|
|
|
+const copySelectionChange = (val) => {
|
|
|
+ copySelection.value = val.map(item => {
|
|
|
+ return {
|
|
|
+ old_time:formData.value.old_time,
|
|
|
+ new_time:formData.value.new_time,
|
|
|
+ 关联员工: item.员工编号
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log(copySelection.value)
|
|
|
+}
|
|
|
+const oncopyup = () => {
|
|
|
+
|
|
|
+ Copy()
|
|
|
+}
|
|
|
+//提交数组
|
|
|
+const Copy= async () => {
|
|
|
+ const response = await copy(copySelection.value);
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ copyshow.value=false
|
|
|
+ // batchaddselectData.value=response.data
|
|
|
+ // batchaddshow.value=true
|
|
|
+ }
|
|
|
+}
|
|
|
+// 更新关联系数
|
|
|
+const uprelevancy = () => {
|
|
|
+ UpdateNum()
|
|
|
+}
|
|
|
+//更新关联系数
|
|
|
+const UpdateNum = async () => {
|
|
|
+ const response = await updateNum({date:formData.value.日期,code:formData.value.关联人员工号,num:formData.value.日关联系数});
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ // Setting(formData.value.日期,formData.value.关联人员工号)
|
|
|
+ tableData[rowIndex.value].关联系数=formData.value.日关联系数
|
|
|
+ console.log(); // Accessing the value of rowIndex
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+// 批量删除
|
|
|
+const batchdel = () => {
|
|
|
+ BatchDel()
|
|
|
+}
|
|
|
+//删除提交
|
|
|
+const BatchDel = async () => {
|
|
|
+ const response = await batchDel(relevancySelection.value);
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ Setting(formData.value.日期,formData.value.关联人员工号)
|
|
|
+ }
|
|
|
+}
|
|
|
+//关联表格双击事件
|
|
|
+const relevancySelectClick = (row, column, event) => {
|
|
|
+ console.log(row.日期)
|
|
|
+ console.log(row.班组员工编号)
|
|
|
+ WeightDetail(row.日期,row.班组员工编号)
|
|
|
+}
|
|
|
+//获取关联员工信息
|
|
|
+const WeightDetail = async (date,code) => {
|
|
|
+ const response = await weightDetail({date:date,code:code.split("(")[0]});
|
|
|
+ console.log(response.data[0].员工编号)
|
|
|
+ if (response.code === 0) {
|
|
|
+ formData.value.员工编号=response.data[0].员工编号
|
|
|
+ formData.value.姓名=response.data[0].姓名
|
|
|
+ formData.value.部门名称=response.data[0].部门名称
|
|
|
+ formData.value.职务=response.data[0].职务
|
|
|
+ formData.value.入职日期=response.data[0].入职日期
|
|
|
+ formData.value.关联权重=response.data[0].关联权重
|
|
|
+ console.log(formData)
|
|
|
+ positioningVisibleshow.value=true
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 批量添加
|
|
|
+const batchadd = () => {
|
|
|
+ BatchAddLst()
|
|
|
+
|
|
|
+}
|
|
|
+const batchaddselectData=ref([])
|
|
|
+
|
|
|
+
|
|
|
+//批量附加组员列表
|
|
|
+const BatchAddLst = async () => {
|
|
|
+ const response = await batchAddLst({date:formData.value.日期,code:formData.value.关联人员工号});
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ batchaddselectData.value=response.data
|
|
|
+ batchaddshow.value=true
|
|
|
+ }
|
|
|
+}
|
|
|
+// 查找
|
|
|
+const oninvestigate = () => {
|
|
|
+ BatchAddSearch()
|
|
|
+}
|
|
|
+//查找
|
|
|
+const BatchAddSearch= async () => {
|
|
|
+ const response = await batchAddSearch({date:formData.value.日期,search:formData.value.定位});
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ batchaddselectData.value=response.data
|
|
|
+ // batchaddshow.value=true
|
|
|
+ }
|
|
|
+}
|
|
|
+const batchaddSelection=ref([])
|
|
|
+//列表勾选
|
|
|
+const batchaddSelectionChange = (val) => {
|
|
|
+ batchaddSelection.value = val.map(item => {
|
|
|
+ return {
|
|
|
+ UniqID: item.UniqID,
|
|
|
+ 关联员工: item.班组员工编号.split("(")[0]
|
|
|
+ };
|
|
|
+ });
|
|
|
+ console.log(batchaddSelection.value)
|
|
|
+}
|
|
|
+//提交
|
|
|
+const batchup = () => {
|
|
|
+
|
|
|
+ BatchAdd()
|
|
|
+}
|
|
|
+//提交数组
|
|
|
+const BatchAdd= async () => {
|
|
|
+ const response = await batchAdd(batchaddSelection.value);
|
|
|
+ console.log(response)
|
|
|
+ if (response.code === 0) {
|
|
|
+ Setting(formData.value.日期,formData.value.关联人员工号)
|
|
|
+ batchaddshow.value=false
|
|
|
+ // batchaddselectData.value=response.data
|
|
|
+ // batchaddshow.value=true
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 搜索
|
|
|
@@ -419,7 +893,7 @@ const handleSelectionChange = (val,row) => {
|
|
|
multipleSelection.value = val
|
|
|
const lenth=val.length
|
|
|
code=val[lenth-1].员工编号
|
|
|
- time=val[lenth-1].日期.replace(/\./g, "-")
|
|
|
+ time=val[lenth-1].日期
|
|
|
formData.value.员工编号=val[lenth-1].员工编号,
|
|
|
formData.value.员工姓名= val[lenth-1].员工姓名,
|
|
|
formData.value.日期=val[lenth-1].日期,
|
|
|
@@ -477,6 +951,11 @@ const updateCompanyFunc = async (row) => {
|
|
|
// 弹窗控制标记
|
|
|
const dialogFormVisible = ref(false)
|
|
|
const positioningVisibleshow = ref(false)
|
|
|
+const weightDetailVisible = ref(false)
|
|
|
+const batchaddshow = ref(false)
|
|
|
+const copyshow = ref(false)
|
|
|
+
|
|
|
+
|
|
|
// 打开弹窗
|
|
|
const openDialog = () => {
|
|
|
type.value = 'create'
|
|
|
@@ -519,14 +998,19 @@ const enterDialog = async () => {
|
|
|
})
|
|
|
}
|
|
|
// 单击表格操作
|
|
|
+const rowIndex=ref()
|
|
|
function ontable(row, column, event) {
|
|
|
- console.log(params.date)
|
|
|
- let parts = params.date.split('-')
|
|
|
-
|
|
|
- console.log(row.员工编号)
|
|
|
- RelatedAllList(params.date,row.员工编号)
|
|
|
-
|
|
|
- console.log(formData);
|
|
|
+ // console.log(params.date)
|
|
|
+ // let parts = params.date.split('-')
|
|
|
+ // console.log(row.员工编号)
|
|
|
+ // RelatedAllList(params.date,row.员工编号)
|
|
|
+ // console.log(formData);
|
|
|
+ console.log(row)
|
|
|
+ code.value=row.员工编号
|
|
|
+ time.value=row.日期
|
|
|
+ console.log(code.value+time.value)
|
|
|
+ rowIndex.value = tableData.indexOf(row);
|
|
|
+ console.log('单击的行数:', rowIndex.value);
|
|
|
}
|
|
|
let temporary = {
|
|
|
员工编号: '',
|
|
|
@@ -545,10 +1029,11 @@ const RelatedAllList = async (date,bh) => {
|
|
|
}
|
|
|
// 双击表格操作
|
|
|
function doubleClick(row, column, event) {
|
|
|
- console.log(row, column, event);
|
|
|
- // updateCompanyFunc(row);
|
|
|
- type.value = 'update';
|
|
|
- dialogFormVisible.value = true
|
|
|
+ // console.log(row, column, event);
|
|
|
+ // // updateCompanyFunc(row);
|
|
|
+ // type.value = 'update';
|
|
|
+ // dialogFormVisible.value = true
|
|
|
+ Setting(time.value,code.value)
|
|
|
}
|
|
|
|
|
|
// 导出excel
|