|
@@ -115,7 +115,8 @@ |
|
@@ -115,7 +115,8 @@ |
|
115
|
</a-col>
|
115
|
</a-col>
|
|
116
|
<a-col :span="24">
|
116
|
<a-col :span="24">
|
|
117
|
<a-form-model-item label="劳动合同周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contractTime">
|
117
|
<a-form-model-item label="劳动合同周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contractTime">
|
|
118
|
- <j-date placeholder="请选择劳动合同周期" v-model="model.contractTime" style="width: 100%" />
|
118
|
+ <!-- <j-date placeholder="请选择劳动合同周期" v-model="model.contractTime" style="width: 100%" /> -->
|
|
|
|
119
|
+ <a-range-picker @change="onChange" v-model="contractTime" />
|
|
119
|
</a-form-model-item>
|
120
|
</a-form-model-item>
|
|
120
|
</a-col>
|
121
|
</a-col>
|
|
121
|
</a-row>
|
122
|
</a-row>
|
|
@@ -149,6 +150,7 @@ export default { |
|
@@ -149,6 +150,7 @@ export default { |
|
149
|
xs: { span: 24 },
|
150
|
xs: { span: 24 },
|
|
150
|
sm: { span: 16 },
|
151
|
sm: { span: 16 },
|
|
151
|
},
|
152
|
},
|
|
|
|
153
|
+ contractTime: [],
|
|
152
|
model: {
|
154
|
model: {
|
|
153
|
userName: '', //姓名
|
155
|
userName: '', //姓名
|
|
154
|
idCard: '', //身份证号
|
156
|
idCard: '', //身份证号
|
|
@@ -167,9 +169,18 @@ export default { |
|
@@ -167,9 +169,18 @@ export default { |
|
167
|
jobId: [{ required: true, message: '请输入工号!' }],
|
169
|
jobId: [{ required: true, message: '请输入工号!' }],
|
|
168
|
jobTitle: [{ required: true, message: '请选择岗位!' }],
|
170
|
jobTitle: [{ required: true, message: '请选择岗位!' }],
|
|
169
|
userName: [{ required: true, message: '请输入姓名!' }],
|
171
|
userName: [{ 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:"请输入正确的银行卡号"}],
|
172
|
+ idCard: [
|
|
|
|
173
|
+ { required: true, message: '请输入身份证号!' },
|
|
|
|
174
|
+ {
|
|
|
|
175
|
+ pattern:
|
|
|
|
176
|
+ /^([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})$/,
|
|
|
|
177
|
+ message: '请输入正确格式的身份证号!',
|
|
|
|
178
|
+ },
|
|
|
|
179
|
+ ],
|
|
|
|
180
|
+ bankCard: [
|
|
|
|
181
|
+ { required: true, message: '请输入银行卡号!' },
|
|
|
|
182
|
+ { pattern: /^\d{16,19}$/, message: '请输入正确的银行卡号' },
|
|
|
|
183
|
+ ],
|
|
173
|
basicSalary: [{ required: true, message: '请输入基本工资!' }],
|
184
|
basicSalary: [{ required: true, message: '请输入基本工资!' }],
|
|
174
|
phone: [{ required: true, message: '请输入手机号!' }, { validator: this.validatePhone }],
|
185
|
phone: [{ required: true, message: '请输入手机号!' }, { validator: this.validatePhone }],
|
|
175
|
socialCompany: [{ required: true, message: '请输入社保公司!' }],
|
186
|
socialCompany: [{ required: true, message: '请输入社保公司!' }],
|
|
@@ -203,6 +214,17 @@ export default { |
|
@@ -203,6 +214,17 @@ export default { |
|
203
|
this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
214
|
this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
204
|
},
|
215
|
},
|
|
205
|
methods: {
|
216
|
methods: {
|
|
|
|
217
|
+ onChange(date, dateString) {
|
|
|
|
218
|
+ console.log(date, dateString)
|
|
|
|
219
|
+ console.log('值:', dateString)
|
|
|
|
220
|
+ const startDate = dateString[0]
|
|
|
|
221
|
+ const endDate = dateString[1]
|
|
|
|
222
|
+
|
|
|
|
223
|
+ console.log('开始日期:', startDate)
|
|
|
|
224
|
+ this.model.contractTime = (startDate+"-"+endDate)
|
|
|
|
225
|
+ console.log(this.model.contractTime)
|
|
|
|
226
|
+ // this.model.contractTime=endDate
|
|
|
|
227
|
+ },
|
|
206
|
validatePhone(rule, value, callback) {
|
228
|
validatePhone(rule, value, callback) {
|
|
207
|
// console.log(this.currentPhone)
|
229
|
// console.log(this.currentPhone)
|
|
208
|
if (!value) {
|
230
|
if (!value) {
|
|
@@ -217,7 +239,7 @@ export default { |
|
@@ -217,7 +239,7 @@ export default { |
|
217
|
// console.log(value)
|
239
|
// console.log(value)
|
|
218
|
if (value === this.currentPhone) {
|
240
|
if (value === this.currentPhone) {
|
|
219
|
callback()
|
241
|
callback()
|
|
220
|
- }else if (res.result && res.result.length <= 0) {
|
242
|
+ } else if (res.result && res.result.length <= 0) {
|
|
221
|
callback()
|
243
|
callback()
|
|
222
|
} else {
|
244
|
} else {
|
|
223
|
callback('手机号已存在!')
|
245
|
callback('手机号已存在!')
|
|
@@ -257,29 +279,30 @@ export default { |
|
@@ -257,29 +279,30 @@ export default { |
|
257
|
httpurl += this.url.edit
|
279
|
httpurl += this.url.edit
|
|
258
|
method = 'put'
|
280
|
method = 'put'
|
|
259
|
}
|
281
|
}
|
|
|
|
282
|
+
|
|
260
|
if (this.model.jobTitle === 'OfficeAdministrative') {
|
283
|
if (this.model.jobTitle === 'OfficeAdministrative') {
|
|
261
|
- this.model.jobName= '办公室行政人员'
|
|
|
|
262
|
- } else if (this.model.jobTitle === 'WorkshopDirector') {
|
|
|
|
263
|
- this.model.jobName= '车间管理员'
|
|
|
|
264
|
- } else if (this.model.jobTitle === 'WorkshopTechnicalManager') {
|
|
|
|
265
|
- this.model.jobName= '车间技术总管'
|
|
|
|
266
|
- } else if (this.model.jobTitle === 'WorkshopTechnician') {
|
|
|
|
267
|
- this.model.jobName= '车间技术员'
|
|
|
|
268
|
- } else if (this.model.jobTitle === 'WorkshopAuxiliaryPersonnel') {
|
|
|
|
269
|
- this.model.jobName= '车间辅助人员'
|
|
|
|
270
|
- } else if (this.model.jobTitle === 'PurchasingOfficer') {
|
|
|
|
271
|
- this.model.jobName= '采购员'
|
|
|
|
272
|
- } else if (this.model.jobTitle === 'ProcurementSupervisor') {
|
|
|
|
273
|
- this.model.jobName= '采购主管'
|
|
|
|
274
|
- } else if (this.model.jobTitle === 'Assembler') {
|
|
|
|
275
|
- this.model.jobName= '装配工'
|
|
|
|
276
|
- } else if (this.model.jobTitle === 'AssemblySupervisor') {
|
|
|
|
277
|
- this.model.jobName= '装配主管'
|
|
|
|
278
|
- } else if (this.model.jobTitle === 'OtherWorker') {
|
|
|
|
279
|
- this.model.jobName= '其他'
|
|
|
|
280
|
- } else if (this.model.jobTitle === 'WorkshopGeneralWorker') {
|
|
|
|
281
|
- this.model.jobName= '普工'
|
|
|
|
282
|
- }
|
284
|
+ this.model.jobName = '办公室行政人员'
|
|
|
|
285
|
+ } else if (this.model.jobTitle === 'WorkshopDirector') {
|
|
|
|
286
|
+ this.model.jobName = '车间管理员'
|
|
|
|
287
|
+ } else if (this.model.jobTitle === 'WorkshopTechnicalManager') {
|
|
|
|
288
|
+ this.model.jobName = '车间技术总管'
|
|
|
|
289
|
+ } else if (this.model.jobTitle === 'WorkshopTechnician') {
|
|
|
|
290
|
+ this.model.jobName = '车间技术员'
|
|
|
|
291
|
+ } else if (this.model.jobTitle === 'WorkshopAuxiliaryPersonnel') {
|
|
|
|
292
|
+ this.model.jobName = '车间辅助人员'
|
|
|
|
293
|
+ } else if (this.model.jobTitle === 'PurchasingOfficer') {
|
|
|
|
294
|
+ this.model.jobName = '采购员'
|
|
|
|
295
|
+ } else if (this.model.jobTitle === 'ProcurementSupervisor') {
|
|
|
|
296
|
+ this.model.jobName = '采购主管'
|
|
|
|
297
|
+ } else if (this.model.jobTitle === 'Assembler') {
|
|
|
|
298
|
+ this.model.jobName = '装配工'
|
|
|
|
299
|
+ } else if (this.model.jobTitle === 'AssemblySupervisor') {
|
|
|
|
300
|
+ this.model.jobName = '装配主管'
|
|
|
|
301
|
+ } else if (this.model.jobTitle === 'OtherWorker') {
|
|
|
|
302
|
+ this.model.jobName = '其他'
|
|
|
|
303
|
+ } else if (this.model.jobTitle === 'WorkshopGeneralWorker') {
|
|
|
|
304
|
+ this.model.jobName = '普工'
|
|
|
|
305
|
+ }
|
|
283
|
httpAction(httpurl, this.model, method)
|
306
|
httpAction(httpurl, this.model, method)
|
|
284
|
.then((res) => {
|
307
|
.then((res) => {
|
|
285
|
if (res.success) {
|
308
|
if (res.success) {
|