浏览代码

feat(组件):

xiugaibug
tangning 2 年之前
父节点
当前提交
0dec2c592e

+ 2 - 2
src/api/customer/index.ts

@@ -67,8 +67,8 @@ export const downTemplate = (params: companyExcelParams) =>
     method: 'GET',
     method: 'GET',
     url: Api.downTemplate,
     url: Api.downTemplate,
     params: params,
     params: params,
-    // data: params,
-    fileName:params.type == 0?'入库模板.xlsx':'出库模板.xlsx',
+    // data: params, 
+    fileName:params.type == 0?'入库模板.xlsx':params.type == 1?'出库模板.xlsx':'客户关联模板.xlsx',
     headers: {
     headers: {
       // @ts-ignore
       // @ts-ignore
       ignoreCancelToken: true,
       ignoreCancelToken: true,

+ 0 - 7
src/views/customer/index.vue

@@ -184,7 +184,6 @@
         title: '客户列表',
         title: '客户列表',
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
         columns: columns,
-        searchInfo: { companyName: '' },
         useSearchForm: true,
         useSearchForm: true,
         formConfig: searchForm,
         formConfig: searchForm,
         showTableSetting: true,
         showTableSetting: true,
@@ -217,14 +216,8 @@
             message.success({
             message.success({
               content: '删除成功',
               content: '删除成功',
             });
             });
-
             reload();
             reload();
           })
           })
-          .catch(() => {
-            message.success({
-              content: '删除失败',
-            });
-          });
       }
       }
       async function handleMove(record: Recordable) {}
       async function handleMove(record: Recordable) {}
       function handleDownload(record: Recordable) {
       function handleDownload(record: Recordable) {

+ 1 - 1
src/views/dashboard/analysis/components/GrowCard.vue

@@ -15,7 +15,7 @@
 
 
         <div class="py-4 px-4 flex justify-between">
         <div class="py-4 px-4 flex justify-between">
           <CountTo :prefix="item.unit" :startVal="1" :endVal="item.value" class="text-2xl" />
           <CountTo :prefix="item.unit" :startVal="1" :endVal="item.value" class="text-2xl" />
-          <Icon :icon="item.icon" :size="40" />
+          <!-- <Icon :icon="item.icon" :size="40" /> -->
         </div>
         </div>
 
 
         <!-- <div class="p-2 px-4 flex justify-between">
         <!-- <div class="p-2 px-4 flex justify-between">

+ 1 - 1
src/views/statistics/components/GrowCard.vue

@@ -15,7 +15,7 @@
 
 
         <div class="py-4 px-4 flex justify-between">
         <div class="py-4 px-4 flex justify-between">
           <CountTo :prefix="item.unit" :startVal="1" :endVal="item.value" class="text-2xl" />
           <CountTo :prefix="item.unit" :startVal="1" :endVal="item.value" class="text-2xl" />
-          <Icon :icon="item.icon" :size="40" />
+          <!-- <Icon :icon="item.icon" :size="40" /> -->
         </div>
         </div>
 
 
         <!-- <div class="p-2 px-4 flex justify-between">
         <!-- <div class="p-2 px-4 flex justify-between">

+ 10 - 3
src/views/statistics/components/condition.vue

@@ -12,7 +12,7 @@
     </div>
     </div>
 
 
     <div class="selct" style="display: inline-block; margin-right: 15px">
     <div class="selct" style="display: inline-block; margin-right: 15px">
-      <RangePicker v-model:value="selectTime" valueFormat="YYYY-MM-DD" :disabled-date="disabledDate" format="YYYY-MM-DD" @change="handleTime"/>
+      <RangePicker v-model:value="selectTime" @calendarChange="calendarPriceRangeChange" valueFormat="YYYY-MM-DD" :disabled-date="disabledDate" format="YYYY-MM-DD" @change="handleTime"/>
     </div>
     </div>
 
 
     <div class="selct" style="display: inline-block">
     <div class="selct" style="display: inline-block">
@@ -46,6 +46,7 @@ const props = defineProps({
 type RangeValue = [Dayjs, Dayjs];
 type RangeValue = [Dayjs, Dayjs];
 const picker = ref('date');
 const picker = ref('date');
 const value = ref(props.type ||'0');
 const value = ref(props.type ||'0');
+const selectPriceDate = ref(dayjs().subtract(6,'month').format('YYYY-MM-DD'))
 const selectTime = ref<RangeValue>([dayjs().subtract(6,'month').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]);
 const selectTime = ref<RangeValue>([dayjs().subtract(6,'month').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]);
 const options = ref<SelectProps['options']>([
 const options = ref<SelectProps['options']>([
   {
   {
@@ -63,8 +64,11 @@ const options = ref<SelectProps['options']>([
 ]);
 ]);
 const type = ref('0');
 const type = ref('0');
 const disabledDate = (current: Dayjs) => {
 const disabledDate = (current: Dayjs) => {
-        // Can not select days before today and today
-        return current && current < dayjs().subtract(2,'year').endOf('day');
+    if(selectPriceDate.value){
+        return current >dayjs(selectPriceDate.value).add(2,'year')  || current < dayjs(selectPriceDate.value).subtract(2,'year')
+    }else{
+        return false
+    }
 };
 };
 const typeOptions = ref<SelectProps['options']>([
 const typeOptions = ref<SelectProps['options']>([
   {
   {
@@ -76,6 +80,9 @@ const typeOptions = ref<SelectProps['options']>([
     label: props.name && props.name[1] || '累计',
     label: props.name && props.name[1] || '累计',
   },
   },
 ]);
 ]);
+function calendarPriceRangeChange(date){
+  selectPriceDate.value = date[0]
+}
 function handleData(val) {
 function handleData(val) {
   console.log('handleData',val)
   console.log('handleData',val)
   value.value = val
   value.value = val