|
...
|
...
|
@@ -115,7 +115,8 @@ |
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="劳动合同周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contractTime">
|
|
|
|
<j-date placeholder="请选择劳动合同周期" v-model="model.contractTime" style="width: 100%" />
|
|
|
|
<!-- <j-date placeholder="请选择劳动合同周期" v-model="model.contractTime" style="width: 100%" /> -->
|
|
|
|
<a-range-picker @change="onChange" v-model="contractTime" />
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
...
|
...
|
@@ -149,6 +150,7 @@ export default { |
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 16 },
|
|
|
|
},
|
|
|
|
contractTime: [],
|
|
|
|
model: {
|
|
|
|
userName: '', //姓名
|
|
|
|
idCard: '', //身份证号
|
|
...
|
...
|
@@ -167,9 +169,18 @@ export default { |
|
|
|
jobId: [{ required: true, message: '请输入工号!' }],
|
|
|
|
jobTitle: [{ required: true, message: '请选择岗位!' }],
|
|
|
|
userName: [{ required: true, message: '请输入姓名!' }],
|
|
|
|
idCard: [{ required: true, message: '请输入身份证号!' } ,
|
|
|
|
{ pattern: /^([1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X))|([1|5|7][0-9]{6}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0|1|2])([0-9])|3[0|1])[0-9]{3}[0-9Xx])|((1|5|7)[0-9]{6}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0|1|2])([0-9])|3[0|1])[0-9]{3})$/, message: '请输入正确格式的身份证号!' }],
|
|
|
|
bankCard: [{ required: true, message: '请输入银行卡号!' },{pattern:/^\d{16,19}$/ , message:"请输入正确的银行卡号"}],
|
|
|
|
idCard: [
|
|
|
|
{ required: true, message: '请输入身份证号!' },
|
|
|
|
{
|
|
|
|
pattern:
|
|
|
|
/^([1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X))|([1|5|7][0-9]{6}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0|1|2])([0-9])|3[0|1])[0-9]{3}[0-9Xx])|((1|5|7)[0-9]{6}(18|19|20)[0-9]{2}((0[1-9])|(1[0-2]))(([0|1|2])([0-9])|3[0|1])[0-9]{3})$/,
|
|
|
|
message: '请输入正确格式的身份证号!',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
bankCard: [
|
|
|
|
{ required: true, message: '请输入银行卡号!' },
|
|
|
|
{ pattern: /^\d{16,19}$/, message: '请输入正确的银行卡号' },
|
|
|
|
],
|
|
|
|
basicSalary: [{ required: true, message: '请输入基本工资!' }],
|
|
|
|
phone: [{ required: true, message: '请输入手机号!' }, { validator: this.validatePhone }],
|
|
|
|
socialCompany: [{ required: true, message: '请输入社保公司!' }],
|
|
...
|
...
|
@@ -203,6 +214,17 @@ export default { |
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model))
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onChange(date, dateString) {
|
|
|
|
console.log(date, dateString)
|
|
|
|
console.log('值:', dateString)
|
|
|
|
const startDate = dateString[0]
|
|
|
|
const endDate = dateString[1]
|
|
|
|
|
|
|
|
console.log('开始日期:', startDate)
|
|
|
|
this.model.contractTime = (startDate+"-"+endDate)
|
|
|
|
console.log(this.model.contractTime)
|
|
|
|
// this.model.contractTime=endDate
|
|
|
|
},
|
|
|
|
validatePhone(rule, value, callback) {
|
|
|
|
// console.log(this.currentPhone)
|
|
|
|
if (!value) {
|
|
...
|
...
|
@@ -217,7 +239,7 @@ export default { |
|
|
|
// console.log(value)
|
|
|
|
if (value === this.currentPhone) {
|
|
|
|
callback()
|
|
|
|
}else if (res.result && res.result.length <= 0) {
|
|
|
|
} else if (res.result && res.result.length <= 0) {
|
|
|
|
callback()
|
|
|
|
} else {
|
|
|
|
callback('手机号已存在!')
|
|
...
|
...
|
@@ -257,28 +279,29 @@ export default { |
|
|
|
httpurl += this.url.edit
|
|
|
|
method = 'put'
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.model.jobTitle === 'OfficeAdministrative') {
|
|
|
|
this.model.jobName= '办公室行政人员'
|
|
|
|
this.model.jobName = '办公室行政人员'
|
|
|
|
} else if (this.model.jobTitle === 'WorkshopDirector') {
|
|
|
|
this.model.jobName= '车间管理员'
|
|
|
|
this.model.jobName = '车间管理员'
|
|
|
|
} else if (this.model.jobTitle === 'WorkshopTechnicalManager') {
|
|
|
|
this.model.jobName= '车间技术总管'
|
|
|
|
this.model.jobName = '车间技术总管'
|
|
|
|
} else if (this.model.jobTitle === 'WorkshopTechnician') {
|
|
|
|
this.model.jobName= '车间技术员'
|
|
|
|
this.model.jobName = '车间技术员'
|
|
|
|
} else if (this.model.jobTitle === 'WorkshopAuxiliaryPersonnel') {
|
|
|
|
this.model.jobName= '车间辅助人员'
|
|
|
|
this.model.jobName = '车间辅助人员'
|
|
|
|
} else if (this.model.jobTitle === 'PurchasingOfficer') {
|
|
|
|
this.model.jobName= '采购员'
|
|
|
|
this.model.jobName = '采购员'
|
|
|
|
} else if (this.model.jobTitle === 'ProcurementSupervisor') {
|
|
|
|
this.model.jobName= '采购主管'
|
|
|
|
this.model.jobName = '采购主管'
|
|
|
|
} else if (this.model.jobTitle === 'Assembler') {
|
|
|
|
this.model.jobName= '装配工'
|
|
|
|
this.model.jobName = '装配工'
|
|
|
|
} else if (this.model.jobTitle === 'AssemblySupervisor') {
|
|
|
|
this.model.jobName= '装配主管'
|
|
|
|
this.model.jobName = '装配主管'
|
|
|
|
} else if (this.model.jobTitle === 'OtherWorker') {
|
|
|
|
this.model.jobName= '其他'
|
|
|
|
this.model.jobName = '其他'
|
|
|
|
} else if (this.model.jobTitle === 'WorkshopGeneralWorker') {
|
|
|
|
this.model.jobName= '普工'
|
|
|
|
this.model.jobName = '普工'
|
|
|
|
}
|
|
|
|
httpAction(httpurl, this.model, method)
|
|
|
|
.then((res) => {
|
...
|
...
|
|