作者 雷海东

不能预览此文件类型
... ... @@ -86,6 +86,8 @@ const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params
// 重复校验
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
// 工资基本信息手机号重复校验
// const duplicateCheck2 = (params)=>getAction("/salary/base/listphone",params);
// 加载分类字典
const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
... ... @@ -144,6 +146,7 @@ export {
getVisitInfo,
queryUserByDepId,
duplicateCheck,
// duplicateCheck2,
queryTreeListForRole,
getSystemMenuList,
getSystemSubmenu,
... ...
... ... @@ -245,7 +245,7 @@ export const JeecgListMixin = {
// },
selectup:function(salaryMonth){
this.$refs.tanForm.selectUp(salaryMonth)
this.$refs.tanForm.title = "新增基本信息";
this.$refs.tanForm.title = "工资计算";
this.$refs.tanForm.disableSubmit = false;
},
handleEdit: function (record) {
... ...
<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.productName"></j-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="购买日期">
<j-date v-model="queryParam.buyTime" placeholder="请选择购买日期" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="到货日期">
<j-date v-model="queryParam.deliveryTime" placeholder="请选择到货日期" />
</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_bidding_htcg')">导出</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="handleEdit(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-bidding-htcg-modal ref="modalForm" @ok="modalFormOk"></tbl-bidding-htcg-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblBiddingHtcgModal from './modules/TblBiddingHtcgModal'
export default {
name: 'TblBiddingHtcgList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblBiddingHtcgModal
},
data () {
return {
description: 'tbl_bidding_htcg管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
},
},
{
title: '品名',
align: 'center',
dataIndex: 'productName',
},
{
title: '规格',
align: 'center',
dataIndex: 'specifications',
},
{
title: '厂商',
align: 'center',
dataIndex: 'chang',
},
{
title: '购买日期',
align: 'center',
dataIndex: 'buyTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '单位',
align: 'center',
dataIndex: 'danwei',
},
{
title: '单价',
align: 'center',
dataIndex: 'danPrice',
},
{
title: '数量',
align: 'center',
dataIndex: 'num',
},
{
title: '总价',
align: 'center',
dataIndex: 'zongPrice',
},
{
title: '用途',
align: 'center',
dataIndex: 'purpose',
},
{
title: '品牌',
align: 'center',
dataIndex: 'brand',
},
{
title: '物料类别',
align: 'center',
dataIndex: 'wuType',
},
{
title: '到货日期',
align: 'center',
dataIndex: 'deliveryTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '发票类别',
align: 'center',
dataIndex: 'fpType',
},
{
title: '发票到否',
align: 'center',
dataIndex: 'fpIsyn',
},
{
title: '发票收到信息',
align: 'center',
dataIndex: 'fpTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '备注',
align: 'center',
dataIndex: 'notes',
},
{
title: '物品图片',
align: 'center',
dataIndex: 'picture',
scopedSlots: { customRender: 'imgSlot' },
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' },
},
],
url: {
list: "/bidding_info/tblBiddingHtcg/list",
delete: "/bidding_info/tblBiddingHtcg/delete",
deleteBatch: "/bidding_info/tblBiddingHtcg/deleteBatch",
exportXlsUrl: "/bidding_info/tblBiddingHtcg/exportXls",
importExcelUrl: "bidding_info/tblBiddingHtcg/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productName',text:'品名'})
fieldList.push({type:'string',value:'specifications',text:'规格'})
fieldList.push({type:'int',value:'num',text:'数量'})
fieldList.push({type:'string',value:'danwei',text:'单位'})
fieldList.push({type:'string',value:'wuType',text:'物料类别'})
fieldList.push({type:'number',value:'danPrice',text:'单价'})
fieldList.push({type:'number',value:'zongPrice',text:'总价'})
fieldList.push({type:'string',value:'purpose',text:'用途'})
fieldList.push({type:'string',value:'chang',text:'厂商'})
fieldList.push({type:'date',value:'buyTime',text:'购买日期'})
fieldList.push({type:'date',value:'deliveryTime',text:'到货日期'})
fieldList.push({type:'string',value:'brand',text:'品牌'})
fieldList.push({type:'string',value:'notes',text:'备注'})
fieldList.push({type:'string',value:'fpType',text:'发票类别'})
fieldList.push({type:'string',value:'fpIsyn',text:'发票到否'})
fieldList.push({type:'date',value:'fpTime',text:'发票收到日期'})
fieldList.push({type:'string',value:'picture',text:'物品图片'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
... ...
... ... @@ -34,14 +34,25 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shiji')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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>
<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-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>
... ... @@ -49,41 +60,44 @@
<!-- 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>项
<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}"
:scroll="{ x: true }"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
class="j-table-force-nowrap"
@change="handleTableChange">
@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 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)">
<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>
... ... @@ -106,7 +120,6 @@
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
... ... @@ -115,184 +128,182 @@
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblBiddingShijiModal from './modules/TblBiddingShijiModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblBiddingShijiModal from './modules/TblBiddingShijiModal'
export default {
name: 'TblBiddingShijiList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblBiddingShijiModal
},
data () {
return {
description: 'tbl_bidding_shiji管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'品名',
align:"center",
dataIndex: 'productName'
},
{
title:'规格',
align:"center",
dataIndex: 'specifications'
},
{
title:'数量',
align:"center",
dataIndex: 'num'
},
{
title:'单位',
align:"center",
dataIndex: 'danwei'
},
{
title:'物料类别',
align:"center",
dataIndex: 'wuType'
},
{
title:'单价',
align:"center",
dataIndex: 'danPrice'
export default {
name: 'TblBiddingShijiList',
mixins: [JeecgListMixin, mixinDevice],
components: {
TblBiddingShijiModal,
},
data() {
return {
description: 'tbl_bidding_shiji管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
},
{
title:'总价',
align:"center",
dataIndex: 'zongPrice'
},
{
title:'用途',
align:"center",
dataIndex: 'purpose'
},
{
title:'厂商',
align:"center",
dataIndex: 'chang'
},
{
title:'购买日期',
align:"center",
dataIndex: 'buyTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'到货日期',
align:"center",
dataIndex: 'deliveryTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'品牌',
align:"center",
dataIndex: 'brand'
},
{
title:'备注',
align:"center",
dataIndex: 'notes'
},
{
title:'发票类别',
align:"center",
dataIndex: 'fpType'
},
{
title:'发票到否',
align:"center",
dataIndex: 'fpIsyn'
},
{
title: '品名',
align: 'center',
dataIndex: 'productName',
},
{
title: '规格',
align: 'center',
dataIndex: 'specifications',
},
{
title: '厂商',
align: 'center',
dataIndex: 'chang',
},
{
title: '购买日期',
align: 'center',
dataIndex: 'buyTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
{
title:'发票收到信息',
align:"center",
dataIndex: 'fpTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '单位',
align: 'center',
dataIndex: 'danwei',
},
{
title: '单价',
align: 'center',
dataIndex: 'danPrice',
},
{
title: '数量',
align: 'center',
dataIndex: 'num',
},
{
title: '总价',
align: 'center',
dataIndex: 'zongPrice',
},
{
title: '用途',
align: 'center',
dataIndex: 'purpose',
},
{
title: '品牌',
align: 'center',
dataIndex: 'brand',
},
{
title: '物料类别',
align: 'center',
dataIndex: 'wuType',
},
{
title: '到货日期',
align: 'center',
dataIndex: 'deliveryTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
{
title:'物品图片',
align:"center",
dataIndex: 'picture',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '发票类别',
align: 'center',
dataIndex: 'fpType',
},
{
title: '发票到否',
align: 'center',
dataIndex: 'fpIsyn',
},
{
title: '发票收到信息',
align: 'center',
dataIndex: 'fpTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/bidding_info/tblBiddingShiji/list",
delete: "/bidding_info/tblBiddingShiji/delete",
deleteBatch: "/bidding_info/tblBiddingShiji/deleteBatch",
exportXlsUrl: "/bidding_info/tblBiddingShiji/exportXls",
importExcelUrl: "bidding_info/tblBiddingShiji/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
{
title: '备注',
align: 'center',
dataIndex: 'notes',
},
{
title: '物品图片',
align: 'center',
dataIndex: 'picture',
scopedSlots: { customRender: 'imgSlot' },
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' },
},
],
url: {
list: '/bidding_info/tblBiddingShiji/list',
delete: '/bidding_info/tblBiddingShiji/delete',
deleteBatch: '/bidding_info/tblBiddingShiji/deleteBatch',
exportXlsUrl: '/bidding_info/tblBiddingShiji/exportXls',
importExcelUrl: 'bidding_info/tblBiddingShiji/importExcel',
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productName',text:'品名'})
fieldList.push({type:'string',value:'specifications',text:'规格'})
fieldList.push({type:'int',value:'num',text:'数量'})
fieldList.push({type:'string',value:'danwei',text:'单位'})
fieldList.push({type:'string',value:'wuType',text:'物料类别'})
fieldList.push({type:'number',value:'danPrice',text:'单价'})
fieldList.push({type:'number',value:'zongPrice',text:'总价'})
fieldList.push({type:'string',value:'purpose',text:'用途'})
fieldList.push({type:'string',value:'chang',text:'厂商'})
fieldList.push({type:'date',value:'buyTime',text:'购买日期'})
fieldList.push({type:'date',value:'deliveryTime',text:'到货日期'})
fieldList.push({type:'string',value:'brand',text:'品牌'})
fieldList.push({type:'string',value:'notes',text:'备注'})
fieldList.push({type:'string',value:'fpType',text:'发票类别'})
fieldList.push({type:'string',value:'fpIsyn',text:'发票到否'})
fieldList.push({type:'date',value:'fpTime',text:'发票收到信息'})
fieldList.push({type:'string',value:'picture',text:'物品图片'})
this.superFieldList = fieldList
}
dictOptions: {},
superFieldList: [],
}
}
},
created() {
this.getSuperFieldList()
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
},
},
methods: {
initDictConfig() {},
getSuperFieldList() {
let fieldList = []
fieldList.push({ type: 'string', value: 'productName', text: '品名' })
fieldList.push({ type: 'string', value: 'specifications', text: '规格' })
fieldList.push({ type: 'int', value: 'num', text: '数量' })
fieldList.push({ type: 'string', value: 'danwei', text: '单位' })
fieldList.push({ type: 'string', value: 'wuType', text: '物料类别' })
fieldList.push({ type: 'number', value: 'danPrice', text: '单价' })
fieldList.push({ type: 'number', value: 'zongPrice', text: '总价' })
fieldList.push({ type: 'string', value: 'purpose', text: '用途' })
fieldList.push({ type: 'string', value: 'chang', text: '厂商' })
fieldList.push({ type: 'date', value: 'buyTime', text: '购买日期' })
fieldList.push({ type: 'date', value: 'deliveryTime', text: '到货日期' })
fieldList.push({ type: 'string', value: 'brand', text: '品牌' })
fieldList.push({ type: 'string', value: 'notes', text: '备注' })
fieldList.push({ type: 'string', value: 'fpType', text: '发票类别' })
fieldList.push({ type: 'string', value: 'fpIsyn', text: '发票到否' })
fieldList.push({ type: 'date', value: 'fpTime', text: '发票收到信息' })
fieldList.push({ type: 'string', value: 'picture', text: '物品图片' })
this.superFieldList = fieldList
},
},
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@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-row>
<a-col :span="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
<a-input v-model="model.productName" placeholder="请输入品名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
<a-input v-model="model.danwei" placeholder="请输入单位"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
<a-input v-model="model.wuType" placeholder="请输入物料类别"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danPrice">
<a-input-number v-model="model.danPrice" placeholder="请输入单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zongPrice">
<a-input-number v-model="model.zongPrice" placeholder="请输入总价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose">
<a-input v-model="model.purpose" placeholder="请输入用途"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="厂商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chang">
<a-input v-model="model.chang" placeholder="请输入厂商"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="购买日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buyTime">
<j-date placeholder="请选择购买日期" v-model="model.buyTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="到货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date placeholder="请选择到货日期" v-model="model.deliveryTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input v-model="model.brand" placeholder="请输入品牌"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="发票类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fpType">
<a-input v-model="model.fpType" placeholder="请输入发票类别"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="发票到否" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fpIsyn">
<a-input v-model="model.fpIsyn" placeholder="请输入发票到否"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="发票收到日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fpTime">
<j-date placeholder="请选择发票收到日期" v-model="model.fpTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物料图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture">
<j-image-upload isMultiple v-model="model.picture"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblBiddingHtcgForm',
components: {},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false,
},
},
data() {
return {
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
productName: [{ required: true, message: '请输入品名!' }],
specifications: [{ required: true, message: '请输入规格!' }],
num: [{ required: true, message: '请输入数量!' }],
wuType: [{ required: true, message: '请输入物料类别!' }],
danwei: [{ required: true, message: '请输入单位!' }],
danPrice: [{ required: true, message: '请输入单价!' }],
zongPrice: [{ required: true, message: '请输入总价!' }],
purpose: [{ required: true, message: '请输入用途!' }],
chang: [{ required: true, message: '请输入厂商!' }],
buyTime: [{ required: true, message: '请输入购买日期!' }],
deliveryTime: [{ required: true, message: '请输入到货日期!' }],
fpTime: [{ required: true, message: '请输入发票收到日期!' }],
brand: [{ required: true, message: '请输入品牌!' }],
fpIsyn: [{ required: true, message: '请输入到否!' }],
fpType: [{ required: true, message: '请输入类别!' }],
notes: [{ required: true, message: '请输入备注!' }],
},
url: {
add: '/bidding_info/tblBiddingHtcg/add',
edit: '/bidding_info/tblBiddingHtcg/edit',
queryById: '/bidding_info/tblBiddingHtcg/queryById',
},
}
},
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
},
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-bidding-htcg-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-bidding-htcg-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 TblBiddingHtcgForm from './TblBiddingHtcgForm'
export default {
name: 'TblBiddingHtcgModal',
components: {
TblBiddingHtcgForm
},
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-bidding-htcg-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-bidding-htcg-form>
</j-modal>
</template>
<script>
import TblBiddingHtcgForm from './TblBiddingHtcgForm'
export default {
name: 'TblBiddingHtcgModal',
components: {
TblBiddingHtcgForm
},
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;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
... ...
... ... @@ -5,74 +5,85 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
<a-input v-model="model.productName" placeholder="请输入品名"></a-input>
<a-input v-model="model.productName" placeholder="请输入品名" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
<a-input v-model="model.specifications" placeholder="请输入规格" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入数量" style="width: 100%" />
<a-input-number
v-model="model.num"
placeholder="请输入数量"
style="width: 100%"
:disabled="isBianhaoDisabled"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
<a-input v-model="model.danwei" placeholder="请输入单位"></a-input>
<a-input v-model="model.danwei" placeholder="请输入单位" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
<a-input v-model="model.wuType" placeholder="请输入物料类别"></a-input>
<a-input v-model="model.wuType" placeholder="请输入物料类别" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder">
<a-input v-model="model.workOrder" placeholder="请输入工作令"></a-input>
<a-input v-model="model.workOrder" placeholder="请输入工作令" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose">
<a-input v-model="model.purpose" placeholder="请输入用途"></a-input>
<a-input v-model="model.purpose" placeholder="请输入用途" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="当前库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ku">
<a-input v-model="model.ku" placeholder="请输入当前库存"></a-input>
<a-input v-model="model.ku" placeholder="请输入当前库存" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="申请日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sqTime">
<j-date v-model="model.sqTime" placeholder="请输入申请日期" />
<j-date v-model="model.sqTime" placeholder="请输入申请日期" :disabled="isBianhaoDisabled" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="使用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<j-date v-model="model.deliveryTime" placeholder="请输入使用日期" />
<j-date v-model="model.deliveryTime" placeholder="请输入使用日期" :disabled="isBianhaoDisabled" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
<a-input v-model="model.brand" placeholder="请输入品牌"></a-input>
<a-input v-model="model.brand" placeholder="请输入品牌" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注"></a-input>
<a-input v-model="model.notes" placeholder="请输入备注" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="申请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant">
<a-input v-model="model.applicant" placeholder="请输入申请人"></a-input>
<a-input v-model="model.applicant" placeholder="请输入申请人" :disabled="isBianhaoDisabled"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<!-- <a-form-model-item label="一级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne">
</a-form-model-item> -->
<a-form-model-item label="一级审批" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne">
<a-form-model-item
label="一级审批"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="spOne"
v-if="userInfo().username === 'admin'"
>
<a-radio-group v-model="model.spOne" @change="handleSpChange('spOne')">
<a-radio value="同意">同意</a-radio>
<a-radio value="不同意">不同意</a-radio>
... ... @@ -80,7 +91,13 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="二级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spTwo">
<a-form-model-item
label="二级审批人"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="spTwo"
v-if="userInfo().username === 'admin'"
>
<a-radio-group v-model="model.spTwo" @change="handleSpChange('spTwo')">
<a-radio value="同意">同意</a-radio>
<a-radio value="不同意">不同意</a-radio>
... ... @@ -93,7 +110,10 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="noNotes"
v-if="model.spOne === '不同意' || model.spTwo === '不同意'"
v-if="
(model.spOne === '不同意' && userInfo().username === 'admin') ||
(model.spTwo === '不同意' && userInfo().username === 'admin')
"
>
<a-input v-model="model.noNotes" placeholder="请输入不同意备注"></a-input>
</a-form-model-item>
... ... @@ -107,9 +127,10 @@
<script >
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { mapGetters } from 'vuex'
export default {
name: 'TblBiddingShenqForm',
components: {},
props: {
//表单禁用
... ... @@ -121,6 +142,7 @@ export default {
},
data() {
return {
isBianhaoDisabled: false,
model: {},
labelCol: {
xs: { span: 24 },
... ... @@ -163,6 +185,7 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
methods: {
...mapGetters(['nickname', 'avatar', 'userInfo']),
handleSpChange(type) {
if (type === 'spOne' && this.model.spOne === '同意') {
this.model.noNotes = ''
... ... @@ -172,10 +195,16 @@ export default {
},
add() {
this.edit(this.modelDefault)
this.isBianhaoDisabled = false
},
edit(record) {
this.model = Object.assign({}, record)
this.visible = true
if (this.userInfo().username === 'admin') {
this.isBianhaoDisabled = true
} else {
this.isBianhaoDisabled = false
}
},
submitForm() {
const that = this
... ... @@ -203,6 +232,8 @@ export default {
})
.finally(() => {
that.confirmLoading = false
console.log(this.nickname())
console.log(this.userInfo().username)
})
}
})
... ...
... ... @@ -130,6 +130,7 @@ export default {
danwei: [{ required: true, message: '请输入单位!' }],
danPrice: [{ required: true, message: '请输入单价!' }],
zongPrice: [{ required: true, message: '请输入总价!' }],
wuType: [{ required: true, message: '请输入物料类别!' }],
purpose: [{ required: true, message: '请输入用途!' }],
chang: [{ required: true, message: '请输入厂商!' }],
buyTime: [{ required: true, message: '请输入购买日期!' }],
... ...
... ... @@ -59,8 +59,8 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="入库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
<j-date placeholder="请选择入库时间" v-model="model.operTime" style="width: 100%" />
<a-form-model-item label="出库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
<j-date placeholder="请选择出库时间" v-model="model.operTime" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
... ...
... ... @@ -10,6 +10,31 @@
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="岗位" >
<a-select ref="select" v-model="queryParam.jobTitle" placeholder="请输入岗位" style="width: 285px">
<a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option>
<a-select-option value="WorkshopDirector">车间管理员</a-select-option>
<a-select-option value="WorkshopGeneralWorker">普工</a-select-option>
<a-select-option value="WorkshopTechnicalManager">车间技术总管</a-select-option>
<a-select-option value="WorkshopTechnician">车间技术员</a-select-option>
<a-select-option value="WorkshopAuxiliaryPersonnel">车间辅助人员</a-select-option>
<a-select-option value="PurchasingOfficer">采购员</a-select-option>
<a-select-option value="ProcurementSupervisor">采购主管</a-select-option>
<a-select-option value="Assembler">装配工</a-select-option>
<a-select-option value="AssemblySupervisor">装配主管</a-select-option>
<a-select-option value="OtherWorker">其他</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="是否在职" >
<a-select ref="select" v-model="queryParam.notes" placeholder="请选择是否在职" style="width: 285px">
<a-select-option value="在职">在职</a-select-option>
<a-select-option value="离职">离职</a-select-option>
</a-select>
</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>
... ... @@ -47,7 +72,7 @@
<a-table
ref="table"
size="middle"
:scroll="{ x: 1200 }"
:scroll="{ x: true }"
bordered
rowKey="id"
:columns="columns"
... ... @@ -112,36 +137,87 @@ export default {
},
},
{
title: '姓名',
title: '岗位',
align: 'center',
dataIndex: 'userName',
key: 'userName',
dataIndex: 'jobTitle',
fixed: 'left',
width: 100,
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
}
},
},
{
title: '工号',
align: 'center',
dataIndex: 'jobId',
fixed: 'left',
width: 100,
},
{
title: '姓名',
align: 'center',
dataIndex: 'userName',
},
{
title: '入职日期',
align: 'center',
dataIndex: 'ruTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '身份证号',
align: 'center',
dataIndex: 'idCard',
},
{
title: '基本工资',
title: '银行卡号',
align: 'center',
dataIndex: 'basicSalary',
dataIndex: 'bankCard',
},
{
title: '工时单价',
title: '手机号',
align: 'center',
dataIndex: 'workingPrice',
dataIndex: 'phone',
},
{
title: '餐费单价',
title: '学历',
align: 'center',
dataIndex: 'mealAllowancePrice',
dataIndex: 'xueli',
},
{
title: '基本工资',
align: 'center',
dataIndex: 'basicSalary',
},
{
title: '社保公司',
align: 'center',
dataIndex: 'socialCompany',
... ... @@ -152,12 +228,55 @@ export default {
dataIndex: 'socialPerson',
},
{
title: '比例',
title: '社保起始日期',
align: 'center',
dataIndex: 'socialTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '餐费津贴标准',
align: 'center',
dataIndex: 'mealAllowancePrice',
},
{
title: '住房津贴标准',
align: 'center',
dataIndex: 'housePrice',
},
{
title: '管理津贴',
align: 'center',
dataIndex: 'guanliPrice',
},
{
title: '工时标准',
align: 'center',
dataIndex: 'workingPrice',
},
{
title: '全勤奖',
align: 'center',
dataIndex: 'proportion',
width:100
dataIndex: 'fullAttendanceAward',
},
{
title: '劳动合同周期',
align: 'center',
dataIndex: 'contractTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '是否在职',
align: 'center',
dataIndex: 'notes',
fixed: 'right',
width: 140,
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
... ... @@ -168,9 +287,8 @@ export default {
],
url: {
list: '/salary/base/list',
delete:'/salary/base/del',
deleteBatch:'/salary/base/deleteBatch',
delete: '/salary/base/del',
deleteBatch: '/salary/base/deleteBatch',
},
}
},
... ...
... ... @@ -11,7 +11,12 @@
</a-col>
<a-col :span="12">
<a-form-item label="工资月份">
<j-date v-model="queryParam.salaryMonth" placeholder="请选择工资月份" />
<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">
... ... @@ -67,7 +72,7 @@
<a-table
ref="table"
size="middle"
:scroll="{ x: 2050 }"
:scroll="{ x: true }"
bordered
rowKey="id"
:columns="columns"
... ... @@ -79,15 +84,15 @@
@change="handleTableChange"
>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<!-- <a @click="handleEdit(record)">编辑</a> -->
<a-divider type="vertical" />
<!-- <a-divider type="vertical" /> -->
<a-dropdown>
<a class="ant-dropdown-link">更多<a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<!-- <a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
</a-menu-item> -->
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
... ... @@ -102,7 +107,6 @@
<tbl-salary-calculation-modal ref="modalForm" @ok="modalFormOk"></tbl-salary-calculation-modal>
<tbl-salary-calculation-modal-tan ref="tanForm" @ok="modalFormOk"></tbl-salary-calculation-modal-tan>
</a-card>
</template>
... ... @@ -120,34 +124,30 @@ export default {
components: {
TblSalaryCalculationModal,
TblSalaryCalculationBase,
TblSalaryCalculationModalTan
TblSalaryCalculationModalTan,
},
data() {
return {
modalFormUserOk: false,
// day: '',
salaryMonth:'',
salaryMonth: '',
description: 'tbl_salary_calculation管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
dataIndex: 'xuhao',
fixed: 'left',
key: 'rowIndex',
key: 'xuhao',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
},
},
{
title:'月份',
align:"center",
dataIndex: 'salaryMonth',
key:'salarymonth',
{
title: '工号',
align: 'center',
dataIndex: 'jobId',
fixed: 'left',
width: 100,
},
... ... @@ -156,46 +156,37 @@ export default {
align: 'center',
dataIndex: 'userName',
key: 'userName',
},
{
title: '基本工资',
title: '身份证号',
align: 'center',
dataIndex: 'basicSalary',
dataIndex: 'idCard',
},
{
title: '天数',
title: '银行卡号',
align: 'center',
dataIndex: 'day',
key: 'day',
slots: { title: 'day' },
// scopedSlots: { customRender: 'day' }
dataIndex: 'bankCard',
},
{
title: '绩效工资',
title: '手机号',
align: 'center',
dataIndex: 'meritPay',
},
{
title: '总工资',
align: 'center',
dataIndex: 'totalWages',
dataIndex: 'phone',
},
{
title: '餐费补助',
title: '基本工资',
align: 'center',
dataIndex: 'mealAllowance',
dataIndex: 'basicSalary',
},
{
title: '全勤奖',
title: '绩效工资',
align: 'center',
dataIndex: 'fullAttendanceAward',
dataIndex: 'meritPay',
},
{
title: '社保公司',
title: '应发工资',
align: 'center',
dataIndex: 'socialCompany',
dataIndex: 'salariesPayable',
},
{
title: '社保个人',
... ... @@ -203,25 +194,11 @@ export default {
dataIndex: 'socialPerson',
},
{
title: '减项',
align: 'center',
dataIndex: 'deduction',
},
{
title: '补项',
align: 'center',
dataIndex: 'supplementary',
},
{
title: '应发工资',
align: 'center',
dataIndex: 'salariesPayable',
},
{
title: '个税',
align: 'center',
dataIndex: 'personalTax',
},
{
title: '实发工资',
align: 'center',
... ... @@ -248,7 +225,6 @@ export default {
deleteBatch: '/salary/calculation/deleteBatch',
exportXlsUrl: '/salary/calculation/exportXls',
importExcelUrl: '/salary/calculation/importExcel',
},
dictOptions: {},
superFieldList: [],
... ... @@ -269,13 +245,15 @@ export default {
// this.$refs.modalFormUser.disableSubmit = false;
// },
handleMonthChange(value) {
this.queryParam.salaryMonth = value ? value.format('YYYY-MM') : null
},
initDictConfig() {},
getSuperFieldList() {
let fieldList = []
fieldList.push({ type: 'string', value: 'salarymonth', text: '月份' })
fieldList.push({ type: 'string', value: 'userName', text: '姓名'})
fieldList.push({ type: 'string', value: 'userName', text: '姓名' })
// fieldList.push({ type: 'string', value: 'idcard', text: '身份证号' })
fieldList.push({ type: 'string', value: 'basicsalary', text: '基本工资' })
fieldList.push({ type: 'string', value: 'day', text: '天数' })
... ...
<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="岗位" >
<a-select ref="select" v-model="queryParam.jobId" placeholder="请输入岗位" style="width: 285px">
<a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option>
<a-select-option value="WorkshopDirector">车间管理员</a-select-option>
<a-select-option value="WorkshopGeneralWorker">普工</a-select-option>
<a-select-option value="WorkshopTechnicalManager">车间技术总管</a-select-option>
<a-select-option value="WorkshopTechnician">车间技术员</a-select-option>
<a-select-option value="WorkshopAuxiliaryPersonnel">车间辅助人员</a-select-option>
<a-select-option value="PurchasingOfficer">采购员</a-select-option>
<a-select-option value="ProcurementSupervisor">采购主管</a-select-option>
<a-select-option value="Assembler">装配工</a-select-option>
<a-select-option value="AssemblySupervisor">装配主管</a-select-option>
<a-select-option value="OtherWorker">其他</a-select-option>
</a-select>
</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_salary_suanfa')">导出</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="handleEdit(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-salary-suanfa-modal ref="modalForm" @ok="modalFormOk"></tbl-salary-suanfa-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TblSalarySuanfaModal from './suanmodules/TblSalarySuanfaModal'
export default {
name: 'TblSalarySuanfaList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TblSalarySuanfaModal
},
data () {
return {
description: 'tbl_salary_suanfa管理页面',
// 表头
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'岗位',
align:"center",
dataIndex: 'jobTitle'
},
{
title:'岗位编号',
align:"center",
dataIndex: 'jobId'
},
{
title:'基本工资',
align:"center",
dataIndex: 'basicSalary'
},
{
title:'总工资算法',
align:"center",
dataIndex: 'zongPrice'
},
{
title:'计算比例',
align:"center",
dataIndex: 'bili'
},
{
title:'备注',
align:"center",
dataIndex: 'notes'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/salary/tblSalarySuanfa/list",
delete: "/salary/tblSalarySuanfa/delete",
deleteBatch: "/salary/tblSalarySuanfa/deleteBatch",
exportXlsUrl: "/salary/tblSalarySuanfa/exportXls",
importExcelUrl: "salary/tblSalarySuanfa/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'jobTitle',text:'岗位'})
fieldList.push({type:'string',value:'jobId',text:'岗位编号'})
fieldList.push({type:'number',value:'basicSalary',text:'基本工资'})
fieldList.push({type:'string',value:'zongPrice',text:'总工资算法'})
fieldList.push({type:'number',value:'bili',text:'计算比例'})
fieldList.push({type:'string',value:'notes',text:'备注'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
... ...
... ... @@ -3,73 +3,119 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-col :span="24">
<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobId">
<a-input v-model="model.jobId" placeholder="请输入工号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
<a-input v-model="model.userName" placeholder="请输入姓名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-model-item label="岗位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobTitle">
<a-select ref="select" v-model="model.jobTitle" placeholder="请输入岗位" style="width: 285px">
<a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option>
<a-select-option value="WorkshopDirector">车间管理员</a-select-option>
<a-select-option value="WorkshopGeneralWorker">普工</a-select-option>
<a-select-option value="WorkshopTechnicalManager">车间技术总管</a-select-option>
<a-select-option value="WorkshopTechnician">车间技术员</a-select-option>
<a-select-option value="WorkshopAuxiliaryPersonnel">车间辅助人员</a-select-option>
<a-select-option value="PurchasingOfficer">采购员</a-select-option>
<a-select-option value="ProcurementSupervisor">采购主管</a-select-option>
<a-select-option value="Assembler">装配工</a-select-option>
<a-select-option value="AssemblySupervisor">装配主管</a-select-option>
<a-select-option value="OtherWorker">其他</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工时标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workingPrice">
<a-input-number v-model="model.workingPrice" placeholder="请输入工时标准" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="idCard">
<a-input v-model="model.idCard" placeholder="请输入身份证号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-model-item label="银行卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankCard">
<a-input v-model="model.bankCard" placeholder="请输入银行卡号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="工作职位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobTitle">
<a-select
ref="select"
v-model="model.jobTitle"
placeholder="请输入工作职位"
style="width: 285px"
>
<a-select-option value="officeAdministrative">办公室行政人员</a-select-option>
<a-select-option value="workshopDirector">车间主任</a-select-option>
<a-select-option value="workshopGeneralWorker">车间普工</a-select-option>
<a-select-option value="otherWorker">其他</a-select-option>
</a-select>
<a-col :span="24">
<a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入手机号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="工时单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workingPrice">
<a-input v-model="model.workingPrice" placeholder="请输入工时单价"></a-input>
<a-col :span="24">
<a-form-model-item label="学历" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xueli">
<a-input v-model="model.xueli" placeholder="请输入学历"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-model-item label="入职日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruTime">
<j-date placeholder="请选择入职日期" v-model="model.ruTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="基本工资" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicSalary">
<a-input
v-model="model.basicSalary"
placeholder="请输入基本工资"
></a-input>
<a-input-number v-model="model.basicSalary" placeholder="请输入基本工资" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="餐费单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mealAllowancePrice">
<a-input
v-model="model.mealAllowancePrice"
placeholder="请输入餐费单价"
></a-input>
<a-col :span="24">
<a-form-model-item
label="餐费津贴标准"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="mealAllowancePrice"
>
<a-input-number v-model="model.mealAllowancePrice" placeholder="请输入餐费津贴标准" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-model-item label="住房津贴标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="housePrice">
<a-input-number v-model="model.housePrice" placeholder="请输入住房津贴标准" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="社保公司" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialCompany">
<a-input v-model="model.socialCompany" placeholder="请输入社保公司" ></a-input>
<a-input-number v-model="model.socialCompany" placeholder="请输入社保公司" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-col :span="24">
<a-form-model-item label="社保个人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialPerson">
<a-input v-model="model.socialPerson" placeholder="请输入社保个人" ></a-input>
<a-input-number v-model="model.socialPerson" placeholder="请输入社保个人" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="管理津贴" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guanliPrice">
<a-input-number v-model="model.guanliPrice" placeholder="请输入管理津贴" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="比例" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="proportion">
<a-input v-model="model.proportion" placeholder="请输入比例" ></a-input>
<a-col :span="24">
<a-form-model-item label="社保起始日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialTime">
<j-date placeholder="请选择社保起始日期" v-model="model.socialTime" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否在职" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-select ref="select" v-model="model.notes" placeholder="请选择是否在职" style="width: 285px">
<a-select-option value="在职">在职</a-select-option>
<a-select-option value="离职">离职</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="全勤奖" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fullAttendanceAward">
<a-input-number v-model="model.fullAttendanceAward" placeholder="请输入全勤奖" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="劳动合同周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contractTime">
<j-date placeholder="请选择劳动合同周期" v-model="model.contractTime" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
... ... @@ -81,6 +127,7 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { message } from 'ant-design-vue'
import { duplicateCheck2 } from '@/api/api'
export default {
name: 'TblSalaryBaseForm',
props: {
... ... @@ -93,6 +140,7 @@ export default {
},
data() {
return {
currentPhone: '',
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
... ... @@ -108,29 +156,39 @@ export default {
workingPrice: 0, //工时单价
jobTitle: undefined, // 工作职位
totalWages: 0, // 总工资
mealAllowancePrice: 0, // 餐费单价
basicSalary: 0, // 基本工资
socialCompany: 0, // 社保公司
socialPerson: 0, // 社保个人
proportion:1 //比例
mealAllowancePrice: 25, // 餐费单价
basicSalary: 2000, // 基本工资
socialCompany: 990.2, // 社保公司
socialPerson: 397.89, // 社保个人
fullAttendanceAward: 200, // 全勤奖
},
confirmLoading: false,
validatorRules: {
jobId: [{ required: true, message: '请输入工号!' }],
jobTitle: [{ required: true, message: '请选择岗位!' }],
userName: [{ required: true, message: '请输入姓名!' }],
idCard: [{ required: true, message: '请输入身份证号!' }],
bankCard: [{ required: true, message: '请输入银行卡号!' }],
idCard: [{ required: true, message: '请输入身份证号!' } ,
{ pattern: /^([1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X))|([1|5|7][0-9]{6}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0|1|2])([0-9])|3[0|1])[0-9]{3}[0-9Xx])|((1|5|7)[0-9]{6}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0|1|2])([0-9])|3[0|1])[0-9]{3})$/, message: '请输入正确格式的身份证号!' }],
bankCard: [{ required: true, message: '请输入银行卡号!' },{pattern:/^\d{16,19}$/ , message:"请输入正确的银行卡号"}],
basicSalary: [{ required: true, message: '请输入基本工资!' }],
jobTitle: [{ required: true, message: '请输入工作职位!' }],
mealAllowancePrice: [{ required: true, message: '请输入餐费单价!' }],
phone: [{ required: true, message: '请输入手机号!' }, { validator: this.validatePhone }],
socialCompany: [{ required: true, message: '请输入社保公司!' }],
socialPerson: [{ required: true, message: '请输入社保个人!' }],
workingPrice: [{ required: true, message: '请输入工时单价!' }],
// proportion: [{ required: true, message: '请输入比例!' }],
xueli: [{ required: true, message: '请输入学历!' }],
ruTime: [{ required: true, message: '请输入入职日期!' }],
mealAllowancePrice: [{ required: true, message: '请输入餐费津贴标准!' }],
housePrice: [{ required: true, message: '请输入住房津贴标准!' }],
guanliPrice: [{ required: true, message: '请输入管理津贴!' }],
socialTime: [{ required: true, message: '请输入社保起始日期!' }],
notes: [{ required: true, message: '请选择是否在职!' }],
contractTime: [{ required: true, message: '请输入劳动合同周期!' }],
fullAttendanceAward: [{ required: true, message: '请输入全勤奖!' }],
},
url: {
add: '/salary/base/add',
edit:'/salary/base/update',
queryById: "/salary/base/queryById"
edit: '/salary/base/update',
queryById: '/salary/base/queryById',
},
}
},
... ... @@ -145,12 +203,42 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
methods: {
validatePhone(rule, value, callback) {
console.log(this.currentPhone)
if (!value) {
callback()
} else {
if (new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)) {
const param = { phone: this.model.phone }
// 使用 Promise 或者 async/await 来等待异步请求完成
getAction('/salary/base/listphone', param)
.then((res) => {
console.log(value)
if (value === this.currentPhone) {
callback()
}else if (res.result && res.result.length <= 0) {
callback()
} else {
callback('手机号已存在!')
}
})
.catch((error) => {
console.error('Error:', error)
callback('网络请求失败,请稍后重试!')
})
} else {
callback('请输入正确格式的手机号码!')
}
}
},
add() {
this.edit(this.modelDefault)
},
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
this.model = Object.assign({}, record)
this.currentPhone = this.model.phone
this.visible = true
},
submitForm() {
const that = this
... ...
... ... @@ -143,13 +143,11 @@ export default {
meritPay: 0, // 绩效工资
totalWages: 0, // 总工资
mealAllowance: 0, // 餐费补助
basicSalary: 0, // 基本工资
basicSalary: 2000, // 基本工资
salariesPayable: 0,
deduction: 0, // 减项
supplementary: 0, // 补项
socialCompany: 0, // 社保公司
socialPerson: 0, // 社保个人
fullAttendanceAward: 0, // 全勤奖
socialCompany: 990.2, // 社保公司
socialPerson: 397.89, // 社保个人
fullAttendanceAward: 200, // 全勤奖
personalTax: 0,// 个税
netSalary:0,// 实发工资
},
... ...
... ... @@ -5,7 +5,12 @@
<a-row>
<a-col :span="12">
<a-form-model-item label="工资月份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salaryMonth">
<j-date v-model="model.salaryMonth" placeholder="请选择工资月份" />
<a-month-picker
v-model="model.salaryMonth"
placeholder="请选择工资月份"
format="YYYY-MM"
@change="handleMonthChange"
/>
</a-form-model-item>
</a-col>
</a-row>
... ... @@ -56,6 +61,9 @@ export default {
},
},
methods: {
handleMonthChange(value) {
this.model.salaryMonth = value ? value.format('YYYY-MM') : null
},
selectup() {},
submitForm() {
const that = this
... ... @@ -69,7 +77,11 @@ export default {
that.$message.success(res.message)
that.$emit('ok')
} else {
that.$message.warning(res.message)
if (res.message === '操作失败,null') {
that.$message.warning('计算错误')
} else {
that.$message.warning(res.message)
}
}
})
.finally(() => {
... ...
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="岗位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobTitle">
<a-input v-model="model.jobTitle" placeholder="请输入岗位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="岗位编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobId">
<a-input v-model="model.jobId" placeholder="请输入岗位编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="基本工资" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicSalary">
<a-input-number v-model="model.basicSalary" placeholder="请输入基本工资" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总工资算法" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zongPrice">
<a-input v-model="model.zongPrice" placeholder="请输入总工资算法" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="计算比例" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bili">
<a-input-number v-model="model.bili" placeholder="请输入计算比例" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
<a-input v-model="model.notes" placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblSalarySuanfaForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
jobId: [{ required: true, message: '请输入岗位编号!' }],
jobTitle: [{ required: true, message: '请输入岗位名称!' }],
basicSalary: [{ required: true, message: '请输入基本工资!' }],
bili: [{ required: true, message: '请输入计算比例!' }],
zongPrice: [{ required: true, message: '请输入总工资算法!' }],
},
url: {
add: "/salary/tblSalarySuanfa/add",
edit: "/salary/tblSalarySuanfa/edit",
queryById: "/salary/tblSalarySuanfa/queryById"
}
}
},
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;
},
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-salary-suanfa-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-salary-suanfa-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 TblSalarySuanfaForm from './TblSalarySuanfaForm'
export default {
name: 'TblSalarySuanfaModal',
components: {
TblSalarySuanfaForm
},
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-salary-suanfa-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-salary-suanfa-form>
</j-modal>
</template>
<script>
import TblSalarySuanfaForm from './TblSalarySuanfaForm'
export default {
name: 'TblSalarySuanfaModal',
components: {
TblSalarySuanfaForm
},
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;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
... ...
... ... @@ -27,8 +27,9 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button type="primary" icon="download" @click="handleExportXls('tbl_trad_zong')">导出</a-button>
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tbl_trad_zong')">导出</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> -->
... ... @@ -84,22 +85,22 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<!-- <a @click="handleEdit(record)">编辑</a> -->
<a-divider type="vertical" />
<a-dropdown>
<!-- <a-divider type="vertical" /> -->
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a-menu-item> -->
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<!-- </a-menu-item> -->
<!-- <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</a-menu-item> -->
<!-- </a-menu>
</a-dropdown> -->
</span>
</a-table>
... ...
... ... @@ -5,7 +5,11 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber">
<a-input v-model="model.tenderNumber" placeholder="请输入招标号"></a-input>
<a-input
v-model="model.tenderNumber"
placeholder="请输入招标号"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -20,7 +24,11 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
<a-input v-model="model.partNumber" placeholder="请输入客户料号"></a-input>
<a-input
v-model="model.partNumber"
placeholder="请输入客户料号"
></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -30,7 +38,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname">
<a-input v-model="model.productname" placeholder="请输入品名"></a-input>
<a-input v-model="model.productname" placeholder="请输入品名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ... @@ -125,6 +133,7 @@ import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TblTradBaseForm',
components: {},
props: {
//表单禁用
... ... @@ -136,6 +145,10 @@ export default {
},
data() {
return {
currentTenNumber:'',
currentPartNumber:'',
isBianhaoDisabled: true, // 添加一个额外的变量来控制合同编号输入框的禁用状态
isBianhaoDisabled2: false,
model: {},
labelCol: {
xs: { span: 24 },
... ... @@ -147,10 +160,10 @@ export default {
},
confirmLoading: false,
validatorRules: {
tenderNumber: [{ required: true, message: '请输入招标号!' }],
tenderNumber: [{ required: true, message: '请输入招标号!' }, { validator: this.validateNumber }],
customer: [{ required: true, message: '请输入客户!' }],
procurement: [{ required: true, message: '请输入客户采购!' }],
partNumber: [{ required: true, message: '请输入客户料号!' }],
partNumber: [{ required: true, message: '请输入客户料号!' }, { validator: this.validateNumber }],
description: [{ required: true, message: '请输入物料描述!' }],
productname: [{ required: true, message: '请输入品名!' }],
specifications: [{ required: true, message: '请输入规格!' }],
... ... @@ -158,12 +171,12 @@ export default {
danwei: [{ required: true, message: '请输入计量单位!' }],
company: [{ required: true, message: '请输入客户需求单位!' }],
baseZhong: [{ required: true, message: '请输入中标单价!' }],
},
url: {
add: '/trad/tblTradBase/add',
edit: '/trad/tblTradBase/edit',
queryById: '/trad/tblTradBase/queryById',
queryBy: 'trad/tblTradBase/queryBy',
},
}
},
... ... @@ -177,12 +190,41 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
methods: {
validateNumber(rule, value, callback) {
console.log(this.currentTenNumber)
console.log(this.currentPartNumber)
if (!value) {
callback()
} else {
const param = { tenderNumber: this.model.tenderNumber, partNumber: this.model.partNumber}
// 使用 Promise 或者 async/await 来等待异步请求完成
getAction(this.url.queryBy, param)
.then((res) => {
if (this.model.tenderNumber === this.currentTenNumber && this.model.partNumber===this.currentPartNumber) {
callback()
}else if (res.result && res.result.length <= 0) {
callback()
} else {
callback('招标信息已存在!')
}
})
.catch((error) => {
console.error('Error:', error)
callback('网络请求失败,请稍后重试!')
})
}
},
add() {
this.edit(this.modelDefault)
},
edit(record) {
this.model = Object.assign({}, record)
this.currentTenNumber=this.model.tenderNumber
this.currentPartNumber=this.model.partNumber
this.visible = true
// this.isBianhaoDisabled2 = true
},
submitForm() {
const that = this
... ...
... ... @@ -104,20 +104,18 @@ export default {
console.log(res)
console.log(res2)
if (res2.result) {
this.$message.error('这个招标已存在合同信息')
if (res.result && res.result.length <=0) {
this.$message.error('没有这个招标信息,请重新输入')
this.confirmLoading = false
// this.readOnly = true
// 设置组件为禁用状态
this.isBianhaoDisabled=true
this.isBianhaoDisabled = true
return
}
if (!res.result) {
this.$message.error('没有这个招标信息,请重新输入')
if (res2.result && res2.result.length >0) {
this.$message.error('这个招标已存在合同信息')
this.confirmLoading = false
// this.readOnly = true
this.isBianhaoDisabled=true
console.log('禁否:', this.isBianhaoDisabled)
this.isBianhaoDisabled = true
return
}
// this.readOnly = false
... ...
... ... @@ -131,15 +131,16 @@ export default {
console.log(res)
console.log(res2)
if (res2.result) {
this.$message.error('这个招标已存在合同信息')
if (res.result && res.result.length <=0) {
this.$message.error('没有这个招标信息,请重新输入')
this.confirmLoading = false
this.isBianhaoDisabled = true
return
}
if (!res.result) {
this.$message.error('没有这个招标信息,请重新输入')
if (res2.result && res2.result.length >0) {
this.$message.error('这个招标已存在发票回款信息')
this.confirmLoading = false
this.isBianhaoDisabled = true
return
... ...
... ... @@ -121,7 +121,7 @@ export default {
let res = await getAction(this.url.queryBy, param)
console.log(res)
if (!res.result) {
if (res.result && res.result.length <=0) {
this.$message.error('没有这个招标信息,请重新输入')
this.confirmLoading = false
... ...
... ... @@ -178,20 +178,21 @@ export default {
console.log(res)
console.log(res2)
if (res2.result) {
this.$message.error('这个招标已存在合同信息')
if (res.result && res.result.length <=0) {
this.$message.error('没有这个招标信息,请重新输入')
this.confirmLoading = false
this.isBianhaoDisabled = true
return
}
if (!res.result) {
this.$message.error('没有这个招标信息,请重新输入')
if (res2.result && res2.result.length >0) {
this.$message.error('这个招标已存在中标采购信息')
this.confirmLoading = false
this.isBianhaoDisabled = true
return
}
this.isBianhaoDisabled=false
this.confirmLoading = false
},
... ...
... ... @@ -120,14 +120,16 @@ export default {
console.log(res)
console.log(res2)
if (res2.result) {
this.$message.error('这个招标已存在合同信息')
if (res.result && res.result.length <=0) {
this.$message.error('没有这个招标信息,请重新输入')
this.confirmLoading = false
this.isBianhaoDisabled = true
return
}
if (!res.result) {
this.$message.error('没有这个招标信息,请重新输入')
if (res2.result && res2.result.length >0) {
this.$message.error('这个招标已存在投标信息')
this.confirmLoading = false
this.isBianhaoDisabled = true
return
... ...