车牌号必填

This commit is contained in:
bb_pan 2025-03-31 10:14:44 +08:00
parent 60cee4697a
commit 286bc185ed
1 changed files with 43 additions and 37 deletions

View File

@ -363,10 +363,10 @@
ref="codeOutForm" ref="codeOutForm"
size="small" size="small"
:inline="true" :inline="true"
label-width="100px" label-width="110px"
> >
<span style="margin-right: 50px">待出库数量{{ outNum }}</span> <span style="margin-right: 50px">待出库数量{{ outNum }}</span>
<el-form-item label="请输入车牌号" prop="carCode"> <el-form-item label="请输入车牌号" prop="carCode" :rules="{ required: true, message: '请输入车牌号', trigger: 'blur' }">
<el-input v-model="codeOutForm.carCode" maxlength="20" /> <el-input v-model="codeOutForm.carCode" maxlength="20" />
</el-form-item> </el-form-item>
<span style="margin-right: 50px; color: red" <span style="margin-right: 50px; color: red"
@ -481,12 +481,12 @@
ref="numOutForm" ref="numOutForm"
size="small" size="small"
:inline="true" :inline="true"
label-width="100px" label-width="110px"
> >
<!-- <span style="margin-right: 50px;"> <!-- <span style="margin-right: 50px;">
待出库数量{{outNum}} 待出库数量{{outNum}}
</span>--> </span>-->
<el-form-item label="请输入车牌号" prop="carCode"> <el-form-item label="请输入车牌号" prop="carCode" :rules="{ required: true, message: '请输入车牌号', trigger: 'blur' }">
<el-input v-model="numOutForm.carCode" maxlength="20" /> <el-input v-model="numOutForm.carCode" maxlength="20" />
</el-form-item> </el-form-item>
<span style="margin-right: 50px; color: red" <span style="margin-right: 50px; color: red"
@ -991,42 +991,48 @@ export default {
}, },
// //
saveCodeOut() { saveCodeOut() {
if (this.maCodeList.length <= this.outObj.outNum) { this.$refs.codeOutForm.validate((valid) => {
let params = this.maCodeList.map((item) => { if (!valid) return
let obj = { if (this.maCodeList.length <= this.outObj.outNum) {
id: this.outObj.id, let params = this.maCodeList.map((item) => {
maId: item, let obj = {
manageType: 0, id: this.outObj.id,
carCode: this.codeOutForm.carCode, maId: item,
typeId: this.outObj.typeId, manageType: 0,
parentId: this.outObj.parentId, carCode: this.codeOutForm.carCode,
outNum: 1, typeId: this.outObj.typeId,
taskId: this.outObj.taskId, parentId: this.outObj.parentId,
createBy: sessionStorage.getItem('userId'), outNum: 1,
companyId: this.outObj.companyId, taskId: this.outObj.taskId,
} createBy: sessionStorage.getItem('userId'),
return obj companyId: this.outObj.companyId,
}) }
// console.log(params) return obj
submitOut(params).then((res) => { })
this.$modal.msgSuccess('出库成功') // console.log(params)
this.openCode = false submitOut(params).then((res) => {
this.handleDialogQuery() this.$modal.msgSuccess('出库成功')
this.handleQuery() this.openCode = false
}) this.handleDialogQuery()
} else { this.handleQuery()
this.$modal.msgError('所选机具编码已超出出库数量!') })
} } else {
this.$modal.msgError('所选机具编码已超出出库数量!')
}
})
}, },
// //
saveNumOut() { saveNumOut() {
this.outNumList[0].carCode = this.numOutForm.carCode this.$refs.numOutForm.validate((valid) => {
let param = this.outNumList if (!valid) return
submitNumOut(param).then((res) => { this.outNumList[0].carCode = this.numOutForm.carCode
this.$modal.msgSuccess('出库成功') let param = this.outNumList
this.openNum = false submitNumOut(param).then((res) => {
this.handleDialogQuery() this.$modal.msgSuccess('出库成功')
this.handleQuery() this.openNum = false
this.handleDialogQuery()
this.handleQuery()
})
}) })
}, },