作者 雷海东

不能预览此文件类型
@@ -86,6 +86,8 @@ const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params @@ -86,6 +86,8 @@ const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params
86 86
87 // 重复校验 87 // 重复校验
88 const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params); 88 const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
  89 +// 工资基本信息手机号重复校验
  90 +// const duplicateCheck2 = (params)=>getAction("/salary/base/listphone",params);
89 // 加载分类字典 91 // 加载分类字典
90 const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params); 92 const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
91 const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params) 93 const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
@@ -144,6 +146,7 @@ export { @@ -144,6 +146,7 @@ export {
144 getVisitInfo, 146 getVisitInfo,
145 queryUserByDepId, 147 queryUserByDepId,
146 duplicateCheck, 148 duplicateCheck,
  149 + // duplicateCheck2,
147 queryTreeListForRole, 150 queryTreeListForRole,
148 getSystemMenuList, 151 getSystemMenuList,
149 getSystemSubmenu, 152 getSystemSubmenu,
@@ -245,7 +245,7 @@ export const JeecgListMixin = { @@ -245,7 +245,7 @@ export const JeecgListMixin = {
245 // }, 245 // },
246 selectup:function(salaryMonth){ 246 selectup:function(salaryMonth){
247 this.$refs.tanForm.selectUp(salaryMonth) 247 this.$refs.tanForm.selectUp(salaryMonth)
248 - this.$refs.tanForm.title = "新增基本信息"; 248 + this.$refs.tanForm.title = "工资计算";
249 this.$refs.tanForm.disableSubmit = false; 249 this.$refs.tanForm.disableSubmit = false;
250 }, 250 },
251 handleEdit: function (record) { 251 handleEdit: function (record) {
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="品名">
  9 + <j-input placeholder="请输入品名" v-model="queryParam.productName"></j-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :span="12">
  13 + <a-form-item label="购买日期">
  14 + <j-date v-model="queryParam.buyTime" placeholder="请选择购买日期" />
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :span="12">
  18 + <a-form-item label="到货日期">
  19 + <j-date v-model="queryParam.deliveryTime" placeholder="请选择到货日期" />
  20 + </a-form-item>
  21 + </a-col>
  22 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23 + <span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
  24 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  25 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  26 + </span>
  27 + </a-col>
  28 + </a-row>
  29 + </a-form>
  30 + </div>
  31 + <!-- 查询区域-END -->
  32 +
  33 + <!-- 操作按钮区域 -->
  34 + <div class="table-operator">
  35 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  36 + <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_htcg')">导出</a-button>
  37 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  38 + <a-button type="primary" icon="import">导入</a-button>
  39 + </a-upload>
  40 + <!-- 高级查询区域 -->
  41 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  42 + <a-dropdown v-if="selectedRowKeys.length > 0">
  43 + <a-menu slot="overlay">
  44 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  45 + </a-menu>
  46 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  47 + </a-dropdown>
  48 + </div>
  49 +
  50 + <!-- table区域-begin -->
  51 + <div>
  52 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  53 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  54 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  55 + </div>
  56 +
  57 + <a-table
  58 + ref="table"
  59 + size="middle"
  60 + :scroll="{x:true}"
  61 + bordered
  62 + rowKey="id"
  63 + :columns="columns"
  64 + :dataSource="dataSource"
  65 + :pagination="ipagination"
  66 + :loading="loading"
  67 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  68 + class="j-table-force-nowrap"
  69 + @change="handleTableChange">
  70 +
  71 + <template slot="htmlSlot" slot-scope="text">
  72 + <div v-html="text"></div>
  73 + </template>
  74 + <template slot="imgSlot" slot-scope="text,record">
  75 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  76 + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  77 + </template>
  78 + <template slot="fileSlot" slot-scope="text">
  79 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  80 + <a-button
  81 + v-else
  82 + :ghost="true"
  83 + type="primary"
  84 + icon="download"
  85 + size="small"
  86 + @click="downloadFile(text)">
  87 + 下载
  88 + </a-button>
  89 + </template>
  90 +
  91 + <span slot="action" slot-scope="text, record">
  92 + <a @click="handleEdit(record)">编辑</a>
  93 +
  94 + <a-divider type="vertical" />
  95 + <a-dropdown>
  96 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  97 + <a-menu slot="overlay">
  98 + <a-menu-item>
  99 + <a @click="handleDetail(record)">详情</a>
  100 + </a-menu-item>
  101 + <a-menu-item>
  102 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  103 + <a>删除</a>
  104 + </a-popconfirm>
  105 + </a-menu-item>
  106 + </a-menu>
  107 + </a-dropdown>
  108 + </span>
  109 +
  110 + </a-table>
  111 + </div>
  112 +
  113 + <tbl-bidding-htcg-modal ref="modalForm" @ok="modalFormOk"></tbl-bidding-htcg-modal>
  114 + </a-card>
  115 +</template>
  116 +
  117 +<script>
  118 +
  119 + import '@/assets/less/TableExpand.less'
  120 + import { mixinDevice } from '@/utils/mixin'
  121 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  122 + import TblBiddingHtcgModal from './modules/TblBiddingHtcgModal'
  123 +
  124 + export default {
  125 + name: 'TblBiddingHtcgList',
  126 + mixins:[JeecgListMixin, mixinDevice],
  127 + components: {
  128 + TblBiddingHtcgModal
  129 + },
  130 + data () {
  131 + return {
  132 + description: 'tbl_bidding_htcg管理页面',
  133 + // 表头
  134 + columns: [
  135 + {
  136 + title: '序号',
  137 + dataIndex: '',
  138 + key: 'rowIndex',
  139 + width: 60,
  140 + align: 'center',
  141 + customRender: function (t, r, index) {
  142 + return parseInt(index) + 1
  143 + },
  144 + },
  145 + {
  146 + title: '品名',
  147 + align: 'center',
  148 + dataIndex: 'productName',
  149 + },
  150 + {
  151 + title: '规格',
  152 + align: 'center',
  153 + dataIndex: 'specifications',
  154 + },
  155 + {
  156 + title: '厂商',
  157 + align: 'center',
  158 + dataIndex: 'chang',
  159 + },
  160 + {
  161 + title: '购买日期',
  162 + align: 'center',
  163 + dataIndex: 'buyTime',
  164 + customRender: function (text) {
  165 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  166 + },
  167 + },
  168 + {
  169 + title: '单位',
  170 + align: 'center',
  171 + dataIndex: 'danwei',
  172 + },
  173 + {
  174 + title: '单价',
  175 + align: 'center',
  176 + dataIndex: 'danPrice',
  177 + },
  178 + {
  179 + title: '数量',
  180 + align: 'center',
  181 + dataIndex: 'num',
  182 + },
  183 + {
  184 + title: '总价',
  185 + align: 'center',
  186 + dataIndex: 'zongPrice',
  187 + },
  188 + {
  189 + title: '用途',
  190 + align: 'center',
  191 + dataIndex: 'purpose',
  192 + },
  193 + {
  194 + title: '品牌',
  195 + align: 'center',
  196 + dataIndex: 'brand',
  197 + },
  198 + {
  199 + title: '物料类别',
  200 + align: 'center',
  201 + dataIndex: 'wuType',
  202 + },
  203 +
  204 + {
  205 + title: '到货日期',
  206 + align: 'center',
  207 + dataIndex: 'deliveryTime',
  208 + customRender: function (text) {
  209 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  210 + },
  211 + },
  212 + {
  213 + title: '发票类别',
  214 + align: 'center',
  215 + dataIndex: 'fpType',
  216 + },
  217 + {
  218 + title: '发票到否',
  219 + align: 'center',
  220 + dataIndex: 'fpIsyn',
  221 + },
  222 + {
  223 + title: '发票收到信息',
  224 + align: 'center',
  225 + dataIndex: 'fpTime',
  226 + customRender: function (text) {
  227 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  228 + },
  229 + },
  230 + {
  231 + title: '备注',
  232 + align: 'center',
  233 + dataIndex: 'notes',
  234 + },
  235 + {
  236 + title: '物品图片',
  237 + align: 'center',
  238 + dataIndex: 'picture',
  239 + scopedSlots: { customRender: 'imgSlot' },
  240 + },
  241 + {
  242 + title: '操作',
  243 + dataIndex: 'action',
  244 + align: 'center',
  245 + fixed: 'right',
  246 + width: 147,
  247 + scopedSlots: { customRender: 'action' },
  248 + },
  249 + ],
  250 + url: {
  251 + list: "/bidding_info/tblBiddingHtcg/list",
  252 + delete: "/bidding_info/tblBiddingHtcg/delete",
  253 + deleteBatch: "/bidding_info/tblBiddingHtcg/deleteBatch",
  254 + exportXlsUrl: "/bidding_info/tblBiddingHtcg/exportXls",
  255 + importExcelUrl: "bidding_info/tblBiddingHtcg/importExcel",
  256 +
  257 + },
  258 + dictOptions:{},
  259 + superFieldList:[],
  260 + }
  261 + },
  262 + created() {
  263 + this.getSuperFieldList();
  264 + },
  265 + computed: {
  266 + importExcelUrl: function(){
  267 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  268 + },
  269 + },
  270 + methods: {
  271 + initDictConfig(){
  272 + },
  273 + getSuperFieldList(){
  274 + let fieldList=[];
  275 + fieldList.push({type:'string',value:'productName',text:'品名'})
  276 + fieldList.push({type:'string',value:'specifications',text:'规格'})
  277 + fieldList.push({type:'int',value:'num',text:'数量'})
  278 + fieldList.push({type:'string',value:'danwei',text:'单位'})
  279 + fieldList.push({type:'string',value:'wuType',text:'物料类别'})
  280 + fieldList.push({type:'number',value:'danPrice',text:'单价'})
  281 + fieldList.push({type:'number',value:'zongPrice',text:'总价'})
  282 + fieldList.push({type:'string',value:'purpose',text:'用途'})
  283 + fieldList.push({type:'string',value:'chang',text:'厂商'})
  284 + fieldList.push({type:'date',value:'buyTime',text:'购买日期'})
  285 + fieldList.push({type:'date',value:'deliveryTime',text:'到货日期'})
  286 + fieldList.push({type:'string',value:'brand',text:'品牌'})
  287 + fieldList.push({type:'string',value:'notes',text:'备注'})
  288 + fieldList.push({type:'string',value:'fpType',text:'发票类别'})
  289 + fieldList.push({type:'string',value:'fpIsyn',text:'发票到否'})
  290 + fieldList.push({type:'date',value:'fpTime',text:'发票收到日期'})
  291 + fieldList.push({type:'string',value:'picture',text:'物品图片'})
  292 + this.superFieldList = fieldList
  293 + }
  294 + }
  295 + }
  296 +</script>
  297 +<style scoped>
  298 + @import '~@assets/less/common.less';
  299 +</style>
@@ -34,14 +34,25 @@ @@ -34,14 +34,25 @@
34 <div class="table-operator"> 34 <div class="table-operator">
35 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 35 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
36 <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shiji')">导出</a-button> 36 <a-button type="primary" icon="download" @click="handleExportXls('tbl_bidding_shiji')">导出</a-button>
37 - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> 37 + <a-upload
  38 + name="file"
  39 + :showUploadList="false"
  40 + :multiple="false"
  41 + :headers="tokenHeader"
  42 + :action="importExcelUrl"
  43 + @change="handleImportExcel"
  44 + >
38 <a-button type="primary" icon="import">导入</a-button> 45 <a-button type="primary" icon="import">导入</a-button>
39 </a-upload> 46 </a-upload>
40 <!-- 高级查询区域 --> 47 <!-- 高级查询区域 -->
41 - <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> 48 + <j-super-query
  49 + :fieldList="superFieldList"
  50 + ref="superQueryModal"
  51 + @handleSuperQuery="handleSuperQuery"
  52 + ></j-super-query>
42 <a-dropdown v-if="selectedRowKeys.length > 0"> 53 <a-dropdown v-if="selectedRowKeys.length > 0">
43 <a-menu slot="overlay"> 54 <a-menu slot="overlay">
44 - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> 55 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
45 </a-menu> 56 </a-menu>
46 <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> 57 <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
47 </a-dropdown> 58 </a-dropdown>
@@ -49,41 +60,44 @@ @@ -49,41 +60,44 @@
49 60
50 <!-- table区域-begin --> 61 <!-- table区域-begin -->
51 <div> 62 <div>
52 - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">  
53 - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 63 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
  64 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
  65 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
  66 + >项
54 <a style="margin-left: 24px" @click="onClearSelected">清空</a> 67 <a style="margin-left: 24px" @click="onClearSelected">清空</a>
55 </div> 68 </div>
56 69
57 <a-table 70 <a-table
58 ref="table" 71 ref="table"
59 size="middle" 72 size="middle"
60 - :scroll="{x:true}" 73 + :scroll="{ x: true }"
61 bordered 74 bordered
62 rowKey="id" 75 rowKey="id"
63 :columns="columns" 76 :columns="columns"
64 :dataSource="dataSource" 77 :dataSource="dataSource"
65 :pagination="ipagination" 78 :pagination="ipagination"
66 :loading="loading" 79 :loading="loading"
67 - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" 80 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
68 class="j-table-force-nowrap" 81 class="j-table-force-nowrap"
69 - @change="handleTableChange">  
70 - 82 + @change="handleTableChange"
  83 + >
71 <template slot="htmlSlot" slot-scope="text"> 84 <template slot="htmlSlot" slot-scope="text">
72 <div v-html="text"></div> 85 <div v-html="text"></div>
73 </template> 86 </template>
74 - <template slot="imgSlot" slot-scope="text,record">  
75 - <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>  
76 - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> 87 + <template slot="imgSlot" slot-scope="text, record">
  88 + <span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
  89 + <img
  90 + v-else
  91 + :src="getImgView(text)"
  92 + :preview="record.id"
  93 + height="25px"
  94 + alt=""
  95 + style="max-width: 80px; font-size: 12px; font-style: italic"
  96 + />
77 </template> 97 </template>
78 <template slot="fileSlot" slot-scope="text"> 98 <template slot="fileSlot" slot-scope="text">
79 - <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>  
80 - <a-button  
81 - v-else  
82 - :ghost="true"  
83 - type="primary"  
84 - icon="download"  
85 - size="small"  
86 - @click="downloadFile(text)"> 99 + <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
  100 + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
87 下载 101 下载
88 </a-button> 102 </a-button>
89 </template> 103 </template>
@@ -106,7 +120,6 @@ @@ -106,7 +120,6 @@
106 </a-menu> 120 </a-menu>
107 </a-dropdown> 121 </a-dropdown>
108 </span> 122 </span>
109 -  
110 </a-table> 123 </a-table>
111 </div> 124 </div>
112 125
@@ -115,184 +128,182 @@ @@ -115,184 +128,182 @@
115 </template> 128 </template>
116 129
117 <script> 130 <script>
  131 +import '@/assets/less/TableExpand.less'
  132 +import { mixinDevice } from '@/utils/mixin'
  133 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  134 +import TblBiddingShijiModal from './modules/TblBiddingShijiModal'
118 135
119 - import '@/assets/less/TableExpand.less'  
120 - import { mixinDevice } from '@/utils/mixin'  
121 - import { JeecgListMixin } from '@/mixins/JeecgListMixin'  
122 - import TblBiddingShijiModal from './modules/TblBiddingShijiModal'  
123 -  
124 - export default {  
125 - name: 'TblBiddingShijiList',  
126 - mixins:[JeecgListMixin, mixinDevice],  
127 - components: {  
128 - TblBiddingShijiModal  
129 - },  
130 - data () {  
131 - return {  
132 - description: 'tbl_bidding_shiji管理页面',  
133 - // 表头  
134 - columns: [  
135 - {  
136 - title: '序号',  
137 - dataIndex: '',  
138 - key:'rowIndex',  
139 - width:60,  
140 - align:"center",  
141 - customRender:function (t,r,index) {  
142 - return parseInt(index)+1;  
143 - }  
144 - },  
145 - {  
146 - title:'品名',  
147 - align:"center",  
148 - dataIndex: 'productName'  
149 - },  
150 - {  
151 - title:'规格',  
152 - align:"center",  
153 - dataIndex: 'specifications'  
154 - },  
155 - {  
156 - title:'数量',  
157 - align:"center",  
158 - dataIndex: 'num'  
159 - },  
160 - {  
161 - title:'单位',  
162 - align:"center",  
163 - dataIndex: 'danwei'  
164 - },  
165 - {  
166 - title:'物料类别',  
167 - align:"center",  
168 - dataIndex: 'wuType'  
169 - },  
170 - {  
171 - title:'单价',  
172 - align:"center",  
173 - dataIndex: 'danPrice' 136 +export default {
  137 + name: 'TblBiddingShijiList',
  138 + mixins: [JeecgListMixin, mixinDevice],
  139 + components: {
  140 + TblBiddingShijiModal,
  141 + },
  142 + data() {
  143 + return {
  144 + description: 'tbl_bidding_shiji管理页面',
  145 + // 表头
  146 + columns: [
  147 + {
  148 + title: '序号',
  149 + dataIndex: '',
  150 + key: 'rowIndex',
  151 + width: 60,
  152 + align: 'center',
  153 + customRender: function (t, r, index) {
  154 + return parseInt(index) + 1
174 }, 155 },
175 - {  
176 - title:'总价',  
177 - align:"center",  
178 - dataIndex: 'zongPrice'  
179 - },  
180 - {  
181 - title:'用途',  
182 - align:"center",  
183 - dataIndex: 'purpose'  
184 - },  
185 - {  
186 - title:'厂商',  
187 - align:"center",  
188 - dataIndex: 'chang'  
189 - },  
190 - {  
191 - title:'购买日期',  
192 - align:"center",  
193 - dataIndex: 'buyTime',  
194 - customRender:function (text) {  
195 - return !text?"":(text.length>10?text.substr(0,10):text)  
196 - }  
197 - },  
198 - {  
199 - title:'到货日期',  
200 - align:"center",  
201 - dataIndex: 'deliveryTime',  
202 - customRender:function (text) {  
203 - return !text?"":(text.length>10?text.substr(0,10):text)  
204 - }  
205 - },  
206 - {  
207 - title:'品牌',  
208 - align:"center",  
209 - dataIndex: 'brand'  
210 - },  
211 - {  
212 - title:'备注',  
213 - align:"center",  
214 - dataIndex: 'notes'  
215 - },  
216 - {  
217 - title:'发票类别',  
218 - align:"center",  
219 - dataIndex: 'fpType'  
220 - },  
221 - {  
222 - title:'发票到否',  
223 - align:"center",  
224 - dataIndex: 'fpIsyn' 156 + },
  157 + {
  158 + title: '品名',
  159 + align: 'center',
  160 + dataIndex: 'productName',
  161 + },
  162 + {
  163 + title: '规格',
  164 + align: 'center',
  165 + dataIndex: 'specifications',
  166 + },
  167 + {
  168 + title: '厂商',
  169 + align: 'center',
  170 + dataIndex: 'chang',
  171 + },
  172 + {
  173 + title: '购买日期',
  174 + align: 'center',
  175 + dataIndex: 'buyTime',
  176 + customRender: function (text) {
  177 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
225 }, 178 },
226 - {  
227 - title:'发票收到信息',  
228 - align:"center",  
229 - dataIndex: 'fpTime',  
230 - customRender:function (text) {  
231 - return !text?"":(text.length>10?text.substr(0,10):text)  
232 - } 179 + },
  180 + {
  181 + title: '单位',
  182 + align: 'center',
  183 + dataIndex: 'danwei',
  184 + },
  185 + {
  186 + title: '单价',
  187 + align: 'center',
  188 + dataIndex: 'danPrice',
  189 + },
  190 + {
  191 + title: '数量',
  192 + align: 'center',
  193 + dataIndex: 'num',
  194 + },
  195 + {
  196 + title: '总价',
  197 + align: 'center',
  198 + dataIndex: 'zongPrice',
  199 + },
  200 + {
  201 + title: '用途',
  202 + align: 'center',
  203 + dataIndex: 'purpose',
  204 + },
  205 + {
  206 + title: '品牌',
  207 + align: 'center',
  208 + dataIndex: 'brand',
  209 + },
  210 + {
  211 + title: '物料类别',
  212 + align: 'center',
  213 + dataIndex: 'wuType',
  214 + },
  215 +
  216 + {
  217 + title: '到货日期',
  218 + align: 'center',
  219 + dataIndex: 'deliveryTime',
  220 + customRender: function (text) {
  221 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
233 }, 222 },
234 - {  
235 - title:'物品图片',  
236 - align:"center",  
237 - dataIndex: 'picture',  
238 - scopedSlots: {customRender: 'imgSlot'} 223 + },
  224 + {
  225 + title: '发票类别',
  226 + align: 'center',
  227 + dataIndex: 'fpType',
  228 + },
  229 + {
  230 + title: '发票到否',
  231 + align: 'center',
  232 + dataIndex: 'fpIsyn',
  233 + },
  234 + {
  235 + title: '发票收到信息',
  236 + align: 'center',
  237 + dataIndex: 'fpTime',
  238 + customRender: function (text) {
  239 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
239 }, 240 },
240 - {  
241 - title: '操作',  
242 - dataIndex: 'action',  
243 - align:"center",  
244 - fixed:"right",  
245 - width:147,  
246 - scopedSlots: { customRender: 'action' }  
247 - }  
248 - ],  
249 - url: {  
250 - list: "/bidding_info/tblBiddingShiji/list",  
251 - delete: "/bidding_info/tblBiddingShiji/delete",  
252 - deleteBatch: "/bidding_info/tblBiddingShiji/deleteBatch",  
253 - exportXlsUrl: "/bidding_info/tblBiddingShiji/exportXls",  
254 - importExcelUrl: "bidding_info/tblBiddingShiji/importExcel",  
255 -  
256 }, 241 },
257 - dictOptions:{},  
258 - superFieldList:[],  
259 - }  
260 - },  
261 - created() {  
262 - this.getSuperFieldList();  
263 - },  
264 - computed: {  
265 - importExcelUrl: function(){  
266 - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;  
267 - },  
268 - },  
269 - methods: {  
270 - initDictConfig(){ 242 + {
  243 + title: '备注',
  244 + align: 'center',
  245 + dataIndex: 'notes',
  246 + },
  247 + {
  248 + title: '物品图片',
  249 + align: 'center',
  250 + dataIndex: 'picture',
  251 + scopedSlots: { customRender: 'imgSlot' },
  252 + },
  253 + {
  254 + title: '操作',
  255 + dataIndex: 'action',
  256 + align: 'center',
  257 + fixed: 'right',
  258 + width: 147,
  259 + scopedSlots: { customRender: 'action' },
  260 + },
  261 + ],
  262 + url: {
  263 + list: '/bidding_info/tblBiddingShiji/list',
  264 + delete: '/bidding_info/tblBiddingShiji/delete',
  265 + deleteBatch: '/bidding_info/tblBiddingShiji/deleteBatch',
  266 + exportXlsUrl: '/bidding_info/tblBiddingShiji/exportXls',
  267 + importExcelUrl: 'bidding_info/tblBiddingShiji/importExcel',
271 }, 268 },
272 - getSuperFieldList(){  
273 - let fieldList=[];  
274 - fieldList.push({type:'string',value:'productName',text:'品名'})  
275 - fieldList.push({type:'string',value:'specifications',text:'规格'})  
276 - fieldList.push({type:'int',value:'num',text:'数量'})  
277 - fieldList.push({type:'string',value:'danwei',text:'单位'})  
278 - fieldList.push({type:'string',value:'wuType',text:'物料类别'})  
279 - fieldList.push({type:'number',value:'danPrice',text:'单价'})  
280 - fieldList.push({type:'number',value:'zongPrice',text:'总价'})  
281 - fieldList.push({type:'string',value:'purpose',text:'用途'})  
282 - fieldList.push({type:'string',value:'chang',text:'厂商'})  
283 - fieldList.push({type:'date',value:'buyTime',text:'购买日期'})  
284 - fieldList.push({type:'date',value:'deliveryTime',text:'到货日期'})  
285 - fieldList.push({type:'string',value:'brand',text:'品牌'})  
286 - fieldList.push({type:'string',value:'notes',text:'备注'})  
287 - fieldList.push({type:'string',value:'fpType',text:'发票类别'})  
288 - fieldList.push({type:'string',value:'fpIsyn',text:'发票到否'})  
289 - fieldList.push({type:'date',value:'fpTime',text:'发票收到信息'})  
290 - fieldList.push({type:'string',value:'picture',text:'物品图片'})  
291 - this.superFieldList = fieldList  
292 - } 269 + dictOptions: {},
  270 + superFieldList: [],
293 } 271 }
294 - } 272 + },
  273 + created() {
  274 + this.getSuperFieldList()
  275 + },
  276 + computed: {
  277 + importExcelUrl: function () {
  278 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  279 + },
  280 + },
  281 + methods: {
  282 + initDictConfig() {},
  283 + getSuperFieldList() {
  284 + let fieldList = []
  285 + fieldList.push({ type: 'string', value: 'productName', text: '品名' })
  286 + fieldList.push({ type: 'string', value: 'specifications', text: '规格' })
  287 + fieldList.push({ type: 'int', value: 'num', text: '数量' })
  288 + fieldList.push({ type: 'string', value: 'danwei', text: '单位' })
  289 + fieldList.push({ type: 'string', value: 'wuType', text: '物料类别' })
  290 + fieldList.push({ type: 'number', value: 'danPrice', text: '单价' })
  291 + fieldList.push({ type: 'number', value: 'zongPrice', text: '总价' })
  292 + fieldList.push({ type: 'string', value: 'purpose', text: '用途' })
  293 + fieldList.push({ type: 'string', value: 'chang', text: '厂商' })
  294 + fieldList.push({ type: 'date', value: 'buyTime', text: '购买日期' })
  295 + fieldList.push({ type: 'date', value: 'deliveryTime', text: '到货日期' })
  296 + fieldList.push({ type: 'string', value: 'brand', text: '品牌' })
  297 + fieldList.push({ type: 'string', value: 'notes', text: '备注' })
  298 + fieldList.push({ type: 'string', value: 'fpType', text: '发票类别' })
  299 + fieldList.push({ type: 'string', value: 'fpIsyn', text: '发票到否' })
  300 + fieldList.push({ type: 'date', value: 'fpTime', text: '发票收到信息' })
  301 + fieldList.push({ type: 'string', value: 'picture', text: '物品图片' })
  302 + this.superFieldList = fieldList
  303 + },
  304 + },
  305 +}
295 </script> 306 </script>
296 <style scoped> 307 <style scoped>
297 - @import '~@assets/less/common.less'; 308 +@import '~@assets/less/common.less';
298 </style> 309 </style>
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
  8 + <a-input v-model="model.productName" placeholder="请输入品名"></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
  13 + <a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
  18 + <a-input-number v-model="model.num" placeholder="请输入数量" style="width: 100%" />
  19 + </a-form-model-item>
  20 + </a-col>
  21 + <a-col :span="24">
  22 + <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
  23 + <a-input v-model="model.danwei" placeholder="请输入单位"></a-input>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
  28 + <a-input v-model="model.wuType" placeholder="请输入物料类别"></a-input>
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danPrice">
  33 + <a-input-number v-model="model.danPrice" placeholder="请输入单价" style="width: 100%" />
  34 + </a-form-model-item>
  35 + </a-col>
  36 + <a-col :span="24">
  37 + <a-form-model-item label="总价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zongPrice">
  38 + <a-input-number v-model="model.zongPrice" placeholder="请输入总价" style="width: 100%" />
  39 + </a-form-model-item>
  40 + </a-col>
  41 + <a-col :span="24">
  42 + <a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose">
  43 + <a-input v-model="model.purpose" placeholder="请输入用途"></a-input>
  44 + </a-form-model-item>
  45 + </a-col>
  46 + <a-col :span="24">
  47 + <a-form-model-item label="厂商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chang">
  48 + <a-input v-model="model.chang" placeholder="请输入厂商"></a-input>
  49 + </a-form-model-item>
  50 + </a-col>
  51 + <a-col :span="24">
  52 + <a-form-model-item label="购买日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buyTime">
  53 + <j-date placeholder="请选择购买日期" v-model="model.buyTime" style="width: 100%" />
  54 + </a-form-model-item>
  55 + </a-col>
  56 + <a-col :span="24">
  57 + <a-form-model-item label="到货日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
  58 + <j-date placeholder="请选择到货日期" v-model="model.deliveryTime" style="width: 100%" />
  59 + </a-form-model-item>
  60 + </a-col>
  61 + <a-col :span="24">
  62 + <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
  63 + <a-input v-model="model.brand" placeholder="请输入品牌"></a-input>
  64 + </a-form-model-item>
  65 + </a-col>
  66 + <a-col :span="24">
  67 + <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
  68 + <a-input v-model="model.notes" placeholder="请输入备注"></a-input>
  69 + </a-form-model-item>
  70 + </a-col>
  71 + <a-col :span="24">
  72 + <a-form-model-item label="发票类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fpType">
  73 + <a-input v-model="model.fpType" placeholder="请输入发票类别"></a-input>
  74 + </a-form-model-item>
  75 + </a-col>
  76 + <a-col :span="24">
  77 + <a-form-model-item label="发票到否" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fpIsyn">
  78 + <a-input v-model="model.fpIsyn" placeholder="请输入发票到否"></a-input>
  79 + </a-form-model-item>
  80 + </a-col>
  81 + <a-col :span="24">
  82 + <a-form-model-item label="发票收到日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fpTime">
  83 + <j-date placeholder="请选择发票收到日期" v-model="model.fpTime" style="width: 100%" />
  84 + </a-form-model-item>
  85 + </a-col>
  86 + <a-col :span="24">
  87 + <a-form-model-item label="物料图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture">
  88 + <j-image-upload isMultiple v-model="model.picture"></j-image-upload>
  89 + </a-form-model-item>
  90 + </a-col>
  91 + </a-row>
  92 + </a-form-model>
  93 + </j-form-container>
  94 + </a-spin>
  95 +</template>
  96 +
  97 +<script>
  98 +import { httpAction, getAction } from '@/api/manage'
  99 +import { validateDuplicateValue } from '@/utils/util'
  100 +
  101 +export default {
  102 + name: 'TblBiddingHtcgForm',
  103 + components: {},
  104 + props: {
  105 + //表单禁用
  106 + disabled: {
  107 + type: Boolean,
  108 + default: false,
  109 + required: false,
  110 + },
  111 + },
  112 + data() {
  113 + return {
  114 + model: {},
  115 + labelCol: {
  116 + xs: { span: 24 },
  117 + sm: { span: 5 },
  118 + },
  119 + wrapperCol: {
  120 + xs: { span: 24 },
  121 + sm: { span: 16 },
  122 + },
  123 + confirmLoading: false,
  124 + validatorRules: {
  125 + productName: [{ required: true, message: '请输入品名!' }],
  126 + specifications: [{ required: true, message: '请输入规格!' }],
  127 + num: [{ required: true, message: '请输入数量!' }],
  128 + wuType: [{ required: true, message: '请输入物料类别!' }],
  129 + danwei: [{ required: true, message: '请输入单位!' }],
  130 + danPrice: [{ required: true, message: '请输入单价!' }],
  131 + zongPrice: [{ required: true, message: '请输入总价!' }],
  132 + purpose: [{ required: true, message: '请输入用途!' }],
  133 + chang: [{ required: true, message: '请输入厂商!' }],
  134 + buyTime: [{ required: true, message: '请输入购买日期!' }],
  135 + deliveryTime: [{ required: true, message: '请输入到货日期!' }],
  136 + fpTime: [{ required: true, message: '请输入发票收到日期!' }],
  137 + brand: [{ required: true, message: '请输入品牌!' }],
  138 + fpIsyn: [{ required: true, message: '请输入到否!' }],
  139 + fpType: [{ required: true, message: '请输入类别!' }],
  140 + notes: [{ required: true, message: '请输入备注!' }],
  141 + },
  142 + url: {
  143 + add: '/bidding_info/tblBiddingHtcg/add',
  144 + edit: '/bidding_info/tblBiddingHtcg/edit',
  145 + queryById: '/bidding_info/tblBiddingHtcg/queryById',
  146 + },
  147 + }
  148 + },
  149 + computed: {
  150 + formDisabled() {
  151 + return this.disabled
  152 + },
  153 + },
  154 + created() {
  155 + //备份model原始值
  156 + this.modelDefault = JSON.parse(JSON.stringify(this.model))
  157 + },
  158 + methods: {
  159 + add() {
  160 + this.edit(this.modelDefault)
  161 + },
  162 + edit(record) {
  163 + this.model = Object.assign({}, record)
  164 + this.visible = true
  165 + },
  166 + submitForm() {
  167 + const that = this
  168 + // 触发表单验证
  169 + this.$refs.form.validate((valid) => {
  170 + if (valid) {
  171 + that.confirmLoading = true
  172 + let httpurl = ''
  173 + let method = ''
  174 + if (!this.model.id) {
  175 + httpurl += this.url.add
  176 + method = 'post'
  177 + } else {
  178 + httpurl += this.url.edit
  179 + method = 'put'
  180 + }
  181 + httpAction(httpurl, this.model, method)
  182 + .then((res) => {
  183 + if (res.success) {
  184 + that.$message.success(res.message)
  185 + that.$emit('ok')
  186 + } else {
  187 + that.$message.warning(res.message)
  188 + }
  189 + })
  190 + .finally(() => {
  191 + that.confirmLoading = false
  192 + })
  193 + }
  194 + })
  195 + },
  196 + },
  197 +}
  198 +</script>
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <tbl-bidding-htcg-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-bidding-htcg-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import TblBiddingHtcgForm from './TblBiddingHtcgForm'
  21 +
  22 + export default {
  23 + name: 'TblBiddingHtcgModal',
  24 + components: {
  25 + TblBiddingHtcgForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <tbl-bidding-htcg-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-bidding-htcg-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import TblBiddingHtcgForm from './TblBiddingHtcgForm'
  18 + export default {
  19 + name: 'TblBiddingHtcgModal',
  20 + components: {
  21 + TblBiddingHtcgForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
@@ -5,74 +5,85 @@ @@ -5,74 +5,85 @@
5 <a-row> 5 <a-row>
6 <a-col :span="24"> 6 <a-col :span="24">
7 <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName"> 7 <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
8 - <a-input v-model="model.productName" placeholder="请输入品名"></a-input> 8 + <a-input v-model="model.productName" placeholder="请输入品名" :disabled="isBianhaoDisabled"></a-input>
9 </a-form-model-item> 9 </a-form-model-item>
10 </a-col> 10 </a-col>
11 <a-col :span="24"> 11 <a-col :span="24">
12 <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications"> 12 <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
13 - <a-input v-model="model.specifications" placeholder="请输入规格"></a-input> 13 + <a-input v-model="model.specifications" placeholder="请输入规格" :disabled="isBianhaoDisabled"></a-input>
14 </a-form-model-item> 14 </a-form-model-item>
15 </a-col> 15 </a-col>
16 <a-col :span="24"> 16 <a-col :span="24">
17 <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> 17 <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
18 - <a-input-number v-model="model.num" placeholder="请输入数量" style="width: 100%" /> 18 + <a-input-number
  19 + v-model="model.num"
  20 + placeholder="请输入数量"
  21 + style="width: 100%"
  22 + :disabled="isBianhaoDisabled"
  23 + />
19 </a-form-model-item> 24 </a-form-model-item>
20 </a-col> 25 </a-col>
21 <a-col :span="24"> 26 <a-col :span="24">
22 <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei"> 27 <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danwei">
23 - <a-input v-model="model.danwei" placeholder="请输入单位"></a-input> 28 + <a-input v-model="model.danwei" placeholder="请输入单位" :disabled="isBianhaoDisabled"></a-input>
24 </a-form-model-item> 29 </a-form-model-item>
25 </a-col> 30 </a-col>
26 <a-col :span="24"> 31 <a-col :span="24">
27 <a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType"> 32 <a-form-model-item label="物料类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wuType">
28 - <a-input v-model="model.wuType" placeholder="请输入物料类别"></a-input> 33 + <a-input v-model="model.wuType" placeholder="请输入物料类别" :disabled="isBianhaoDisabled"></a-input>
29 </a-form-model-item> 34 </a-form-model-item>
30 </a-col> 35 </a-col>
31 <a-col :span="24"> 36 <a-col :span="24">
32 <a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder"> 37 <a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder">
33 - <a-input v-model="model.workOrder" placeholder="请输入工作令"></a-input> 38 + <a-input v-model="model.workOrder" placeholder="请输入工作令" :disabled="isBianhaoDisabled"></a-input>
34 </a-form-model-item> 39 </a-form-model-item>
35 </a-col> 40 </a-col>
36 <a-col :span="24"> 41 <a-col :span="24">
37 <a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose"> 42 <a-form-model-item label="用途" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purpose">
38 - <a-input v-model="model.purpose" placeholder="请输入用途"></a-input> 43 + <a-input v-model="model.purpose" placeholder="请输入用途" :disabled="isBianhaoDisabled"></a-input>
39 </a-form-model-item> 44 </a-form-model-item>
40 </a-col> 45 </a-col>
41 <a-col :span="24"> 46 <a-col :span="24">
42 <a-form-model-item label="当前库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ku"> 47 <a-form-model-item label="当前库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ku">
43 - <a-input v-model="model.ku" placeholder="请输入当前库存"></a-input> 48 + <a-input v-model="model.ku" placeholder="请输入当前库存" :disabled="isBianhaoDisabled"></a-input>
44 </a-form-model-item> 49 </a-form-model-item>
45 </a-col> 50 </a-col>
46 <a-col :span="24"> 51 <a-col :span="24">
47 <a-form-model-item label="申请日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sqTime"> 52 <a-form-model-item label="申请日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sqTime">
48 - <j-date v-model="model.sqTime" placeholder="请输入申请日期" /> 53 + <j-date v-model="model.sqTime" placeholder="请输入申请日期" :disabled="isBianhaoDisabled" />
49 </a-form-model-item> 54 </a-form-model-item>
50 </a-col> 55 </a-col>
51 <a-col :span="24"> 56 <a-col :span="24">
52 <a-form-model-item label="使用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime"> 57 <a-form-model-item label="使用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
53 - <j-date v-model="model.deliveryTime" placeholder="请输入使用日期" /> 58 + <j-date v-model="model.deliveryTime" placeholder="请输入使用日期" :disabled="isBianhaoDisabled" />
54 </a-form-model-item> 59 </a-form-model-item>
55 </a-col> 60 </a-col>
56 <a-col :span="24"> 61 <a-col :span="24">
57 <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> 62 <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
58 - <a-input v-model="model.brand" placeholder="请输入品牌"></a-input> 63 + <a-input v-model="model.brand" placeholder="请输入品牌" :disabled="isBianhaoDisabled"></a-input>
59 </a-form-model-item> 64 </a-form-model-item>
60 </a-col> 65 </a-col>
61 <a-col :span="24"> 66 <a-col :span="24">
62 <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes"> 67 <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
63 - <a-input v-model="model.notes" placeholder="请输入备注"></a-input> 68 + <a-input v-model="model.notes" placeholder="请输入备注" :disabled="isBianhaoDisabled"></a-input>
64 </a-form-model-item> 69 </a-form-model-item>
65 </a-col> 70 </a-col>
66 <a-col :span="24"> 71 <a-col :span="24">
67 <a-form-model-item label="申请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant"> 72 <a-form-model-item label="申请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant">
68 - <a-input v-model="model.applicant" placeholder="请输入申请人"></a-input> 73 + <a-input v-model="model.applicant" placeholder="请输入申请人" :disabled="isBianhaoDisabled"></a-input>
69 </a-form-model-item> 74 </a-form-model-item>
70 </a-col> 75 </a-col>
71 <a-col :span="24"> 76 <a-col :span="24">
72 <!-- <a-form-model-item label="一级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne"> 77 <!-- <a-form-model-item label="一级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne">
73 78
74 </a-form-model-item> --> 79 </a-form-model-item> -->
75 - <a-form-model-item label="一级审批" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spOne"> 80 + <a-form-model-item
  81 + label="一级审批"
  82 + :labelCol="labelCol"
  83 + :wrapperCol="wrapperCol"
  84 + prop="spOne"
  85 + v-if="userInfo().username === 'admin'"
  86 + >
76 <a-radio-group v-model="model.spOne" @change="handleSpChange('spOne')"> 87 <a-radio-group v-model="model.spOne" @change="handleSpChange('spOne')">
77 <a-radio value="同意">同意</a-radio> 88 <a-radio value="同意">同意</a-radio>
78 <a-radio value="不同意">不同意</a-radio> 89 <a-radio value="不同意">不同意</a-radio>
@@ -80,7 +91,13 @@ @@ -80,7 +91,13 @@
80 </a-form-model-item> 91 </a-form-model-item>
81 </a-col> 92 </a-col>
82 <a-col :span="24"> 93 <a-col :span="24">
83 - <a-form-model-item label="二级审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spTwo"> 94 + <a-form-model-item
  95 + label="二级审批人"
  96 + :labelCol="labelCol"
  97 + :wrapperCol="wrapperCol"
  98 + prop="spTwo"
  99 + v-if="userInfo().username === 'admin'"
  100 + >
84 <a-radio-group v-model="model.spTwo" @change="handleSpChange('spTwo')"> 101 <a-radio-group v-model="model.spTwo" @change="handleSpChange('spTwo')">
85 <a-radio value="同意">同意</a-radio> 102 <a-radio value="同意">同意</a-radio>
86 <a-radio value="不同意">不同意</a-radio> 103 <a-radio value="不同意">不同意</a-radio>
@@ -93,7 +110,10 @@ @@ -93,7 +110,10 @@
93 :labelCol="labelCol" 110 :labelCol="labelCol"
94 :wrapperCol="wrapperCol" 111 :wrapperCol="wrapperCol"
95 prop="noNotes" 112 prop="noNotes"
96 - v-if="model.spOne === '不同意' || model.spTwo === '不同意'" 113 + v-if="
  114 + (model.spOne === '不同意' && userInfo().username === 'admin') ||
  115 + (model.spTwo === '不同意' && userInfo().username === 'admin')
  116 + "
97 > 117 >
98 <a-input v-model="model.noNotes" placeholder="请输入不同意备注"></a-input> 118 <a-input v-model="model.noNotes" placeholder="请输入不同意备注"></a-input>
99 </a-form-model-item> 119 </a-form-model-item>
@@ -107,9 +127,10 @@ @@ -107,9 +127,10 @@
107 <script > 127 <script >
108 import { httpAction, getAction } from '@/api/manage' 128 import { httpAction, getAction } from '@/api/manage'
109 import { validateDuplicateValue } from '@/utils/util' 129 import { validateDuplicateValue } from '@/utils/util'
110 - 130 +import { mapGetters } from 'vuex'
111 export default { 131 export default {
112 name: 'TblBiddingShenqForm', 132 name: 'TblBiddingShenqForm',
  133 +
113 components: {}, 134 components: {},
114 props: { 135 props: {
115 //表单禁用 136 //表单禁用
@@ -121,6 +142,7 @@ export default { @@ -121,6 +142,7 @@ export default {
121 }, 142 },
122 data() { 143 data() {
123 return { 144 return {
  145 + isBianhaoDisabled: false,
124 model: {}, 146 model: {},
125 labelCol: { 147 labelCol: {
126 xs: { span: 24 }, 148 xs: { span: 24 },
@@ -163,6 +185,7 @@ export default { @@ -163,6 +185,7 @@ export default {
163 this.modelDefault = JSON.parse(JSON.stringify(this.model)) 185 this.modelDefault = JSON.parse(JSON.stringify(this.model))
164 }, 186 },
165 methods: { 187 methods: {
  188 + ...mapGetters(['nickname', 'avatar', 'userInfo']),
166 handleSpChange(type) { 189 handleSpChange(type) {
167 if (type === 'spOne' && this.model.spOne === '同意') { 190 if (type === 'spOne' && this.model.spOne === '同意') {
168 this.model.noNotes = '' 191 this.model.noNotes = ''
@@ -172,10 +195,16 @@ export default { @@ -172,10 +195,16 @@ export default {
172 }, 195 },
173 add() { 196 add() {
174 this.edit(this.modelDefault) 197 this.edit(this.modelDefault)
  198 + this.isBianhaoDisabled = false
175 }, 199 },
176 edit(record) { 200 edit(record) {
177 this.model = Object.assign({}, record) 201 this.model = Object.assign({}, record)
178 this.visible = true 202 this.visible = true
  203 + if (this.userInfo().username === 'admin') {
  204 + this.isBianhaoDisabled = true
  205 + } else {
  206 + this.isBianhaoDisabled = false
  207 + }
179 }, 208 },
180 submitForm() { 209 submitForm() {
181 const that = this 210 const that = this
@@ -203,6 +232,8 @@ export default { @@ -203,6 +232,8 @@ export default {
203 }) 232 })
204 .finally(() => { 233 .finally(() => {
205 that.confirmLoading = false 234 that.confirmLoading = false
  235 + console.log(this.nickname())
  236 + console.log(this.userInfo().username)
206 }) 237 })
207 } 238 }
208 }) 239 })
@@ -130,6 +130,7 @@ export default { @@ -130,6 +130,7 @@ export default {
130 danwei: [{ required: true, message: '请输入单位!' }], 130 danwei: [{ required: true, message: '请输入单位!' }],
131 danPrice: [{ required: true, message: '请输入单价!' }], 131 danPrice: [{ required: true, message: '请输入单价!' }],
132 zongPrice: [{ required: true, message: '请输入总价!' }], 132 zongPrice: [{ required: true, message: '请输入总价!' }],
  133 + wuType: [{ required: true, message: '请输入物料类别!' }],
133 purpose: [{ required: true, message: '请输入用途!' }], 134 purpose: [{ required: true, message: '请输入用途!' }],
134 chang: [{ required: true, message: '请输入厂商!' }], 135 chang: [{ required: true, message: '请输入厂商!' }],
135 buyTime: [{ required: true, message: '请输入购买日期!' }], 136 buyTime: [{ required: true, message: '请输入购买日期!' }],
@@ -59,8 +59,8 @@ @@ -59,8 +59,8 @@
59 </a-form-model-item> 59 </a-form-model-item>
60 </a-col> 60 </a-col>
61 <a-col :span="24"> 61 <a-col :span="24">
62 - <a-form-model-item label="入库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">  
63 - <j-date placeholder="请选择入库时间" v-model="model.operTime" style="width: 100%" /> 62 + <a-form-model-item label="出库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
  63 + <j-date placeholder="请选择出库时间" v-model="model.operTime" style="width: 100%" />
64 </a-form-model-item> 64 </a-form-model-item>
65 </a-col> 65 </a-col>
66 </a-row> 66 </a-row>
@@ -10,6 +10,31 @@ @@ -10,6 +10,31 @@
10 </a-form-item> 10 </a-form-item>
11 </a-col> 11 </a-col>
12 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 12 <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="岗位" >
  14 + <a-select ref="select" v-model="queryParam.jobTitle" placeholder="请输入岗位" style="width: 285px">
  15 + <a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option>
  16 + <a-select-option value="WorkshopDirector">车间管理员</a-select-option>
  17 + <a-select-option value="WorkshopGeneralWorker">普工</a-select-option>
  18 + <a-select-option value="WorkshopTechnicalManager">车间技术总管</a-select-option>
  19 + <a-select-option value="WorkshopTechnician">车间技术员</a-select-option>
  20 + <a-select-option value="WorkshopAuxiliaryPersonnel">车间辅助人员</a-select-option>
  21 + <a-select-option value="PurchasingOfficer">采购员</a-select-option>
  22 + <a-select-option value="ProcurementSupervisor">采购主管</a-select-option>
  23 + <a-select-option value="Assembler">装配工</a-select-option>
  24 + <a-select-option value="AssemblySupervisor">装配主管</a-select-option>
  25 + <a-select-option value="OtherWorker">其他</a-select-option>
  26 + </a-select>
  27 + </a-form-item>
  28 + </a-col>
  29 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  30 + <a-form-item label="是否在职" >
  31 + <a-select ref="select" v-model="queryParam.notes" placeholder="请选择是否在职" style="width: 285px">
  32 + <a-select-option value="在职">在职</a-select-option>
  33 + <a-select-option value="离职">离职</a-select-option>
  34 + </a-select>
  35 + </a-form-item>
  36 + </a-col>
  37 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
13 <span style="float: right; overflow: hidden" class="table-page-search-submitButtons"> 38 <span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
14 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> 39 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
15 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> 40 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -47,7 +72,7 @@ @@ -47,7 +72,7 @@
47 <a-table 72 <a-table
48 ref="table" 73 ref="table"
49 size="middle" 74 size="middle"
50 - :scroll="{ x: 1200 }" 75 + :scroll="{ x: true }"
51 bordered 76 bordered
52 rowKey="id" 77 rowKey="id"
53 :columns="columns" 78 :columns="columns"
@@ -112,36 +137,87 @@ export default { @@ -112,36 +137,87 @@ export default {
112 }, 137 },
113 }, 138 },
114 { 139 {
115 - title: '姓名', 140 + title: '岗位',
116 align: 'center', 141 align: 'center',
117 - dataIndex: 'userName',  
118 - key: 'userName', 142 + dataIndex: 'jobTitle',
119 fixed: 'left', 143 fixed: 'left',
120 width: 100, 144 width: 100,
  145 + customRender: function (text) {
  146 + if (text === 'OfficeAdministrative') {
  147 + return '办公室行政人员'
  148 + } else if (text === 'WorkshopDirector') {
  149 + return '车间管理员'
  150 + } else if (text === 'WorkshopTechnicalManager') {
  151 + return '车间技术总管'
  152 + } else if (text === 'WorkshopTechnician') {
  153 + return '车间技术员'
  154 + } else if (text === 'WorkshopAuxiliaryPersonnel') {
  155 + return '车间辅助人员'
  156 + } else if (text === 'PurchasingOfficer') {
  157 + return '采购员'
  158 + } else if (text === 'ProcurementSupervisor') {
  159 + return '采购主管'
  160 + } else if (text === 'Assembler') {
  161 + return '装配工'
  162 + } else if (text === 'AssemblySupervisor') {
  163 + return '装配主管'
  164 + } else if (text === 'OtherWorker') {
  165 + return '其他'
  166 + } else if (text === 'WorkshopGeneralWorker') {
  167 + return '普工'
  168 + } else {
  169 + return text
  170 + }
  171 + },
  172 + },
  173 + {
  174 + title: '工号',
  175 + align: 'center',
  176 + dataIndex: 'jobId',
  177 + fixed: 'left',
  178 + width: 100,
  179 + },
  180 + {
  181 + title: '姓名',
  182 + align: 'center',
  183 + dataIndex: 'userName',
  184 + },
  185 + {
  186 + title: '入职日期',
  187 + align: 'center',
  188 + dataIndex: 'ruTime',
  189 + customRender: function (text) {
  190 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  191 + },
121 }, 192 },
  193 +
122 { 194 {
123 title: '身份证号', 195 title: '身份证号',
124 align: 'center', 196 align: 'center',
125 dataIndex: 'idCard', 197 dataIndex: 'idCard',
126 }, 198 },
127 { 199 {
128 - title: '基本工资', 200 + title: '银行卡号',
129 align: 'center', 201 align: 'center',
130 - dataIndex: 'basicSalary', 202 + dataIndex: 'bankCard',
131 }, 203 },
132 { 204 {
133 - title: '工时单价', 205 + title: '手机号',
134 align: 'center', 206 align: 'center',
135 - dataIndex: 'workingPrice', 207 + dataIndex: 'phone',
136 }, 208 },
137 -  
138 { 209 {
139 - title: '餐费单价', 210 + title: '学历',
140 align: 'center', 211 align: 'center',
141 - dataIndex: 'mealAllowancePrice', 212 + dataIndex: 'xueli',
142 }, 213 },
143 214
144 { 215 {
  216 + title: '基本工资',
  217 + align: 'center',
  218 + dataIndex: 'basicSalary',
  219 + },
  220 + {
145 title: '社保公司', 221 title: '社保公司',
146 align: 'center', 222 align: 'center',
147 dataIndex: 'socialCompany', 223 dataIndex: 'socialCompany',
@@ -152,12 +228,55 @@ export default { @@ -152,12 +228,55 @@ export default {
152 dataIndex: 'socialPerson', 228 dataIndex: 'socialPerson',
153 }, 229 },
154 { 230 {
155 - title: '比例', 231 + title: '社保起始日期',
  232 + align: 'center',
  233 + dataIndex: 'socialTime',
  234 + customRender: function (text) {
  235 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  236 + },
  237 + },
  238 + {
  239 + title: '餐费津贴标准',
  240 + align: 'center',
  241 + dataIndex: 'mealAllowancePrice',
  242 + },
  243 + {
  244 + title: '住房津贴标准',
  245 + align: 'center',
  246 + dataIndex: 'housePrice',
  247 + },
  248 + {
  249 + title: '管理津贴',
  250 + align: 'center',
  251 + dataIndex: 'guanliPrice',
  252 + },
  253 + {
  254 + title: '工时标准',
  255 + align: 'center',
  256 + dataIndex: 'workingPrice',
  257 + },
  258 + {
  259 + title: '全勤奖',
156 align: 'center', 260 align: 'center',
157 - dataIndex: 'proportion',  
158 - width:100 261 + dataIndex: 'fullAttendanceAward',
159 }, 262 },
160 { 263 {
  264 + title: '劳动合同周期',
  265 + align: 'center',
  266 + dataIndex: 'contractTime',
  267 + customRender: function (text) {
  268 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  269 + },
  270 + },
  271 + {
  272 + title: '是否在职',
  273 + align: 'center',
  274 + dataIndex: 'notes',
  275 + fixed: 'right',
  276 + width: 140,
  277 + },
  278 +
  279 + {
161 title: '操作', 280 title: '操作',
162 dataIndex: 'action', 281 dataIndex: 'action',
163 align: 'center', 282 align: 'center',
@@ -168,9 +287,8 @@ export default { @@ -168,9 +287,8 @@ export default {
168 ], 287 ],
169 url: { 288 url: {
170 list: '/salary/base/list', 289 list: '/salary/base/list',
171 - delete:'/salary/base/del',  
172 - deleteBatch:'/salary/base/deleteBatch',  
173 - 290 + delete: '/salary/base/del',
  291 + deleteBatch: '/salary/base/deleteBatch',
174 }, 292 },
175 } 293 }
176 }, 294 },
@@ -11,7 +11,12 @@ @@ -11,7 +11,12 @@
11 </a-col> 11 </a-col>
12 <a-col :span="12"> 12 <a-col :span="12">
13 <a-form-item label="工资月份"> 13 <a-form-item label="工资月份">
14 - <j-date v-model="queryParam.salaryMonth" placeholder="请选择工资月份" /> 14 + <a-month-picker
  15 + v-model="queryParam.salarymonth"
  16 + placeholder="请选择工资月份"
  17 + format="YYYY-MM"
  18 + @change="handleMonthChange"
  19 + />
15 </a-form-item> 20 </a-form-item>
16 </a-col> 21 </a-col>
17 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 22 <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -67,7 +72,7 @@ @@ -67,7 +72,7 @@
67 <a-table 72 <a-table
68 ref="table" 73 ref="table"
69 size="middle" 74 size="middle"
70 - :scroll="{ x: 2050 }" 75 + :scroll="{ x: true }"
71 bordered 76 bordered
72 rowKey="id" 77 rowKey="id"
73 :columns="columns" 78 :columns="columns"
@@ -79,15 +84,15 @@ @@ -79,15 +84,15 @@
79 @change="handleTableChange" 84 @change="handleTableChange"
80 > 85 >
81 <span slot="action" slot-scope="text, record"> 86 <span slot="action" slot-scope="text, record">
82 - <a @click="handleEdit(record)">编辑</a> 87 + <!-- <a @click="handleEdit(record)">编辑</a> -->
83 88
84 - <a-divider type="vertical" /> 89 + <!-- <a-divider type="vertical" /> -->
85 <a-dropdown> 90 <a-dropdown>
86 <a class="ant-dropdown-link">更多<a-icon type="down" /></a> 91 <a class="ant-dropdown-link">更多<a-icon type="down" /></a>
87 <a-menu slot="overlay"> 92 <a-menu slot="overlay">
88 - <a-menu-item> 93 + <!-- <a-menu-item>
89 <a @click="handleDetail(record)">详情</a> 94 <a @click="handleDetail(record)">详情</a>
90 - </a-menu-item> 95 + </a-menu-item> -->
91 <a-menu-item> 96 <a-menu-item>
92 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> 97 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
93 <a>删除</a> 98 <a>删除</a>
@@ -102,7 +107,6 @@ @@ -102,7 +107,6 @@
102 <tbl-salary-calculation-modal ref="modalForm" @ok="modalFormOk"></tbl-salary-calculation-modal> 107 <tbl-salary-calculation-modal ref="modalForm" @ok="modalFormOk"></tbl-salary-calculation-modal>
103 108
104 <tbl-salary-calculation-modal-tan ref="tanForm" @ok="modalFormOk"></tbl-salary-calculation-modal-tan> 109 <tbl-salary-calculation-modal-tan ref="tanForm" @ok="modalFormOk"></tbl-salary-calculation-modal-tan>
105 -  
106 </a-card> 110 </a-card>
107 </template> 111 </template>
108 112
@@ -120,34 +124,30 @@ export default { @@ -120,34 +124,30 @@ export default {
120 components: { 124 components: {
121 TblSalaryCalculationModal, 125 TblSalaryCalculationModal,
122 TblSalaryCalculationBase, 126 TblSalaryCalculationBase,
123 - TblSalaryCalculationModalTan  
124 - 127 + TblSalaryCalculationModalTan,
125 }, 128 },
126 data() { 129 data() {
127 return { 130 return {
128 modalFormUserOk: false, 131 modalFormUserOk: false,
129 - // day: '',  
130 - salaryMonth:'',  
131 - 132 + salaryMonth: '',
132 description: 'tbl_salary_calculation管理页面', 133 description: 'tbl_salary_calculation管理页面',
133 // 表头 134 // 表头
134 columns: [ 135 columns: [
135 { 136 {
136 title: '序号', 137 title: '序号',
137 - dataIndex: '', 138 + dataIndex: 'xuhao',
138 fixed: 'left', 139 fixed: 'left',
139 - key: 'rowIndex', 140 + key: 'xuhao',
140 width: 60, 141 width: 60,
141 align: 'center', 142 align: 'center',
142 customRender: function (t, r, index) { 143 customRender: function (t, r, index) {
143 return parseInt(index) + 1 144 return parseInt(index) + 1
144 }, 145 },
145 }, 146 },
146 - {  
147 - title:'月份',  
148 - align:"center",  
149 - dataIndex: 'salaryMonth',  
150 - key:'salarymonth', 147 + {
  148 + title: '工号',
  149 + align: 'center',
  150 + dataIndex: 'jobId',
151 fixed: 'left', 151 fixed: 'left',
152 width: 100, 152 width: 100,
153 }, 153 },
@@ -156,46 +156,37 @@ export default { @@ -156,46 +156,37 @@ export default {
156 align: 'center', 156 align: 'center',
157 dataIndex: 'userName', 157 dataIndex: 'userName',
158 key: 'userName', 158 key: 'userName',
159 -  
160 }, 159 },
161 { 160 {
162 - title: '基本工资', 161 + title: '身份证号',
163 align: 'center', 162 align: 'center',
164 - dataIndex: 'basicSalary',  
165 - 163 + dataIndex: 'idCard',
166 }, 164 },
167 { 165 {
168 - title: '天数', 166 + title: '银行卡号',
169 align: 'center', 167 align: 'center',
170 - dataIndex: 'day',  
171 - key: 'day',  
172 - slots: { title: 'day' },  
173 - // scopedSlots: { customRender: 'day' } 168 + dataIndex: 'bankCard',
174 }, 169 },
175 { 170 {
176 - title: '绩效工资', 171 + title: '手机号',
177 align: 'center', 172 align: 'center',
178 - dataIndex: 'meritPay',  
179 - },  
180 - {  
181 - title: '总工资',  
182 - align: 'center',  
183 - dataIndex: 'totalWages', 173 + dataIndex: 'phone',
184 }, 174 },
185 { 175 {
186 - title: '餐费补助', 176 + title: '基本工资',
187 align: 'center', 177 align: 'center',
188 - dataIndex: 'mealAllowance', 178 + dataIndex: 'basicSalary',
189 }, 179 },
  180 +
190 { 181 {
191 - title: '全勤奖', 182 + title: '绩效工资',
192 align: 'center', 183 align: 'center',
193 - dataIndex: 'fullAttendanceAward', 184 + dataIndex: 'meritPay',
194 }, 185 },
195 { 186 {
196 - title: '社保公司', 187 + title: '应发工资',
197 align: 'center', 188 align: 'center',
198 - dataIndex: 'socialCompany', 189 + dataIndex: 'salariesPayable',
199 }, 190 },
200 { 191 {
201 title: '社保个人', 192 title: '社保个人',
@@ -203,25 +194,11 @@ export default { @@ -203,25 +194,11 @@ export default {
203 dataIndex: 'socialPerson', 194 dataIndex: 'socialPerson',
204 }, 195 },
205 { 196 {
206 - title: '减项',  
207 - align: 'center',  
208 - dataIndex: 'deduction',  
209 - },  
210 - {  
211 - title: '补项',  
212 - align: 'center',  
213 - dataIndex: 'supplementary',  
214 - },  
215 - {  
216 - title: '应发工资',  
217 - align: 'center',  
218 - dataIndex: 'salariesPayable',  
219 - },  
220 - {  
221 title: '个税', 197 title: '个税',
222 align: 'center', 198 align: 'center',
223 dataIndex: 'personalTax', 199 dataIndex: 'personalTax',
224 }, 200 },
  201 +
225 { 202 {
226 title: '实发工资', 203 title: '实发工资',
227 align: 'center', 204 align: 'center',
@@ -248,7 +225,6 @@ export default { @@ -248,7 +225,6 @@ export default {
248 deleteBatch: '/salary/calculation/deleteBatch', 225 deleteBatch: '/salary/calculation/deleteBatch',
249 exportXlsUrl: '/salary/calculation/exportXls', 226 exportXlsUrl: '/salary/calculation/exportXls',
250 importExcelUrl: '/salary/calculation/importExcel', 227 importExcelUrl: '/salary/calculation/importExcel',
251 -  
252 }, 228 },
253 dictOptions: {}, 229 dictOptions: {},
254 superFieldList: [], 230 superFieldList: [],
@@ -269,13 +245,15 @@ export default { @@ -269,13 +245,15 @@ export default {
269 // this.$refs.modalFormUser.disableSubmit = false; 245 // this.$refs.modalFormUser.disableSubmit = false;
270 // }, 246 // },
271 247
272 -  
273 - 248 + handleMonthChange(value) {
  249 + this.queryParam.salaryMonth = value ? value.format('YYYY-MM') : null
  250 + },
  251 +
274 initDictConfig() {}, 252 initDictConfig() {},
275 getSuperFieldList() { 253 getSuperFieldList() {
276 let fieldList = [] 254 let fieldList = []
277 fieldList.push({ type: 'string', value: 'salarymonth', text: '月份' }) 255 fieldList.push({ type: 'string', value: 'salarymonth', text: '月份' })
278 - fieldList.push({ type: 'string', value: 'userName', text: '姓名'}) 256 + fieldList.push({ type: 'string', value: 'userName', text: '姓名' })
279 // fieldList.push({ type: 'string', value: 'idcard', text: '身份证号' }) 257 // fieldList.push({ type: 'string', value: 'idcard', text: '身份证号' })
280 fieldList.push({ type: 'string', value: 'basicsalary', text: '基本工资' }) 258 fieldList.push({ type: 'string', value: 'basicsalary', text: '基本工资' })
281 fieldList.push({ type: 'string', value: 'day', text: '天数' }) 259 fieldList.push({ type: 'string', value: 'day', text: '天数' })
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="岗位" >
  9 + <a-select ref="select" v-model="queryParam.jobId" placeholder="请输入岗位" style="width: 285px">
  10 + <a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option>
  11 + <a-select-option value="WorkshopDirector">车间管理员</a-select-option>
  12 + <a-select-option value="WorkshopGeneralWorker">普工</a-select-option>
  13 + <a-select-option value="WorkshopTechnicalManager">车间技术总管</a-select-option>
  14 + <a-select-option value="WorkshopTechnician">车间技术员</a-select-option>
  15 + <a-select-option value="WorkshopAuxiliaryPersonnel">车间辅助人员</a-select-option>
  16 + <a-select-option value="PurchasingOfficer">采购员</a-select-option>
  17 + <a-select-option value="ProcurementSupervisor">采购主管</a-select-option>
  18 + <a-select-option value="Assembler">装配工</a-select-option>
  19 + <a-select-option value="AssemblySupervisor">装配主管</a-select-option>
  20 + <a-select-option value="OtherWorker">其他</a-select-option>
  21 + </a-select>
  22 + </a-form-item>
  23 + </a-col>
  24 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  25 + <span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
  26 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  27 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  28 + </span>
  29 + </a-col>
  30 + </a-row>
  31 + </a-form>
  32 + </div>
  33 + <!-- 查询区域-END -->
  34 +
  35 + <!-- 操作按钮区域 -->
  36 + <div class="table-operator">
  37 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  38 + <a-button type="primary" icon="download" @click="handleExportXls('tbl_salary_suanfa')">导出</a-button>
  39 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  40 + <a-button type="primary" icon="import">导入</a-button>
  41 + </a-upload>
  42 + <!-- 高级查询区域 -->
  43 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  44 + <a-dropdown v-if="selectedRowKeys.length > 0">
  45 + <a-menu slot="overlay">
  46 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  47 + </a-menu>
  48 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  49 + </a-dropdown>
  50 + </div>
  51 +
  52 + <!-- table区域-begin -->
  53 + <div>
  54 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  55 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  56 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  57 + </div>
  58 +
  59 + <a-table
  60 + ref="table"
  61 + size="middle"
  62 + :scroll="{x:true}"
  63 + bordered
  64 + rowKey="id"
  65 + :columns="columns"
  66 + :dataSource="dataSource"
  67 + :pagination="ipagination"
  68 + :loading="loading"
  69 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  70 + class="j-table-force-nowrap"
  71 + @change="handleTableChange">
  72 +
  73 + <template slot="htmlSlot" slot-scope="text">
  74 + <div v-html="text"></div>
  75 + </template>
  76 + <template slot="imgSlot" slot-scope="text,record">
  77 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  78 + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  79 + </template>
  80 + <template slot="fileSlot" slot-scope="text">
  81 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  82 + <a-button
  83 + v-else
  84 + :ghost="true"
  85 + type="primary"
  86 + icon="download"
  87 + size="small"
  88 + @click="downloadFile(text)">
  89 + 下载
  90 + </a-button>
  91 + </template>
  92 +
  93 + <span slot="action" slot-scope="text, record">
  94 + <a @click="handleEdit(record)">编辑</a>
  95 +
  96 + <a-divider type="vertical" />
  97 + <a-dropdown>
  98 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  99 + <a-menu slot="overlay">
  100 + <a-menu-item>
  101 + <a @click="handleDetail(record)">详情</a>
  102 + </a-menu-item>
  103 + <a-menu-item>
  104 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  105 + <a>删除</a>
  106 + </a-popconfirm>
  107 + </a-menu-item>
  108 + </a-menu>
  109 + </a-dropdown>
  110 + </span>
  111 +
  112 + </a-table>
  113 + </div>
  114 +
  115 + <tbl-salary-suanfa-modal ref="modalForm" @ok="modalFormOk"></tbl-salary-suanfa-modal>
  116 + </a-card>
  117 +</template>
  118 +
  119 +<script>
  120 +
  121 + import '@/assets/less/TableExpand.less'
  122 + import { mixinDevice } from '@/utils/mixin'
  123 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  124 + import TblSalarySuanfaModal from './suanmodules/TblSalarySuanfaModal'
  125 +
  126 + export default {
  127 + name: 'TblSalarySuanfaList',
  128 + mixins:[JeecgListMixin, mixinDevice],
  129 + components: {
  130 + TblSalarySuanfaModal
  131 + },
  132 + data () {
  133 + return {
  134 + description: 'tbl_salary_suanfa管理页面',
  135 + // 表头
  136 + columns: [
  137 + {
  138 + title: '序号',
  139 + dataIndex: '',
  140 + key:'rowIndex',
  141 + width:60,
  142 + align:"center",
  143 + customRender:function (t,r,index) {
  144 + return parseInt(index)+1;
  145 + }
  146 + },
  147 + {
  148 + title:'岗位',
  149 + align:"center",
  150 + dataIndex: 'jobTitle'
  151 + },
  152 + {
  153 + title:'岗位编号',
  154 + align:"center",
  155 + dataIndex: 'jobId'
  156 + },
  157 + {
  158 + title:'基本工资',
  159 + align:"center",
  160 + dataIndex: 'basicSalary'
  161 + },
  162 + {
  163 + title:'总工资算法',
  164 + align:"center",
  165 + dataIndex: 'zongPrice'
  166 + },
  167 + {
  168 + title:'计算比例',
  169 + align:"center",
  170 + dataIndex: 'bili'
  171 + },
  172 + {
  173 + title:'备注',
  174 + align:"center",
  175 + dataIndex: 'notes'
  176 + },
  177 + {
  178 + title: '操作',
  179 + dataIndex: 'action',
  180 + align:"center",
  181 + fixed:"right",
  182 + width:147,
  183 + scopedSlots: { customRender: 'action' }
  184 + }
  185 + ],
  186 + url: {
  187 + list: "/salary/tblSalarySuanfa/list",
  188 + delete: "/salary/tblSalarySuanfa/delete",
  189 + deleteBatch: "/salary/tblSalarySuanfa/deleteBatch",
  190 + exportXlsUrl: "/salary/tblSalarySuanfa/exportXls",
  191 + importExcelUrl: "salary/tblSalarySuanfa/importExcel",
  192 +
  193 + },
  194 + dictOptions:{},
  195 + superFieldList:[],
  196 + }
  197 + },
  198 + created() {
  199 + this.getSuperFieldList();
  200 + },
  201 + computed: {
  202 + importExcelUrl: function(){
  203 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  204 + },
  205 + },
  206 + methods: {
  207 + initDictConfig(){
  208 + },
  209 + getSuperFieldList(){
  210 + let fieldList=[];
  211 + fieldList.push({type:'string',value:'jobTitle',text:'岗位'})
  212 + fieldList.push({type:'string',value:'jobId',text:'岗位编号'})
  213 + fieldList.push({type:'number',value:'basicSalary',text:'基本工资'})
  214 + fieldList.push({type:'string',value:'zongPrice',text:'总工资算法'})
  215 + fieldList.push({type:'number',value:'bili',text:'计算比例'})
  216 + fieldList.push({type:'string',value:'notes',text:'备注'})
  217 + this.superFieldList = fieldList
  218 + }
  219 + }
  220 + }
  221 +</script>
  222 +<style scoped>
  223 + @import '~@assets/less/common.less';
  224 +</style>
@@ -3,73 +3,119 @@ @@ -3,73 +3,119 @@
3 <j-form-container :disabled="formDisabled"> 3 <j-form-container :disabled="formDisabled">
4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> 4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
5 <a-row> 5 <a-row>
6 - <a-col :span="12"> 6 + <a-col :span="24">
  7 + <a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobId">
  8 + <a-input v-model="model.jobId" placeholder="请输入工号"></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
7 <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName"> 12 <a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
8 <a-input v-model="model.userName" placeholder="请输入姓名"></a-input> 13 <a-input v-model="model.userName" placeholder="请输入姓名"></a-input>
9 </a-form-model-item> 14 </a-form-model-item>
10 </a-col> 15 </a-col>
11 - <a-col :span="12"> 16 + <a-col :span="24">
  17 + <a-form-model-item label="岗位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobTitle">
  18 + <a-select ref="select" v-model="model.jobTitle" placeholder="请输入岗位" style="width: 285px">
  19 + <a-select-option value="OfficeAdministrative">办公室行政人员</a-select-option>
  20 + <a-select-option value="WorkshopDirector">车间管理员</a-select-option>
  21 + <a-select-option value="WorkshopGeneralWorker">普工</a-select-option>
  22 + <a-select-option value="WorkshopTechnicalManager">车间技术总管</a-select-option>
  23 + <a-select-option value="WorkshopTechnician">车间技术员</a-select-option>
  24 + <a-select-option value="WorkshopAuxiliaryPersonnel">车间辅助人员</a-select-option>
  25 + <a-select-option value="PurchasingOfficer">采购员</a-select-option>
  26 + <a-select-option value="ProcurementSupervisor">采购主管</a-select-option>
  27 + <a-select-option value="Assembler">装配工</a-select-option>
  28 + <a-select-option value="AssemblySupervisor">装配主管</a-select-option>
  29 + <a-select-option value="OtherWorker">其他</a-select-option>
  30 + </a-select>
  31 + </a-form-model-item>
  32 + </a-col>
  33 + <a-col :span="24">
  34 + <a-form-model-item label="工时标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workingPrice">
  35 + <a-input-number v-model="model.workingPrice" placeholder="请输入工时标准" style="width: 100%" />
  36 + </a-form-model-item>
  37 + </a-col>
  38 + <a-col :span="24">
12 <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="idCard"> 39 <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="idCard">
13 <a-input v-model="model.idCard" placeholder="请输入身份证号"></a-input> 40 <a-input v-model="model.idCard" placeholder="请输入身份证号"></a-input>
14 </a-form-model-item> 41 </a-form-model-item>
15 </a-col> 42 </a-col>
16 - <a-col :span="12"> 43 + <a-col :span="24">
17 <a-form-model-item label="银行卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankCard"> 44 <a-form-model-item label="银行卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankCard">
18 <a-input v-model="model.bankCard" placeholder="请输入银行卡号"></a-input> 45 <a-input v-model="model.bankCard" placeholder="请输入银行卡号"></a-input>
19 </a-form-model-item> 46 </a-form-model-item>
20 </a-col> 47 </a-col>
21 - <a-col :span="12">  
22 - <a-form-model-item label="工作职位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobTitle">  
23 - <a-select  
24 - ref="select"  
25 - v-model="model.jobTitle"  
26 - placeholder="请输入工作职位"  
27 - style="width: 285px"  
28 -  
29 - >  
30 - <a-select-option value="officeAdministrative">办公室行政人员</a-select-option>  
31 - <a-select-option value="workshopDirector">车间主任</a-select-option>  
32 - <a-select-option value="workshopGeneralWorker">车间普工</a-select-option>  
33 - <a-select-option value="otherWorker">其他</a-select-option>  
34 - </a-select> 48 + <a-col :span="24">
  49 + <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
  50 + <a-input v-model="model.phone" placeholder="请输入手机号"></a-input>
35 </a-form-model-item> 51 </a-form-model-item>
36 </a-col> 52 </a-col>
37 - <a-col :span="12">  
38 - <a-form-model-item label="工时单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workingPrice">  
39 - <a-input v-model="model.workingPrice" placeholder="请输入工时单价"></a-input> 53 + <a-col :span="24">
  54 + <a-form-model-item label="学历" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xueli">
  55 + <a-input v-model="model.xueli" placeholder="请输入学历"></a-input>
40 </a-form-model-item> 56 </a-form-model-item>
41 </a-col> 57 </a-col>
42 - <a-col :span="12"> 58 + <a-col :span="24">
  59 + <a-form-model-item label="入职日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ruTime">
  60 + <j-date placeholder="请选择入职日期" v-model="model.ruTime" style="width: 100%" />
  61 + </a-form-model-item>
  62 + </a-col>
  63 + <a-col :span="24">
43 <a-form-model-item label="基本工资" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicSalary"> 64 <a-form-model-item label="基本工资" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicSalary">
44 - <a-input  
45 - v-model="model.basicSalary"  
46 - placeholder="请输入基本工资"  
47 - ></a-input> 65 + <a-input-number v-model="model.basicSalary" placeholder="请输入基本工资" style="width: 100%" />
48 </a-form-model-item> 66 </a-form-model-item>
49 </a-col> 67 </a-col>
50 -  
51 - <a-col :span="12">  
52 - <a-form-model-item label="餐费单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mealAllowancePrice">  
53 - <a-input  
54 - v-model="model.mealAllowancePrice"  
55 - placeholder="请输入餐费单价"  
56 - ></a-input> 68 + <a-col :span="24">
  69 + <a-form-model-item
  70 + label="餐费津贴标准"
  71 + :labelCol="labelCol"
  72 + :wrapperCol="wrapperCol"
  73 + prop="mealAllowancePrice"
  74 + >
  75 + <a-input-number v-model="model.mealAllowancePrice" placeholder="请输入餐费津贴标准" style="width: 100%" />
57 </a-form-model-item> 76 </a-form-model-item>
58 </a-col> 77 </a-col>
59 -  
60 - <a-col :span="12"> 78 + <a-col :span="24">
  79 + <a-form-model-item label="住房津贴标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="housePrice">
  80 + <a-input-number v-model="model.housePrice" placeholder="请输入住房津贴标准" style="width: 100%" />
  81 + </a-form-model-item>
  82 + </a-col>
  83 + <a-col :span="24">
61 <a-form-model-item label="社保公司" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialCompany"> 84 <a-form-model-item label="社保公司" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialCompany">
62 - <a-input v-model="model.socialCompany" placeholder="请输入社保公司" ></a-input> 85 + <a-input-number v-model="model.socialCompany" placeholder="请输入社保公司" style="width: 100%" />
63 </a-form-model-item> 86 </a-form-model-item>
64 </a-col> 87 </a-col>
65 - <a-col :span="12"> 88 + <a-col :span="24">
66 <a-form-model-item label="社保个人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialPerson"> 89 <a-form-model-item label="社保个人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialPerson">
67 - <a-input v-model="model.socialPerson" placeholder="请输入社保个人" ></a-input> 90 + <a-input-number v-model="model.socialPerson" placeholder="请输入社保个人" style="width: 100%" />
  91 + </a-form-model-item>
  92 + </a-col>
  93 + <a-col :span="24">
  94 + <a-form-model-item label="管理津贴" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guanliPrice">
  95 + <a-input-number v-model="model.guanliPrice" placeholder="请输入管理津贴" style="width: 100%" />
68 </a-form-model-item> 96 </a-form-model-item>
69 </a-col> 97 </a-col>
70 - <a-col :span="12">  
71 - <a-form-model-item label="比例" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="proportion">  
72 - <a-input v-model="model.proportion" placeholder="请输入比例" ></a-input> 98 + <a-col :span="24">
  99 + <a-form-model-item label="社保起始日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="socialTime">
  100 + <j-date placeholder="请选择社保起始日期" v-model="model.socialTime" style="width: 100%" />
  101 + </a-form-model-item>
  102 + </a-col>
  103 + <a-col :span="24">
  104 + <a-form-model-item label="是否在职" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
  105 + <a-select ref="select" v-model="model.notes" placeholder="请选择是否在职" style="width: 285px">
  106 + <a-select-option value="在职">在职</a-select-option>
  107 + <a-select-option value="离职">离职</a-select-option>
  108 + </a-select>
  109 + </a-form-model-item>
  110 + </a-col>
  111 + <a-col :span="24">
  112 + <a-form-model-item label="全勤奖" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fullAttendanceAward">
  113 + <a-input-number v-model="model.fullAttendanceAward" placeholder="请输入全勤奖" style="width: 100%" />
  114 + </a-form-model-item>
  115 + </a-col>
  116 + <a-col :span="24">
  117 + <a-form-model-item label="劳动合同周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contractTime">
  118 + <j-date placeholder="请选择劳动合同周期" v-model="model.contractTime" style="width: 100%" />
73 </a-form-model-item> 119 </a-form-model-item>
74 </a-col> 120 </a-col>
75 </a-row> 121 </a-row>
@@ -81,6 +127,7 @@ @@ -81,6 +127,7 @@
81 <script> 127 <script>
82 import { httpAction, getAction } from '@/api/manage' 128 import { httpAction, getAction } from '@/api/manage'
83 import { message } from 'ant-design-vue' 129 import { message } from 'ant-design-vue'
  130 +import { duplicateCheck2 } from '@/api/api'
84 export default { 131 export default {
85 name: 'TblSalaryBaseForm', 132 name: 'TblSalaryBaseForm',
86 props: { 133 props: {
@@ -93,6 +140,7 @@ export default { @@ -93,6 +140,7 @@ export default {
93 }, 140 },
94 data() { 141 data() {
95 return { 142 return {
  143 + currentPhone: '',
96 labelCol: { 144 labelCol: {
97 xs: { span: 24 }, 145 xs: { span: 24 },
98 sm: { span: 5 }, 146 sm: { span: 5 },
@@ -108,29 +156,39 @@ export default { @@ -108,29 +156,39 @@ export default {
108 workingPrice: 0, //工时单价 156 workingPrice: 0, //工时单价
109 jobTitle: undefined, // 工作职位 157 jobTitle: undefined, // 工作职位
110 totalWages: 0, // 总工资 158 totalWages: 0, // 总工资
111 - mealAllowancePrice: 0, // 餐费单价  
112 - basicSalary: 0, // 基本工资  
113 - socialCompany: 0, // 社保公司  
114 - socialPerson: 0, // 社保个人  
115 - proportion:1 //比例 159 + mealAllowancePrice: 25, // 餐费单价
  160 + basicSalary: 2000, // 基本工资
  161 + socialCompany: 990.2, // 社保公司
  162 + socialPerson: 397.89, // 社保个人
  163 + fullAttendanceAward: 200, // 全勤奖
116 }, 164 },
117 confirmLoading: false, 165 confirmLoading: false,
118 validatorRules: { 166 validatorRules: {
  167 + jobId: [{ required: true, message: '请输入工号!' }],
  168 + jobTitle: [{ required: true, message: '请选择岗位!' }],
119 userName: [{ required: true, message: '请输入姓名!' }], 169 userName: [{ required: true, message: '请输入姓名!' }],
120 - idCard: [{ required: true, message: '请输入身份证号!' }],  
121 - bankCard: [{ required: true, message: '请输入银行卡号!' }], 170 + idCard: [{ required: true, message: '请输入身份证号!' } ,
  171 + { 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: '请输入正确格式的身份证号!' }],
  172 + bankCard: [{ required: true, message: '请输入银行卡号!' },{pattern:/^\d{16,19}$/ , message:"请输入正确的银行卡号"}],
122 basicSalary: [{ required: true, message: '请输入基本工资!' }], 173 basicSalary: [{ required: true, message: '请输入基本工资!' }],
123 - jobTitle: [{ required: true, message: '请输入工作职位!' }],  
124 - mealAllowancePrice: [{ required: true, message: '请输入餐费单价!' }], 174 + phone: [{ required: true, message: '请输入手机号!' }, { validator: this.validatePhone }],
125 socialCompany: [{ required: true, message: '请输入社保公司!' }], 175 socialCompany: [{ required: true, message: '请输入社保公司!' }],
126 socialPerson: [{ required: true, message: '请输入社保个人!' }], 176 socialPerson: [{ required: true, message: '请输入社保个人!' }],
127 workingPrice: [{ required: true, message: '请输入工时单价!' }], 177 workingPrice: [{ required: true, message: '请输入工时单价!' }],
128 - // proportion: [{ required: true, message: '请输入比例!' }], 178 + xueli: [{ required: true, message: '请输入学历!' }],
  179 + ruTime: [{ required: true, message: '请输入入职日期!' }],
  180 + mealAllowancePrice: [{ required: true, message: '请输入餐费津贴标准!' }],
  181 + housePrice: [{ required: true, message: '请输入住房津贴标准!' }],
  182 + guanliPrice: [{ required: true, message: '请输入管理津贴!' }],
  183 + socialTime: [{ required: true, message: '请输入社保起始日期!' }],
  184 + notes: [{ required: true, message: '请选择是否在职!' }],
  185 + contractTime: [{ required: true, message: '请输入劳动合同周期!' }],
  186 + fullAttendanceAward: [{ required: true, message: '请输入全勤奖!' }],
129 }, 187 },
130 url: { 188 url: {
131 add: '/salary/base/add', 189 add: '/salary/base/add',
132 - edit:'/salary/base/update',  
133 - queryById: "/salary/base/queryById" 190 + edit: '/salary/base/update',
  191 + queryById: '/salary/base/queryById',
134 }, 192 },
135 } 193 }
136 }, 194 },
@@ -145,12 +203,42 @@ export default { @@ -145,12 +203,42 @@ export default {
145 this.modelDefault = JSON.parse(JSON.stringify(this.model)) 203 this.modelDefault = JSON.parse(JSON.stringify(this.model))
146 }, 204 },
147 methods: { 205 methods: {
  206 + validatePhone(rule, value, callback) {
  207 + console.log(this.currentPhone)
  208 + if (!value) {
  209 + callback()
  210 + } else {
  211 + if (new RegExp(/^1[3|4|5|7|8|9][0-9]\d{8}$/).test(value)) {
  212 + const param = { phone: this.model.phone }
  213 +
  214 + // 使用 Promise 或者 async/await 来等待异步请求完成
  215 + getAction('/salary/base/listphone', param)
  216 + .then((res) => {
  217 + console.log(value)
  218 + if (value === this.currentPhone) {
  219 + callback()
  220 + }else if (res.result && res.result.length <= 0) {
  221 + callback()
  222 + } else {
  223 + callback('手机号已存在!')
  224 + }
  225 + })
  226 + .catch((error) => {
  227 + console.error('Error:', error)
  228 + callback('网络请求失败,请稍后重试!')
  229 + })
  230 + } else {
  231 + callback('请输入正确格式的手机号码!')
  232 + }
  233 + }
  234 + },
148 add() { 235 add() {
149 this.edit(this.modelDefault) 236 this.edit(this.modelDefault)
150 }, 237 },
151 edit(record) { 238 edit(record) {
152 - this.model = Object.assign({}, record);  
153 - this.visible = true; 239 + this.model = Object.assign({}, record)
  240 + this.currentPhone = this.model.phone
  241 + this.visible = true
154 }, 242 },
155 submitForm() { 243 submitForm() {
156 const that = this 244 const that = this
@@ -143,13 +143,11 @@ export default { @@ -143,13 +143,11 @@ export default {
143 meritPay: 0, // 绩效工资 143 meritPay: 0, // 绩效工资
144 totalWages: 0, // 总工资 144 totalWages: 0, // 总工资
145 mealAllowance: 0, // 餐费补助 145 mealAllowance: 0, // 餐费补助
146 - basicSalary: 0, // 基本工资 146 + basicSalary: 2000, // 基本工资
147 salariesPayable: 0, 147 salariesPayable: 0,
148 - deduction: 0, // 减项  
149 - supplementary: 0, // 补项  
150 - socialCompany: 0, // 社保公司  
151 - socialPerson: 0, // 社保个人  
152 - fullAttendanceAward: 0, // 全勤奖 148 + socialCompany: 990.2, // 社保公司
  149 + socialPerson: 397.89, // 社保个人
  150 + fullAttendanceAward: 200, // 全勤奖
153 personalTax: 0,// 个税 151 personalTax: 0,// 个税
154 netSalary:0,// 实发工资 152 netSalary:0,// 实发工资
155 }, 153 },
@@ -5,7 +5,12 @@ @@ -5,7 +5,12 @@
5 <a-row> 5 <a-row>
6 <a-col :span="12"> 6 <a-col :span="12">
7 <a-form-model-item label="工资月份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salaryMonth"> 7 <a-form-model-item label="工资月份" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="salaryMonth">
8 - <j-date v-model="model.salaryMonth" placeholder="请选择工资月份" /> 8 + <a-month-picker
  9 + v-model="model.salaryMonth"
  10 + placeholder="请选择工资月份"
  11 + format="YYYY-MM"
  12 + @change="handleMonthChange"
  13 + />
9 </a-form-model-item> 14 </a-form-model-item>
10 </a-col> 15 </a-col>
11 </a-row> 16 </a-row>
@@ -56,6 +61,9 @@ export default { @@ -56,6 +61,9 @@ export default {
56 }, 61 },
57 }, 62 },
58 methods: { 63 methods: {
  64 + handleMonthChange(value) {
  65 + this.model.salaryMonth = value ? value.format('YYYY-MM') : null
  66 + },
59 selectup() {}, 67 selectup() {},
60 submitForm() { 68 submitForm() {
61 const that = this 69 const that = this
@@ -69,7 +77,11 @@ export default { @@ -69,7 +77,11 @@ export default {
69 that.$message.success(res.message) 77 that.$message.success(res.message)
70 that.$emit('ok') 78 that.$emit('ok')
71 } else { 79 } else {
72 - that.$message.warning(res.message) 80 + if (res.message === '操作失败,null') {
  81 + that.$message.warning('计算错误')
  82 + } else {
  83 + that.$message.warning(res.message)
  84 + }
73 } 85 }
74 }) 86 })
75 .finally(() => { 87 .finally(() => {
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="岗位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobTitle">
  8 + <a-input v-model="model.jobTitle" placeholder="请输入岗位" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="岗位编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jobId">
  13 + <a-input v-model="model.jobId" placeholder="请输入岗位编号" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="基本工资" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicSalary">
  18 + <a-input-number v-model="model.basicSalary" placeholder="请输入基本工资" style="width: 100%" />
  19 + </a-form-model-item>
  20 + </a-col>
  21 + <a-col :span="24">
  22 + <a-form-model-item label="总工资算法" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zongPrice">
  23 + <a-input v-model="model.zongPrice" placeholder="请输入总工资算法" ></a-input>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="计算比例" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bili">
  28 + <a-input-number v-model="model.bili" placeholder="请输入计算比例" style="width: 100%" />
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes">
  33 + <a-input v-model="model.notes" placeholder="请输入备注" ></a-input>
  34 + </a-form-model-item>
  35 + </a-col>
  36 + </a-row>
  37 + </a-form-model>
  38 + </j-form-container>
  39 + </a-spin>
  40 +</template>
  41 +
  42 +<script>
  43 +
  44 + import { httpAction, getAction } from '@/api/manage'
  45 + import { validateDuplicateValue } from '@/utils/util'
  46 +
  47 + export default {
  48 + name: 'TblSalarySuanfaForm',
  49 + components: {
  50 + },
  51 + props: {
  52 + //表单禁用
  53 + disabled: {
  54 + type: Boolean,
  55 + default: false,
  56 + required: false
  57 + }
  58 + },
  59 + data () {
  60 + return {
  61 + model:{
  62 + },
  63 + labelCol: {
  64 + xs: { span: 24 },
  65 + sm: { span: 5 },
  66 + },
  67 + wrapperCol: {
  68 + xs: { span: 24 },
  69 + sm: { span: 16 },
  70 + },
  71 + confirmLoading: false,
  72 + validatorRules: {
  73 + jobId: [{ required: true, message: '请输入岗位编号!' }],
  74 + jobTitle: [{ required: true, message: '请输入岗位名称!' }],
  75 + basicSalary: [{ required: true, message: '请输入基本工资!' }],
  76 + bili: [{ required: true, message: '请输入计算比例!' }],
  77 + zongPrice: [{ required: true, message: '请输入总工资算法!' }],
  78 + },
  79 + url: {
  80 + add: "/salary/tblSalarySuanfa/add",
  81 + edit: "/salary/tblSalarySuanfa/edit",
  82 + queryById: "/salary/tblSalarySuanfa/queryById"
  83 + }
  84 + }
  85 + },
  86 + computed: {
  87 + formDisabled(){
  88 + return this.disabled
  89 + },
  90 + },
  91 + created () {
  92 + //备份model原始值
  93 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  94 + },
  95 + methods: {
  96 + add () {
  97 + this.edit(this.modelDefault);
  98 + },
  99 + edit (record) {
  100 + this.model = Object.assign({}, record);
  101 + this.visible = true;
  102 + },
  103 + submitForm () {
  104 + const that = this;
  105 + // 触发表单验证
  106 + this.$refs.form.validate(valid => {
  107 + if (valid) {
  108 + that.confirmLoading = true;
  109 + let httpurl = '';
  110 + let method = '';
  111 + if(!this.model.id){
  112 + httpurl+=this.url.add;
  113 + method = 'post';
  114 + }else{
  115 + httpurl+=this.url.edit;
  116 + method = 'put';
  117 + }
  118 + httpAction(httpurl,this.model,method).then((res)=>{
  119 + if(res.success){
  120 + that.$message.success(res.message);
  121 + that.$emit('ok');
  122 + }else{
  123 + that.$message.warning(res.message);
  124 + }
  125 + }).finally(() => {
  126 + that.confirmLoading = false;
  127 + })
  128 + }
  129 +
  130 + })
  131 + },
  132 + }
  133 + }
  134 +</script>
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <tbl-salary-suanfa-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-salary-suanfa-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import TblSalarySuanfaForm from './TblSalarySuanfaForm'
  21 +
  22 + export default {
  23 + name: 'TblSalarySuanfaModal',
  24 + components: {
  25 + TblSalarySuanfaForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <tbl-salary-suanfa-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-salary-suanfa-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import TblSalarySuanfaForm from './TblSalarySuanfaForm'
  18 + export default {
  19 + name: 'TblSalarySuanfaModal',
  20 + components: {
  21 + TblSalarySuanfaForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
@@ -27,8 +27,9 @@ @@ -27,8 +27,9 @@
27 27
28 <!-- 操作按钮区域 --> 28 <!-- 操作按钮区域 -->
29 <div class="table-operator"> 29 <div class="table-operator">
  30 + <a-button type="primary" icon="download" @click="handleExportXls('tbl_trad_zong')">导出</a-button>
30 <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 31 <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
31 - <a-button type="primary" icon="download" @click="handleExportXls('tbl_trad_zong')">导出</a-button> 32 +
32 <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> 33 <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
33 <a-button type="primary" icon="import">导入</a-button> 34 <a-button type="primary" icon="import">导入</a-button>
34 </a-upload> --> 35 </a-upload> -->
@@ -84,22 +85,22 @@ @@ -84,22 +85,22 @@
84 </template> 85 </template>
85 86
86 <span slot="action" slot-scope="text, record"> 87 <span slot="action" slot-scope="text, record">
87 - <a @click="handleEdit(record)">编辑</a> 88 + <!-- <a @click="handleEdit(record)">编辑</a> -->
88 89
89 - <a-divider type="vertical" />  
90 - <a-dropdown> 90 + <!-- <a-divider type="vertical" /> -->
  91 + <!-- <a-dropdown>
91 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> 92 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
92 <a-menu slot="overlay"> 93 <a-menu slot="overlay">
93 - <a-menu-item> 94 + <a-menu-item> -->
94 <a @click="handleDetail(record)">详情</a> 95 <a @click="handleDetail(record)">详情</a>
95 - </a-menu-item>  
96 - <a-menu-item> 96 + <!-- </a-menu-item> -->
  97 + <!-- <a-menu-item>
97 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> 98 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
98 <a>删除</a> 99 <a>删除</a>
99 </a-popconfirm> 100 </a-popconfirm>
100 - </a-menu-item>  
101 - </a-menu>  
102 - </a-dropdown> 101 + </a-menu-item> -->
  102 + <!-- </a-menu>
  103 + </a-dropdown> -->
103 </span> 104 </span>
104 105
105 </a-table> 106 </a-table>
@@ -5,7 +5,11 @@ @@ -5,7 +5,11 @@
5 <a-row> 5 <a-row>
6 <a-col :span="24"> 6 <a-col :span="24">
7 <a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber"> 7 <a-form-model-item label="招标号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenderNumber">
8 - <a-input v-model="model.tenderNumber" placeholder="请输入招标号"></a-input> 8 + <a-input
  9 + v-model="model.tenderNumber"
  10 + placeholder="请输入招标号"
  11 +
  12 + ></a-input>
9 </a-form-model-item> 13 </a-form-model-item>
10 </a-col> 14 </a-col>
11 <a-col :span="24"> 15 <a-col :span="24">
@@ -20,7 +24,11 @@ @@ -20,7 +24,11 @@
20 </a-col> 24 </a-col>
21 <a-col :span="24"> 25 <a-col :span="24">
22 <a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber"> 26 <a-form-model-item label="客户料号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
23 - <a-input v-model="model.partNumber" placeholder="请输入客户料号"></a-input> 27 + <a-input
  28 + v-model="model.partNumber"
  29 + placeholder="请输入客户料号"
  30 +
  31 + ></a-input>
24 </a-form-model-item> 32 </a-form-model-item>
25 </a-col> 33 </a-col>
26 <a-col :span="24"> 34 <a-col :span="24">
@@ -30,7 +38,7 @@ @@ -30,7 +38,7 @@
30 </a-col> 38 </a-col>
31 <a-col :span="24"> 39 <a-col :span="24">
32 <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname"> 40 <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productname">
33 - <a-input v-model="model.productname" placeholder="请输入品名"></a-input> 41 + <a-input v-model="model.productname" placeholder="请输入品名" ></a-input>
34 </a-form-model-item> 42 </a-form-model-item>
35 </a-col> 43 </a-col>
36 <a-col :span="24"> 44 <a-col :span="24">
@@ -125,6 +133,7 @@ import { validateDuplicateValue } from '@/utils/util' @@ -125,6 +133,7 @@ import { validateDuplicateValue } from '@/utils/util'
125 133
126 export default { 134 export default {
127 name: 'TblTradBaseForm', 135 name: 'TblTradBaseForm',
  136 +
128 components: {}, 137 components: {},
129 props: { 138 props: {
130 //表单禁用 139 //表单禁用
@@ -136,6 +145,10 @@ export default { @@ -136,6 +145,10 @@ export default {
136 }, 145 },
137 data() { 146 data() {
138 return { 147 return {
  148 + currentTenNumber:'',
  149 + currentPartNumber:'',
  150 + isBianhaoDisabled: true, // 添加一个额外的变量来控制合同编号输入框的禁用状态
  151 + isBianhaoDisabled2: false,
139 model: {}, 152 model: {},
140 labelCol: { 153 labelCol: {
141 xs: { span: 24 }, 154 xs: { span: 24 },
@@ -147,10 +160,10 @@ export default { @@ -147,10 +160,10 @@ export default {
147 }, 160 },
148 confirmLoading: false, 161 confirmLoading: false,
149 validatorRules: { 162 validatorRules: {
150 - tenderNumber: [{ required: true, message: '请输入招标号!' }], 163 + tenderNumber: [{ required: true, message: '请输入招标号!' }, { validator: this.validateNumber }],
151 customer: [{ required: true, message: '请输入客户!' }], 164 customer: [{ required: true, message: '请输入客户!' }],
152 procurement: [{ required: true, message: '请输入客户采购!' }], 165 procurement: [{ required: true, message: '请输入客户采购!' }],
153 - partNumber: [{ required: true, message: '请输入客户料号!' }], 166 + partNumber: [{ required: true, message: '请输入客户料号!' }, { validator: this.validateNumber }],
154 description: [{ required: true, message: '请输入物料描述!' }], 167 description: [{ required: true, message: '请输入物料描述!' }],
155 productname: [{ required: true, message: '请输入品名!' }], 168 productname: [{ required: true, message: '请输入品名!' }],
156 specifications: [{ required: true, message: '请输入规格!' }], 169 specifications: [{ required: true, message: '请输入规格!' }],
@@ -158,12 +171,12 @@ export default { @@ -158,12 +171,12 @@ export default {
158 danwei: [{ required: true, message: '请输入计量单位!' }], 171 danwei: [{ required: true, message: '请输入计量单位!' }],
159 company: [{ required: true, message: '请输入客户需求单位!' }], 172 company: [{ required: true, message: '请输入客户需求单位!' }],
160 baseZhong: [{ required: true, message: '请输入中标单价!' }], 173 baseZhong: [{ required: true, message: '请输入中标单价!' }],
161 -  
162 }, 174 },
163 url: { 175 url: {
164 add: '/trad/tblTradBase/add', 176 add: '/trad/tblTradBase/add',
165 edit: '/trad/tblTradBase/edit', 177 edit: '/trad/tblTradBase/edit',
166 queryById: '/trad/tblTradBase/queryById', 178 queryById: '/trad/tblTradBase/queryById',
  179 + queryBy: 'trad/tblTradBase/queryBy',
167 }, 180 },
168 } 181 }
169 }, 182 },
@@ -177,12 +190,41 @@ export default { @@ -177,12 +190,41 @@ export default {
177 this.modelDefault = JSON.parse(JSON.stringify(this.model)) 190 this.modelDefault = JSON.parse(JSON.stringify(this.model))
178 }, 191 },
179 methods: { 192 methods: {
  193 + validateNumber(rule, value, callback) {
  194 + console.log(this.currentTenNumber)
  195 + console.log(this.currentPartNumber)
  196 + if (!value) {
  197 + callback()
  198 + } else {
  199 + const param = { tenderNumber: this.model.tenderNumber, partNumber: this.model.partNumber}
  200 + // 使用 Promise 或者 async/await 来等待异步请求完成
  201 + getAction(this.url.queryBy, param)
  202 + .then((res) => {
  203 + if (this.model.tenderNumber === this.currentTenNumber && this.model.partNumber===this.currentPartNumber) {
  204 + callback()
  205 + }else if (res.result && res.result.length <= 0) {
  206 + callback()
  207 + } else {
  208 + callback('招标信息已存在!')
  209 + }
  210 + })
  211 + .catch((error) => {
  212 + console.error('Error:', error)
  213 + callback('网络请求失败,请稍后重试!')
  214 + })
  215 + }
  216 + },
  217 +
180 add() { 218 add() {
181 this.edit(this.modelDefault) 219 this.edit(this.modelDefault)
182 }, 220 },
183 edit(record) { 221 edit(record) {
184 this.model = Object.assign({}, record) 222 this.model = Object.assign({}, record)
  223 + this.currentTenNumber=this.model.tenderNumber
  224 + this.currentPartNumber=this.model.partNumber
185 this.visible = true 225 this.visible = true
  226 +
  227 + // this.isBianhaoDisabled2 = true
186 }, 228 },
187 submitForm() { 229 submitForm() {
188 const that = this 230 const that = this
@@ -104,20 +104,18 @@ export default { @@ -104,20 +104,18 @@ export default {
104 104
105 console.log(res) 105 console.log(res)
106 console.log(res2) 106 console.log(res2)
107 - if (res2.result) {  
108 - this.$message.error('这个招标已存在合同信息') 107 + if (res.result && res.result.length <=0) {
  108 + this.$message.error('没有这个招标信息,请重新输入')
  109 +
109 this.confirmLoading = false 110 this.confirmLoading = false
110 - // this.readOnly = true  
111 - // 设置组件为禁用状态  
112 - this.isBianhaoDisabled=true 111 + this.isBianhaoDisabled = true
113 return 112 return
114 } 113 }
115 - if (!res.result) {  
116 - this.$message.error('没有这个招标信息,请重新输入') 114 + if (res2.result && res2.result.length >0) {
  115 + this.$message.error('这个招标已存在合同信息')
  116 +
117 this.confirmLoading = false 117 this.confirmLoading = false
118 - // this.readOnly = true  
119 - this.isBianhaoDisabled=true  
120 - console.log('禁否:', this.isBianhaoDisabled) 118 + this.isBianhaoDisabled = true
121 return 119 return
122 } 120 }
123 // this.readOnly = false 121 // this.readOnly = false
@@ -131,15 +131,16 @@ export default { @@ -131,15 +131,16 @@ export default {
131 131
132 console.log(res) 132 console.log(res)
133 console.log(res2) 133 console.log(res2)
134 - if (res2.result) {  
135 - this.$message.error('这个招标已存在合同信息') 134 + if (res.result && res.result.length <=0) {
  135 + this.$message.error('没有这个招标信息,请重新输入')
136 136
137 this.confirmLoading = false 137 this.confirmLoading = false
138 this.isBianhaoDisabled = true 138 this.isBianhaoDisabled = true
139 return 139 return
140 } 140 }
141 - if (!res.result) {  
142 - this.$message.error('没有这个招标信息,请重新输入') 141 + if (res2.result && res2.result.length >0) {
  142 + this.$message.error('这个招标已存在发票回款信息')
  143 +
143 this.confirmLoading = false 144 this.confirmLoading = false
144 this.isBianhaoDisabled = true 145 this.isBianhaoDisabled = true
145 return 146 return
@@ -121,7 +121,7 @@ export default { @@ -121,7 +121,7 @@ export default {
121 let res = await getAction(this.url.queryBy, param) 121 let res = await getAction(this.url.queryBy, param)
122 122
123 console.log(res) 123 console.log(res)
124 - if (!res.result) { 124 + if (res.result && res.result.length <=0) {
125 this.$message.error('没有这个招标信息,请重新输入') 125 this.$message.error('没有这个招标信息,请重新输入')
126 126
127 this.confirmLoading = false 127 this.confirmLoading = false
@@ -178,20 +178,21 @@ export default { @@ -178,20 +178,21 @@ export default {
178 178
179 console.log(res) 179 console.log(res)
180 console.log(res2) 180 console.log(res2)
181 - if (res2.result) {  
182 - this.$message.error('这个招标已存在合同信息') 181 + if (res.result && res.result.length <=0) {
  182 + this.$message.error('没有这个招标信息,请重新输入')
183 183
184 this.confirmLoading = false 184 this.confirmLoading = false
185 this.isBianhaoDisabled = true 185 this.isBianhaoDisabled = true
186 return 186 return
187 } 187 }
188 - if (!res.result) {  
189 - this.$message.error('没有这个招标信息,请重新输入') 188 + if (res2.result && res2.result.length >0) {
  189 + this.$message.error('这个招标已存在中标采购信息')
190 190
191 this.confirmLoading = false 191 this.confirmLoading = false
192 this.isBianhaoDisabled = true 192 this.isBianhaoDisabled = true
193 return 193 return
194 } 194 }
  195 +
195 this.isBianhaoDisabled=false 196 this.isBianhaoDisabled=false
196 this.confirmLoading = false 197 this.confirmLoading = false
197 }, 198 },
@@ -120,14 +120,16 @@ export default { @@ -120,14 +120,16 @@ export default {
120 120
121 console.log(res) 121 console.log(res)
122 console.log(res2) 122 console.log(res2)
123 - if (res2.result) {  
124 - this.$message.error('这个招标已存在合同信息') 123 + if (res.result && res.result.length <=0) {
  124 + this.$message.error('没有这个招标信息,请重新输入')
  125 +
125 this.confirmLoading = false 126 this.confirmLoading = false
126 this.isBianhaoDisabled = true 127 this.isBianhaoDisabled = true
127 return 128 return
128 } 129 }
129 - if (!res.result) {  
130 - this.$message.error('没有这个招标信息,请重新输入') 130 + if (res2.result && res2.result.length >0) {
  131 + this.$message.error('这个招标已存在投标信息')
  132 +
131 this.confirmLoading = false 133 this.confirmLoading = false
132 this.isBianhaoDisabled = true 134 this.isBianhaoDisabled = true
133 return 135 return