fix bug
ItemReceptionTransNumber
This commit is contained in:
@@ -167,10 +167,10 @@
|
||||
<el-input v-model="form.email" :class="validation.email ? 'err' : null" placeholder="ایمیل"></el-input>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-12 mt-4">
|
||||
<el-input v-model="form.deviceNumber" :class="validation.deviceNumber ? 'err' : null" placeholder="شماره سریال دستگاه"></el-input>
|
||||
<el-input v-model="form.deviceNumber" :class="validation.deviceNumber ? 'err' : null" placeholder="شماره سریال دستگاه (اختیاری)"></el-input>
|
||||
</div>
|
||||
<div class="col-lg-4 col-sm-12 mt-4">
|
||||
<el-input v-model="form.receptionCode" :class="validation.receptionCode ? 'err' : null" placeholder="کد پذیرش (اختیاری)"></el-input>
|
||||
<el-input v-model="form.receptionCode" :class="validation.receptionCode ? 'err' : null" placeholder="کد پذیرش"></el-input>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-sm-12 mt-4">
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports.create = [
|
||||
body('phoneNumber').notEmpty().isMobilePhone('ir-IR').withMessage(_faSr.required.phone_number),
|
||||
body('email').notEmpty().isEmail().withMessage(_faSr.required.email),
|
||||
body('receptionCode').notEmpty().withMessage(_faSr.required.field).custom(async(value, { req }) => {
|
||||
const check = await Transaction.findOne({ItemReceptionTransDate:value})
|
||||
const check = await Transaction.findOne({ItemReceptionTransNumber:value})
|
||||
if(!check){
|
||||
return Promise.reject(new Error("کد پذیرش معتبر نیست"))
|
||||
}else{
|
||||
|
||||
@@ -50,7 +50,7 @@ module.exports.createPublic = [
|
||||
body('email').notEmpty().isEmail().withMessage(_faSr.required.email),
|
||||
body('code').custom(async(value, { req }) => {
|
||||
if(value){
|
||||
const check = await Transaction.findOne({ItemReceptionTransDate:value})
|
||||
const check = await Transaction.findOne({ItemReceptionTransNumber:value})
|
||||
if(!check){
|
||||
return Promise.reject(new Error("کد پذیرش معتبر نیست"))
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user