Selaa lähdekoodia

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

zhengnaiwen_citu 4 kuukautta sitten
vanhempi
commit
a2be504ac7

+ 2 - 1
components.d.ts

@@ -29,6 +29,7 @@ declare module 'vue' {
     CtTextField: typeof import('./src/components/CtVuetify/CtTextField/index.vue')['default']
     CtTextField: typeof import('./src/components/CtVuetify/CtTextField/index.vue')['default']
     DatePicker: typeof import('./src/components/DatePicker/index.vue')['default']
     DatePicker: typeof import('./src/components/DatePicker/index.vue')['default']
     Echarts: typeof import('./src/components/Echarts/index.vue')['default']
     Echarts: typeof import('./src/components/Echarts/index.vue')['default']
+    ElCascader: typeof import('element-plus/es')['ElCascader']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     Empty: typeof import('./src/components/Empty/index.vue')['default']
     Empty: typeof import('./src/components/Empty/index.vue')['default']
     File: typeof import('./src/components/Upload/file.vue')['default']
     File: typeof import('./src/components/Upload/file.vue')['default']
@@ -42,7 +43,7 @@ declare module 'vue' {
     IndustryTypeCard: typeof import('./src/components/industryTypeCard/index.vue')['default']
     IndustryTypeCard: typeof import('./src/components/industryTypeCard/index.vue')['default']
     Info: typeof import('./src/components/Enterprise/info.vue')['default']
     Info: typeof import('./src/components/Enterprise/info.vue')['default']
     InitPay: typeof import('./src/components/personalRecharge/initPay.vue')['default']
     InitPay: typeof import('./src/components/personalRecharge/initPay.vue')['default']
-    Item: typeof import('./src/components/Position/item.vue')['default']
+    Item: typeof import('./src/components/PositionLongStrip/item.vue')['default']
     JobTypeCard: typeof import('./src/components/jobTypeCard/index.vue')['default']
     JobTypeCard: typeof import('./src/components/jobTypeCard/index.vue')['default']
     ListGroup: typeof import('./src/components/FormUI/nestedListGroup/components/listGroup.vue')['default']
     ListGroup: typeof import('./src/components/FormUI/nestedListGroup/components/listGroup.vue')['default']
     Loading: typeof import('./src/components/Loading/index.vue')['default']
     Loading: typeof import('./src/components/Loading/index.vue')['default']

+ 5 - 0
src/components/CtTable/index.vue

@@ -16,6 +16,7 @@
       :show-select="showSelect"
       :show-select="showSelect"
       :loading="loading"
       :loading="loading"
       :select-strategy="selectStrategy"
       :select-strategy="selectStrategy"
+      :return-object="returnObject"
       color="primary"
       color="primary"
       hover
       hover
       :height="height"
       :height="height"
@@ -123,6 +124,10 @@ defineProps({
     type: Boolean,
     type: Boolean,
     default: false
     default: false
   },
   },
+  returnObject: {
+    type: Boolean,
+    default: false
+  },
   selectStrategy: {
   selectStrategy: {
     type: String,
     type: String,
     default: 'single'
     default: 'single'

+ 2 - 2
src/layout/personal/navBar.vue

@@ -183,8 +183,8 @@ const navList = [
   // },
   // },
   { title: '门墩儿招聘', path: '/recruit/personal/recommend', noLeaving: true },
   { title: '门墩儿招聘', path: '/recruit/personal/recommend', noLeaving: true },
   { title: '门墩儿猎头', path: '/headhunting' },
   { title: '门墩儿猎头', path: '/headhunting' },
-  // { title: '门墩儿商城', path: '/pointsExchange' },
-  { title: '门墩儿商城', path: '/mall' },
+  { title: '门墩儿商城', path: '/pointsExchange' },
+  // { title: '门墩儿商城', path: '/mall' },
   { title: '火苗儿校企' },
   { title: '火苗儿校企' },
   // { title: '产业联合会' },
   // { title: '产业联合会' },
   // { title: '数据' },
   // { title: '数据' },

+ 1 - 1
src/version.js

@@ -1,2 +1,2 @@
 // 版本号
 // 版本号
-export const vue_version = 'v24.12.23.1257'
+export const vue_version = 'v24.12.24.1221'

+ 4 - 1
src/views/mall/components/details.vue

@@ -1,7 +1,10 @@
 <!-- 商品详情 -->
 <!-- 商品详情 -->
 <template>
 <template>
   <div class="default-width py-5" v-if="state.goodsInfo && Object.keys(state.goodsInfo).length">
   <div class="default-width py-5" v-if="state.goodsInfo && Object.keys(state.goodsInfo).length">
-    <v-btn class="mb-3" size="large" color="primary" variant="text" prepend-icon="mdi-chevron-triple-left" @click="router.go(-1)">返回上一页</v-btn>
+    <div class="d-flex justify-space-between">
+      <v-btn class="mb-3" size="large" color="primary" variant="text" prepend-icon="mdi-chevron-triple-left" @click="router.go(-1)">返回上一页</v-btn>
+      <v-btn class="mb-3" size="large" color="primary" variant="text" prepend-icon="mdi-account-circle-outline" to="/mall/user/order">我的订单</v-btn>
+    </div>
     <v-card class="carousel border-radius-8 white-bgc pa-5" style="width: 100%;">
     <v-card class="carousel border-radius-8 white-bgc pa-5" style="width: 100%;">
       <div class=" d-flex">
       <div class=" d-flex">
         <!-- 图片展示-轮播 -->
         <!-- 图片展示-轮播 -->

+ 50 - 173
src/views/mall/components/details/order/addressSelection.vue

@@ -1,42 +1,51 @@
 <!-- 下单界面,收货地址 or 自提门店的选择组件 -->
 <!-- 下单界面,收货地址 or 自提门店的选择组件 -->
 <template>
 <template>
-  <v-card class="allAddress" elevation="1" :style="state.isPickUp ? '' : 'padding-top:10rpx;'">
-    <!-- 情况一:收货地址的选择 -->
-    <div
-      class="address"
-      @click="onSelectAddress"
-      v-if="state.deliveryType === 1"
-      :style="state.isPickUp ? '' : 'border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;'"
-    >
-      <div class="addressCon" v-if="state.addressInfo.name">
-        <div class="name d-flex"
-          >{{ state.addressInfo.name }}
-          <div class="phone ml-3">{{ state.addressInfo.mobile }}</div>
-        </div>
-        <div class="d-flex mt-1">
-          <div class="default font-color" v-if="state.addressInfo.defaultStatus">[默认]</div>
-          <div class="line2 ml-3">
-            {{ state.addressInfo.areaName }} {{ state.addressInfo.detailAddress }}
+  <div>
+    <v-card class="allAddress" elevation="1" >
+      <div class="d-flex justify-space-between align-center">
+        <div
+          class="address py-4 px-5"
+          v-if="state.deliveryType === 1"
+        >
+          <div class="addressCon" v-if="state.addressInfo.name">
+            <div class="name d-flex"
+              >{{ state.addressInfo.name }}
+              <div class="phone ml-3">{{ state.addressInfo.mobile }}</div>
+            </div>
+            <div class="d-flex mt-1">
+              <div class="default font-color" v-if="state.addressInfo.defaultStatus">[默认]</div>
+              <div class="line2 ml-3">
+                {{ state.addressInfo.areaName }} {{ state.addressInfo.detailAddress }}
+              </div>
+            </div>
+          </div>
+          <div class="addressCon" v-else>
+            <div class="setaddress">设置收货地址</div>
+          </div>
+          <div class="iconfont">
+            <div class="ss-rest-button">
+              <div class="_icon-forward" />
+            </div>
           </div>
           </div>
         </div>
         </div>
-      </div>
-      <div class="addressCon" v-else>
-        <div class="setaddress">设置收货地址</div>
-      </div>
-      <div class="iconfont">
-        <div class="ss-rest-button">
-          <div class="_icon-forward" />
+        <div class="mx-1">
+          <v-btn color="primary" variant="text" @click="onSelectAddress">切换</v-btn>
         </div>
         </div>
       </div>
       </div>
-    </div>
-  </v-card>
+    </v-card>
+    <CtDialog :visible="selectAddress" titleClass="text-h6" :footer="true" :widthType="1" title="修改收货地址" @submit="handleSubmit" @close="selectAddress = false">
+      <div style="min-height: 60vh;">
+        <addressPage ref="addressPageRef" showSelect single returnObject></addressPage>
+      </div>
+    </CtDialog>
+  </div>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-  import { computed } from 'vue';
+  import { computed, ref } from 'vue';
   import { isEmpty1 } from '@/utils/is'
   import { isEmpty1 } from '@/utils/is'
-  // import Snackbar from '@/plugins/snackbar'
-
+  import addressPage from '@/views/mall/user/address'
+  import Snackbar from '@/plugins/snackbar'
   const props = defineProps({
   const props = defineProps({
     modelValue: {
     modelValue: {
       type: Object,
       type: Object,
@@ -63,18 +72,18 @@
     },
     },
   });
   });
 
 
+  const selectAddress = ref(false)
   // 选择地址
   // 选择地址
   function onSelectAddress() {
   function onSelectAddress() {
-    // let emitName = 'SELECT_ADDRESS';
-    // let addressPage = '/pages/user/address/list?type=select';
-    // if (state.value.deliveryType === 2) {
-    //   emitName = 'SELECT_PICK_UP_INFO';
-    //   addressPage = '/pages/user/goods_details_store/index';
-    // }
-    // uni.$once(emitName, (e) => {
-    //   changeConsignee(e.addressInfo);
-    // });
-    // sheep.$router.go(addressPage);
+    selectAddress.value = true
+  }
+  
+  const addressPageRef = ref()
+  const handleSubmit = () => {
+    const selected = addressPageRef.value?.getSelected() || []
+    if (!selected?.length) return Snackbar.warning('请选择收货地址')
+    changeConsignee(selected[0])
+    selectAddress.value = false
   }
   }
 
 
   // 更改收货人地址&计算订单信息
   // 更改收货人地址&计算订单信息
@@ -89,149 +98,17 @@
     }
     }
   }
   }
 
 
-  // 收货方式切换
-  const switchDeliveryType = (type) => {
-    state.value.deliveryType = type;
-  };
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
   .allAddress .font-color {
   .allAddress .font-color {
     color: #e93323 !important;
     color: #e93323 !important;
   }
   }
-  .line2 {
-    width: 504rpx;
-  }
-  .textR {
-    text-align: right;
-  }
-
-  .line {
-    width: 100%;
-    height: 3rpx;
-  }
-
-  .line image {
-    width: 100%;
-    height: 100%;
-    display: block;
-  }
-
-  .address {
-    background-color: #fff;
-    box-sizing: border-box;
-    padding: 12px;
-    border-radius: 10px;
-  }
-
-  .address .addressCon {
-    width: 596rpx;
-    font-size: 26rpx;
-    color: #666;
-  }
 
 
   .address .addressCon .name {
   .address .addressCon .name {
-    font-size: 30rpx;
+    font-size: 16px;
     color: #282828;
     color: #282828;
     font-weight: bold;
     font-weight: bold;
-    margin-bottom: 10rpx;
-  }
-
-  .address .addressCon .name .phone {
-    margin-left: 50rpx;
-  }
-
-  .address .addressCon .default {
-    margin-right: 12rpx;
-  }
-
-  .address .addressCon .setaddress {
-    color: #333;
-    font-size: 28rpx;
-  }
-
-  .address .iconfont {
-    font-size: 35rpx;
-    color: #707070;
-  }
-
-  .allAddress {
-    width: 100%;
-    padding-top: 100rpx;
-    padding-bottom: 10rpx;
-  }
-
-  .allAddress .nav {
-    width: 690rpx;
-    margin: 0 auto;
-  }
-
-  .allAddress .nav .item {
-    width: 334rpx;
-  }
-
-  .allAddress .nav .item.on {
-    position: relative;
-    width: 230rpx;
-  }
-
-  .allAddress .nav .item.on::before {
-    position: absolute;
-    bottom: 0;
-    content: '快递配送';
-    font-size: 28rpx;
-    display: block;
-    height: 0;
-    width: 336rpx;
-    border-width: 0 20rpx 80rpx 0;
-    border-style: none solid solid;
-    border-color: transparent transparent #fff;
-    z-index: 2;
-    border-radius: 14rpx 36rpx 0 0;
-    text-align: center;
-    line-height: 80rpx;
-  }
-
-  .allAddress .nav .item:nth-of-type(2).on::before {
-    content: '到店自提';
-    border-width: 0 0 80rpx 20rpx;
-    border-radius: 36rpx 14rpx 0 0;
-  }
-
-  .allAddress .nav .item.on2 {
-    position: relative;
-  }
-
-  .allAddress .nav .item.on2::before {
-    position: absolute;
-    bottom: 0;
-    content: '到店自提';
-    font-size: 28rpx;
-    display: block;
-    height: 0;
-    width: 401rpx;
-    border-width: 0 0 60rpx 60rpx;
-    border-style: none solid solid;
-    border-color: transparent transparent #f7c1bd;
-    border-radius: 36rpx 14rpx 0 0;
-    text-align: center;
-    line-height: 60rpx;
-  }
-
-  .allAddress .nav .item:nth-of-type(1).on2::before {
-    content: '快递配送';
-    border-width: 0 60rpx 60rpx 0;
-    border-radius: 14rpx 36rpx 0 0;
-  }
-
-  .allAddress .address {
-    width: 690rpx;
-    max-height: 180rpx;
-    margin: 0 auto;
-  }
-
-  .allAddress .line {
-    width: 100%;
-    margin: 0 auto;
+    // margin-bottom: 10px;
   }
   }
 </style>
 </style>

+ 5 - 1
src/views/mall/components/details/order/confirm.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div>
   <div>
     <!-- 头部地址选择【配送地址】【自提地址】 -->
     <!-- 头部地址选择【配送地址】【自提地址】 -->
-    <AddressSelection v-model="addressState" class="mb-3" />
+    <AddressSelection v-model="addressState" class="addressBox" />
     
     
     <!-- 购买的商品信息 -->
     <!-- 购买的商品信息 -->
     <div class="goodsListBox mb-3">
     <div class="goodsListBox mb-3">
@@ -327,6 +327,10 @@
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+  .addressBox {
+    // border: 1px solid #000;
+    margin-bottom: 20px;
+  }
   .goodsListBox {
   .goodsListBox {
     background: linear-gradient(to bottom, #e93323 0%, #e93323 100%);
     background: linear-gradient(to bottom, #e93323 0%, #e93323 100%);
     // background: linear-gradient(to bottom, var(--v-primary-base) 0%, var(--v-primary-base) 100%);
     // background: linear-gradient(to bottom, var(--v-primary-base) 0%, var(--v-primary-base) 100%);

+ 27 - 0
src/views/mall/user/address/index.vue

@@ -7,8 +7,11 @@
     :elevation="0"
     :elevation="0"
     :isTools="true"
     :isTools="true"
     :showPage="false"
     :showPage="false"
+    :showSelect="props.showSelect"
+    :returnObject="props.returnObject"
     itemKey="id"
     itemKey="id"
     @add="handleAdd"
     @add="handleAdd"
+    @selected="handleSelected"
   >
   >
     <template #actions="{ item }">
     <template #actions="{ item }">
       <v-btn color="primary" @click.stop="handleEdit(item)" variant="text">编辑</v-btn>
       <v-btn color="primary" @click.stop="handleEdit(item)" variant="text">编辑</v-btn>
@@ -54,6 +57,17 @@ import { getMallUserAddressList, deleteMallUserAddress, createMallUserAddress, u
 import Confirm from '@/plugins/confirm'
 import Confirm from '@/plugins/confirm'
 import { getDict } from '@/hooks/web/useDictionaries'
 import { getDict } from '@/hooks/web/useDictionaries'
 import Snackbar from '@/plugins/snackbar'
 import Snackbar from '@/plugins/snackbar'
+const props = defineProps({
+  showSelect: {
+    type: Boolean,
+    default: false,
+  },
+  returnObject: {
+    type: Boolean,
+    default: false,
+  }
+})
+console.log('showSelect:', props.showSelect)
 
 
 const isAdd = ref(true)
 const isAdd = ref(true)
 const editId = ref(null)
 const editId = ref(null)
@@ -118,6 +132,15 @@ getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
   formItems.value.options.find(e => e.key === 'areaId').items = data
   formItems.value.options.find(e => e.key === 'areaId').items = data
 })
 })
 
 
+const selected = ref([])
+const handleSelected = (e) => {
+  selected.value = e
+}
+
+const getSelected = () => {
+  return selected.value
+}
+
 // 获取地址列表
 // 获取地址列表
 const getAddressList = async () => {
 const getAddressList = async () => {
   const data = await getMallUserAddressList()
   const data = await getMallUserAddressList()
@@ -189,6 +212,10 @@ const handleDelete = (item) => {
     await getAddressList()
     await getAddressList()
   })
   })
 }
 }
+
+defineExpose({
+  getSelected
+})
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">

+ 1 - 0
src/views/mall/user/order/detail.vue

@@ -15,6 +15,7 @@
               <p class="my-3">下单时间:{{ timesTampChange(order.createTime) }}</p>
               <p class="my-3">下单时间:{{ timesTampChange(order.createTime) }}</p>
               <p>支付时间:{{ timesTampChange(order.payTime) }}</p>
               <p>支付时间:{{ timesTampChange(order.payTime) }}</p>
               <p class="mt-3">支付方式:{{ order.payChannelName }}</p>
               <p class="mt-3">支付方式:{{ order.payChannelName }}</p>
+              <p class="mt-3">订单备注:{{ order.userRemark }}</p>
             </div>
             </div>
           </v-card>
           </v-card>
         </v-col>
         </v-col>