Jelajahi Sumber

审核时,开票日期加必填验证

lizhenhao 2 tahun lalu
induk
melakukan
a7f6a61059

+ 25 - 1
src/views/modules/cw/invoice/InvoiceFormTask.vue

@@ -272,7 +272,23 @@
         </el-col>
         <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status !== 'audit'"
                  label-width="160px" @submit.native.prevent>
-          <el-col :span="12" >
+          <el-col v-if="status === 'audit'" :span="12" >
+            <el-form-item label="开票时间" prop="billingDate"
+                          :rules="[
+                         {required: true, message:'开票时间不能为空', trigger:'blur'}
+                 ]">
+              <el-date-picker
+                v-model="inputForm.billingDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择开票时间"
+                style="width:100%"
+                placement="bottom-start"
+                clearable>
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col v-if="status !== 'audit'" :span="12" >
             <el-form-item label="开票时间" prop="billingDate"
                           :rules="[
                  ]">
@@ -361,6 +377,7 @@
               url="/sys/area/treeData"
               :value="inputForm.reconciliationArea"
               :clearable="true"
+              size="medium"
               :accordion="true"
               @getValue="(value) => {inputForm.reconciliationArea=value}"/>
           </el-form-item>
@@ -909,6 +926,13 @@
             throw new Error()
           }
         }
+        if (this.status === 'audit') {
+          if (this.commonJS.isEmpty(this.inputForm.billingDate)) {
+            this.$message.error('开票时间不可以为空')
+            this.loading = false
+            throw new Error('开票时间不可以为空')
+          }
+        }
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
             this.loading = true

+ 0 - 1
src/views/modules/cw/invoice/InvoiceList.vue

@@ -369,7 +369,6 @@
       },
       // 获取数据列表
       refreshList () {
-        console.log(this.$store.state.user.id)
         this.loading = true
         if (!this.commonJS.isEmpty(this.searchForm.billingDateList)) {
           if (!this.commonJS.isEmpty(this.searchForm.billingDateList[0]) && !this.commonJS.isEmpty(this.searchForm.billingDateList[1])) {