|
|
@ -476,16 +476,16 @@ |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<!-- 凭证有效期 --> |
|
|
|
<el-form-item label="开始时间" v-if="documentType != '' ? true : false"> |
|
|
|
<el-date-picker v-model="value2[0]" size="small" :picker-options="pickerOptionsBegin" type="datetime" |
|
|
|
placeholder="选择开始日期时间" default-time="00:00:00"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="结束时间" v-if="documentType != '' ? true : false"> |
|
|
|
<el-date-picker v-model="value2[1]" size="small" :picker-options="pickerOptionsEnd" type="datetime" |
|
|
|
placeholder="选择结束日期时间" default-time="00:00:00"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="开始时间" v-if="documentType != '' ? true : false">--> |
|
|
|
<!-- <el-date-picker v-model="value2[0]" size="small" :picker-options="pickerOptionsBegin" type="datetime"--> |
|
|
|
<!-- placeholder="选择开始日期时间" default-time="00:00:00">--> |
|
|
|
<!-- </el-date-picker>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="结束时间" v-if="documentType != '' ? true : false">--> |
|
|
|
<!-- <el-date-picker v-model="value2[1]" size="small" :picker-options="pickerOptionsEnd" type="datetime"--> |
|
|
|
<!-- placeholder="选择结束日期时间" default-time="00:00:00">--> |
|
|
|
<!-- </el-date-picker>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
</el-form> |
|
|
|
<el-button type="primary" size="small" @click="savevoucher" |
|
|
|
v-if="documentType != '' ? true : false">保存</el-button> |
|
|
@ -2119,17 +2119,23 @@ export default { |
|
|
|
}, |
|
|
|
// 保存凭证 |
|
|
|
savevoucher() { |
|
|
|
if (this.value2[0] == '' || this.value2[1] == '') { |
|
|
|
return this.$message.error('开始时间和结束时间不能为空') |
|
|
|
} |
|
|
|
if (this.value2[0] > this.value2[1]) { |
|
|
|
return this.$message.error('开始时间不能大于结束时间') |
|
|
|
} |
|
|
|
if (this.value2[0] < this.form.signingTime || this.value2[0] > this.form.contractTime) { |
|
|
|
return this.$message.error('开始时间不能超出祖约时间') |
|
|
|
// if (this.value2[0] == '' || this.value2[1] == '') { |
|
|
|
// return this.$message.error('开始时间和结束时间不能为空') |
|
|
|
// } |
|
|
|
// if (this.value2[0] > this.value2[1]) { |
|
|
|
// return this.$message.error('开始时间不能大于结束时间') |
|
|
|
// } |
|
|
|
// if (this.value2[0] < this.form.signingTime || this.value2[0] > this.form.contractTime) { |
|
|
|
// return this.$message.error('开始时间不能超出租约时间') |
|
|
|
// } |
|
|
|
// if (this.value2[1] < this.form.signingTime || this.value2[1] > this.form.contractTime) { |
|
|
|
// return this.$message.error('结束时间不能超出租约时间') |
|
|
|
// } |
|
|
|
if (this.form.signingTime > this.form.contractTime) { |
|
|
|
return this.$message.error('签约时间不能大于有效时间') |
|
|
|
} |
|
|
|
if (this.value2[1] < this.form.signingTime || this.value2[1] > this.form.contractTime) { |
|
|
|
return this.$message.error('结束时间不能超出租约时间') |
|
|
|
if (this.form.signingTime == '' || this.form.contractTime == '') { |
|
|
|
return this.$message.error('签约时间和有效时间都不能为空') |
|
|
|
} |
|
|
|
if (this.documentType == 11) { |
|
|
|
var fingerprintAlias = '' |
|
|
@ -2146,8 +2152,8 @@ export default { |
|
|
|
name: name, |
|
|
|
fingerprintAlias: fingerprintAlias, |
|
|
|
type: 11, |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} else { |
|
|
@ -2162,8 +2168,8 @@ export default { |
|
|
|
name: name, |
|
|
|
fingerprintAlias: fingerprintAlias, |
|
|
|
type: 11, |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} |
|
|
@ -2186,8 +2192,8 @@ export default { |
|
|
|
name: name, |
|
|
|
type: 12, |
|
|
|
password: password.toUpperCase(), |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} else { |
|
|
@ -2209,8 +2215,8 @@ export default { |
|
|
|
name: name, |
|
|
|
type: 12, |
|
|
|
password: password.toUpperCase(), |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} |
|
|
@ -2237,8 +2243,8 @@ export default { |
|
|
|
name: name, |
|
|
|
type: 13, |
|
|
|
password: nfc.toUpperCase(), |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} else { |
|
|
@ -2264,8 +2270,8 @@ export default { |
|
|
|
name: name, |
|
|
|
type: 13, |
|
|
|
password: nfc.toUpperCase(), |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} |
|
|
@ -2285,8 +2291,8 @@ export default { |
|
|
|
password: this.voucher.password, |
|
|
|
type: 14, |
|
|
|
name: name, |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} else { |
|
|
@ -2306,8 +2312,8 @@ export default { |
|
|
|
password: this.voucher.password, |
|
|
|
type: 14, |
|
|
|
name: name, |
|
|
|
passWordStartTime: moment(this.value2[0]).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.value2[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
passWordStartTime: moment(this.form.signingTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
passWordEndTime: moment(this.form.contractTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
this.savevoucherlist.push(data) |
|
|
|
} |
|
|
|