Переглянути джерело

修复订单价格显示异常

学习?学个屁 3 тижнів тому
батько
коміт
7fc60a6f63

+ 1 - 1
.env

@@ -5,7 +5,7 @@ VITE_PORT = 3100
 VITE_GLOB_APP_TITLE = 中数未来
 
 # 简称,此变量只能是字符/下划线
-VITE_GLOB_APP_SHORT_NAME = zhonshuweilai
+VITE_GLOB_APP_SHORT_NAME = zhongshuweilai
 
 # 单点登录服务端地址
 VITE_GLOB_APP_CAS_BASE_URL=http://cas.test.com:8443/cas


+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "zhonshuweilai-vue3",
+  "name": "zhongshuweilai-vue3",
   "version": "3.8.1",
   "author": {
     "name": "中数未来",

BIN
public/logo.png


BIN
public/resource/img/logo.png


BIN
src/assets/images/logo.png


BIN
src/assets/loginmini/icon/logo.png


+ 13 - 4
src/views/businessManagement/courses/publishcourses.vue

@@ -29,8 +29,8 @@
 
         <template #formFooter>
           <div class="w-full flex items-center justify-center my-3" v-if="Number(route.query.type) != 2">
-            <a-button type="primary" @click="save" class="mr-2" :loading="isSubmit"> 保存 </a-button>
-            <a-button type="error" @click="back" class="mr-2"> 关闭 </a-button>
+            <a-button type="primary" @click="save" class="mr-2" :loading="isSubmit"> 保存</a-button>
+            <a-button type="error" @click="back" class="mr-2"> 关闭</a-button>
           </div>
         </template>
       </BasicForm>
@@ -54,6 +54,7 @@
   import { useUserStore } from '/@/store/modules/user';
   import { storeToRefs } from 'pinia';
   import { areAllItemsAllFieldsFilled } from '/@/utils';
+
   const { close: closeTab } = useTabs();
   const { userInfo } = storeToRefs(useUserStore());
   const route = useRoute();
@@ -64,6 +65,7 @@
   });
   const viewDataSport = ref<any>({});
   const customTableData = ref({});
+
   async function isView() {
     if (Number(route.query.type) != 0) {
       await getDataList();
@@ -80,25 +82,30 @@
       });
     }
   }
+
   isView();
+
   async function getDataList() {
     const res = await getDetaile({ id: route.query.id });
     // viewDataSportList.value = res;\
-    customTableData.value = res.priceRulesList.map((it) => {
+    customTableData.value = res.priceRulesList.map((it, index) => {
       return {
         name: it.name,
         time: [it.startTime, it.endTime],
         id: it.id,
         coursesId: it.coursesId,
+        sort: index + 1,
       };
     });
     viewDataSport.value = res.courses;
   }
 
   const isSubmit = ref(false);
+
   async function back() {
     await closeTab();
   }
+
   async function save() {
     await validate();
     const form = await getFieldsValue();
@@ -121,14 +128,16 @@
       isSubmit.value = false;
     }
   }
+
   function transformData(data) {
-    return data.map((it) => {
+    return data.map((it, index) => {
       return {
         startTime: unref(it.editValueRefs.time)[0],
         endTime: unref(it.editValueRefs.time)[1],
         name: unref(it.editValueRefs.name),
         id: typeof it.id == 'string' ? it.id : null,
         coursesId: it.coursesId,
+        sort: index + 1,
       };
     });
   }

+ 2 - 5
src/views/informationManagement/hot/components/hotModal.vue

@@ -48,12 +48,9 @@
     try {
       let values = await validate();
       setModalProps({ confirmLoading: true });
-      const Time = values.Time.split(',');
-      Time[1]=dayjs(Time[1]).format('YYYY-MM-DD');
-      Time[3]=dayjs(Time[3]).format('YYYY-MM-DD');
-      console.log(Time[1],'提交时间')
+      const Time = values.Time;
       //提交表单
-      await saveOrUpdate({ ...values, startTime: Time[1], endTime: Time[3] }, isUpdate.value);
+      await saveOrUpdate({ ...values, startTime: dayjs(Time[0]).format('YYYY-MM-DD'), endTime: dayjs(Time[1]).format('YYYY-MM-DD') }, isUpdate.value);
       //关闭弹窗
       closeModal();
       //刷新列表

+ 13 - 0
src/views/informationManagement/hot/hot.data.ts

@@ -81,9 +81,22 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       format: 'YYYY-MM-DD',
       valueFormat: 'YYYY-MM-DD',
+      valueType: 'Date',
+      // style: { width: '200px' },
     },
   },
   // {
+  //   label: '',
+  //   field: 'endTime',
+  //   component: 'DatePicker',
+  //   required: true,
+  //   componentProps: {
+  //     format: 'YYYY-MM-DD',
+  //     valueFormat: 'YYYY-MM-DD',
+  //     style: { width: '200px' },
+  //   },
+  // },
+  // {
   //   label: '搜索次数',
   //   field: 'searchCount',
   //   required: true,

+ 5 - 1
src/views/orderManagement/order/index.vue

@@ -31,10 +31,14 @@
     <template #price="{ record }">
       <div class="h-20px"></div>
       <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in record.orderProInfoList" :key="item.id">
-        <div class="flex items-center">
+        <div class="flex items-center" v-if="item.price>0">
           <div>¥{{ item.price || 0 }}</div>
           <div class="line-through ml-3 text-gray">¥{{ item.originalPrice || 0 }}</div>
         </div>
+        <div class="flex items-center" v-else>
+          <div>¥{{ item.originalPrice || 0 }}</div>
+<!--          <div class="line-through ml-3 text-gray">¥{{ item.originalPrice || 0 }}</div>-->
+        </div>
         <div class="text-gray">x{{ item.quantity }}</div>
       </div>
     </template>