作者 雷海东

月工时信息、工资基本信息更改

... ... @@ -9,6 +9,14 @@ export function listSalary(parameter) {
})
}
export function listSalary2(parameter) {
return axios({
url: '/salary/base/listSalary2',
method: 'get',
data: parameter
})
}
export function queryDesignByOrderId(orderId) {
return axios({
url: '/product_design/tblProductDesign/queryByOrderId/'+orderId,
... ...
... ... @@ -104,6 +104,14 @@ export function queryBynumber(url,parameter){
params:parameter
})
}
//根据月份、姓名查看工序
export function queryGxOne(url,parameter){
return axios({
url:url,
method:'get',
params:parameter
})
}
//生产计划验收
export function yanshouList(url,parameter){
return axios({
... ...
... ... @@ -313,6 +313,15 @@ export const JeecgListMixin = {
this.$refs.modalForm.title = "生产订单>详情";
this.$refs.modalForm.disableSubmit = true;
},
// 根据月份和姓名查看工序
querygxone: function (record) {
console.log("月份:",record.salaryMonth)
console.log("姓名:",record.name)
this.$refs.modalForm.edit(record);
this.$refs.modalForm.queryGxOne(record.salaryMonth,record.name);
this.$refs.modalForm.title = "工序查看";
this.$refs.modalForm.disableSubmit = true;
},
/* 导出 */
handleExportXls2() {
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
... ...
... ... @@ -60,7 +60,7 @@ export default {
data() {
return {
options: [{
value: '7',
value: 7,
label: '7天内订单',
}, {
value: '15',
... ... @@ -94,7 +94,7 @@ export default {
{
title: '编号',
align: 'center',
dataIndex: 'id',
dataIndex: 'partNumber',
},
{
title: '品名',
... ... @@ -132,7 +132,7 @@ export default {
{
title: '编号',
align: 'center',
dataIndex: 'id',
dataIndex: 'partNumber',
},
{
title: '品名',
... ...
... ... @@ -45,10 +45,10 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('订单表')">导出</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('订单表')">导出</a-button> -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload> -->
</a-upload>
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
</div>
... ...
... ... @@ -188,35 +188,7 @@ export default {
{
title: '岗位',
align: 'center',
dataIndex: 'jobTitle',
customRender: function (text) {
if (text === 'OfficeAdministrative') {
return '办公室行政人员'
} else if (text === 'WorkshopDirector') {
return '车间管理员'
} else if (text === 'WorkshopTechnicalManager') {
return '车间技术总管'
} else if (text === 'WorkshopTechnician') {
return '车间技术员'
} else if (text === 'WorkshopAuxiliaryPersonnel') {
return '车间辅助人员'
} else if (text === 'PurchasingOfficer') {
return '采购员'
} else if (text === 'ProcurementSupervisor') {
return '采购主管'
} else if (text === 'Assembler') {
return '装配工'
} else if (text === 'AssemblySupervisor') {
return '装配主管'
} else if (text === 'OtherWorker') {
return '其他'
} else if (text === 'WorkshopGeneralWorker') {
return '普工'
} else {
return text
}
},
dataIndex: 'jobName',
},
{
title: '学历',
... ...
... ... @@ -53,9 +53,11 @@
></j-super-query>
<a-button type="primary" @click="selectup(salaryMonth)" icon="search">计算</a-button>
<a-button type="primary" @click="downloadFile2('工资导入.xlsx')" download="工资导入.xlsx">导入模板下载</a-button>
<!-- <a href="https://feite-1300636907.cos.ap-chongqing.myqcloud.com/工资导入.xlsx" download="工资导入.xlsx"
<!--
<a href="https://feite-1300636907.cos.ap-chongqing.myqcloud.com/工资导入.xlsx" download="工资导入.xlsx"
>下载工资导入文件</a
> -->
>
-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
... ... @@ -153,6 +155,16 @@ export default {
},
},
{
title: '月份',
align: 'center',
dataIndex: 'salaryMonth',
fixed: 'left',
width: 100,
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '工号',
align: 'center',
dataIndex: 'jobId',
... ...
... ... @@ -175,7 +175,7 @@ export default {
socialCompany: [{ required: true, message: '请输入社保公司!' }],
socialPerson: [{ required: true, message: '请输入社保个人!' }],
workingPrice: [{ required: true, message: '请输入工时单价!' }],
xueli: [{ required: true, message: '请输入学历!' }],
//xueli: [{ required: true, message: '请输入学历!' }],
// ruTime: [{ required: true, message: '请输入入职日期!' }],
mealAllowancePrice: [{ required: true, message: '请输入餐费津贴标准!' }],
housePrice: [{ required: true, message: '请输入住房津贴标准!' }],
... ... @@ -257,6 +257,29 @@ export default {
httpurl += this.url.edit
method = 'put'
}
if (this.model.jobTitle === 'OfficeAdministrative') {
this.model.jobName= '办公室行政人员'
} else if (this.model.jobTitle === 'WorkshopDirector') {
this.model.jobName= '车间管理员'
} else if (this.model.jobTitle === 'WorkshopTechnicalManager') {
this.model.jobName= '车间技术总管'
} else if (this.model.jobTitle === 'WorkshopTechnician') {
this.model.jobName= '车间技术员'
} else if (this.model.jobTitle === 'WorkshopAuxiliaryPersonnel') {
this.model.jobName= '车间辅助人员'
} else if (this.model.jobTitle === 'PurchasingOfficer') {
this.model.jobName= '采购员'
} else if (this.model.jobTitle === 'ProcurementSupervisor') {
this.model.jobName= '采购主管'
} else if (this.model.jobTitle === 'Assembler') {
this.model.jobName= '装配工'
} else if (this.model.jobTitle === 'AssemblySupervisor') {
this.model.jobName= '装配主管'
} else if (this.model.jobTitle === 'OtherWorker') {
this.model.jobName= '其他'
} else if (this.model.jobTitle === 'WorkshopGeneralWorker') {
this.model.jobName= '普工'
}
httpAction(httpurl, this.model, method)
.then((res) => {
if (res.success) {
... ...
... ... @@ -61,7 +61,7 @@ import { validateDuplicateValue } from '@/utils/util'
import Axios from 'axios'
import { addPg, gongxuList, queryBynumber, querygx } from '../../../api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { listSalary } from '@/api/TblSalaryBase'
import { listSalary2 } from '@/api/TblSalaryBase'
import { mapGetters } from 'vuex'
export default {
name: 'TblProductionAddpgForm',
... ... @@ -152,7 +152,7 @@ export default {
methods: {
loadUser() {
var that = this
listSalary().then((res) => {
listSalary2().then((res) => {
if (res.success) {
// that.treeData = [];
that.options = res.result
... ... @@ -223,8 +223,11 @@ export default {
console.log('res:', this.res)
// 使用 reduce 方法累加工时字段值
const zong = this.res.reduce((acc, current) => {
if (current.undertaker !== null && current.undertaker !== undefined && current.undertaker !== '') {
console.log('current.workhours:', current.workHours)
return acc + parseFloat(current.workHours)
}
return acc
}, 0)
console.log(this.panduan.dispatchedWorkingHours)
if (this.panduan.dispatchedWorkingHours === '' || this.panduan.dispatchedWorkingHours === null) {
... ...
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="姓名">
<j-input placeholder="请输入姓名" v-model="queryParam.name"></j-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工资月份">
<a-month-picker
v-model="queryParam.salaryMonth"
placeholder="请选择工资月份"
format="YYYY-MM"
@change="handleMonthChange"
/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
<a-button type="primary" icon="download" @click="handleExportXls('tbl_work_time')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload> -->
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown> -->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="querygxone(record)">查看本月工作</a>
<a-divider type="vertical" />
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown> -->
</span>
</a-table>
</div>
<tbl-work-time-modal ref="modalForm" @ok="modalFormOk"></tbl-work-time-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblWorkTimeModal from './modules/TblWorkTimeModal'
export default {
name: 'TblWorkTimeList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblWorkTimeModal
},
data () {
return {
description: 'tbl_work_time管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'月份',
align:"center",
dataIndex: 'salaryMonth',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'月总工时',
align:"center",
dataIndex: 'workTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/work_time/tblWorkTime/list",
delete: "/work_time/tblWorkTime/delete",
deleteBatch: "/work_time/tblWorkTime/deleteBatch",
exportXlsUrl: "/work_time/tblWorkTime/exportXls",
importExcelUrl: "work_time/tblWorkTime/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
handleMonthChange(value) {
this.queryParam.salaryMonth = value ? value.format('YYYY-MM') : null
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'salaryMonth',text:'月份'})
fieldList.push({type:'string',value:'name',text:'姓名'})
fieldList.push({type:'string',value:'workTime',text:'月总工时'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
... ...
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-table ref="table" size="middle" bordered rowKey="id" class="j-table-force-nowrap" :scroll="{ x: true }"
:columns="columns" :dataSource="res" :pagination="false">
</a-table>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { queryGxOne } from '../../../api/manage'
export default {
name: 'TblWorkTimeForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
res:[],
model:{
},
columns: [
{
title: '工序',
align: 'center',
dataIndex: 'workingProcedure',
},
{
title: '承接人',
align: 'center',
dataIndex: 'undertaker',
},
{
title: '工时',
align: 'center',
dataIndex: 'workHours',
},
{
title: '派发时间',
align: 'center',
dataIndex: 'dispatchTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '派发人',
align: 'center',
dataIndex: 'dispatchRen',
},
{
title: '验收时间',
align: 'center',
dataIndex: 'yanTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '验收人',
align: 'center',
dataIndex: 'yanRen',
},
{
title: '验收结果',
align: 'center',
dataIndex: 'yanResult',
},
{
title: '备注',
align: 'center',
dataIndex: 'notes',
},
],
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/work_time/tblWorkTime/add",
edit: "/work_time/tblWorkTime/edit",
queryById: "/work_time/tblWorkTime/queryById",
querygxone:"/production/tblProductionPlan/querygxone"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
queryGxOne(salaryMonth,name){
queryGxOne(this.url.querygxone,this.model).then((res) =>{
this.res=res.result
})
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>
\ No newline at end of file
... ...
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tbl-work-time-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-work-time-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import TblWorkTimeForm from './TblWorkTimeForm'
export default {
name: 'TblWorkTimeModal',
components: {
TblWorkTimeForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
\ No newline at end of file
... ...
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tbl-work-time-form ref="realForm" @ok="submitCallback"></tbl-work-time-form>
</j-modal>
</template>
<script>
import TblWorkTimeForm from './TblWorkTimeForm'
export default {
name: 'TblWorkTimeModal',
components: {
TblWorkTimeForm
},
data () {
return {
title:'',
width:1200,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
queryGxOne (salaryMonth,name) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.queryGxOne(salaryMonth,name);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
... ...