Browse Source

开票管理--增加字段必填限制

master
yunuo970428 2 years ago
parent
commit
bb1b4780d3
  1. 4
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/finginvoiceapply/billingmanagement/billingmanagement.vue
  2. 24
      anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/finginvoiceapply/billingmanagement/billingmanagementAdd.vue

4
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/finginvoiceapply/billingmanagement/billingmanagement.vue

@ -372,8 +372,8 @@ export default {
if (this.sids.length === 1) {
if (this.nodeState_list.length > 0) {
for (var i = 0; i < this.nodeState_list.length; i++) {
if (this.nodeState_list[i] === '作废' || this.nodeState_list[i] === '已移交') {
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含作废或已移交的,操作失败' })
if (this.nodeState_list[i] === '作废' || this.nodeState_list[i] === '已开票') {
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含作废或已开票的,操作失败' })
return
}
}

24
anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/finginvoiceapply/billingmanagement/billingmanagementAdd.vue

@ -61,23 +61,23 @@
<el-form-item><span class="addinputInfo">{{ formobj.name }}</span></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">开票日期</div>
<div class="span-sty"><span class="icon">*</span>开票日期</div>
<el-form-item><el-date-picker v-model="formobj.createTime" class="addinputw" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<div class="span-sty">发票号</div>
<div class="span-sty"><span class="icon">*</span>发票号</div>
<el-form-item><el-input v-model="formobj.invoiceNo" clearable class="addinputw" /></el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty">发票代码</div>
<div class="span-sty"><span class="icon">*</span>发票代码</div>
<el-form-item><el-input v-model="formobj.invoiceCode" clearable class="addinputw" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center">发票照片</div>
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span class="icon">*</span>发票照片</div>
<el-form-item>
<upload ref="uploadImg" v-model="diploma_list" :accept="accept" class="addinputw" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
@ -220,7 +220,23 @@ export default {
handleSubmit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.invoiceNo === '') {
this.$message({ showClose: true, type: 'error', message: '发票号不能为空' })
return
}
if (this.formobj.invoiceCode === '') {
this.$message({ showClose: true, type: 'error', message: '发票代码不能为空' })
return
}
if (this.formobj.createTime === '') {
this.$message({ showClose: true, type: 'error', message: '开票日期不能为空' })
return
}
this.getUrl()
if (this.formobj.filePaths === 0) {
this.$message({ showClose: true, type: 'error', message: '请上传发票照片' })
return
}
this.submitdisabled = true
this.formobj.tempSave = false
saveOrUpdate(this.formobj).then((res) => {

Loading…
Cancel
Save