Ver Fonte

报关月份改为日期补充

chenj há 6 dias atrás
pai
commit
8d7e03cd2a

+ 1 - 1
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/domain/bo/contract/TqContractLiftBo.java

@@ -238,7 +238,7 @@ public class TqContractLiftBo extends BaseEntity
 
     /** 报关月份 */
     @Excel(name = "报关月份", width = 30, dateFormat = "yyyy-MM",i18nCode = "lift.customsDeclarationMonth")
-    private Date customsDeclarationMonth;
+    private Date[] customsDeclarationMonth;
 
     /** 后续收取运费 */
     @Excel(name = "后续收取运费")

+ 5 - 1
RuoYi-Vue-fast-master/src/main/resources/mybatis/business/contract/TqContractLiftMapper.xml

@@ -273,7 +273,11 @@
                     #{item}
                 </foreach>
             </if>
-            <if test="customsDeclarationMonth != null "> and l.customs_declaration_month = #{customsDeclarationMonth}</if>
+            <if test="customsDeclarationMonth != null and customsDeclarationMonth.length == 2"> and l.customs_declaration_month
+                <foreach collection="customsDeclarationMonth" item="item" open="between " separator=" and " >
+                    #{item}
+                </foreach>
+            </if>
             <if test="subsequentCollectionOfShippingFees != null "> and l.subsequent_collection_of_shipping_fees = #{subsequentCollectionOfShippingFees}</if>
             <if test="collectionDate != null and collectionDate.length == 2"> and l.collection_date
                 <foreach collection="collectionDate" item="item" open="between " separator=" and " >

+ 5 - 1
ruoyi-ui-vue2/src/components/element/table/DatePickSelectColumn.vue

@@ -3,7 +3,7 @@
     <template v-slot="scope" >
       <el-date-picker
         v-model="scope.row[prop]"
-        type="date"
+        :type="type"
         :disabled="disabled"
         @change="$emit('change',scope.row)"
         :style="{ width: `${minWidth - 24}px` }"
@@ -20,6 +20,10 @@ export default {
       type: String,
       default: "",
     },
+    type: {
+      type: String,
+      default: "date",
+    },
     prop: {
       type: String,
     },

+ 7 - 2
ruoyi-ui-vue2/src/views/contract/lift/index.vue

@@ -235,7 +235,12 @@
         <!--港口56-->
         <Column :label="$t('lift.port')" :searchParams="queryParams" :showSearch="true" prop="port"  v-if="checkPermi(['user:contract:lift:port'])"/>
         <!--报关月份57-->
-        <Column :label="$t('lift.customsDeclarationMonth')" :searchParams="queryParams" :showSearch="true" search-type="dateRange" prop="customsDeclarationMonth" v-if="checkPermi(['user:contract:lift:customsDeclarationMonth'])" sortable="custom" />
+        <Column :label="$t('lift.customsDeclarationMonth')" :searchParams="queryParams" :showSearch="true" search-type="dateRange" width="250"
+                 date-type="monthrange" prop="customsDeclarationMonth" v-if="checkPermi(['user:contract:lift:customsDeclarationMonth'])" sortable="custom" >
+          <template #default="{ row }">
+            <span>{{ formatDate (row.customsDeclarationMonth) }}</span>
+          </template>
+        </Column>
         <!--备注58-->
         <Column :label="$t('common.remark')" :searchParams="queryParams" :showSearch="true" prop="remark"  v-if="checkPermi(['user:contract:lift:remark'])"/>
         <!--合同更改日期59-->
@@ -480,7 +485,7 @@
           <InputColumn  :label="$t('lift.port')"  prop="port"  v-if="checkPermi(['user:contract:lift:portEdit'])"/>
 
           <!--报关月份57 可修改-->
-          <DatePickSelectColumn  :label="$t('lift.customsDeclarationMonth')"  prop="customsDeclarationMonth" :search-dict="months" v-if="checkPermi(['user:contract:lift:customsDeclarationMonthEdit'])"></DatePickSelectColumn>
+          <DatePickSelectColumn  :label="$t('lift.customsDeclarationMonth')"  prop="customsDeclarationMonth" v-if="checkPermi(['user:contract:lift:customsDeclarationMonthEdit'])" type="month"></DatePickSelectColumn>
 
           <!--备注58  可修改-->
           <Column  :label="$t('common.remark')" prop="remark"  v-if="checkPermi(['user:contract:lift:remarkEdit'])">